diff --git a/backend/Makefile b/backend/Makefile index a7468d70..4b23a5d3 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -3,6 +3,9 @@ # Default target executed when no arguments are given to make. all: help +build_ui: + cd ../frontend && yarn build && cp -r dist/* ../backend/ui + ###################### # TESTING AND COVERAGE ###################### diff --git a/backend/app/api/__init__.py b/backend/app/api/__init__.py new file mode 100644 index 00000000..25ecacf2 --- /dev/null +++ b/backend/app/api/__init__.py @@ -0,0 +1,23 @@ +from fastapi import APIRouter + +from app.api.assistants import router as assistants_router +from app.api.runs import router as runs_router +from app.api.threads import router as threads_router + +router = APIRouter() + +router.include_router( + assistants_router, + prefix="/assistants", + tags=["assistants"], +) +router.include_router( + runs_router, + prefix="/runs", + tags=["runs"], +) +router.include_router( + threads_router, + prefix="/threads", + tags=["threads"], +) diff --git a/backend/app/api/assistants.py b/backend/app/api/assistants.py new file mode 100644 index 00000000..45d7e53f --- /dev/null +++ b/backend/app/api/assistants.py @@ -0,0 +1,87 @@ +from typing import Annotated, List, Optional +from uuid import uuid4 + +from fastapi import APIRouter, HTTPException, Path, Query +from pydantic import BaseModel, Field + +import app.storage as storage +from app.schema import Assistant, AssistantWithoutUserId, OpengptsUserId + +router = APIRouter() + +FEATURED_PUBLIC_ASSISTANTS = [ + "ba721964-b7e4-474c-b817-fb089d94dc5f", + "dc3ec482-aafc-4d90-8a1a-afb9b2876cde", +] + + +class AssistantPayload(BaseModel): + """Payload for creating an assistant.""" + + name: str = Field(..., description="The name of the assistant.") + config: dict = Field(..., description="The assistant config.") + public: bool = Field(default=False, description="Whether the assistant is public.") + + +AssistantID = Annotated[str, Path(description="The ID of the assistant.")] + + +@router.get("/") +def list_assistants(opengpts_user_id: OpengptsUserId) -> List[AssistantWithoutUserId]: + """List all assistants for the current user.""" + return storage.list_assistants(opengpts_user_id) + + +@router.get("/public/") +def list_public_assistants( + shared_id: Annotated[ + Optional[str], Query(description="ID of a publicly shared assistant.") + ] = None, +) -> List[AssistantWithoutUserId]: + """List all public assistants.""" + return storage.list_public_assistants( + FEATURED_PUBLIC_ASSISTANTS + ([shared_id] if shared_id else []) + ) + + +@router.get("/{aid}") +def get_asistant( + opengpts_user_id: OpengptsUserId, + aid: AssistantID, +) -> Assistant: + """Get an assistant by ID.""" + assistant = storage.get_assistant(opengpts_user_id, aid) + if not assistant: + raise HTTPException(status_code=404, detail="Assistant not found") + return assistant + + +@router.post("") +def create_assistant( + opengpts_user_id: OpengptsUserId, + payload: AssistantPayload, +) -> Assistant: + """Create an assistant.""" + return storage.put_assistant( + opengpts_user_id, + str(uuid4()), + name=payload.name, + config=payload.config, + public=payload.public, + ) + + +@router.put("/{aid}") +def upsert_assistant( + opengpts_user_id: OpengptsUserId, + aid: AssistantID, + payload: AssistantPayload, +) -> Assistant: + """Create or update an assistant.""" + return storage.put_assistant( + opengpts_user_id, + aid, + name=payload.name, + config=payload.config, + public=payload.public, + ) diff --git a/backend/app/api/runs.py b/backend/app/api/runs.py new file mode 100644 index 00000000..abeada0c --- /dev/null +++ b/backend/app/api/runs.py @@ -0,0 +1,213 @@ +import asyncio +import json +from typing import AsyncIterator, Sequence +from uuid import uuid4 + +import langsmith.client +import orjson +from fastapi import APIRouter, BackgroundTasks, HTTPException, Request +from fastapi.exceptions import RequestValidationError +from gizmo_agent import agent +from langchain.pydantic_v1 import ValidationError +from langchain.schema.messages import AnyMessage, FunctionMessage +from langchain.schema.output import ChatGeneration +from langchain.schema.runnable import RunnableConfig +from langserve.callbacks import AsyncEventAggregatorCallback +from langserve.schema import FeedbackCreateRequest +from langserve.serialization import WellKnownLCSerializer +from langserve.server import _get_base_run_id_as_str, _unpack_input +from langsmith.utils import tracing_is_enabled +from pydantic import BaseModel, Field +from sse_starlette import EventSourceResponse + +from app.schema import OpengptsUserId +from app.storage import get_assistant, get_thread_messages, public_user_id +from app.stream import StreamMessagesHandler + +router = APIRouter() + + +_serializer = WellKnownLCSerializer() + + +class AgentInput(BaseModel): + """An input into an agent.""" + + messages: Sequence[AnyMessage] = Field(default_factory=list) + + +class CreateRunPayload(BaseModel): + """Payload for creating a run.""" + + assistant_id: str + thread_id: str + input: AgentInput = Field(default_factory=AgentInput) + + +async def _run_input_and_config(request: Request, opengpts_user_id: OpengptsUserId): + try: + body = await request.json() + except json.JSONDecodeError: + raise RequestValidationError(errors=["Invalid JSON body"]) + assistant, public_assistant, state = await asyncio.gather( + asyncio.get_running_loop().run_in_executor( + None, get_assistant, opengpts_user_id, body["assistant_id"] + ), + asyncio.get_running_loop().run_in_executor( + None, get_assistant, public_user_id, body["assistant_id"] + ), + asyncio.get_running_loop().run_in_executor( + None, get_thread_messages, opengpts_user_id, body["thread_id"] + ), + ) + assistant = assistant or public_assistant + if not assistant: + raise HTTPException(status_code=404, detail="Assistant not found") + config: RunnableConfig = { + **assistant["config"], + "configurable": { + **assistant["config"]["configurable"], + "user_id": opengpts_user_id, + "thread_id": body["thread_id"], + "assistant_id": body["assistant_id"], + }, + } + try: + input_ = _unpack_input(agent.get_input_schema(config).validate(body["input"])) + except ValidationError as e: + raise RequestValidationError(e.errors(), body=body) + + return input_, config, state["messages"] + + +@router.post("") +async def create_run( + request: Request, + payload: CreateRunPayload, # for openapi docs + opengpts_user_id: OpengptsUserId, + background_tasks: BackgroundTasks, +): + """Create a run.""" + input_, config, messages = await _run_input_and_config(request, opengpts_user_id) + background_tasks.add_task(agent.ainvoke, input_, config) + return {"status": "ok"} # TODO add a run id + + +@router.post("/stream") +async def stream_run( + request: Request, + payload: CreateRunPayload, # for openapi docs + opengpts_user_id: OpengptsUserId, +): + """Create a run.""" + input_, config, messages = await _run_input_and_config(request, opengpts_user_id) + streamer = StreamMessagesHandler(messages + input_["messages"]) + event_aggregator = AsyncEventAggregatorCallback() + config["callbacks"] = [streamer, event_aggregator] + + # Call the runnable in streaming mode, + # add each chunk to the output stream + async def consume_astream() -> None: + try: + async for chunk in agent.astream(input_, config): + await streamer.send_stream.send(chunk) + # hack: function messages aren't generated by chat model + # so the callback handler doesn't know about them + if chunk["messages"]: + message = chunk["messages"][-1] + if isinstance(message, FunctionMessage): + streamer.output[uuid4()] = ChatGeneration(message=message) + except Exception as e: + await streamer.send_stream.send(e) + finally: + await streamer.send_stream.aclose() + + # Start the runnable in the background + task = asyncio.create_task(consume_astream()) + + # Consume the stream into an EventSourceResponse + async def _stream() -> AsyncIterator[dict]: + has_sent_metadata = False + + async for chunk in streamer.receive_stream: + if isinstance(chunk, BaseException): + yield { + "event": "error", + # Do not expose the error message to the client since + # the message may contain sensitive information. + # We'll add client side errors for validation as well. + "data": orjson.dumps( + {"status_code": 500, "message": "Internal Server Error"} + ).decode(), + } + raise chunk + else: + if not has_sent_metadata and event_aggregator.callback_events: + yield { + "event": "metadata", + "data": orjson.dumps( + {"run_id": _get_base_run_id_as_str(event_aggregator)} + ).decode(), + } + has_sent_metadata = True + + yield { + # EventSourceResponse expects a string for data + # so after serializing into bytes, we decode into utf-8 + # to get a string. + "data": _serializer.dumps(chunk).decode("utf-8"), + "event": "data", + } + + # Send an end event to signal the end of the stream + yield {"event": "end"} + # Wait for the runnable to finish + await task + + return EventSourceResponse(_stream()) + + +@router.get("/input_schema") +async def input_schema() -> dict: + """Return the input schema of the runnable.""" + return agent.get_input_schema().schema() + + +@router.get("/output_schema") +async def output_schema() -> dict: + """Return the output schema of the runnable.""" + return agent.get_output_schema().schema() + + +@router.get("/config_schema") +async def config_schema() -> dict: + """Return the config schema of the runnable.""" + return agent.config_schema().schema() + + +if tracing_is_enabled(): + langsmith_client = langsmith.client.Client() + + @router.post("/feedback") + def create_run_feedback(feedback_create_req: FeedbackCreateRequest) -> dict: + """ + Send feedback on an individual run to langsmith + + Note that a successful response means that feedback was successfully + submitted. It does not guarantee that the feedback is recorded by + langsmith. Requests may be silently rejected if they are + unauthenticated or invalid by the server. + """ + + langsmith_client.create_feedback( + feedback_create_req.run_id, + feedback_create_req.key, + score=feedback_create_req.score, + value=feedback_create_req.value, + comment=feedback_create_req.comment, + source_info={ + "from_langserve": True, + }, + ) + + return {"status": "ok"} diff --git a/backend/app/api/threads.py b/backend/app/api/threads.py new file mode 100644 index 00000000..a41632c5 --- /dev/null +++ b/backend/app/api/threads.py @@ -0,0 +1,93 @@ +from typing import Annotated, List, Sequence +from uuid import uuid4 + +from fastapi import APIRouter, HTTPException, Path +from langchain.schema.messages import AnyMessage +from pydantic import BaseModel, Field + +import app.storage as storage +from app.schema import OpengptsUserId, Thread, ThreadWithoutUserId + +router = APIRouter() + + +ThreadID = Annotated[str, Path(description="The ID of the thread.")] + + +class ThreadPutRequest(BaseModel): + """Payload for creating a thread.""" + + name: str = Field(..., description="The name of the thread.") + assistant_id: str = Field(..., description="The ID of the assistant to use.") + + +class ThreadMessagesPostRequest(BaseModel): + """Payload for adding messages to a thread.""" + + messages: Sequence[AnyMessage] + + +@router.get("/") +def list_threads(opengpts_user_id: OpengptsUserId) -> List[ThreadWithoutUserId]: + """List all threads for the current user.""" + return storage.list_threads(opengpts_user_id) + + +@router.get("/{tid}/messages") +def get_thread_messages( + opengpts_user_id: OpengptsUserId, + tid: ThreadID, +): + """Get all messages for a thread.""" + return storage.get_thread_messages(opengpts_user_id, tid) + + +@router.post("/{tid}/messages") +def add_thread_messages( + opengpts_user_id: OpengptsUserId, + tid: ThreadID, + payload: ThreadMessagesPostRequest, +): + """Add messages to a thread.""" + return storage.post_thread_messages(opengpts_user_id, tid, payload.messages) + + +@router.get("/{tid}") +def get_thread( + opengpts_user_id: OpengptsUserId, + tid: ThreadID, +) -> Thread: + """Get a thread by ID.""" + thread = storage.get_thread(opengpts_user_id, tid) + if not thread: + raise HTTPException(status_code=404, detail="Thread not found") + return thread + + +@router.post("") +def create_thread( + opengpts_user_id: OpengptsUserId, + thread_put_request: ThreadPutRequest, +) -> Thread: + """Create a thread.""" + return storage.put_thread( + opengpts_user_id, + str(uuid4()), + assistant_id=thread_put_request.assistant_id, + name=thread_put_request.name, + ) + + +@router.put("/{tid}") +def upsert_thread( + opengpts_user_id: OpengptsUserId, + tid: ThreadID, + thread_put_request: ThreadPutRequest, +) -> Thread: + """Update a thread.""" + return storage.put_thread( + opengpts_user_id, + tid, + assistant_id=thread_put_request.assistant_id, + name=thread_put_request.name, + ) diff --git a/backend/app/schema.py b/backend/app/schema.py new file mode 100644 index 00000000..336493cf --- /dev/null +++ b/backend/app/schema.py @@ -0,0 +1,57 @@ +from datetime import datetime +from typing import Annotated + +from fastapi import Cookie +from typing_extensions import TypedDict + + +class AssistantWithoutUserId(TypedDict): + """Assistant model.""" + + assistant_id: str + """The ID of the assistant.""" + name: str + """The name of the assistant.""" + config: dict + """The assistant config.""" + updated_at: datetime + """The last time the assistant was updated.""" + public: bool + """Whether the assistant is public.""" + + +class Assistant(AssistantWithoutUserId): + """Assistant model.""" + + user_id: str + """The ID of the user that owns the assistant.""" + + +class ThreadWithoutUserId(TypedDict): + thread_id: str + """The ID of the thread.""" + assistant_id: str + """The assistant that was used in conjunction with this thread.""" + name: str + """The name of the thread.""" + updated_at: datetime + """The last time the thread was updated.""" + + +class Thread(ThreadWithoutUserId): + """Thread model.""" + + user_id: str + """The ID of the user that owns the thread.""" + + +OpengptsUserId = Annotated[ + str, + Cookie( + description=( + "A cookie that identifies the user. This is not an authentication " + "mechanism that should be used in an actual production environment that " + "contains sensitive information." + ) + ), +] diff --git a/backend/app/server.py b/backend/app/server.py index 193bcce8..2fa5e436 100644 --- a/backend/app/server.py +++ b/backend/app/server.py @@ -1,118 +1,29 @@ from pathlib import Path -from typing import Annotated, Optional import orjson -from fastapi import Cookie, FastAPI, Form, Request, UploadFile +from fastapi import FastAPI, Form, UploadFile from fastapi.staticfiles import StaticFiles -from gizmo_agent import agent, ingest_runnable -from langchain.schema.runnable import RunnableConfig -from langserve import add_routes -from typing_extensions import TypedDict +from gizmo_agent import ingest_runnable -from app.storage import ( - get_thread_messages, - list_assistants, - list_public_assistants, - list_threads, - put_assistant, - put_thread, -) +from app.api import router as api_router -app = FastAPI() +app = FastAPI(title="OpenGPTs API") -FEATURED_PUBLIC_ASSISTANTS = [ - "ba721964-b7e4-474c-b817-fb089d94dc5f", - "dc3ec482-aafc-4d90-8a1a-afb9b2876cde", -] # Get root of app, used to point to directory containing static files ROOT = Path(__file__).parent.parent -def attach_user_id_to_config( - config: RunnableConfig, - request: Request, -) -> RunnableConfig: - config["configurable"]["user_id"] = request.cookies["opengpts_user_id"] - return config +app.include_router(api_router) -add_routes( - app, - agent, - config_keys=["configurable"], - per_req_config_modifier=attach_user_id_to_config, - enable_feedback_endpoint=True, -) - - -@app.post("/ingest") -def ingest_endpoint(files: list[UploadFile], config: str = Form(...)): +@app.post("/ingest", description="Upload files to the given assistant.") +def ingest_files(files: list[UploadFile], config: str = Form(...)) -> None: + """Ingest a list of files.""" config = orjson.loads(config) return ingest_runnable.batch([file.file for file in files], config) -@app.get("/assistants/") -def list_assistants_endpoint(opengpts_user_id: Annotated[str, Cookie()]): - """List all assistants for the current user.""" - return list_assistants(opengpts_user_id) - - -@app.get("/assistants/public/") -def list_public_assistants_endpoint(shared_id: Optional[str] = None): - return list_public_assistants( - FEATURED_PUBLIC_ASSISTANTS + ([shared_id] if shared_id else []) - ) - - -class AssistantPayload(TypedDict): - name: str - config: dict - public: bool - - -@app.put("/assistants/{aid}") -def put_assistant_endpoint( - aid: str, - payload: AssistantPayload, - opengpts_user_id: Annotated[str, Cookie()], -): - return put_assistant( - opengpts_user_id, - aid, - name=payload["name"], - config=payload["config"], - public=payload["public"], - ) - - -@app.get("/threads/") -def list_threads_endpoint(opengpts_user_id: Annotated[str, Cookie()]): - return list_threads(opengpts_user_id) - - -@app.get("/threads/{tid}/messages") -def get_thread_messages_endpoint(opengpts_user_id: Annotated[str, Cookie()], tid: str): - return get_thread_messages(opengpts_user_id, tid) - - -class ThreadPayload(TypedDict): - name: str - assistant_id: str - - -@app.put("/threads/{tid}") -def put_thread_endpoint( - opengpts_user_id: Annotated[str, Cookie()], tid: str, payload: ThreadPayload -): - return put_thread( - opengpts_user_id, - tid, - assistant_id=payload["assistant_id"], - name=payload["name"], - ) - - app.mount("", StaticFiles(directory=str(ROOT / "ui"), html=True), name="ui") if __name__ == "__main__": diff --git a/backend/app/storage.py b/backend/app/storage.py index 2ea37c3a..10b0b559 100644 --- a/backend/app/storage.py +++ b/backend/app/storage.py @@ -1,34 +1,34 @@ import os from datetime import datetime +from typing import List, Sequence import orjson -from langchain.schema.messages import messages_from_dict +from agent_executor.checkpoint import RedisCheckpoint +from langchain.schema.messages import AnyMessage from langchain.utilities.redis import get_client +from permchain.channels import Topic +from permchain.channels.base import ChannelsManager, create_checkpoint from redis.client import Redis as RedisType +from app.schema import Assistant, AssistantWithoutUserId, Thread, ThreadWithoutUserId -def assistants_list_key(user_id: str): + +def assistants_list_key(user_id: str) -> str: return f"opengpts:{user_id}:assistants" -def assistant_key(user_id: str, assistant_id: str): +def assistant_key(user_id: str, assistant_id: str) -> str: return f"opengpts:{user_id}:assistant:{assistant_id}" -def threads_list_key(user_id: str): +def threads_list_key(user_id: str) -> str: return f"opengpts:{user_id}:threads" -def thread_key(user_id: str, thread_id: str): +def thread_key(user_id: str, thread_id: str) -> str: return f"opengpts:{user_id}:thread:{thread_id}" -def thread_messages_key(user_id: str, thread_id: str): - # Needs to match key used by RedisChatMessageHistory - # TODO we probably want to align this with the others - return f"message_store:{user_id}:{thread_id}" - - assistant_hash_keys = ["assistant_id", "name", "config", "updated_at", "public"] thread_hash_keys = ["assistant_id", "thread_id", "name", "updated_at"] public_user_id = "eef39817-c173-4eb6-8be4-f77cf37054fb" @@ -50,7 +50,8 @@ def _get_redis_client() -> RedisType: return get_client(url) -def list_assistants(user_id: str): +def list_assistants(user_id: str) -> List[Assistant]: + """List all assistants for the current user.""" client = _get_redis_client() ids = [orjson.loads(id) for id in client.smembers(assistants_list_key(user_id))] with client.pipeline() as pipe: @@ -60,7 +61,17 @@ def list_assistants(user_id: str): return [load(assistant_hash_keys, values) for values in assistants] -def list_public_assistants(assistant_ids: list[str]): +def get_assistant(user_id: str, assistant_id: str) -> Assistant | None: + """Get an assistant by ID.""" + client = _get_redis_client() + values = client.hmget(assistant_key(user_id, assistant_id), *assistant_hash_keys) + return load(assistant_hash_keys, values) if any(values) else None + + +def list_public_assistants( + assistant_ids: Sequence[str] +) -> List[AssistantWithoutUserId]: + """List all the public assistants.""" if not assistant_ids: return [] client = _get_redis_client() @@ -84,10 +95,22 @@ def list_public_assistants(assistant_ids: list[str]): def put_assistant( user_id: str, assistant_id: str, *, name: str, config: dict, public: bool = False -): - saved = { - "user_id": user_id, - "assistant_id": assistant_id, +) -> Assistant: + """Modify an assistant. + + Args: + user_id: The user ID. + assistant_id: The assistant ID. + name: The assistant name. + config: The assistant config. + public: Whether the assistant is public. + + Returns: + return the assistant model if no exception is raised. + """ + saved: Assistant = { + "user_id": user_id, # TODO(Nuno): Could we remove this? + "assistant_id": assistant_id, # TODO(Nuno): remove this? "name": name, "config": config, "updated_at": datetime.utcnow(), @@ -104,7 +127,8 @@ def put_assistant( return saved -def list_threads(user_id: str): +def list_threads(user_id: str) -> List[ThreadWithoutUserId]: + """List all threads for the current user.""" client = _get_redis_client() ids = [orjson.loads(id) for id in client.smembers(threads_list_key(user_id))] with client.pipeline() as pipe: @@ -114,20 +138,48 @@ def list_threads(user_id: str): return [load(thread_hash_keys, values) for values in threads] -def get_thread_messages(user_id: str, thread_id: str): +def get_thread(user_id: str, thread_id: str) -> Thread | None: + """Get a thread by ID.""" client = _get_redis_client() - messages = client.lrange(thread_messages_key(user_id, thread_id), 0, -1) - return { - "messages": [ - m.dict() - for m in messages_from_dict([orjson.loads(m) for m in messages[::-1]]) - ], - } + values = client.hmget(thread_key(user_id, thread_id), *thread_hash_keys) + return load(thread_hash_keys, values) if any(values) else None -def put_thread(user_id: str, thread_id: str, *, assistant_id: str, name: str): - saved = { - "user_id": user_id, +def get_thread_messages(user_id: str, thread_id: str): + """Get all messages for a thread.""" + client = RedisCheckpoint() + checkpoint = client.get( + {"configurable": {"user_id": user_id, "thread_id": thread_id}} + ) + # TODO replace hardcoded messages channel with + # channel extracted from agent + with ChannelsManager( + {"messages": Topic(AnyMessage, accumulate=True)}, checkpoint + ) as channels: + return {k: v.get() for k, v in channels.items()} + + +def post_thread_messages(user_id: str, thread_id: str, messages: Sequence[AnyMessage]): + """Add messages to a thread.""" + client = RedisCheckpoint() + config = {"configurable": {"user_id": user_id, "thread_id": thread_id}} + checkpoint = client.get(config) + # TODO replace hardcoded messages channel with + # channel extracted from agent + with ChannelsManager( + {"messages": Topic(AnyMessage, accumulate=True)}, checkpoint + ) as channels: + channels["messages"].update(messages) + checkpoint = { + k: v for k, v in create_checkpoint(channels).items() if k == "messages" + } + client.put(config, checkpoint) + + +def put_thread(user_id: str, thread_id: str, *, assistant_id: str, name: str) -> Thread: + """Modify a thread.""" + saved: Thread = { + "user_id": user_id, # TODO(Nuno): Could we remove this? "thread_id": thread_id, "assistant_id": assistant_id, "name": name, diff --git a/backend/app/stream.py b/backend/app/stream.py new file mode 100644 index 00000000..b8a4a19e --- /dev/null +++ b/backend/app/stream.py @@ -0,0 +1,84 @@ +import math +from typing import Any, Dict, Optional, Sequence, Union +from uuid import UUID + +from anyio import create_memory_object_stream +from langchain.callbacks.base import BaseCallbackHandler +from langchain.schema.messages import ( + AIMessage, + AIMessageChunk, + BaseMessage, + BaseMessageChunk, + ChatMessage, + ChatMessageChunk, + FunctionMessage, + FunctionMessageChunk, + HumanMessage, + HumanMessageChunk, +) +from langchain.schema.output import ChatGenerationChunk, GenerationChunk + + +class StreamMessagesHandler(BaseCallbackHandler): + def __init__(self, messages: Sequence[BaseMessage]) -> None: + self.messages = messages + self.output: Dict[UUID, ChatGenerationChunk] = {} + send_stream, receive_stream = create_memory_object_stream( + math.inf, item_type=dict | Exception + ) + self.send_stream = send_stream + self.receive_stream = receive_stream + + def on_llm_new_token( + self, + token: str, + *, + chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]] = None, + run_id: UUID, + **kwargs: Any, + ) -> Any: + # If this is being called for a non-Chat Model run, convert to AIMessage + if chunk is None: + chunk = ChatGenerationChunk(message=AIMessageChunk(content=token)) + # If we get something we don't know how to handle, ignore it + if not ( + isinstance(chunk, ChatGenerationChunk) + or isinstance(chunk, BaseMessageChunk) + ): + return + # Convert messages to ChatGenerationChunks (workaround for old langchahin) + if isinstance(chunk, BaseMessageChunk): + chunk = ChatGenerationChunk(message=chunk) + # Accumulate the output (ChatGenerationChunk implements __add__) + if not self.output.get(run_id): + self.output[run_id] = chunk + else: + self.output[run_id] += chunk + # Send the messages to the stream + self.send_stream.send_nowait( + { + "messages": ( + self.messages + + [ + map_chunk_to_msg(chunk.message) + for chunk in self.output.values() + ] + ) + } + ) + + +def map_chunk_to_msg(chunk: BaseMessageChunk) -> BaseMessage: + if not isinstance(chunk, BaseMessageChunk): + return chunk + args = {k: v for k, v in chunk.__dict__.items() if k != "type"} + if isinstance(chunk, HumanMessageChunk): + return HumanMessage(**args) + elif isinstance(chunk, AIMessageChunk): + return AIMessage(**args) + elif isinstance(chunk, FunctionMessageChunk): + return FunctionMessage(**args) + elif isinstance(chunk, ChatMessageChunk): + return ChatMessage(**args) + else: + raise ValueError(f"Unknown chunk type: {chunk}") diff --git a/backend/packages/agent-executor/agent_executor/__init__.py b/backend/packages/agent-executor/agent_executor/__init__.py index f34b77f6..e69de29b 100644 --- a/backend/packages/agent-executor/agent_executor/__init__.py +++ b/backend/packages/agent-executor/agent_executor/__init__.py @@ -1,460 +0,0 @@ -from __future__ import annotations - -import asyncio -import json -import logging -import time -from typing import ( - Any, - AsyncIterator, - Callable, - Dict, - List, - Optional, - Sequence, - Tuple, - Union, -) - -from langchain.agents.agent import ExceptionTool -from langchain.agents.tools import InvalidTool -from langchain.callbacks.manager import ( - AsyncCallbackManager, - AsyncCallbackManagerForChainRun, -) -from langchain.load.dump import dumpd -from langchain.load.serializable import Serializable -from langchain.schema import ( - AgentAction, - AgentFinish, - OutputParserException, -) -from langchain.schema.agent import AgentActionMessageLog -from langchain.schema.messages import ( - AIMessage, - BaseMessage, - FunctionMessage, -) -from langchain.schema.runnable import Runnable, RunnableSerializable -from langchain.schema.runnable.config import RunnableConfig -from langchain.schema.runnable.utils import AddableDict, Input, Output -from langchain.tools.base import BaseTool -from langchain.utilities.asyncio import asyncio_timeout -from langchain.utils.input import get_color_mapping - -logger = logging.getLogger(__name__) - - -def _create_function_message( - agent_action: AgentAction, observation: str -) -> FunctionMessage: - """Convert agent action and observation into a function message. - Args: - agent_action: the tool invocation request from the agent - observation: the result of the tool invocation - Returns: - FunctionMessage that corresponds to the original tool invocation - """ - if not isinstance(observation, str): - try: - content = json.dumps(observation, ensure_ascii=False) - except Exception: - content = str(observation) - else: - content = observation - return FunctionMessage( - name=agent_action.tool, - content=content, - ) - - -def _convert_agent_observation_to_messages( - agent_action: AgentAction, observation: Any -) -> Sequence[BaseMessage]: - """Convert an agent action to a message. - - This code is used to reconstruct the original AI message from the agent action. - - Args: - agent_action: Agent action to convert. - - Returns: - AIMessage that corresponds to the original tool invocation. - """ - return [_create_function_message(agent_action, observation)] - - -class AgentStep(Serializable): - """The result of running an AgentAction.""" - - action: AgentAction - """The AgentAction that was executed.""" - observation: Any - """The result of the AgentAction.""" - - @property - def messages(self) -> Sequence[BaseMessage]: - """Return the messages that correspond to this observation.""" - return _convert_agent_observation_to_messages(self.action, self.observation) - - -NextStepOutput = List[Union[AgentFinish, AgentAction, AgentStep]] - - -class AgentExecutor(RunnableSerializable): - agent: Runnable - """The agent to run for creating a plan and determining actions - to take at each step of the execution loop.""" - tools: Sequence[BaseTool] - """The valid tools the agent can call.""" - max_iterations: Optional[int] = 15 - """The maximum number of steps to take before ending the execution - loop. - - Setting to 'None' could lead to an infinite loop.""" - max_execution_time: Optional[float] = None - """The maximum amount of wall clock time to spend in the execution - loop. - """ - early_stopping_method: str = "force" - """The method to use for early stopping if the agent never - returns `AgentFinish`. Either 'force' or 'generate'. - - `"force"` returns a string saying that it stopped because it met a - time or iteration limit. - - `"generate"` calls the agent's LLM Chain one final time to generate - a final answer based on the previous steps. - """ - handle_parsing_errors: Union[ - bool, str, Callable[[OutputParserException], str] - ] = False - """How to handle errors raised by the agent's output parser. - Defaults to `False`, which raises the error. - If `true`, the error will be sent back to the LLM as an observation. - If a string, the string itself will be sent to the LLM as an observation. - If a callable function, the function will be called with the exception - as an argument, and the result of that function will be passed to the agent - as an observation. - """ - - class Config: - """Configuration for this pydantic object.""" - - arbitrary_types_allowed = True - - def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: - raise ValueError - - def _should_continue(self, iterations: int, time_elapsed: float) -> bool: - if self.max_iterations is not None and iterations >= self.max_iterations: - return False - if ( - self.max_execution_time is not None - and time_elapsed >= self.max_execution_time - ): - return False - - return True - - @property - def name_to_tool_map(self) -> Dict[str, BaseTool]: - return {tool.name: tool for tool in self.tools} - - @property - def color_mapping(self) -> Dict[str, str]: - return get_color_mapping( - [tool.name for tool in self.tools], - excluded_colors=["green", "red"], - ) - - def _get_tool_return( - self, next_step_output: Tuple[AgentAction, str] - ) -> Optional[AgentFinish]: - """Check if the tool is a returning tool.""" - agent_action, observation = next_step_output - name_to_tool_map = {tool.name: tool for tool in self.tools} - return_value_key = "output" - # Invalid tools won't be in the map, so we return False. - if agent_action.tool in name_to_tool_map: - if name_to_tool_map[agent_action.tool].return_direct: - return AgentFinish( - {return_value_key: observation}, - "", - ) - return None - - def return_stopped_response( - self, - early_stopping_method: str, - intermediate_steps: List[Tuple[AgentAction, str]], - **kwargs: Any, - ) -> AgentFinish: - """Return response when agent has been stopped due to max iterations.""" - if early_stopping_method == "force": - # `force` just returns a constant string - return AgentFinish( - {"output": "Agent stopped due to iteration limit or time limit."}, "" - ) - else: - raise ValueError( - "early_stopping_method should be one of `force` or `generate`, " - f"got {early_stopping_method}" - ) - - async def _aprocess_next_step_output( - self, - next_step_output: Union[AgentFinish, List[Tuple[AgentAction, str]]], - intermediate_steps, - run_manager: AsyncCallbackManagerForChainRun, - acc_output: AddableDict, - ) -> Optional[AddableDict]: - """ - Process the output of the next async step, - handling AgentFinish and tool return cases. - """ - logger.debug("Processing output of async Agent loop step") - if isinstance(next_step_output, AgentFinish): - logger.debug( - "Hit AgentFinish: _areturn -> on_chain_end -> run final output logic" - ) - return await self._areturn( - next_step_output, run_manager=run_manager, acc_output=acc_output - ) - - intermediate_steps.extend(next_step_output) - logger.debug("Updated intermediate_steps with step output") - - # Check for tool return - if len(next_step_output) == 1: - next_step_action = next_step_output[0] - tool_return = self._get_tool_return(next_step_action) - if tool_return is not None: - return await self._areturn( - tool_return, run_manager=run_manager, acc_output=acc_output - ) - - async def _aiter_next_step( - self, - name_to_tool_map: Dict[str, BaseTool], - color_mapping: Dict[str, str], - inputs: Dict[str, str], - intermediate_steps: List[Tuple[AgentAction, str]], - run_manager: Optional[AsyncCallbackManagerForChainRun] = None, - ) -> AsyncIterator[Union[AgentFinish, AgentAction, AgentStep]]: - """Take a single step in the thought-action-observation loop. - - Override this to take control of how the agent makes and acts on choices. - """ - try: - _inputs = {**{"intermediate_steps": intermediate_steps}, **inputs} - # Call the LLM to see what to do. - output = await self.agent.ainvoke( - _inputs, - config={"callbacks": run_manager.get_child() if run_manager else None}, - ) - except OutputParserException as e: - if isinstance(self.handle_parsing_errors, bool): - raise_error = not self.handle_parsing_errors - else: - raise_error = False - if raise_error: - raise ValueError( - "An output parsing error occurred. " - "In order to pass this error back to the agent and have it try " - "again, pass `handle_parsing_errors=True` to the AgentExecutor. " - f"This is the error: {str(e)}" - ) - text = str(e) - if isinstance(self.handle_parsing_errors, bool): - if e.send_to_llm: - observation = str(e.observation) - text = str(e.llm_output) - else: - observation = "Invalid or incomplete response" - elif isinstance(self.handle_parsing_errors, str): - observation = self.handle_parsing_errors - elif callable(self.handle_parsing_errors): - observation = self.handle_parsing_errors(e) - else: - raise ValueError("Got unexpected type of `handle_parsing_errors`") - output = AgentAction("_Exception", observation, text) - observation = await ExceptionTool().arun( - output.tool_input, - color=None, - callbacks=run_manager.get_child() if run_manager else None, - ) - yield AgentStep(action=output, observation=observation) - return - - # If the tool chosen is the finishing tool, then we end and return. - if isinstance(output, AgentFinish): - yield output - return - - yield output - - if run_manager: - await run_manager.on_agent_action(output, color="green") - # Otherwise we lookup the tool - if output.tool in name_to_tool_map: - tool = name_to_tool_map[output.tool] - color = color_mapping[output.tool] - # We then call the tool on the tool input to get an observation - observation = await tool.arun( - output.tool_input, - color=color, - callbacks=run_manager.get_child() if run_manager else None, - ) - else: - observation = await InvalidTool().arun( - { - "requested_tool_name": output.tool, - "available_tool_names": list(name_to_tool_map.keys()), - }, - color=None, - callbacks=run_manager.get_child() if run_manager else None, - ) - yield AgentStep(action=output, observation=observation) - - async def _astop( - self, - inputs, - intermediate_steps, - run_manager: AsyncCallbackManagerForChainRun, - acc_output: AddableDict, - ) -> AddableDict: - """ - Stop the async iterator and raise a StopAsyncIteration exception with - the stopped response. - """ - logger.warning("Stopping agent prematurely due to triggering stop condition") - output = self.return_stopped_response( - self.early_stopping_method, - intermediate_steps, - **inputs, - ) - return await self._areturn( - output, run_manager=run_manager, acc_output=acc_output - ) - - def _consume_next_step( - self, values: NextStepOutput - ) -> Union[AgentFinish, List[Tuple[AgentAction, str]]]: - if isinstance(values[-1], AgentFinish): - assert len(values) == 1 - return values[-1] - else: - return [ - (a.action, a.observation) for a in values if isinstance(a, AgentStep) - ] - - async def _areturn( - self, - output: AgentFinish, - run_manager: AsyncCallbackManagerForChainRun, - acc_output: AddableDict, - ) -> AddableDict: - """ - Return the final output of the async iterator. - """ - if run_manager: - await run_manager.on_agent_finish(output, color="green") - final_output = AddableDict(output.return_values) - final_output["messages"] = [AIMessage(content=output.log)] - await run_manager.on_chain_end(acc_output + final_output) - return final_output - - async def astream( - self, - input: Union[Dict[str, Any], Any], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> AsyncIterator[AddableDict]: - """Enables streaming over steps taken to reach final output.""" - config = config or {} - run_name = config.get("run_name") - iterations = 0 - start_time = time.time() - time_elapsed = 0 - intermediate_steps = [] - logger.debug("Initialising AgentExecutorIterator (async)") - callback_manager = AsyncCallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - inheritable_metadata=config.get("metadata"), - inheritable_tags=config.get("tags"), - ) - run_manager = await callback_manager.on_chain_start( - dumpd(self), - input, - name=run_name, - ) - try: - async with asyncio_timeout(self.max_execution_time): - acc_output = AddableDict() - while self._should_continue(iterations, time_elapsed): - # take the next step: this plans next action, executes it, - # yielding action and observation as they are generated - next_step_seq: NextStepOutput = [] - async for chunk in self._aiter_next_step( - self.name_to_tool_map, - self.color_mapping, - input, - intermediate_steps, - run_manager, - ): - next_step_seq.append(chunk) - # do not yield AgentFinish, which will be handled below - if isinstance(chunk, AgentAction): - if isinstance(chunk, AgentActionMessageLog): - next_output = AddableDict( - actions=[chunk], messages=chunk.message_log - ) - acc_output += next_output - yield next_output - else: - msg = AIMessage( - content=chunk.log, - additional_kwargs={ - "function_call": { - "name": chunk.tool, - "arguments": json.dumps( - {"input": chunk.tool_input} - ), - } - }, - ) - next_output = AddableDict( - actions=[chunk], - messages=[msg], - ) - acc_output += next_output - yield next_output - - elif isinstance(chunk, AgentStep): - next_output = AddableDict( - steps=[chunk], messages=chunk.messages - ) - acc_output += next_output - yield next_output - - # convert iterator output to format handled by _process_next_step - next_step = self._consume_next_step(next_step_seq) - # update iterations and time elapsed - iterations += 1 - time_elapsed = time.time() - start_time - # decide if this is the final output - if output := await self._aprocess_next_step_output( - next_step, intermediate_steps, run_manager, acc_output - ): - yield output - return - except (TimeoutError, asyncio.TimeoutError): - yield await self._astop(input, intermediate_steps, run_manager, acc_output) - return - except BaseException as e: - await run_manager.on_chain_error(e) - raise - - # if we got here means we exhausted iterations or time - yield await self._astop(input, intermediate_steps, run_manager, acc_output) diff --git a/backend/packages/agent-executor/agent_executor/checkpoint.py b/backend/packages/agent-executor/agent_executor/checkpoint.py new file mode 100644 index 00000000..ec4f8f64 --- /dev/null +++ b/backend/packages/agent-executor/agent_executor/checkpoint.py @@ -0,0 +1,65 @@ +import os +import pickle +from functools import partial +from typing import Any, Mapping, Sequence + +from langchain.pydantic_v1 import Field +from langchain.schema.runnable import RunnableConfig +from langchain.schema.runnable.utils import ConfigurableFieldSpec +from langchain.utilities.redis import get_client +from permchain.checkpoint.base import BaseCheckpointAdapter +from redis.client import Redis as RedisType + + +def checkpoint_key(user_id: str, thread_id: str): + return f"opengpts:{user_id}:thread:{thread_id}:checkpoint" + + +def _dump(mapping: dict[str, Any]) -> dict: + return {k: pickle.dumps(v) if v is not None else None for k, v in mapping.items()} + + +def _load(mapping: dict[bytes, bytes]) -> dict: + return { + k.decode(): pickle.loads(v) if v is not None else None + for k, v in mapping.items() + } + + +class RedisCheckpoint(BaseCheckpointAdapter): + client: RedisType = Field( + default_factory=partial(get_client, os.environ.get("REDIS_URL")) + ) + + class Config: + arbitrary_types_allowed = True + + @property + def config_specs(self) -> Sequence[ConfigurableFieldSpec]: + return [ + ConfigurableFieldSpec( + id="user_id", + annotation=str, + name="User ID", + description=None, + default=None, + ), + ConfigurableFieldSpec( + id="thread_id", + annotation=str, + name="Thread ID", + description=None, + default="", + ), + ] + + def _hash_key(self, config: RunnableConfig) -> str: + return checkpoint_key( + config["configurable"]["user_id"], config["configurable"]["thread_id"] + ) + + def get(self, config: RunnableConfig) -> Mapping[str, Any] | None: + return _load(self.client.hgetall(self._hash_key(config))) + + def put(self, config: RunnableConfig, checkpoint: Mapping[str, Any]) -> None: + return self.client.hmset(self._hash_key(config), _dump(checkpoint)) diff --git a/backend/packages/agent-executor/agent_executor/history.py b/backend/packages/agent-executor/agent_executor/history.py deleted file mode 100644 index e451adde..00000000 --- a/backend/packages/agent-executor/agent_executor/history.py +++ /dev/null @@ -1,124 +0,0 @@ -from __future__ import annotations - -import asyncio -from typing import Any, Callable, Dict, List, Optional, Sequence, Type - -from langchain.callbacks.tracers.schemas import Run -from langchain.pydantic_v1 import BaseModel, create_model -from langchain.schema.chat_history import BaseChatMessageHistory -from langchain.schema.messages import BaseMessage -from langchain.schema.runnable.base import Runnable, RunnableLambda -from langchain.schema.runnable.config import RunnableConfig -from langchain.schema.runnable.passthrough import RunnablePassthrough -from langchain.schema.runnable.utils import ( - ConfigurableFieldSpec, - get_unique_config_specs, -) - -from agent_executor.runnables import RunnableBindingBase - - -class RunnableWithMessageHistory(RunnableBindingBase): - factory: Callable[[str], BaseChatMessageHistory] - - input_key: str - - output_key: Optional[str] - history_key: str = "messages" - - def __init__( - self, - runnable: Runnable, - factory: Callable[[str], BaseChatMessageHistory], - input_key: str, - output_key: Optional[str] = None, - history_key: str = "messages", - **kwargs: Any, - ) -> None: - bound = RunnablePassthrough.assign( - **{history_key: RunnableLambda(self._enter_history, self._aenter_history)} - ) | runnable.with_listeners(on_end=self._exit_history) - super().__init__( - factory=factory, - input_key=input_key, - output_key=output_key, - bound=bound, - **kwargs, - ) - - @property - def config_specs(self) -> Sequence[ConfigurableFieldSpec]: - return get_unique_config_specs( - super().config_specs - + [ - ConfigurableFieldSpec( - id="user_id", - annotation=str, - name="User ID", - description=None, - default=None, - ), - ConfigurableFieldSpec( - id="thread_id", - annotation=str, - name="Thread ID", - description=None, - default="", - ), - ] - ) - - def get_input_schema( - self, config: Optional[RunnableConfig] = None - ) -> Type[BaseModel]: - super_schema = super().get_input_schema(config) - if super_schema.__custom_root_type__ is not None: - # The schema is not correct so we'll default to dict with input_key - return create_model( # type: ignore[call-overload] - "RunnableWithChatHistoryInput", - **{self.input_key: (str, ...)}, - ) - else: - return super_schema - - def _enter_history( - self, input: Dict[str, Any], config: RunnableConfig - ) -> List[BaseMessage]: - hist: BaseChatMessageHistory = config["configurable"]["message_history"] - return hist.messages.copy() + [input[self.input_key]] - - async def _aenter_history( - self, input: Dict[str, Any], config: RunnableConfig - ) -> List[BaseMessage]: - return await asyncio.get_running_loop().run_in_executor( - None, self._enter_history, input, config - ) - - def _exit_history(self, run: Run, config: RunnableConfig) -> None: - hist: BaseChatMessageHistory = config["configurable"]["message_history"] - # Add the input message - hist.add_message(run.inputs[self.input_key]) - # Find the output messages - for m in run.outputs[self.output_key]: - hist.add_message(m) - - def _merge_configs(self, *configs: Optional[RunnableConfig]) -> RunnableConfig: - config = super()._merge_configs(*configs) - # extract thread_id - config["configurable"] = config.get("configurable", {}) - try: - thread_id = config["configurable"]["thread_id"] - user_id = config["configurable"].get("user_id") - except KeyError: - example_input = {self.input_key: "foo"} - raise ValueError( - "thread_id is required when using .with_message_history()" - "\nPass it in as part of the config argument to .invoke() or .stream()" - f'\neg. chain.invoke({example_input}, {{"configurable": {{"thread_id":' - ' "123"}})' - ) - # attach message_history - config["configurable"]["message_history"] = self.factory( # type: ignore - session_id=thread_id if user_id is None else f"{user_id}:{thread_id}", - ) - return config diff --git a/backend/packages/agent-executor/agent_executor/permchain.py b/backend/packages/agent-executor/agent_executor/permchain.py new file mode 100644 index 00000000..1bee2808 --- /dev/null +++ b/backend/packages/agent-executor/agent_executor/permchain.py @@ -0,0 +1,154 @@ +import json +from operator import itemgetter +from typing import Sequence + +from langchain.schema.agent import AgentAction, AgentActionMessageLog, AgentFinish +from langchain.schema.messages import ( + AnyMessage, + AIMessage, + AIMessageChunk, + BaseMessage, + BaseMessageChunk, + ChatMessage, + ChatMessageChunk, + FunctionMessage, + FunctionMessageChunk, + HumanMessage, + HumanMessageChunk, +) +from langchain.schema.runnable import ( + Runnable, + RunnableConfig, + RunnableLambda, + RunnablePassthrough, +) +from langchain.tools import BaseTool +from permchain import Channel, Pregel, ReservedChannels +from permchain.channels import Topic +from permchain.checkpoint.base import BaseCheckpointAdapter + + +def map_chunk_to_msg(chunk: BaseMessageChunk) -> BaseMessage: + if not isinstance(chunk, BaseMessageChunk): + return chunk + args = {k: v for k, v in chunk.__dict__.items() if k != "type"} + if isinstance(chunk, HumanMessageChunk): + return HumanMessage(**args) + elif isinstance(chunk, AIMessageChunk): + return AIMessage(**args) + elif isinstance(chunk, FunctionMessageChunk): + return FunctionMessage(**args) + elif isinstance(chunk, ChatMessageChunk): + return ChatMessage(**args) + else: + raise ValueError(f"Unknown chunk type: {chunk}") + + +def _create_agent_message( + output: AgentAction | AgentFinish +) -> list[AnyMessage] | AnyMessage: + if isinstance(output, AgentAction): + if isinstance(output, AgentActionMessageLog): + output.message_log[-1].additional_kwargs["agent"] = output + messages = [map_chunk_to_msg(m) for m in output.message_log] + output.message_log = [] # avoid circular reference for json dumps + return messages + else: + return AIMessage( + content=output.log, + additional_kwargs={"agent": output}, + ) + else: + return AIMessage( + content=output.return_values["output"], + additional_kwargs={"agent": output}, + ) + + +def _create_function_message( + agent_action: AgentAction, observation: str +) -> FunctionMessage: + if not isinstance(observation, str): + try: + content = json.dumps(observation, ensure_ascii=False) + except Exception: + content = str(observation) + else: + content = observation + return FunctionMessage( + name=agent_action.tool, + content=content, + ) + + +def _run_tool( + messages: list[AnyMessage], config: RunnableConfig, *, tools: dict[str, BaseTool] +) -> FunctionMessage: + action: AgentAction = messages[-1].additional_kwargs["agent"] + tool = tools[action.tool] + result = tool.invoke(action.tool_input, config) + return _create_function_message(action, result) + + +async def _arun_tool( + messages: list[AnyMessage], config: RunnableConfig, *, tools: dict[str, BaseTool] +) -> FunctionMessage: + action: AgentAction = messages[-1].additional_kwargs["agent"] + tool = tools[action.tool] + result = await tool.ainvoke(action.tool_input, config) + return _create_function_message(action, result) + + +def get_agent_executor( + tools: list[BaseTool], + agent: Runnable[dict[str, list[AnyMessage]], AgentAction | AgentFinish], + checkpoint: BaseCheckpointAdapter, +) -> Pregel: + tool_map = {tool.name: tool for tool in tools} + tool_lambda = RunnableLambda(_run_tool, _arun_tool).bind(tools=tool_map) + + tool_chain = itemgetter("messages") | tool_lambda | Channel.write_to("messages") + agent_chain = agent | _create_agent_message | Channel.write_to("messages") + + def route_last_message(input: dict[str, bool | Sequence[AnyMessage]]) -> Runnable: + if not input["messages"]: + # no messages, do nothing + return agent_chain + + message: AnyMessage = input["messages"][-1] + if isinstance(message.additional_kwargs.get("agent"), AgentFinish): + # finished, do nothing + return RunnablePassthrough() + + if input[ReservedChannels.is_last_step]: + # exhausted iterations without finishing, return stop message + return Channel.write_to( + messages=_create_agent_message( + AgentFinish( + { + "output": "Agent stopped due to iteration limit or time limit." + }, + "", + ) + ) + ) + + if isinstance(message.additional_kwargs.get("agent"), AgentAction): + # agent action, run it + return tool_chain + + # otherwise, run the agent + return agent_chain + + executor = ( + Channel.subscribe_to(["messages"]).join([ReservedChannels.is_last_step]) + | route_last_message + ) + + return Pregel( + chains={"executor": executor}, + channels={"messages": Topic(AnyMessage, accumulate=True)}, + input=["messages"], + output=["messages"], + checkpoint=checkpoint, + ) diff --git a/backend/packages/agent-executor/agent_executor/runnables.py b/backend/packages/agent-executor/agent_executor/runnables.py deleted file mode 100644 index 1d7033b2..00000000 --- a/backend/packages/agent-executor/agent_executor/runnables.py +++ /dev/null @@ -1,257 +0,0 @@ -"""Temporary code for RunnableBinding. - -This is temporary code for Runnable Binding while it isn't available on released -LangChain. -""" -from __future__ import annotations - -from typing import ( - Any, - AsyncIterator, - Callable, - Iterator, - List, - Mapping, - Optional, - Sequence, - Type, - TypeVar, - Union, - cast, -) - -from langchain.pydantic_v1 import BaseModel, Field -from langchain.schema.runnable import Runnable, RunnableSerializable -from langchain.schema.runnable.config import ( - RunnableConfig, - merge_configs, -) -from langchain.schema.runnable.utils import ( - ConfigurableFieldSpec, - Input, - Output, -) - -Other = TypeVar("Other") - - -class RunnableBindingBase(RunnableSerializable[Input, Output]): - """A runnable that delegates calls to another runnable with a set of kwargs.""" - - bound: Runnable[Input, Output] - - kwargs: Mapping[str, Any] = Field(default_factory=dict) - - config: RunnableConfig = Field(default_factory=dict) - - config_factories: List[Callable[[RunnableConfig], RunnableConfig]] = Field( - default_factory=list - ) - - # Union[Type[Input], BaseModel] + things like List[str] - custom_input_type: Optional[Any] = None - # Union[Type[Output], BaseModel] + things like List[str] - custom_output_type: Optional[Any] = None - - class Config: - arbitrary_types_allowed = True - - def __init__( - self, - *, - bound: Runnable[Input, Output], - kwargs: Optional[Mapping[str, Any]] = None, - config: Optional[RunnableConfig] = None, - config_factories: Optional[ - List[Callable[[RunnableConfig], RunnableConfig]] - ] = None, - custom_input_type: Optional[Union[Type[Input], BaseModel]] = None, - custom_output_type: Optional[Union[Type[Output], BaseModel]] = None, - **other_kwargs: Any, - ) -> None: - config = config or {} - # config_specs contains the list of valid `configurable` keys - if configurable := config.get("configurable", None): - allowed_keys = set(s.id for s in bound.config_specs) - for key in configurable: - if key not in allowed_keys: - raise ValueError( - f"Configurable key '{key}' not found in runnable with" - f" config keys: {allowed_keys}" - ) - super().__init__( - bound=bound, - kwargs=kwargs or {}, - config=config or {}, - config_factories=config_factories or [], - custom_input_type=custom_input_type, - custom_output_type=custom_output_type, - **other_kwargs, - ) - - @property - def InputType(self) -> Type[Input]: - return ( - cast(Type[Input], self.custom_input_type) - if self.custom_input_type is not None - else self.bound.InputType - ) - - @property - def OutputType(self) -> Type[Output]: - return ( - cast(Type[Output], self.custom_output_type) - if self.custom_output_type is not None - else self.bound.OutputType - ) - - def get_input_schema( - self, config: Optional[RunnableConfig] = None - ) -> Type[BaseModel]: - if self.custom_input_type is not None: - return super().get_input_schema(config) - return self.bound.get_input_schema(merge_configs(self.config, config)) - - def get_output_schema( - self, config: Optional[RunnableConfig] = None - ) -> Type[BaseModel]: - if self.custom_output_type is not None: - return super().get_output_schema(config) - return self.bound.get_output_schema(merge_configs(self.config, config)) - - @property - def config_specs(self) -> Sequence[ConfigurableFieldSpec]: - return self.bound.config_specs - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - def _merge_configs(self, *configs: Optional[RunnableConfig]) -> RunnableConfig: - config = merge_configs(self.config, *configs) - return merge_configs(config, *(f(config) for f in self.config_factories)) - - def invoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - return self.bound.invoke( - input, - self._merge_configs(config), - **{**self.kwargs, **kwargs}, - ) - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - return await self.bound.ainvoke( - input, - self._merge_configs(config), - **{**self.kwargs, **kwargs}, - ) - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - if isinstance(config, list): - configs = cast( - List[RunnableConfig], - [self._merge_configs(conf) for conf in config], - ) - else: - configs = [self._merge_configs(config) for _ in range(len(inputs))] - return self.bound.batch( - inputs, - configs, - return_exceptions=return_exceptions, - **{**self.kwargs, **kwargs}, - ) - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - if isinstance(config, list): - configs = cast( - List[RunnableConfig], - [self._merge_configs(conf) for conf in config], - ) - else: - configs = [self._merge_configs(config) for _ in range(len(inputs))] - return await self.bound.abatch( - inputs, - configs, - return_exceptions=return_exceptions, - **{**self.kwargs, **kwargs}, - ) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - yield from self.bound.stream( - input, - self._merge_configs(config), - **{**self.kwargs, **kwargs}, - ) - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - async for item in self.bound.astream( - input, - self._merge_configs(config), - **{**self.kwargs, **kwargs}, - ): - yield item - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> Iterator[Output]: - yield from self.bound.transform( - input, - self._merge_configs(config), - **{**self.kwargs, **kwargs}, - ) - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> AsyncIterator[Output]: - async for item in self.bound.atransform( - input, - self._merge_configs(config), - **{**self.kwargs, **kwargs}, - ): - yield item - - -RunnableBindingBase.update_forward_refs(RunnableConfig=RunnableConfig) diff --git a/backend/packages/agent-executor/agent_executor/upload.py b/backend/packages/agent-executor/agent_executor/upload.py index b0d90218..515548bd 100644 --- a/backend/packages/agent-executor/agent_executor/upload.py +++ b/backend/packages/agent-executor/agent_executor/upload.py @@ -46,9 +46,17 @@ def _convert_ingestion_input_to_blob(data: BinaryIO) -> Blob: class IngestRunnable(RunnableSerializable[BinaryIO, List[str]]): + """Runnable for ingesting files into a vectorstore.""" + text_splitter: TextSplitter + """Text splitter to use for splitting the text into chunks.""" vectorstore: VectorStore + """Vectorstore to ingest into.""" assistant_id: Optional[str] + """Ingested documents will be associated with this assistant id. + + The assistant ID is used as the namespace, and is filtered on at query time. + """ class Config: arbitrary_types_allowed = True diff --git a/backend/packages/gizmo-agent/gizmo_agent/agent_types/openai.py b/backend/packages/gizmo-agent/gizmo_agent/agent_types/openai.py index 203ccdc5..0e6c2a98 100644 --- a/backend/packages/gizmo-agent/gizmo_agent/agent_types/openai.py +++ b/backend/packages/gizmo-agent/gizmo_agent/agent_types/openai.py @@ -1,6 +1,5 @@ import os -from langchain.agents.format_scratchpad import format_to_openai_functions from langchain.agents.output_parsers import OpenAIFunctionsAgentOutputParser from langchain.chat_models import AzureChatOpenAI, ChatOpenAI from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder @@ -12,9 +11,9 @@ def get_openai_function_agent( ): if not azure: if gpt_4: - llm = ChatOpenAI(model="gpt-4-1106-preview", temperature=0) + llm = ChatOpenAI(model="gpt-4-1106-preview", temperature=0, streaming=True) else: - llm = ChatOpenAI(model="gpt-3.5-turbo-1106", temperature=0) + llm = ChatOpenAI(model="gpt-3.5-turbo-1106", temperature=0, streaming=True) else: llm = AzureChatOpenAI( temperature=0, @@ -22,12 +21,12 @@ def get_openai_function_agent( openai_api_base=os.environ["AZURE_OPENAI_API_BASE"], openai_api_version=os.environ["AZURE_OPENAI_API_VERSION"], openai_api_key=os.environ["AZURE_OPENAI_API_KEY"], + streaming=True, ) prompt = ChatPromptTemplate.from_messages( [ ("system", system_message), MessagesPlaceholder(variable_name="messages"), - MessagesPlaceholder(variable_name="agent_scratchpad"), ] ) if tools: @@ -36,15 +35,5 @@ def get_openai_function_agent( ) else: llm_with_tools = llm - agent = ( - { - "messages": lambda x: x["messages"], - "agent_scratchpad": lambda x: format_to_openai_functions( - x["intermediate_steps"] - ), - } - | prompt - | llm_with_tools - | OpenAIFunctionsAgentOutputParser() - ) + agent = prompt | llm_with_tools | OpenAIFunctionsAgentOutputParser() return agent diff --git a/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/agent.py b/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/agent.py index e873cee0..90bd170c 100644 --- a/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/agent.py +++ b/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/agent.py @@ -1,7 +1,6 @@ import os import boto3 -from langchain.agents.format_scratchpad import format_xml from langchain.chat_models import BedrockChat, ChatAnthropic from langchain.schema.messages import AIMessage, HumanMessage from langchain.tools.render import render_text_description @@ -61,10 +60,7 @@ def get_xml_agent(tools, system_message, bedrock=False): llm_with_stop = model.bind(stop=[""]) agent = ( - { - "messages": lambda x: construct_chat_history(x["messages"]), - "agent_scratchpad": lambda x: format_xml(x["intermediate_steps"]), - } + {"messages": lambda x: construct_chat_history(x["messages"])} | prompt | llm_with_stop | parse_output diff --git a/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/prompts.py b/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/prompts.py index 5f202096..b16dcbff 100644 --- a/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/prompts.py +++ b/backend/packages/gizmo-agent/gizmo_agent/agent_types/xml/prompts.py @@ -33,7 +33,6 @@ [ ("system", template), MessagesPlaceholder(variable_name="messages"), - ("ai", "{agent_scratchpad}"), ] ) diff --git a/backend/packages/gizmo-agent/gizmo_agent/main.py b/backend/packages/gizmo-agent/gizmo_agent/main.py index 43b5eec2..8ebc4c8f 100644 --- a/backend/packages/gizmo-agent/gizmo_agent/main.py +++ b/backend/packages/gizmo-agent/gizmo_agent/main.py @@ -1,10 +1,7 @@ -import os -from functools import partial from typing import Any, Mapping, Optional, Sequence -from agent_executor import AgentExecutor -from agent_executor.history import RunnableWithMessageHistory -from langchain.memory import RedisChatMessageHistory +from agent_executor.checkpoint import RedisCheckpoint +from agent_executor.permchain import get_agent_executor from langchain.pydantic_v1 import BaseModel, Field from langchain.schema.messages import AnyMessage from langchain.schema.runnable import ( @@ -64,12 +61,9 @@ def __init__( _agent = get_xml_agent(_tools, system_message, bedrock=True) else: raise ValueError("Unexpected agent type") - agent_executor = AgentExecutor( - agent=_agent, - tools=_tools, - handle_parsing_errors=True, - max_iterations=10, - ) + agent_executor = get_agent_executor( + tools=_tools, agent=_agent, checkpoint=RedisCheckpoint() + ).with_config({"recursion_limit": 10}) super().__init__( tools=tools, agent=agent, @@ -81,40 +75,33 @@ def __init__( class AgentInput(BaseModel): - input: AnyMessage + messages: Sequence[AnyMessage] = Field(default_factory=list) class AgentOutput(BaseModel): messages: Sequence[AnyMessage] = Field(..., extra={"widget": {"type": "chat"}}) - output: str - - -agent = ConfigurableAgent( - agent=GizmoAgentType.GPT_35_TURBO, - tools=[], - system_message=DEFAULT_SYSTEM_MESSAGE, - assistant_id=None, -).configurable_fields( - agent=ConfigurableField(id="agent_type", name="Agent Type"), - system_message=ConfigurableField(id="system_message", name="System Message"), - assistant_id=ConfigurableField(id="assistant_id", name="Assistant ID"), - tools=ConfigurableFieldMultiOption( - id="tools", - name="Tools", - options=TOOL_OPTIONS, - default=[], - ), + + +agent = ( + ConfigurableAgent( + agent=GizmoAgentType.GPT_35_TURBO, + tools=[], + system_message=DEFAULT_SYSTEM_MESSAGE, + assistant_id=None, + ) + .configurable_fields( + agent=ConfigurableField(id="agent_type", name="Agent Type"), + system_message=ConfigurableField(id="system_message", name="System Message"), + assistant_id=ConfigurableField(id="assistant_id", name="Assistant ID"), + tools=ConfigurableFieldMultiOption( + id="tools", + name="Tools", + options=TOOL_OPTIONS, + default=[], + ), + ) + .with_types(input_type=AgentInput, output_type=AgentOutput) ) -agent = RunnableWithMessageHistory( - agent, - # first arg should be a function that - # - accepts a single arg "session_id" - # - returns a BaseChatMessageHistory instance - partial(RedisChatMessageHistory, url=os.environ["REDIS_URL"]), - input_key="input", - output_key="messages", - history_key="messages", -).with_types(input_type=AgentInput, output_type=AgentOutput) if __name__ == "__main__": import asyncio @@ -123,8 +110,8 @@ class AgentOutput(BaseModel): async def run(): async for m in agent.astream_log( - {"input": HumanMessage(content="whats your name")}, - config={"configurable": {"thread_id": "test1"}}, + {"messages": HumanMessage(content="whats your name")}, + config={"configurable": {"user_id": "1", "thread_id": "test1"}}, ): print(m) diff --git a/backend/packages/gizmo-agent/gizmo_agent/tools.py b/backend/packages/gizmo-agent/gizmo_agent/tools.py index f0fd470b..cdefd966 100644 --- a/backend/packages/gizmo-agent/gizmo_agent/tools.py +++ b/backend/packages/gizmo-agent/gizmo_agent/tools.py @@ -5,10 +5,10 @@ from langchain.retrievers.you import YouRetriever from langchain.tools import ArxivQueryRun, DuckDuckGoSearchRun from langchain.tools.retriever import create_retriever_tool +from langchain.tools.tavily_search import TavilyAnswer, TavilySearchResults from langchain.utilities import ArxivAPIWrapper -from langchain.vectorstores.redis import RedisFilter from langchain.utilities.tavily_search import TavilySearchAPIWrapper -from langchain.tools.tavily_search import TavilySearchResults, TavilyAnswer +from langchain.vectorstores.redis import RedisFilter from gizmo_agent.ingest import vstore diff --git a/backend/poetry.lock b/backend/poetry.lock index 41ab0cfa..87d786ed 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -150,20 +150,6 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" -[[package]] -name = "annotated-types" -version = "0.6.0" -description = "Reusable constraint types to use with typing.Annotated" -optional = false -python-versions = ">=3.8" -files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, -] - -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} - [[package]] name = "anthropic" version = "0.3.11" @@ -279,17 +265,17 @@ lxml = ["lxml"] [[package]] name = "boto3" -version = "1.28.84" +version = "1.29.2" description = "The AWS SDK for Python" optional = false python-versions = ">= 3.7" files = [ - {file = "boto3-1.28.84-py3-none-any.whl", hash = "sha256:98b01bbea27740720a06f7c7bc0132ae4ce902e640aab090cfb99ad3278449c3"}, - {file = "boto3-1.28.84.tar.gz", hash = "sha256:adfb915958d7b54d876891ea1599dd83189e35a2442eb41ca52b04ea716180b6"}, + {file = "boto3-1.29.2-py3-none-any.whl", hash = "sha256:6617ac176efb21485ebc3a058a3a97feb1300141421ae3d1809562c4cac1d5f9"}, + {file = "boto3-1.29.2.tar.gz", hash = "sha256:f3024bba9ac980007ba7b5f28a9734d111fb5466e2426ac76c5edbd6dedd8db2"}, ] [package.dependencies] -botocore = ">=1.31.84,<1.32.0" +botocore = ">=1.32.2,<1.33.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.7.0,<0.8.0" @@ -298,13 +284,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.31.84" +version = "1.32.2" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">= 3.7" files = [ - {file = "botocore-1.31.84-py3-none-any.whl", hash = "sha256:d65bc05793d1a8a8c191a739f742876b4b403c5c713dc76beef262d18f7984a2"}, - {file = "botocore-1.31.84.tar.gz", hash = "sha256:8913bedb96ad0427660dee083aeaa675466eb662bbf1a47781956b5882aadcc5"}, + {file = "botocore-1.32.2-py3-none-any.whl", hash = "sha256:a68a33193d8cd59e3b2142bff632e562afc02f9c4417e3dcc81a6e1b1f47148e"}, + {file = "botocore-1.32.2.tar.gz", hash = "sha256:0e231524e9b72169fe0b8d9310f47072c245fb712778e0669f53f264f0e49536"}, ] [package.dependencies] @@ -316,7 +302,7 @@ urllib3 = [ ] [package.extras] -crt = ["awscrt (==0.19.10)"] +crt = ["awscrt (==0.19.12)"] [[package]] name = "brotli" @@ -803,13 +789,13 @@ test-randomorder = ["pytest-randomly"] [[package]] name = "dataclasses-json" -version = "0.6.1" +version = "0.6.2" description = "Easily serialize dataclasses to and from JSON." optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "dataclasses_json-0.6.1-py3-none-any.whl", hash = "sha256:1bd8418a61fe3d588bb0079214d7fb71d44937da40742b787256fd53b26b6c80"}, - {file = "dataclasses_json-0.6.1.tar.gz", hash = "sha256:a53c220c35134ce08211a1057fd0e5bf76dc5331627c6b241cacbc570a89faae"}, + {file = "dataclasses_json-0.6.2-py3-none-any.whl", hash = "sha256:71816ced3d0f55a2c5bc1a813ace1b8d4234e79a08744269a7cf84d6f7c06e99"}, + {file = "dataclasses_json-0.6.2.tar.gz", hash = "sha256:1b934c1bd63e775880946b8361a902d7de86e894bab8098eab27c010f95724d1"}, ] [package.dependencies] @@ -856,19 +842,19 @@ files = [ [[package]] name = "duckduckgo-search" -version = "3.9.4" +version = "3.9.5" description = "Search for words, documents, images, news, maps and text translation using the DuckDuckGo.com search engine." optional = false python-versions = ">=3.8" files = [ - {file = "duckduckgo_search-3.9.4-py3-none-any.whl", hash = "sha256:06004982952feb2c65927840ebf3d186498bce2390f208be7726f5f82675f3db"}, - {file = "duckduckgo_search-3.9.4.tar.gz", hash = "sha256:ce140bf005ff147b5f7f02ef893e575527487db8f689dfccc86c7d4519b95a9b"}, + {file = "duckduckgo_search-3.9.5-py3-none-any.whl", hash = "sha256:d96e97beeaa89da04ac84f425319a89ece625e834913953fa56a64c6295d1ad6"}, + {file = "duckduckgo_search-3.9.5.tar.gz", hash = "sha256:63eb56e544f2e9812d09f37b2d7851f9cb00948acba4892241f976358813bd2e"}, ] [package.dependencies] aiofiles = ">=23.2.1" click = ">=8.1.7" -httpx = {version = ">=0.25.0", extras = ["brotli", "http2", "socks"]} +httpx = {version = ">=0.25.1", extras = ["brotli", "http2", "socks"]} lxml = ">=4.9.3" [package.extras] @@ -1207,13 +1193,13 @@ files = [ [[package]] name = "httpcore" -version = "1.0.1" +version = "1.0.2" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpcore-1.0.1-py3-none-any.whl", hash = "sha256:c5e97ef177dca2023d0b9aad98e49507ef5423e9f1d94ffe2cfe250aa28e63b0"}, - {file = "httpcore-1.0.1.tar.gz", hash = "sha256:fce1ddf9b606cfb98132ab58865c3728c52c8e4c3c46e2aabb3674464a186e92"}, + {file = "httpcore-1.0.2-py3-none-any.whl", hash = "sha256:096cc05bca73b8e459a1fc3dcf585148f63e534eae4339559c9b8a8d6399acc7"}, + {file = "httpcore-1.0.2.tar.gz", hash = "sha256:9fc092e4799b26174648e54b74ed5f683132a464e95643b226e00c2ed2fa6535"}, ] [package.dependencies] @@ -1256,18 +1242,18 @@ socks = ["socksio (==1.*)"] [[package]] name = "huggingface-hub" -version = "0.17.3" +version = "0.19.4" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" files = [ - {file = "huggingface_hub-0.17.3-py3-none-any.whl", hash = "sha256:545eb3665f6ac587add946e73984148f2ea5c7877eac2e845549730570c1933a"}, - {file = "huggingface_hub-0.17.3.tar.gz", hash = "sha256:40439632b211311f788964602bf8b0d9d6b7a2314fba4e8d67b2ce3ecea0e3fd"}, + {file = "huggingface_hub-0.19.4-py3-none-any.whl", hash = "sha256:dba013f779da16f14b606492828f3760600a1e1801432d09fe1c33e50b825bb5"}, + {file = "huggingface_hub-0.19.4.tar.gz", hash = "sha256:176a4fc355a851c17550e7619488f383189727eab209534d7cef2114dae77b22"}, ] [package.dependencies] filelock = "*" -fsspec = "*" +fsspec = ">=2023.5.0" packaging = ">=20.9" pyyaml = ">=5.1" requests = "*" @@ -1275,17 +1261,17 @@ tqdm = ">=4.42.1" typing-extensions = ">=3.7.4.3" [package.extras] -all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] +all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] cli = ["InquirerPy (==0.3.4)"] -dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] -docs = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "hf-doc-builder", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)", "watchdog"] +dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] +docs = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "hf-doc-builder", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.1.3)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)", "watchdog"] fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"] -inference = ["aiohttp", "pydantic (<2.0)"] -quality = ["black (==23.7)", "mypy (==1.5.1)", "ruff (>=0.0.241)"] +inference = ["aiohttp", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)"] +quality = ["mypy (==1.5.1)", "ruff (>=0.1.3)"] tensorflow = ["graphviz", "pydot", "tensorflow"] -testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] +testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic (>1.1,<2.0)", "pydantic (>1.1,<3.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] torch = ["torch"] -typing = ["pydantic (<2.0)", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3"] +typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)"] [[package]] name = "hyperframe" @@ -1382,13 +1368,13 @@ requests = ">=2" [[package]] name = "langchain" -version = "0.0.335" +version = "0.0.338" description = "Building applications with LLMs through composability" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchain-0.0.335-py3-none-any.whl", hash = "sha256:f74c98366070a46953c071c69f6c01671a9437569c08406cace256ccaabdfcaf"}, - {file = "langchain-0.0.335.tar.gz", hash = "sha256:93136fe6cc9ac06a80ccf7cf581e58af5cfcc31fef1083b30165df9a9bc53f5d"}, + {file = "langchain-0.0.338-py3-none-any.whl", hash = "sha256:d9fa750f01f99c0ce04bfac4c614a142702f7b7715928c6db74ea80f4514d3dd"}, + {file = "langchain-0.0.338.tar.gz", hash = "sha256:c928cceca770b5c62b48024de163aaca5ca0539b613e7726369f2671e2934e80"}, ] [package.dependencies] @@ -1406,17 +1392,17 @@ SQLAlchemy = ">=1.4,<3" tenacity = ">=8.1.0,<9.0.0" [package.extras] -all = ["O365 (>=2.0.26,<3.0.0)", "aleph-alpha-client (>=2.15.0,<3.0.0)", "amadeus (>=8.1.0)", "arxiv (>=1.4,<2.0)", "atlassian-python-api (>=3.36.0,<4.0.0)", "awadb (>=0.3.9,<0.4.0)", "azure-ai-formrecognizer (>=3.2.1,<4.0.0)", "azure-ai-vision (>=0.11.1b1,<0.12.0)", "azure-cognitiveservices-speech (>=1.28.0,<2.0.0)", "azure-cosmos (>=4.4.0b1,<5.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "beautifulsoup4 (>=4,<5)", "clarifai (>=9.1.0)", "clickhouse-connect (>=0.5.14,<0.6.0)", "cohere (>=4,<5)", "deeplake (>=3.8.3,<4.0.0)", "docarray[hnswlib] (>=0.32.0,<0.33.0)", "duckduckgo-search (>=3.8.3,<4.0.0)", "elasticsearch (>=8,<9)", "esprima (>=4.0.1,<5.0.0)", "faiss-cpu (>=1,<2)", "google-api-python-client (==2.70.0)", "google-auth (>=2.18.1,<3.0.0)", "google-search-results (>=2,<3)", "gptcache (>=0.1.7)", "html2text (>=2020.1.16,<2021.0.0)", "huggingface_hub (>=0,<1)", "jinja2 (>=3,<4)", "jq (>=1.4.1,<2.0.0)", "lancedb (>=0.1,<0.2)", "langkit (>=0.0.6,<0.1.0)", "lark (>=1.1.5,<2.0.0)", "librosa (>=0.10.0.post2,<0.11.0)", "lxml (>=4.9.2,<5.0.0)", "manifest-ml (>=0.0.1,<0.0.2)", "marqo (>=1.2.4,<2.0.0)", "momento (>=1.10.1,<2.0.0)", "nebula3-python (>=3.4.0,<4.0.0)", "neo4j (>=5.8.1,<6.0.0)", "networkx (>=2.6.3,<4)", "nlpcloud (>=1,<2)", "nltk (>=3,<4)", "nomic (>=1.0.43,<2.0.0)", "openai (>=0,<1)", "openlm (>=0.0.5,<0.0.6)", "opensearch-py (>=2.0.0,<3.0.0)", "pdfminer-six (>=20221105,<20221106)", "pexpect (>=4.8.0,<5.0.0)", "pgvector (>=0.1.6,<0.2.0)", "pinecone-client (>=2,<3)", "pinecone-text (>=0.4.2,<0.5.0)", "psycopg2-binary (>=2.9.5,<3.0.0)", "pymongo (>=4.3.3,<5.0.0)", "pyowm (>=3.3.0,<4.0.0)", "pypdf (>=3.4.0,<4.0.0)", "pytesseract (>=0.3.10,<0.4.0)", "python-arango (>=7.5.9,<8.0.0)", "pyvespa (>=0.33.0,<0.34.0)", "qdrant-client (>=1.3.1,<2.0.0)", "rdflib (>=6.3.2,<7.0.0)", "redis (>=4,<5)", "requests-toolbelt (>=1.0.0,<2.0.0)", "sentence-transformers (>=2,<3)", "singlestoredb (>=0.7.1,<0.8.0)", "tensorflow-text (>=2.11.0,<3.0.0)", "tigrisdb (>=1.0.0b6,<2.0.0)", "tiktoken (>=0.3.2,<0.6.0)", "torch (>=1,<3)", "transformers (>=4,<5)", "weaviate-client (>=3,<4)", "wikipedia (>=1,<2)", "wolframalpha (==5.0.0)"] -azure = ["azure-ai-formrecognizer (>=3.2.1,<4.0.0)", "azure-ai-vision (>=0.11.1b1,<0.12.0)", "azure-cognitiveservices-speech (>=1.28.0,<2.0.0)", "azure-core (>=1.26.4,<2.0.0)", "azure-cosmos (>=4.4.0b1,<5.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "azure-search-documents (==11.4.0b8)", "openai (>=0,<1)"] +all = ["O365 (>=2.0.26,<3.0.0)", "aleph-alpha-client (>=2.15.0,<3.0.0)", "amadeus (>=8.1.0)", "arxiv (>=1.4,<2.0)", "atlassian-python-api (>=3.36.0,<4.0.0)", "awadb (>=0.3.9,<0.4.0)", "azure-ai-formrecognizer (>=3.2.1,<4.0.0)", "azure-ai-vision (>=0.11.1b1,<0.12.0)", "azure-cognitiveservices-speech (>=1.28.0,<2.0.0)", "azure-cosmos (>=4.4.0b1,<5.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "beautifulsoup4 (>=4,<5)", "clarifai (>=9.1.0)", "clickhouse-connect (>=0.5.14,<0.6.0)", "cohere (>=4,<5)", "deeplake (>=3.8.3,<4.0.0)", "docarray[hnswlib] (>=0.32.0,<0.33.0)", "duckduckgo-search (>=3.8.3,<4.0.0)", "elasticsearch (>=8,<9)", "esprima (>=4.0.1,<5.0.0)", "faiss-cpu (>=1,<2)", "google-api-python-client (==2.70.0)", "google-auth (>=2.18.1,<3.0.0)", "google-search-results (>=2,<3)", "gptcache (>=0.1.7)", "html2text (>=2020.1.16,<2021.0.0)", "huggingface_hub (>=0,<1)", "jinja2 (>=3,<4)", "jq (>=1.4.1,<2.0.0)", "lancedb (>=0.1,<0.2)", "langkit (>=0.0.6,<0.1.0)", "lark (>=1.1.5,<2.0.0)", "librosa (>=0.10.0.post2,<0.11.0)", "lxml (>=4.9.2,<5.0.0)", "manifest-ml (>=0.0.1,<0.0.2)", "marqo (>=1.2.4,<2.0.0)", "momento (>=1.13.0,<2.0.0)", "nebula3-python (>=3.4.0,<4.0.0)", "neo4j (>=5.8.1,<6.0.0)", "networkx (>=2.6.3,<4)", "nlpcloud (>=1,<2)", "nltk (>=3,<4)", "nomic (>=1.0.43,<2.0.0)", "openai (<2)", "openlm (>=0.0.5,<0.0.6)", "opensearch-py (>=2.0.0,<3.0.0)", "pdfminer-six (>=20221105,<20221106)", "pexpect (>=4.8.0,<5.0.0)", "pgvector (>=0.1.6,<0.2.0)", "pinecone-client (>=2,<3)", "pinecone-text (>=0.4.2,<0.5.0)", "psycopg2-binary (>=2.9.5,<3.0.0)", "pymongo (>=4.3.3,<5.0.0)", "pyowm (>=3.3.0,<4.0.0)", "pypdf (>=3.4.0,<4.0.0)", "pytesseract (>=0.3.10,<0.4.0)", "python-arango (>=7.5.9,<8.0.0)", "pyvespa (>=0.33.0,<0.34.0)", "qdrant-client (>=1.3.1,<2.0.0)", "rdflib (>=6.3.2,<7.0.0)", "redis (>=4,<5)", "requests-toolbelt (>=1.0.0,<2.0.0)", "sentence-transformers (>=2,<3)", "singlestoredb (>=0.7.1,<0.8.0)", "tensorflow-text (>=2.11.0,<3.0.0)", "tigrisdb (>=1.0.0b6,<2.0.0)", "tiktoken (>=0.3.2,<0.6.0)", "torch (>=1,<3)", "transformers (>=4,<5)", "weaviate-client (>=3,<4)", "wikipedia (>=1,<2)", "wolframalpha (==5.0.0)"] +azure = ["azure-ai-formrecognizer (>=3.2.1,<4.0.0)", "azure-ai-vision (>=0.11.1b1,<0.12.0)", "azure-cognitiveservices-speech (>=1.28.0,<2.0.0)", "azure-core (>=1.26.4,<2.0.0)", "azure-cosmos (>=4.4.0b1,<5.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "azure-search-documents (==11.4.0b8)", "openai (<2)"] clarifai = ["clarifai (>=9.1.0)"] cli = ["typer (>=0.9.0,<0.10.0)"] cohere = ["cohere (>=4,<5)"] docarray = ["docarray[hnswlib] (>=0.32.0,<0.33.0)"] embeddings = ["sentence-transformers (>=2,<3)"] -extended-testing = ["aiosqlite (>=0.19.0,<0.20.0)", "aleph-alpha-client (>=2.15.0,<3.0.0)", "anthropic (>=0.3.11,<0.4.0)", "arxiv (>=1.4,<2.0)", "assemblyai (>=0.17.0,<0.18.0)", "atlassian-python-api (>=3.36.0,<4.0.0)", "beautifulsoup4 (>=4,<5)", "bibtexparser (>=1.4.0,<2.0.0)", "cassio (>=0.1.0,<0.2.0)", "chardet (>=5.1.0,<6.0.0)", "dashvector (>=1.0.1,<2.0.0)", "esprima (>=4.0.1,<5.0.0)", "faiss-cpu (>=1,<2)", "feedparser (>=6.0.10,<7.0.0)", "fireworks-ai (>=0.6.0,<0.7.0)", "geopandas (>=0.13.1,<0.14.0)", "gitpython (>=3.1.32,<4.0.0)", "google-cloud-documentai (>=2.20.1,<3.0.0)", "gql (>=3.4.1,<4.0.0)", "html2text (>=2020.1.16,<2021.0.0)", "jinja2 (>=3,<4)", "jq (>=1.4.1,<2.0.0)", "jsonschema (>1)", "lxml (>=4.9.2,<5.0.0)", "markdownify (>=0.11.6,<0.12.0)", "motor (>=3.3.1,<4.0.0)", "mwparserfromhell (>=0.6.4,<0.7.0)", "mwxml (>=0.3.3,<0.4.0)", "newspaper3k (>=0.2.8,<0.3.0)", "numexpr (>=2.8.6,<3.0.0)", "openai (>=0,<1)", "openapi-pydantic (>=0.3.2,<0.4.0)", "pandas (>=2.0.1,<3.0.0)", "pdfminer-six (>=20221105,<20221106)", "pgvector (>=0.1.6,<0.2.0)", "psychicapi (>=0.8.0,<0.9.0)", "py-trello (>=0.19.0,<0.20.0)", "pymupdf (>=1.22.3,<2.0.0)", "pypdf (>=3.4.0,<4.0.0)", "pypdfium2 (>=4.10.0,<5.0.0)", "pyspark (>=3.4.0,<4.0.0)", "rank-bm25 (>=0.2.2,<0.3.0)", "rapidfuzz (>=3.1.1,<4.0.0)", "rapidocr-onnxruntime (>=1.3.2,<2.0.0)", "requests-toolbelt (>=1.0.0,<2.0.0)", "rspace_client (>=2.5.0,<3.0.0)", "scikit-learn (>=1.2.2,<2.0.0)", "sqlite-vss (>=0.1.2,<0.2.0)", "streamlit (>=1.18.0,<2.0.0)", "sympy (>=1.12,<2.0)", "telethon (>=1.28.5,<2.0.0)", "timescale-vector (>=0.0.1,<0.0.2)", "tqdm (>=4.48.0)", "upstash-redis (>=0.15.0,<0.16.0)", "xata (>=1.0.0a7,<2.0.0)", "xmltodict (>=0.13.0,<0.14.0)"] +extended-testing = ["aiosqlite (>=0.19.0,<0.20.0)", "aleph-alpha-client (>=2.15.0,<3.0.0)", "anthropic (>=0.3.11,<0.4.0)", "arxiv (>=1.4,<2.0)", "assemblyai (>=0.17.0,<0.18.0)", "atlassian-python-api (>=3.36.0,<4.0.0)", "beautifulsoup4 (>=4,<5)", "bibtexparser (>=1.4.0,<2.0.0)", "cassio (>=0.1.0,<0.2.0)", "chardet (>=5.1.0,<6.0.0)", "dashvector (>=1.0.1,<2.0.0)", "esprima (>=4.0.1,<5.0.0)", "faiss-cpu (>=1,<2)", "feedparser (>=6.0.10,<7.0.0)", "fireworks-ai (>=0.6.0,<0.7.0)", "geopandas (>=0.13.1,<0.14.0)", "gitpython (>=3.1.32,<4.0.0)", "google-cloud-documentai (>=2.20.1,<3.0.0)", "gql (>=3.4.1,<4.0.0)", "html2text (>=2020.1.16,<2021.0.0)", "javelin-sdk (>=0.1.8,<0.2.0)", "jinja2 (>=3,<4)", "jq (>=1.4.1,<2.0.0)", "jsonschema (>1)", "lxml (>=4.9.2,<5.0.0)", "markdownify (>=0.11.6,<0.12.0)", "motor (>=3.3.1,<4.0.0)", "mwparserfromhell (>=0.6.4,<0.7.0)", "mwxml (>=0.3.3,<0.4.0)", "newspaper3k (>=0.2.8,<0.3.0)", "numexpr (>=2.8.6,<3.0.0)", "openai (<2)", "openapi-pydantic (>=0.3.2,<0.4.0)", "pandas (>=2.0.1,<3.0.0)", "pdfminer-six (>=20221105,<20221106)", "pgvector (>=0.1.6,<0.2.0)", "psychicapi (>=0.8.0,<0.9.0)", "py-trello (>=0.19.0,<0.20.0)", "pymupdf (>=1.22.3,<2.0.0)", "pypdf (>=3.4.0,<4.0.0)", "pypdfium2 (>=4.10.0,<5.0.0)", "pyspark (>=3.4.0,<4.0.0)", "rank-bm25 (>=0.2.2,<0.3.0)", "rapidfuzz (>=3.1.1,<4.0.0)", "rapidocr-onnxruntime (>=1.3.2,<2.0.0)", "requests-toolbelt (>=1.0.0,<2.0.0)", "rspace_client (>=2.5.0,<3.0.0)", "scikit-learn (>=1.2.2,<2.0.0)", "sqlite-vss (>=0.1.2,<0.2.0)", "streamlit (>=1.18.0,<2.0.0)", "sympy (>=1.12,<2.0)", "telethon (>=1.28.5,<2.0.0)", "timescale-vector (>=0.0.1,<0.0.2)", "tqdm (>=4.48.0)", "upstash-redis (>=0.15.0,<0.16.0)", "xata (>=1.0.0a7,<2.0.0)", "xmltodict (>=0.13.0,<0.14.0)"] javascript = ["esprima (>=4.0.1,<5.0.0)"] -llms = ["clarifai (>=9.1.0)", "cohere (>=4,<5)", "huggingface_hub (>=0,<1)", "manifest-ml (>=0.0.1,<0.0.2)", "nlpcloud (>=1,<2)", "openai (>=0,<1)", "openlm (>=0.0.5,<0.0.6)", "torch (>=1,<3)", "transformers (>=4,<5)"] -openai = ["openai (>=0,<1)", "tiktoken (>=0.3.2,<0.6.0)"] +llms = ["clarifai (>=9.1.0)", "cohere (>=4,<5)", "huggingface_hub (>=0,<1)", "manifest-ml (>=0.0.1,<0.0.2)", "nlpcloud (>=1,<2)", "openai (<2)", "openlm (>=0.0.5,<0.0.6)", "torch (>=1,<3)", "transformers (>=4,<5)"] +openai = ["openai (<2)", "tiktoken (>=0.3.2,<0.6.0)"] qdrant = ["qdrant-client (>=1.3.1,<2.0.0)"] text-helpers = ["chardet (>=5.1.0,<6.0.0)"] @@ -1453,13 +1439,13 @@ six = "*" [[package]] name = "langserve" -version = "0.0.25" +version = "0.0.29" description = "" optional = false python-versions = ">=3.8.1,<4.0.0" files = [ - {file = "langserve-0.0.25-py3-none-any.whl", hash = "sha256:f4657ce257ced223c1ae354c5c425ba6c942f7d716bf9c5cfbaecb1c82bea216"}, - {file = "langserve-0.0.25.tar.gz", hash = "sha256:22f305ff2ffbe21f0e42597e13f992cca0576b34eaf3dc2706a53c928153bacd"}, + {file = "langserve-0.0.29-py3-none-any.whl", hash = "sha256:977e654ef818523afa420a5bf1374e8e6cd11d69a631c2feadc3a31e67626e8e"}, + {file = "langserve-0.0.29.tar.gz", hash = "sha256:fbcf64a50263a58b806b90cb79cea6b58e4561e3d769e3aa6b902f6322dcb5a0"}, ] [package.dependencies] @@ -1469,19 +1455,19 @@ orjson = ">=2" pydantic = ">=1" [package.extras] -all = ["fastapi (>=0.90.1)", "httpx-sse (>=0.3.1)", "sse-starlette (>=1.3.0,<2.0.0)"] +all = ["fastapi (>=0.90.1,<1)", "httpx-sse (>=0.3.1)", "sse-starlette (>=1.3.0,<2.0.0)"] client = ["httpx-sse (>=0.3.1)"] -server = ["fastapi (>=0.90.1)", "sse-starlette (>=1.3.0,<2.0.0)"] +server = ["fastapi (>=0.90.1,<1)", "sse-starlette (>=1.3.0,<2.0.0)"] [[package]] name = "langsmith" -version = "0.0.63" +version = "0.0.64" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langsmith-0.0.63-py3-none-any.whl", hash = "sha256:43a521dd10d8405ac21a0b959e3de33e2270e4abe6c73cc4036232a6990a0793"}, - {file = "langsmith-0.0.63.tar.gz", hash = "sha256:ddb2dfadfad3e05151ed8ba1643d1c516024b80fbd0c6263024400ced06a3768"}, + {file = "langsmith-0.0.64-py3-none-any.whl", hash = "sha256:461acdcd8332d1325c16dc57e8a2d5ec9d1578490a4eaabe14db74db74ceaf21"}, + {file = "langsmith-0.0.64.tar.gz", hash = "sha256:e78c02501c2cff24fff7bd2d28ff3765b21675c7f0fcf6a09932bc218603c36e"}, ] [package.dependencies] @@ -1883,6 +1869,20 @@ dev = ["black", "mypy (==0.931)", "nox", "pytest"] docs = ["sphinx", "sphinx-argparse"] image = ["Pillow"] +[[package]] +name = "permchain" +version = "0.0.6" +description = "permchain" +optional = false +python-versions = ">=3.8.1,<4.0" +files = [ + {file = "permchain-0.0.6-py3-none-any.whl", hash = "sha256:420891760db90b5f5398e53ced5361f548712d79ac7957864c769a6534392c72"}, + {file = "permchain-0.0.6.tar.gz", hash = "sha256:505171943e068f567c0dc2f4692d8654d8444347a9e9965614033cd70d5982fd"}, +] + +[package.dependencies] +langchain = ">=0.0.335" + [[package]] name = "pluggy" version = "1.3.0" @@ -1911,140 +1911,55 @@ files = [ [[package]] name = "pydantic" -version = "2.4.2" -description = "Data validation using Python type hints" +version = "1.10.13" +description = "Data validation and settings management using python type hints" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-2.4.2-py3-none-any.whl", hash = "sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1"}, - {file = "pydantic-2.4.2.tar.gz", hash = "sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7"}, + {file = "pydantic-1.10.13-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:efff03cc7a4f29d9009d1c96ceb1e7a70a65cfe86e89d34e4a5f2ab1e5693737"}, + {file = "pydantic-1.10.13-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3ecea2b9d80e5333303eeb77e180b90e95eea8f765d08c3d278cd56b00345d01"}, + {file = "pydantic-1.10.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1740068fd8e2ef6eb27a20e5651df000978edce6da6803c2bef0bc74540f9548"}, + {file = "pydantic-1.10.13-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84bafe2e60b5e78bc64a2941b4c071a4b7404c5c907f5f5a99b0139781e69ed8"}, + {file = "pydantic-1.10.13-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bc0898c12f8e9c97f6cd44c0ed70d55749eaf783716896960b4ecce2edfd2d69"}, + {file = "pydantic-1.10.13-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:654db58ae399fe6434e55325a2c3e959836bd17a6f6a0b6ca8107ea0571d2e17"}, + {file = "pydantic-1.10.13-cp310-cp310-win_amd64.whl", hash = "sha256:75ac15385a3534d887a99c713aa3da88a30fbd6204a5cd0dc4dab3d770b9bd2f"}, + {file = "pydantic-1.10.13-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c553f6a156deb868ba38a23cf0df886c63492e9257f60a79c0fd8e7173537653"}, + {file = "pydantic-1.10.13-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5e08865bc6464df8c7d61439ef4439829e3ab62ab1669cddea8dd00cd74b9ffe"}, + {file = "pydantic-1.10.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e31647d85a2013d926ce60b84f9dd5300d44535a9941fe825dc349ae1f760df9"}, + {file = "pydantic-1.10.13-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:210ce042e8f6f7c01168b2d84d4c9eb2b009fe7bf572c2266e235edf14bacd80"}, + {file = "pydantic-1.10.13-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:8ae5dd6b721459bfa30805f4c25880e0dd78fc5b5879f9f7a692196ddcb5a580"}, + {file = "pydantic-1.10.13-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f8e81fc5fb17dae698f52bdd1c4f18b6ca674d7068242b2aff075f588301bbb0"}, + {file = "pydantic-1.10.13-cp311-cp311-win_amd64.whl", hash = "sha256:61d9dce220447fb74f45e73d7ff3b530e25db30192ad8d425166d43c5deb6df0"}, + {file = "pydantic-1.10.13-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4b03e42ec20286f052490423682016fd80fda830d8e4119f8ab13ec7464c0132"}, + {file = "pydantic-1.10.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f59ef915cac80275245824e9d771ee939133be38215555e9dc90c6cb148aaeb5"}, + {file = "pydantic-1.10.13-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a1f9f747851338933942db7af7b6ee8268568ef2ed86c4185c6ef4402e80ba8"}, + {file = "pydantic-1.10.13-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:97cce3ae7341f7620a0ba5ef6cf043975cd9d2b81f3aa5f4ea37928269bc1b87"}, + {file = "pydantic-1.10.13-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:854223752ba81e3abf663d685f105c64150873cc6f5d0c01d3e3220bcff7d36f"}, + {file = "pydantic-1.10.13-cp37-cp37m-win_amd64.whl", hash = "sha256:b97c1fac8c49be29486df85968682b0afa77e1b809aff74b83081cc115e52f33"}, + {file = "pydantic-1.10.13-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c958d053453a1c4b1c2062b05cd42d9d5c8eb67537b8d5a7e3c3032943ecd261"}, + {file = "pydantic-1.10.13-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4c5370a7edaac06daee3af1c8b1192e305bc102abcbf2a92374b5bc793818599"}, + {file = "pydantic-1.10.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d6f6e7305244bddb4414ba7094ce910560c907bdfa3501e9db1a7fd7eaea127"}, + {file = "pydantic-1.10.13-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d3a3c792a58e1622667a2837512099eac62490cdfd63bd407993aaf200a4cf1f"}, + {file = "pydantic-1.10.13-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c636925f38b8db208e09d344c7aa4f29a86bb9947495dd6b6d376ad10334fb78"}, + {file = "pydantic-1.10.13-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:678bcf5591b63cc917100dc50ab6caebe597ac67e8c9ccb75e698f66038ea953"}, + {file = "pydantic-1.10.13-cp38-cp38-win_amd64.whl", hash = "sha256:6cf25c1a65c27923a17b3da28a0bdb99f62ee04230c931d83e888012851f4e7f"}, + {file = "pydantic-1.10.13-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8ef467901d7a41fa0ca6db9ae3ec0021e3f657ce2c208e98cd511f3161c762c6"}, + {file = "pydantic-1.10.13-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:968ac42970f57b8344ee08837b62f6ee6f53c33f603547a55571c954a4225691"}, + {file = "pydantic-1.10.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9849f031cf8a2f0a928fe885e5a04b08006d6d41876b8bbd2fc68a18f9f2e3fd"}, + {file = "pydantic-1.10.13-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:56e3ff861c3b9c6857579de282ce8baabf443f42ffba355bf070770ed63e11e1"}, + {file = "pydantic-1.10.13-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f00790179497767aae6bcdc36355792c79e7bbb20b145ff449700eb076c5f96"}, + {file = "pydantic-1.10.13-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:75b297827b59bc229cac1a23a2f7a4ac0031068e5be0ce385be1462e7e17a35d"}, + {file = "pydantic-1.10.13-cp39-cp39-win_amd64.whl", hash = "sha256:e70ca129d2053fb8b728ee7d1af8e553a928d7e301a311094b8a0501adc8763d"}, + {file = "pydantic-1.10.13-py3-none-any.whl", hash = "sha256:b87326822e71bd5f313e7d3bfdc77ac3247035ac10b0c0618bd99dcf95b1e687"}, + {file = "pydantic-1.10.13.tar.gz", hash = "sha256:32c8b48dcd3b2ac4e78b0ba4af3a2c2eb6048cb75202f0ea7b34feb740efc340"}, ] [package.dependencies] -annotated-types = ">=0.4.0" -pydantic-core = "2.10.1" -typing-extensions = ">=4.6.1" +typing-extensions = ">=4.2.0" [package.extras] -email = ["email-validator (>=2.0.0)"] - -[[package]] -name = "pydantic-core" -version = "2.10.1" -description = "" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pydantic_core-2.10.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:d64728ee14e667ba27c66314b7d880b8eeb050e58ffc5fec3b7a109f8cddbd63"}, - {file = "pydantic_core-2.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:48525933fea744a3e7464c19bfede85df4aba79ce90c60b94d8b6e1eddd67096"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef337945bbd76cce390d1b2496ccf9f90b1c1242a3a7bc242ca4a9fc5993427a"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1392e0638af203cee360495fd2cfdd6054711f2db5175b6e9c3c461b76f5175"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0675ba5d22de54d07bccde38997e780044dcfa9a71aac9fd7d4d7a1d2e3e65f7"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:128552af70a64660f21cb0eb4876cbdadf1a1f9d5de820fed6421fa8de07c893"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f6e6aed5818c264412ac0598b581a002a9f050cb2637a84979859e70197aa9e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ecaac27da855b8d73f92123e5f03612b04c5632fd0a476e469dfc47cd37d6b2e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3c01c2fb081fced3bbb3da78510693dc7121bb893a1f0f5f4b48013201f362e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:92f675fefa977625105708492850bcbc1182bfc3e997f8eecb866d1927c98ae6"}, - {file = "pydantic_core-2.10.1-cp310-none-win32.whl", hash = "sha256:420a692b547736a8d8703c39ea935ab5d8f0d2573f8f123b0a294e49a73f214b"}, - {file = "pydantic_core-2.10.1-cp310-none-win_amd64.whl", hash = "sha256:0880e239827b4b5b3e2ce05e6b766a7414e5f5aedc4523be6b68cfbc7f61c5d0"}, - {file = "pydantic_core-2.10.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:073d4a470b195d2b2245d0343569aac7e979d3a0dcce6c7d2af6d8a920ad0bea"}, - {file = "pydantic_core-2.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:600d04a7b342363058b9190d4e929a8e2e715c5682a70cc37d5ded1e0dd370b4"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39215d809470f4c8d1881758575b2abfb80174a9e8daf8f33b1d4379357e417c"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eeb3d3d6b399ffe55f9a04e09e635554012f1980696d6b0aca3e6cf42a17a03b"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a7902bf75779bc12ccfc508bfb7a4c47063f748ea3de87135d433a4cca7a2f"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3625578b6010c65964d177626fde80cf60d7f2e297d56b925cb5cdeda6e9925a"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:caa48fc31fc7243e50188197b5f0c4228956f97b954f76da157aae7f67269ae8"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:07ec6d7d929ae9c68f716195ce15e745b3e8fa122fc67698ac6498d802ed0fa4"}, - {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e6f31a17acede6a8cd1ae2d123ce04d8cca74056c9d456075f4f6f85de055607"}, - {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f1ebca515a03e5654f88411420fea6380fc841d1bea08effb28184e3d4899f"}, - {file = "pydantic_core-2.10.1-cp311-none-win32.whl", hash = "sha256:6db2eb9654a85ada248afa5a6db5ff1cf0f7b16043a6b070adc4a5be68c716d6"}, - {file = "pydantic_core-2.10.1-cp311-none-win_amd64.whl", hash = "sha256:4a5be350f922430997f240d25f8219f93b0c81e15f7b30b868b2fddfc2d05f27"}, - {file = "pydantic_core-2.10.1-cp311-none-win_arm64.whl", hash = "sha256:5fdb39f67c779b183b0c853cd6b45f7db84b84e0571b3ef1c89cdb1dfc367325"}, - {file = "pydantic_core-2.10.1-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:b1f22a9ab44de5f082216270552aa54259db20189e68fc12484873d926426921"}, - {file = "pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8572cadbf4cfa95fb4187775b5ade2eaa93511f07947b38f4cd67cf10783b118"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db9a28c063c7c00844ae42a80203eb6d2d6bbb97070cfa00194dff40e6f545ab"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e2a35baa428181cb2270a15864ec6286822d3576f2ed0f4cd7f0c1708472aff"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05560ab976012bf40f25d5225a58bfa649bb897b87192a36c6fef1ab132540d7"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d6495008733c7521a89422d7a68efa0a0122c99a5861f06020ef5b1f51f9ba7c"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ac492c686defc8e6133e3a2d9eaf5261b3df26b8ae97450c1647286750b901"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8282bab177a9a3081fd3d0a0175a07a1e2bfb7fcbbd949519ea0980f8a07144d"}, - {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:aafdb89fdeb5fe165043896817eccd6434aee124d5ee9b354f92cd574ba5e78f"}, - {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f6defd966ca3b187ec6c366604e9296f585021d922e666b99c47e78738b5666c"}, - {file = "pydantic_core-2.10.1-cp312-none-win32.whl", hash = "sha256:7c4d1894fe112b0864c1fa75dffa045720a194b227bed12f4be7f6045b25209f"}, - {file = "pydantic_core-2.10.1-cp312-none-win_amd64.whl", hash = "sha256:5994985da903d0b8a08e4935c46ed8daf5be1cf217489e673910951dc533d430"}, - {file = "pydantic_core-2.10.1-cp312-none-win_arm64.whl", hash = "sha256:0d8a8adef23d86d8eceed3e32e9cca8879c7481c183f84ed1a8edc7df073af94"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9badf8d45171d92387410b04639d73811b785b5161ecadabf056ea14d62d4ede"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:ebedb45b9feb7258fac0a268a3f6bec0a2ea4d9558f3d6f813f02ff3a6dc6698"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfe1090245c078720d250d19cb05d67e21a9cd7c257698ef139bc41cf6c27b4f"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e357571bb0efd65fd55f18db0a2fb0ed89d0bb1d41d906b138f088933ae618bb"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b3dcd587b69bbf54fc04ca157c2323b8911033e827fffaecf0cafa5a892a0904"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c120c9ce3b163b985a3b966bb701114beb1da4b0468b9b236fc754783d85aa3"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15d6bca84ffc966cc9976b09a18cf9543ed4d4ecbd97e7086f9ce9327ea48891"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5cabb9710f09d5d2e9e2748c3e3e20d991a4c5f96ed8f1132518f54ab2967221"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:82f55187a5bebae7d81d35b1e9aaea5e169d44819789837cdd4720d768c55d15"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1d40f55222b233e98e3921df7811c27567f0e1a4411b93d4c5c0f4ce131bc42f"}, - {file = "pydantic_core-2.10.1-cp37-none-win32.whl", hash = "sha256:14e09ff0b8fe6e46b93d36a878f6e4a3a98ba5303c76bb8e716f4878a3bee92c"}, - {file = "pydantic_core-2.10.1-cp37-none-win_amd64.whl", hash = "sha256:1396e81b83516b9d5c9e26a924fa69164156c148c717131f54f586485ac3c15e"}, - {file = "pydantic_core-2.10.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:6835451b57c1b467b95ffb03a38bb75b52fb4dc2762bb1d9dbed8de31ea7d0fc"}, - {file = "pydantic_core-2.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b00bc4619f60c853556b35f83731bd817f989cba3e97dc792bb8c97941b8053a"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fa467fd300a6f046bdb248d40cd015b21b7576c168a6bb20aa22e595c8ffcdd"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d99277877daf2efe074eae6338453a4ed54a2d93fb4678ddfe1209a0c93a2468"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aad7bd686363d1ce4ee930ad39f14e1673248373f4a9d74d2b9554f06199fb58"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:443fed67d33aa85357464f297e3d26e570267d1af6fef1c21ca50921d2976302"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e"}, - {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ecdbde46235f3d560b18be0cb706c8e8ad1b965e5c13bbba7450c86064e96561"}, - {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ed550ed05540c03f0e69e6d74ad58d026de61b9eaebebbaaf8873e585cbb18de"}, - {file = "pydantic_core-2.10.1-cp38-none-win32.whl", hash = "sha256:8cdbbd92154db2fec4ec973d45c565e767ddc20aa6dbaf50142676484cbff8ee"}, - {file = "pydantic_core-2.10.1-cp38-none-win_amd64.whl", hash = "sha256:9f6f3e2598604956480f6c8aa24a3384dbf6509fe995d97f6ca6103bb8c2534e"}, - {file = "pydantic_core-2.10.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:655f8f4c8d6a5963c9a0687793da37b9b681d9ad06f29438a3b2326d4e6b7970"}, - {file = "pydantic_core-2.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e570ffeb2170e116a5b17e83f19911020ac79d19c96f320cbfa1fa96b470185b"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64322bfa13e44c6c30c518729ef08fda6026b96d5c0be724b3c4ae4da939f875"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:485a91abe3a07c3a8d1e082ba29254eea3e2bb13cbbd4351ea4e5a21912cc9b0"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7c2b8eb9fc872e68b46eeaf835e86bccc3a58ba57d0eedc109cbb14177be531"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5cb87bdc2e5f620693148b5f8f842d293cae46c5f15a1b1bf7ceeed324a740c"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25bd966103890ccfa028841a8f30cebcf5875eeac8c4bde4fe221364c92f0c9a"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f323306d0556351735b54acbf82904fe30a27b6a7147153cbe6e19aaaa2aa429"}, - {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0c27f38dc4fbf07b358b2bc90edf35e82d1703e22ff2efa4af4ad5de1b3833e7"}, - {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f1365e032a477c1430cfe0cf2856679529a2331426f8081172c4a74186f1d595"}, - {file = "pydantic_core-2.10.1-cp39-none-win32.whl", hash = "sha256:a1c311fd06ab3b10805abb72109f01a134019739bd3286b8ae1bc2fc4e50c07a"}, - {file = "pydantic_core-2.10.1-cp39-none-win_amd64.whl", hash = "sha256:ae8a8843b11dc0b03b57b52793e391f0122e740de3df1474814c700d2622950a"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d43002441932f9a9ea5d6f9efaa2e21458221a3a4b417a14027a1d530201ef1b"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:962ed72424bf1f72334e2f1e61b68f16c0e596f024ca7ac5daf229f7c26e4208"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf5bb4dd67f20f3bbc1209ef572a259027c49e5ff694fa56bed62959b41e1f9"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e544246b859f17373bed915182ab841b80849ed9cf23f1f07b73b7c58baee5fb"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c0877239307b7e69d025b73774e88e86ce82f6ba6adf98f41069d5b0b78bd1bf"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:53df009d1e1ba40f696f8995683e067e3967101d4bb4ea6f667931b7d4a01357"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a1254357f7e4c82e77c348dabf2d55f1d14d19d91ff025004775e70a6ef40ada"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:524ff0ca3baea164d6d93a32c58ac79eca9f6cf713586fdc0adb66a8cdeab96a"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f0ac9fb8608dbc6eaf17956bf623c9119b4db7dbb511650910a82e261e6600f"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:320f14bd4542a04ab23747ff2c8a778bde727158b606e2661349557f0770711e"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63974d168b6233b4ed6a0046296803cb13c56637a7b8106564ab575926572a55"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:417243bf599ba1f1fef2bb8c543ceb918676954734e2dcb82bf162ae9d7bd514"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:dda81e5ec82485155a19d9624cfcca9be88a405e2857354e5b089c2a982144b2"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:14cfbb00959259e15d684505263d5a21732b31248a5dd4941f73a3be233865b9"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:631cb7415225954fdcc2a024119101946793e5923f6c4d73a5914d27eb3d3a05"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:bec7dd208a4182e99c5b6c501ce0b1f49de2802448d4056091f8e630b28e9a52"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:149b8a07712f45b332faee1a2258d8ef1fb4a36f88c0c17cb687f205c5dc6e7d"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d966c47f9dd73c2d32a809d2be529112d509321c5310ebf54076812e6ecd884"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7eb037106f5c6b3b0b864ad226b0b7ab58157124161d48e4b30c4a43fef8bc4b"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:154ea7c52e32dce13065dbb20a4a6f0cc012b4f667ac90d648d36b12007fa9f7"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e562617a45b5a9da5be4abe72b971d4f00bf8555eb29bb91ec2ef2be348cd132"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f23b55eb5464468f9e0e9a9935ce3ed2a870608d5f534025cd5536bca25b1402"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e9121b4009339b0f751955baf4543a0bfd6bc3f8188f8056b1a25a2d45099934"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e0e2959ef5d5b8dc9ef21e1a305a21a36e254e6a34432d00c72a92fdc5ecda5"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da01bec0a26befab4898ed83b362993c844b9a607a86add78604186297eb047e"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f2e9072d71c1f6cfc79a36d4484c82823c560e6f5599c43c1ca6b5cdbd54f881"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f36a3489d9e28fe4b67be9992a23029c3cec0babc3bd9afb39f49844a8c721c5"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f64f82cc3443149292b32387086d02a6c7fb39b8781563e0ca7b8d7d9cf72bd7"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b4a6db486ac8e99ae696e09efc8b2b9fea67b63c8f88ba7a1a16c24a057a0776"}, - {file = "pydantic_core-2.10.1.tar.gz", hash = "sha256:0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82"}, -] - -[package.dependencies] -typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" +dotenv = ["python-dotenv (>=0.10.4)"] +email = ["email-validator (>=1.0.3)"] [[package]] name = "pygithub" @@ -2311,6 +2226,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -2318,8 +2234,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -2336,6 +2259,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -2343,6 +2267,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -2877,113 +2802,113 @@ blobfile = ["blobfile (>=2)"] [[package]] name = "tokenizers" -version = "0.14.1" +version = "0.15.0" description = "" optional = false python-versions = ">=3.7" files = [ - {file = "tokenizers-0.14.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:04ec1134a18ede355a05641cdc7700f17280e01f69f2f315769f02f7e295cf1e"}, - {file = "tokenizers-0.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:638abedb39375f0ddce2de536fc9c976639b2d1b7202d715c2e7a25f0ebfd091"}, - {file = "tokenizers-0.14.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:901635098565773a44f74068639d265f19deaaca47ea77b428fd9bee13a61d87"}, - {file = "tokenizers-0.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:72e95184bf5b9a4c08153ed07c16c130ff174835c9a1e6ee2b311be758c8b3ef"}, - {file = "tokenizers-0.14.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ebefbc26ccff5e96ae7d40772172e7310174f9aa3683d2870a1882313ec3a4d5"}, - {file = "tokenizers-0.14.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d3a6330c9f1deda22873e8b4ac849cc06d3ff33d60b3217ac0bb397b541e1509"}, - {file = "tokenizers-0.14.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6cba7483ba45600346a35c466bde32327b108575022f73c35a0f7170b5a71ae2"}, - {file = "tokenizers-0.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60fec380778d75cbb492f14ca974f11f37b41d53c057b9c8ba213315b86e1f84"}, - {file = "tokenizers-0.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:930c19b699dd7e1077eac98967adc2fe5f0b104bd96cc1f26778ab82b31ceb24"}, - {file = "tokenizers-0.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a1e30a13376db5329570e09b14c8eb36c017909ed7e88591ca3aa81f3c7d6f32"}, - {file = "tokenizers-0.14.1-cp310-none-win32.whl", hash = "sha256:370b5b86da9bddbe65fa08711f0e8ffdf8b0036558178d1a31dfcb44efcde72a"}, - {file = "tokenizers-0.14.1-cp310-none-win_amd64.whl", hash = "sha256:c2c659f2106b6d154f118ad1b700e68148c46c59b720f04867b1fc5f26a85060"}, - {file = "tokenizers-0.14.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:00df4c5bf25c153b432b98689609b426ae701a44f3d8074dcb619f410bc2a870"}, - {file = "tokenizers-0.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fee553657dcdb7e73df8823c49e8611457ba46e9d7026b7e9c44820c08c327c3"}, - {file = "tokenizers-0.14.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a480bd902e327dfcaa52b7dd14fdc71e7aa45d73a3d6e41e028a75891d2823cf"}, - {file = "tokenizers-0.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e448b2be0430ab839cf7954715c39d6f34ff6cf2b49393f336283b7a59f485af"}, - {file = "tokenizers-0.14.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c11444984aecd342f0cf160c3320288edeb1763871fbb560ed466654b2a7016c"}, - {file = "tokenizers-0.14.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfe164a1c72c6be3c5c26753c6c412f81412f4dae0d7d06371e0b396a9cc0fc9"}, - {file = "tokenizers-0.14.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:72d9967fb1f927542cfb5347207fde01b29f25c9bb8cbc7ced280decfa015983"}, - {file = "tokenizers-0.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37cc955c84ec67c2d11183d372044399342b20a1fa447b7a33040f4889bba318"}, - {file = "tokenizers-0.14.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:db96cf092d86d4cb543daa9148e299011e0a40770380bb78333b9fd700586fcb"}, - {file = "tokenizers-0.14.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c84d3cb1349936c2b96ca6175b50f5a9518170bffd76464219ee0ea6022a64a7"}, - {file = "tokenizers-0.14.1-cp311-none-win32.whl", hash = "sha256:8db3a6f3d430ac3dc3793c53fa8e5e665c23ba359484d365a191027ad8b65a30"}, - {file = "tokenizers-0.14.1-cp311-none-win_amd64.whl", hash = "sha256:c65d76052561c60e17cb4fa289885ed00a9995d59e97019fac2138bd45142057"}, - {file = "tokenizers-0.14.1-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:c375161b588982be381c43eb7158c250f430793d0f708ce379a0f196164c6778"}, - {file = "tokenizers-0.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50f03d2330a153a9114c2429061137bd323736059f384de8348d7cb1ca1baa15"}, - {file = "tokenizers-0.14.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0c8ee283b249c3c3c201c41bc23adc3be2514ae4121eacdb5c5250a461eaa8c6"}, - {file = "tokenizers-0.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9f27399b8d50c5d3f08f0aae961bcc66a1dead1cd0ae9401e4c2a43a623322a"}, - {file = "tokenizers-0.14.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:89cbeec7e9d5d8773ec4779c64e3cbcbff53d234ca6ad7b1a3736588003bba48"}, - {file = "tokenizers-0.14.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:08e55920b453c30b46d58accc68a38e8e7488d0c03babfdb29c55d3f39dd2052"}, - {file = "tokenizers-0.14.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91d32bd1056c0e83a0f90e4ffa213c25096b2d8b9f0e2d172a45f138c7d8c081"}, - {file = "tokenizers-0.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44f1748035c36c939848c935715bde41734d9249ab7b844ff9bfbe984be8952c"}, - {file = "tokenizers-0.14.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1ff516d129f01bb7a4aa95bc6aae88e4d86dd63bfc2d57db9302c2624d1be7cb"}, - {file = "tokenizers-0.14.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:acfc8db61c6e919d932448cc7985b85e330c8d745528e12fce6e62d40d268bce"}, - {file = "tokenizers-0.14.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:ba336bc9107acbc1da2ad30967df7b2db93448ca66538ad86aa1fbb91116f631"}, - {file = "tokenizers-0.14.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:f77371b5030e53f8bf92197640af437539e3bba1bc8342b97888c8e26567bfdc"}, - {file = "tokenizers-0.14.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:d72d25c57a9c814240802d188ff0a808b701e2dd2bf1c64721c7088ceeeb1ed7"}, - {file = "tokenizers-0.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:caf0df8657277e32671aa8a4d3cc05f2050ab19d9b49447f2265304168e9032c"}, - {file = "tokenizers-0.14.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb3c6bc6e599e46a26ad559ad5dec260ffdf705663cc9b894033d64a69314e86"}, - {file = "tokenizers-0.14.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8cf2fcdc2368df4317e05571e33810eeed24cd594acc9dfc9788b21dac6b3a8"}, - {file = "tokenizers-0.14.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f475d5eda41d2ed51ca775a07c80529a923dd759fcff7abf03ccdd83d9f7564e"}, - {file = "tokenizers-0.14.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cce4d1a97a7eb2253b5d3f29f4a478d8c37ba0303ea34024eb9e65506d4209f8"}, - {file = "tokenizers-0.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ff66577ae55114f7d0f6aa0d4d335f27cae96bf245962a745b718ec887bbe7eb"}, - {file = "tokenizers-0.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a687099e085f5162e5b88b3402adb6c2b41046180c015c5075c9504440b6e971"}, - {file = "tokenizers-0.14.1-cp37-none-win32.whl", hash = "sha256:49f5336b82e315a33bef1025d247ca08d95719715b29e33f0e9e8cf15ff1dfb6"}, - {file = "tokenizers-0.14.1-cp37-none-win_amd64.whl", hash = "sha256:117c8da60d1bd95a6df2692926f36de7971baa1d89ff702fae47b6689a4465ad"}, - {file = "tokenizers-0.14.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:01d2bd5935642de22a6c6778bb2307f9949cd6eaeeb5c77f9b98f0060b69f0db"}, - {file = "tokenizers-0.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b05ec04132394c20bd6bcb692d557a8eb8ab1bac1646d28e49c67c00907d17c8"}, - {file = "tokenizers-0.14.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:7d9025b185465d9d18679406f6f394850347d5ed2681efc203539d800f36f459"}, - {file = "tokenizers-0.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2539831838ab5393f78a893d7bbf27d5c36e43baf77e91dc9992922b2b97e09d"}, - {file = "tokenizers-0.14.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ec8f46d533092d8e20bc742c47918cbe24b8641dbfbbcb83177c5de3c9d4decb"}, - {file = "tokenizers-0.14.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8b019c4810903fdea3b230f358b9d27377c0f38454778b607676c9e1b57d14b7"}, - {file = "tokenizers-0.14.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e8984114fd83ed3913d89526c992395920930c9620a2feee61faf035f41d7b9a"}, - {file = "tokenizers-0.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11284b32f0036fe7ef4b8b00201dda79c00f3fcea173bc0e5c599e09c937ab0f"}, - {file = "tokenizers-0.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:53614f44f36917282a583180e402105bc63d61d1aca067d51cb7f051eb489901"}, - {file = "tokenizers-0.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e3b6082e9532309727273443c8943bb9558d52e36788b246aa278bda7c642116"}, - {file = "tokenizers-0.14.1-cp38-none-win32.whl", hash = "sha256:7560fca3e17a6bc876d20cd825d7721c101fa2b1cd0bfa0abf9a2e781e49b37b"}, - {file = "tokenizers-0.14.1-cp38-none-win_amd64.whl", hash = "sha256:c318a5acb429ca38f632577754235140bbb8c5a27faca1c51b43fbf575596e34"}, - {file = "tokenizers-0.14.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:b886e0f5c72aa4249c609c24b9610a9ca83fd963cbb5066b19302723ea505279"}, - {file = "tokenizers-0.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f522f28c88a0d5b2f9e895cf405dd594cd518e99d61905406aec74d30eb6383b"}, - {file = "tokenizers-0.14.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5bef76c4d9329913cef2fe79ce1f4dab98f77fa4887e5f0420ffc9386941de32"}, - {file = "tokenizers-0.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59c7df2103052b30b7c76d4fa8251326c9f82689578a912698a127dc1737f43e"}, - {file = "tokenizers-0.14.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:232445e7b85255ccfe68dfd42185db8a3f3349b34ad7068404856c4a5f67c355"}, - {file = "tokenizers-0.14.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8e63781da85aa8948864970e529af10abc4084a990d30850c41bbdb5f83eee45"}, - {file = "tokenizers-0.14.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5760a831c0f3c6d3229b50ef3fafa4c164ec99d7e8c2237fe144e67a9d33b120"}, - {file = "tokenizers-0.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c84b456ff8525ec3ff09762e32ccc27888d036dcd0ba2883e1db491e164dd725"}, - {file = "tokenizers-0.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:463ee5f3afbfec29cbf5652752c9d1032bdad63daf48bb8cb9970064cc81d5f9"}, - {file = "tokenizers-0.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ee6b63aecf929a7bcf885bdc8a8aec96c43bc4442f63fe8c6d48f24fc992b05b"}, - {file = "tokenizers-0.14.1-cp39-none-win32.whl", hash = "sha256:aae42798ba1da3bc1572b2048fe42e61dd6bacced2b424cb0f5572c5432f79c2"}, - {file = "tokenizers-0.14.1-cp39-none-win_amd64.whl", hash = "sha256:68c4699147dded6926a3d2c2f948d435d54d027f69909e0ef3c6587933723ed2"}, - {file = "tokenizers-0.14.1-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:5f9afdcf701a1aa3c41e0e748c152d2162434d61639a1e5d8523ecf60ae35aea"}, - {file = "tokenizers-0.14.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:6859d81243cd09854be9054aca3ecab14a2dee5b3c9f6d7ef12061d478ca0c57"}, - {file = "tokenizers-0.14.1-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:7975178f9478ccedcf613332d5d6f37b67c74ef4e2e47e0c965597506b921f04"}, - {file = "tokenizers-0.14.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ce2f0ff2e5f12ac5bebaa690606395725239265d7ffa35f35c243a379316297"}, - {file = "tokenizers-0.14.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7cfc3d42e81cda802f93aa9e92caf79feaa1711426e28ce620560b8aaf5e4d"}, - {file = "tokenizers-0.14.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:67d3adff654dc7f7c7091dd259b3b847fe119c08d0bda61db91e2ea2b61c38c0"}, - {file = "tokenizers-0.14.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:956729b7dd599020e57133fb95b777e4f81ee069ff0a70e80f6eeac82658972f"}, - {file = "tokenizers-0.14.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:fe2ea1177146a7ab345ab61e90a490eeea25d5f063e1cb9d4eb1425b169b64d7"}, - {file = "tokenizers-0.14.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9930f31f603ecc6ea54d5c6dfa299f926ab3e921f72f94babcb02598c32b57c6"}, - {file = "tokenizers-0.14.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d49567a2754e9991c05c2b5a7e6650b56e24365b7cab504558e58033dcf0edc4"}, - {file = "tokenizers-0.14.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3678be5db330726f19c1949d8ae1b845a02eeb2a2e1d5a8bb8eaa82087ae25c1"}, - {file = "tokenizers-0.14.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:42b180ed1bec58ab9bdc65d406577e0c0fb7241b74b8c032846073c7743c9f86"}, - {file = "tokenizers-0.14.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:319e4367596fb0d52be645b3de1616faf0fadaf28507ce1c7595bebd9b4c402c"}, - {file = "tokenizers-0.14.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:2cda65b689aec63b7c76a77f43a08044fa90bbc6ad9849267cedfee9795913f3"}, - {file = "tokenizers-0.14.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:ca0bfc79b27d84fcb7fa09339b2ee39077896738d9a30ff99c0332376e985072"}, - {file = "tokenizers-0.14.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a7093767e070269e22e2c5f845e46510304f124c32d2cd249633c0f27eb29d86"}, - {file = "tokenizers-0.14.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad759ba39cd32c2c2247864d02c84ea5883b5f6cc6a4ee0c95602a3dde52268f"}, - {file = "tokenizers-0.14.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26fee36a6d8f2bd9464f3566b95e3e3fb7fd7dad723f775c500aac8204ec98c6"}, - {file = "tokenizers-0.14.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d091c62cb7abbd32e527a85c41f7c8eb4526a926251891fc4ecbe5f974142ffb"}, - {file = "tokenizers-0.14.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ca304402ea66d58f99c05aa3d7a6052faea61e5a8313b94f6bc36fbf27960e2d"}, - {file = "tokenizers-0.14.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:102f118fa9b720b93c3217c1e239ed7bc1ae1e8dbfe9b4983a4f2d7b4ce6f2ec"}, - {file = "tokenizers-0.14.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:df4f058e96e8b467b7742e5dba7564255cd482d3c1e6cf81f8cb683bb0433340"}, - {file = "tokenizers-0.14.1-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:040ee44efc1806900de72b13c1c3036154077d9cde189c9a7e7a50bbbdcbf39f"}, - {file = "tokenizers-0.14.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7618b84118ae704f7fa23c4a190bd80fc605671841a4427d5ca14b9b8d9ec1a3"}, - {file = "tokenizers-0.14.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ecdfe9736c4a73343f629586016a137a10faed1a29c6dc699d8ab20c2d3cf64"}, - {file = "tokenizers-0.14.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:92c34de04fec7f4ff95f7667d4eb085c4e4db46c31ef44c3d35c38df128430da"}, - {file = "tokenizers-0.14.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:628b654ba555b2ba9111c0936d558b14bfc9d5f57b8c323b02fc846036b38b2f"}, - {file = "tokenizers-0.14.1.tar.gz", hash = "sha256:ea3b3f8908a9a5b9d6fc632b5f012ece7240031c44c6d4764809f33736534166"}, -] - -[package.dependencies] -huggingface_hub = ">=0.16.4,<0.18" + {file = "tokenizers-0.15.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:cd3cd0299aaa312cd2988957598f80becd04d5a07338741eca076057a2b37d6e"}, + {file = "tokenizers-0.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a922c492c721744ee175f15b91704be2d305569d25f0547c77cd6c9f210f9dc"}, + {file = "tokenizers-0.15.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:331dd786d02fc38698f835fff61c99480f98b73ce75a4c65bd110c9af5e4609a"}, + {file = "tokenizers-0.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88dd0961c437d413ab027f8b115350c121d49902cfbadf08bb8f634b15fa1814"}, + {file = "tokenizers-0.15.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6fdcc55339df7761cd52e1fbe8185d3b3963bc9e3f3545faa6c84f9e8818259a"}, + {file = "tokenizers-0.15.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1480b0051d8ab5408e8e4db2dc832f7082ea24aa0722c427bde2418c6f3bd07"}, + {file = "tokenizers-0.15.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9855e6c258918f9cf62792d4f6ddfa6c56dccd8c8118640f867f6393ecaf8bd7"}, + {file = "tokenizers-0.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de9529fe75efcd54ba8d516aa725e1851df9199f0669b665c55e90df08f5af86"}, + {file = "tokenizers-0.15.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8edcc90a36eab0705fe9121d6c77c6e42eeef25c7399864fd57dfb27173060bf"}, + {file = "tokenizers-0.15.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ae17884aafb3e94f34fb7cfedc29054f5f54e142475ebf8a265a4e388fee3f8b"}, + {file = "tokenizers-0.15.0-cp310-none-win32.whl", hash = "sha256:9a3241acdc9b44cff6e95c4a55b9be943ef3658f8edb3686034d353734adba05"}, + {file = "tokenizers-0.15.0-cp310-none-win_amd64.whl", hash = "sha256:4b31807cb393d6ea31926b307911c89a1209d5e27629aa79553d1599c8ffdefe"}, + {file = "tokenizers-0.15.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:af7e9be8c05d30bb137b9fd20f9d99354816599e5fd3d58a4b1e28ba3b36171f"}, + {file = "tokenizers-0.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c3d7343fa562ea29661783344a2d83662db0d3d17a6fa6a403cac8e512d2d9fd"}, + {file = "tokenizers-0.15.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:32371008788aeeb0309a9244809a23e4c0259625e6b74a103700f6421373f395"}, + {file = "tokenizers-0.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca9db64c7c9954fbae698884c5bb089764edc549731e5f9b7fa1dd4e4d78d77f"}, + {file = "tokenizers-0.15.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dbed5944c31195514669cf6381a0d8d47f164943000d10f93d6d02f0d45c25e0"}, + {file = "tokenizers-0.15.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aab16c4a26d351d63e965b0c792f5da7227a37b69a6dc6d922ff70aa595b1b0c"}, + {file = "tokenizers-0.15.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3c2b60b12fdd310bf85ce5d7d3f823456b9b65eed30f5438dd7761879c495983"}, + {file = "tokenizers-0.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0344d6602740e44054a9e5bbe9775a5e149c4dddaff15959bb07dcce95a5a859"}, + {file = "tokenizers-0.15.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4525f6997d81d9b6d9140088f4f5131f6627e4c960c2c87d0695ae7304233fc3"}, + {file = "tokenizers-0.15.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:65975094fef8cc68919644936764efd2ce98cf1bacbe8db2687155d2b0625bee"}, + {file = "tokenizers-0.15.0-cp311-none-win32.whl", hash = "sha256:ff5d2159c5d93015f5a4542aac6c315506df31853123aa39042672031768c301"}, + {file = "tokenizers-0.15.0-cp311-none-win_amd64.whl", hash = "sha256:2dd681b53cf615e60a31a115a3fda3980e543d25ca183797f797a6c3600788a3"}, + {file = "tokenizers-0.15.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:c9cce6ee149a3d703f86877bc2a6d997e34874b2d5a2d7839e36b2273f31d3d9"}, + {file = "tokenizers-0.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a0a94bc3370e6f1cc8a07a8ae867ce13b7c1b4291432a773931a61f256d44ea"}, + {file = "tokenizers-0.15.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:309cfcccfc7e502cb1f1de2c9c1c94680082a65bfd3a912d5a5b2c90c677eb60"}, + {file = "tokenizers-0.15.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8413e994dd7d875ab13009127fc85633916c71213917daf64962bafd488f15dc"}, + {file = "tokenizers-0.15.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d0ebf9430f901dbdc3dcb06b493ff24a3644c9f88c08e6a1d6d0ae2228b9b818"}, + {file = "tokenizers-0.15.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10361e9c7864b22dd791ec5126327f6c9292fb1d23481d4895780688d5e298ac"}, + {file = "tokenizers-0.15.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:babe42635b8a604c594bdc56d205755f73414fce17ba8479d142a963a6c25cbc"}, + {file = "tokenizers-0.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3768829861e964c7a4556f5f23307fce6a23872c2ebf030eb9822dbbbf7e9b2a"}, + {file = "tokenizers-0.15.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9c91588a630adc88065e1c03ac6831e3e2112558869b9ebcb2b8afd8a14c944d"}, + {file = "tokenizers-0.15.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:77606994e793ca54ecf3a3619adc8a906a28ca223d9354b38df41cb8766a0ed6"}, + {file = "tokenizers-0.15.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:6fe143939f3b596681922b2df12a591a5b010e7dcfbee2202482cd0c1c2f2459"}, + {file = "tokenizers-0.15.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:b7bee0f1795e3e3561e9a557061b1539e5255b8221e3f928f58100282407e090"}, + {file = "tokenizers-0.15.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5d37e7f4439b4c46192ab4f2ff38ab815e4420f153caa13dec9272ef14403d34"}, + {file = "tokenizers-0.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:caadf255cf7f951b38d10097836d1f3bcff4aeaaffadfdf748bab780bf5bff95"}, + {file = "tokenizers-0.15.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:05accb9162bf711a941b1460b743d62fec61c160daf25e53c5eea52c74d77814"}, + {file = "tokenizers-0.15.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:26a2ef890740127cb115ee5260878f4a677e36a12831795fd7e85887c53b430b"}, + {file = "tokenizers-0.15.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e54c5f26df14913620046b33e822cb3bcd091a332a55230c0e63cc77135e2169"}, + {file = "tokenizers-0.15.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:669b8ed653a578bcff919566631156f5da3aab84c66f3c0b11a6281e8b4731c7"}, + {file = "tokenizers-0.15.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0ea480d943297df26f06f508dab6e012b07f42bf3dffdd36e70799368a5f5229"}, + {file = "tokenizers-0.15.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bc80a0a565ebfc7cd89de7dd581da8c2b3238addfca6280572d27d763f135f2f"}, + {file = "tokenizers-0.15.0-cp37-none-win32.whl", hash = "sha256:cdd945e678bbdf4517d5d8de66578a5030aeefecdb46f5320b034de9cad8d4dd"}, + {file = "tokenizers-0.15.0-cp37-none-win_amd64.whl", hash = "sha256:1ab96ab7dc706e002c32b2ea211a94c1c04b4f4de48354728c3a6e22401af322"}, + {file = "tokenizers-0.15.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:f21c9eb71c9a671e2a42f18b456a3d118e50c7f0fc4dd9fa8f4eb727fea529bf"}, + {file = "tokenizers-0.15.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2a5f4543a35889679fc3052086e69e81880b2a5a28ff2a52c5a604be94b77a3f"}, + {file = "tokenizers-0.15.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f8aa81afec893e952bd39692b2d9ef60575ed8c86fce1fd876a06d2e73e82dca"}, + {file = "tokenizers-0.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1574a5a4af22c3def93fe8fe4adcc90a39bf5797ed01686a4c46d1c3bc677d2f"}, + {file = "tokenizers-0.15.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7c7982fd0ec9e9122d03b209dac48cebfea3de0479335100ef379a9a959b9a5a"}, + {file = "tokenizers-0.15.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8d16b647032df2ce2c1f9097236e046ea9fedd969b25637b9d5d734d78aa53b"}, + {file = "tokenizers-0.15.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b3cdf29e6f9653da330515dc8fa414be5a93aae79e57f8acc50d4028dd843edf"}, + {file = "tokenizers-0.15.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7286f3df10de840867372e3e64b99ef58c677210e3ceb653cd0e740a5c53fe78"}, + {file = "tokenizers-0.15.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aabc83028baa5a36ce7a94e7659250f0309c47fa4a639e5c2c38e6d5ea0de564"}, + {file = "tokenizers-0.15.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:72f78b0e0e276b1fc14a672fa73f3acca034ba8db4e782124a2996734a9ba9cf"}, + {file = "tokenizers-0.15.0-cp38-none-win32.whl", hash = "sha256:9680b0ecc26e7e42f16680c1aa62e924d58d1c2dd992707081cc10a374896ea2"}, + {file = "tokenizers-0.15.0-cp38-none-win_amd64.whl", hash = "sha256:f17cbd88dab695911cbdd385a5a7e3709cc61dff982351f5d1b5939f074a2466"}, + {file = "tokenizers-0.15.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:3661862df7382c5eb23ac4fbf7c75e69b02dc4f5784e4c5a734db406b5b24596"}, + {file = "tokenizers-0.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3045d191dad49647f5a5039738ecf1c77087945c7a295f7bcf051c37067e883"}, + {file = "tokenizers-0.15.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a9fcaad9ab0801f14457d7c820d9f246b5ab590c407fc6b073819b1573097aa7"}, + {file = "tokenizers-0.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a79f17027f24fe9485701c8dbb269b9c713954ec3bdc1e7075a66086c0c0cd3c"}, + {file = "tokenizers-0.15.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:01a3aa332abc4bee7640563949fcfedca4de8f52691b3b70f2fc6ca71bfc0f4e"}, + {file = "tokenizers-0.15.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05b83896a893cdfedad8785250daa3ba9f0504848323471524d4783d7291661e"}, + {file = "tokenizers-0.15.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cbbf2489fcf25d809731ba2744ff278dd07d9eb3f8b7482726bd6cae607073a4"}, + {file = "tokenizers-0.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab806ad521a5e9de38078b7add97589c313915f6f5fec6b2f9f289d14d607bd6"}, + {file = "tokenizers-0.15.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a522612d5c88a41563e3463226af64e2fa00629f65cdcc501d1995dd25d23f5"}, + {file = "tokenizers-0.15.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e58a38c4e6075810bdfb861d9c005236a72a152ebc7005941cc90d1bbf16aca9"}, + {file = "tokenizers-0.15.0-cp39-none-win32.whl", hash = "sha256:b8034f1041fd2bd2b84ff9f4dc4ae2e1c3b71606820a9cd5c562ebd291a396d1"}, + {file = "tokenizers-0.15.0-cp39-none-win_amd64.whl", hash = "sha256:edde9aa964145d528d0e0dbf14f244b8a85ebf276fb76869bc02e2530fa37a96"}, + {file = "tokenizers-0.15.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:309445d10d442b7521b98083dc9f0b5df14eca69dbbfebeb98d781ee2cef5d30"}, + {file = "tokenizers-0.15.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d3125a6499226d4d48efc54f7498886b94c418e93a205b673bc59364eecf0804"}, + {file = "tokenizers-0.15.0-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ed56ddf0d54877bb9c6d885177db79b41576e61b5ef6defeb579dcb803c04ad5"}, + {file = "tokenizers-0.15.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b22cd714706cc5b18992a232b023f736e539495f5cc61d2d28d176e55046f6c"}, + {file = "tokenizers-0.15.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fac2719b1e9bc8e8e7f6599b99d0a8e24f33d023eb8ef644c0366a596f0aa926"}, + {file = "tokenizers-0.15.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:85ddae17570ec7e5bfaf51ffa78d044f444a8693e1316e1087ee6150596897ee"}, + {file = "tokenizers-0.15.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:76f1bed992e396bf6f83e3df97b64ff47885e45e8365f8983afed8556a0bc51f"}, + {file = "tokenizers-0.15.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:3bb0f4df6dce41a1c7482087b60d18c372ef4463cb99aa8195100fcd41e0fd64"}, + {file = "tokenizers-0.15.0-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:22c27672c27a059a5f39ff4e49feed8c7f2e1525577c8a7e3978bd428eb5869d"}, + {file = "tokenizers-0.15.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78104f5d035c9991f92831fc0efe9e64a05d4032194f2a69f67aaa05a4d75bbb"}, + {file = "tokenizers-0.15.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a40b73dc19d82c3e3ffb40abdaacca8fbc95eeb26c66b7f9f860aebc07a73998"}, + {file = "tokenizers-0.15.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d801d1368188c74552cd779b1286e67cb9fd96f4c57a9f9a2a09b6def9e1ab37"}, + {file = "tokenizers-0.15.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:82641ffb13a4da1293fcc9f437d457647e60ed0385a9216cd135953778b3f0a1"}, + {file = "tokenizers-0.15.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:160f9d1810f2c18fffa94aa98bf17632f6bd2dabc67fcb01a698ca80c37d52ee"}, + {file = "tokenizers-0.15.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:8d7d6eea831ed435fdeeb9bcd26476226401d7309d115a710c65da4088841948"}, + {file = "tokenizers-0.15.0-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f6456bec6c557d63d8ec0023758c32f589e1889ed03c055702e84ce275488bed"}, + {file = "tokenizers-0.15.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1eef39a502fad3bf104b9e1906b4fb0cee20e44e755e51df9a98f8922c3bf6d4"}, + {file = "tokenizers-0.15.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1e4664c5b797e093c19b794bbecc19d2367e782b4a577d8b7c1821db5dc150d"}, + {file = "tokenizers-0.15.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:ca003fb5f3995ff5cf676db6681b8ea5d54d3b30bea36af1120e78ee1a4a4cdf"}, + {file = "tokenizers-0.15.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:7f17363141eb0c53752c89e10650b85ef059a52765d0802ba9613dbd2d21d425"}, + {file = "tokenizers-0.15.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:8a765db05581c7d7e1280170f2888cda351760d196cc059c37ea96f121125799"}, + {file = "tokenizers-0.15.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:2a0dd641a72604486cd7302dd8f87a12c8a9b45e1755e47d2682733f097c1af5"}, + {file = "tokenizers-0.15.0-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0a1a3c973e4dc97797fc19e9f11546c95278ffc55c4492acb742f69e035490bc"}, + {file = "tokenizers-0.15.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4fab75642aae4e604e729d6f78e0addb9d7e7d49e28c8f4d16b24da278e5263"}, + {file = "tokenizers-0.15.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65f80be77f6327a86d8fd35a4467adcfe6174c159b4ab52a1a8dd4c6f2d7d9e1"}, + {file = "tokenizers-0.15.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a8da7533dbe66b88afd430c56a2f2ce1fd82e2681868f857da38eeb3191d7498"}, + {file = "tokenizers-0.15.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:fa8eb4584fc6cbe6a84d7a7864be3ed28e23e9fd2146aa8ef1814d579df91958"}, + {file = "tokenizers-0.15.0.tar.gz", hash = "sha256:10c7e6e7b4cabd757da59e93f5f8d1126291d16f8b54f28510825ef56a3e5d0e"}, +] + +[package.dependencies] +huggingface_hub = ">=0.16.4,<1.0" [package.extras] dev = ["tokenizers[testing]"] @@ -3422,4 +3347,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "37414ed34cf3f379d6589da067bed4a6e7f1c434342dd8f3e39ec0f22553c1fc" +content-hash = "12719c7283f8c9d8433c84c40d3ada12d4f5bcf0689adc63fde2d706184a9e03" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index f5ff03d0..11476340 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "lang-gizmo" +name = "opengpts" version = "0.1.0" description = "" authors = ["Your Name "] @@ -22,8 +22,9 @@ orjson = "^3.9.10" redis = "^5.0.1" python-multipart = "^0.0.6" tiktoken = "^0.5.1" -langchain = "^0.0.335" -python-magic = "^0.4.27" +langchain = ">=0.0.338" +permchain = "0.0.6" +pydantic = "<2.0" [tool.poetry.group.dev.dependencies] uvicorn = "^0.23.2" diff --git a/backend/tests/unit_tests/app/test_app.py b/backend/tests/unit_tests/app/test_app.py index c38d156f..ab7879ee 100644 --- a/backend/tests/unit_tests/app/test_app.py +++ b/backend/tests/unit_tests/app/test_app.py @@ -109,7 +109,7 @@ async def test_list_and_create_assistants(redis_client: RedisType) -> None: # Check not visible to other users headers = {"Cookie": "opengpts_user_id=2"} response = await client.get("/assistants/", headers=headers) - assert response.status_code == 200 + assert response.status_code == 200, response.text assert response.json() == [] @@ -122,7 +122,7 @@ async def test_threads(redis_client: RedisType) -> None: json={"name": "bobby", "assistant_id": "bobby"}, headers={"Cookie": "opengpts_user_id=1"}, ) - assert response.status_code == 200 + assert response.status_code == 200, response.text response = await client.get( "/threads/1/messages", headers={"Cookie": "opengpts_user_id=1"} diff --git a/backend/tests/unit_tests/conftest.py b/backend/tests/unit_tests/conftest.py index 169452f9..f66e27e1 100644 --- a/backend/tests/unit_tests/conftest.py +++ b/backend/tests/unit_tests/conftest.py @@ -4,3 +4,4 @@ os.environ["REDIS_URL"] = "redis://localhost:6379/3" os.environ["OPENAI_API_KEY"] = "test" os.environ["YDC_API_KEY"] = "test" +os.environ["TAVILY_API_KEY"] = "test" diff --git a/backend/ui/assets/index-030c7d0e.js b/backend/ui/assets/index-030c7d0e.js new file mode 100644 index 00000000..50e86f46 --- /dev/null +++ b/backend/ui/assets/index-030c7d0e.js @@ -0,0 +1,123 @@ +var tE=Object.defineProperty;var nE=(e,t,n)=>t in e?tE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ot=(e,t,n)=>(nE(e,typeof t!="symbol"?t+"":t,n),n),rE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var ss=(e,t,n)=>(rE(e,t,"access private method"),n);function oE(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Lc={},l1={exports:{}},at={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var lu=Symbol.for("react.element"),iE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),uE=Symbol.for("react.profiler"),sE=Symbol.for("react.provider"),cE=Symbol.for("react.context"),fE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),hE=Symbol.for("react.lazy"),Iv=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=Iv&&e[Iv]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,c1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}Ra.prototype.isReactComponent={};Ra.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ra.prototype;function bh(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}var Sh=bh.prototype=new f1;Sh.constructor=bh;s1(Sh,Ra.prototype);Sh.isPureReactComponent=!0;var Lv=Array.isArray,d1=Object.prototype.hasOwnProperty,Eh={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,G=X[N];if(0>>1;No(ie,_e))reo(Se,ie)?(X[N]=Se,X[re]=_e,N=re):(X[N]=ie,X[Z]=_e,N=Z);else if(reo(Se,_e))X[N]=Se,X[re]=_e,N=re;else break e}}return ne}function o(X,ne){var _e=X.sortIndex-ne.sortIndex;return _e!==0?_e:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=X)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function k(X){if(E=!1,S(X),!b)if(n(c)!==null)b=!0,De(C);else{var ne=n(f);ne!==null&&Be(k,ne.startTime-X)}}function C(X,ne){b=!1,E&&(E=!1,_(U),U=-1),y=!0;var _e=g;try{for(S(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||X&&!K());){var N=p.callback;if(typeof N=="function"){p.callback=null,g=p.priorityLevel;var G=N(p.expirationTime<=ne);ne=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(c)&&r(c),S(ne)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var Z=n(f);Z!==null&&Be(k,Z.startTime-ne),oe=!1}return oe}finally{p=null,g=_e,y=!1}}var $=!1,L=null,U=-1,ce=5,z=-1;function K(){return!(e.unstable_now()-zX||125N?(X.sortIndex=_e,t(f,X),n(c)===null&&X===n(f)&&(E?(_(U),U=-1):E=!0,Be(k,_e-N))):(X.sortIndex=G,t(c,X),b||y||(b=!0,De(C))),X},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(X){var ne=g;return function(){var _e=g;g=ne;try{return X.apply(this,arguments)}finally{g=_e}}}})(y1);v1.exports=y1;var TE=v1.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var w1=j,sr=TE;function ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lp=Object.prototype.hasOwnProperty,CE=/^[: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]*$/,Fv={},zv={};function OE(e){return lp.call(zv,e)?!0:lp.call(Fv,e)?!1:CE.test(e)?zv[e]=!0:(Fv[e]=!0,!1)}function AE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jE(e,t,n,r){if(t===null||typeof t>"u"||AE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xn[e]=new zn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Ch(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});xn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var o=xn.hasOwnProperty(t)?xn[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var c=` +`+o[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{_d=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tl(e):""}function PE(e){switch(e.tag){case 5:return Tl(e.type);case 16:return Tl("Lazy");case 13:return Tl("Suspense");case 19:return Tl("SuspenseList");case 0:case 2:case 15:return e=xd(e.type,!1),e;case 11:return e=xd(e.type.render,!1),e;case 1:return e=xd(e.type,!0),e;default:return""}}function fp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ua:return"Fragment";case la:return"Portal";case up:return"Profiler";case Ah:return"StrictMode";case sp:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function RE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fp(t);case 8:return t===Ah?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ps(e){e._valueTracker||(e._valueTracker=$E(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dp(e,t){var n=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function T1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function pp(e,t){T1(e,t);var n=ui(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hp(e,t.type,n):t.hasOwnProperty("defaultValue")&&hp(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hp(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},NE=["Webkit","ms","Moz","O"];Object.keys(Pl).forEach(function(e){NE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pl[t]=Pl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pl.hasOwnProperty(e)&&Pl[e]?(""+t).trim():t+"px"}function P1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var DE=Qt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vp(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function yp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 wp=null;function Rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _p=null,_a=null,xa=null;function Vv(e){if(e=cu(e)){if(typeof _p!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=Bc(t),_p(e.stateNode,e.type,t))}}function R1(e){_a?xa?xa.push(e):xa=[e]:_a=e}function $1(){if(_a){var e=_a,t=xa;if(xa=_a=null,Vv(e),t)for(e=0;e>>=0,e===0?32:31-(VE(e)/qE|0)|0}var gs=64,ms=4194304;function Ol(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ol(s):(i&=l,i!==0&&(r=Ol(i)))}else l=n&~o,l!==0?r=Ol(l):i!==0&&(r=Ol(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function uu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fr(t),e[t]=n}function XE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=$l),t0=String.fromCharCode(32),n0=!1;function J1(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function Ck(e,t){switch(e){case"compositionend":return ew(t);case"keypress":return t.which!==32?null:(n0=!0,t0);case"textInput":return e=t.data,e===t0&&n0?null:e;default:return null}}function Ok(e,t){if(sa)return e==="compositionend"||!zh&&J1(e,t)?(e=X1(),Us=Lh=Xo=null,sa=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=a0(n)}}function ow(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ow(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iw(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Uh(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")}function Lk(e){var t=iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ow(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=l0(n,i);var l=l0(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ca=null,Tp=null,Dl=null,Cp=!1;function u0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||ca==null||ca!==Zs(r)||(r=ca,"selectionStart"in r&&Uh(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}),Dl&&Ql(Dl,r)||(Dl=r,r=ic(Tp,"onSelect"),0pa||(e.current=$p[pa],$p[pa]=null,pa--)}function Pt(e,t){pa++,$p[pa]=e.current,e.current=t}var si={},jn=fi(si),Kn=fi(!1),Ni=si;function Ta(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function lc(){Lt(Kn),Lt(jn)}function g0(e,t,n){if(jn.current!==si)throw Error(ue(168));Pt(jn,t),Pt(Kn,n)}function hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ue(108,RE(e)||"Unknown",o));return Qt({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ni=jn.current,Pt(jn,e),Pt(Kn,Kn.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=hw(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Lt(Kn),Lt(jn),Pt(jn,e)):Lt(Kn),Pt(Kn,n)}var yo=null,Hc=!1,Dd=!1;function gw(e){yo===null?yo=[e]:yo.push(e)}function Qk(e){Hc=!0,gw(e)}function di(){if(!Dd&&yo!==null){Dd=!0;var e=0,t=Et;try{var n=yo;for(Et=1;e>=l,o-=l,wo=1<<32-Fr(t)+o|n<U?(ce=L,L=null):ce=L.sibling;var z=g(_,L,S[U],k);if(z===null){L===null&&(L=ce);break}e&&L&&z.alternate===null&&t(_,L),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z,L=ce}if(U===S.length)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;UU?(ce=L,L=null):ce=L.sibling;var K=g(_,L,z.value,k);if(K===null){L===null&&(L=ce);break}e&&L&&K.alternate===null&&t(_,L),w=i(K,w,U),$===null?C=K:$.sibling=K,$=K,L=ce}if(z.done)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;!z.done;U++,z=S.next())z=p(_,z.value,k),z!==null&&(w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return zt&&xi(_,U),C}for(L=r(_,L);!z.done;U++,z=S.next())z=y(L,_,U,z.value,k),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?U:z.key),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return e&&L.forEach(function(W){return t(_,W)}),zt&&xi(_,U),C}function O(_,w,S,k){if(typeof S=="object"&&S!==null&&S.type===ua&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:e:{for(var C=S.key,$=w;$!==null;){if($.key===C){if(C=S.type,C===ua){if($.tag===7){n(_,$.sibling),w=o($,S.props.children),w.return=_,_=w;break e}}else if($.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Vo&&S0(C)===$.type){n(_,$.sibling),w=o($,S.props),w.ref=gl(_,$,S),w.return=_,_=w;break e}n(_,$);break}else t(_,$);$=$.sibling}S.type===ua?(w=Ri(S.props.children,_.mode,k,S.key),w.return=_,_=w):(k=Qs(S.type,S.key,S.props,null,_.mode,k),k.ref=gl(_,w,S),k.return=_,_=k)}return l(_);case la:e:{for($=S.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=o(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=Hd(S,_.mode,k),w.return=_,_=w}return l(_);case Vo:return $=S._init,O(_,w,$(S._payload),k)}if(Cl(S))return b(_,w,S,k);if(cl(S))return E(_,w,S,k);Ss(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=o(w,S),w.return=_,_=w):(n(_,w),w=Bd(S,_.mode,k),w.return=_,_=w),l(_)):n(_,w)}return O}var Oa=Sw(!0),Ew=Sw(!1),fu={},oo=fi(fu),Jl=fi(fu),eu=fi(fu);function Oi(e){if(e===fu)throw Error(ue(174));return e}function Yh(e,t){switch(Pt(eu,t),Pt(Jl,e),Pt(oo,fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mp(t,e)}Lt(oo),Pt(oo,t)}function Aa(){Lt(oo),Lt(Jl),Lt(eu)}function kw(e){Oi(eu.current);var t=Oi(oo.current),n=mp(t,e.type);t!==n&&(Pt(Jl,e),Pt(oo,n))}function Xh(e){Jl.current===e&&(Lt(oo),Lt(Jl))}var qt=fi(0);function hc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 Id=[];function Zh(){for(var e=0;en?n:4,e(!0);var r=Ld.transition;Ld.transition={};try{e(!1),t()}finally{Et=n,Ld.transition=r}}function Uw(){return Cr().memoizedState}function Jk(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bw(e))Hw(t,n);else if(n=ww(e,t,n,r),n!==null){var o=Ln();zr(n,e,r,o),Ww(n,t,r)}}function e2(e,t,n){var r=ai(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bw(e))Hw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Ur(s,l)){var c=t.interleaved;c===null?(o.next=o,Kh(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=ww(e,t,o,r),n!==null&&(o=Ln(),zr(n,e,r,o),Ww(n,t,r))}}function Bw(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function Hw(e,t){Il=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var mc={readContext:Tr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},t2={readContext:Tr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:k0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,Iw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jk.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:E0,useDebugValue:rg,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=E0(!1),t=e[0];return e=Zk.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,o=Jr();if(zt){if(n===void 0)throw Error(ue(407));n=n()}else{if(n=t(),mn===null)throw Error(ue(349));Ii&30||Ow(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,k0(jw.bind(null,r,i,e),[e]),r.flags|=2048,ru(9,Aw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=mn.identifierPrefix;if(zt){var n=_o,r=wo;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[eo]=t,e[Zl]=r,Jw(e,t,!1,!1),t.stateNode=e;e:{switch(l=yp(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),o=r;break;case"iframe":case"object":case"embed":Dt("load",e),o=r;break;case"video":case"audio":for(o=0;oPa&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=hc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!zt)return Tn(t),null}else 2*nn()-i.renderingStartTime>Pa&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=qt.current,Pt(qt,r?n&1|2:n&1),t):(Tn(t),null);case 22:case 23:return sg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function s2(e,t){switch(Hh(t),t.tag){case 1:return Qn(t.type)&&lc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(),Lt(Kn),Lt(jn),Zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xh(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Aa(),null;case 10:return qh(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var ks=!1,Cn=!1,c2=typeof WeakSet=="function"?WeakSet:Set,we=null;function va(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Gp(e,t,n){try{n()}catch(r){en(e,t,r)}}var N0=!1;function f2(e,t){if(Op=rc,e=iw(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,f=0,h=0,p=e,g=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(s=l+o),p!==i||r!==0&&p.nodeType!==3||(c=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===e)break t;if(g===n&&++f===o&&(s=l),g===i&&++h===r&&(c=l),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ap={focusedElem:e,selectionRange:n},rc=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var E=b.memoizedProps,O=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ir(t.type,E),O);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(k){en(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return b=N0,N0=!1,b}function Ll(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gp(t,n,i)}o=o.next}while(o!==r)}}function Vc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function n_(e){var t=e.alternate;t!==null&&(e.alternate=null,n_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Zl],delete t[Rp],delete t[qk],delete t[Kk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function r_(e){return e.tag===5||e.tag===3||e.tag===4}function D0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r_(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ac));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Kp(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&&(e=e.child,e!==null))for(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}var wn=null,Lr=!1;function Bo(e,t,n){for(n=n.child;n!==null;)o_(e,t,n),n=n.sibling}function o_(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Cn||va(n,t);case 6:var r=wn,o=Lr;wn=null,Bo(e,t,n),wn=r,Lr=o,wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ql(e)):Nd(wn,n.stateNode));break;case 4:r=wn,o=Lr,wn=n.stateNode.containerInfo,Lr=!0,Bo(e,t,n),wn=r,Lr=o;break;case 0:case 11:case 14:case 15:if(!Cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Gp(n,t,l),o=o.next}while(o!==r)}Bo(e,t,n);break;case 1:if(!Cn&&(va(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:n.mode&1?(Cn=(r=Cn)||n.memoizedState!==null,Bo(e,t,n),Cn=r):Bo(e,t,n);break;default:Bo(e,t,n)}}function I0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c2),t.forEach(function(r){var o=_2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p2(r/1960))-r,10e?16:e,Zo===null)var r=!1;else{if(e=Zo,Zo=null,wc=0,dt&6)throw Error(ue(331));var o=dt;for(dt|=4,we=e.current;we!==null;){var i=we,l=i.child;if(we.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cnn()-lg?Pi(e,0):ag|=n),Yn(e,t)}function d_(e,t){t===0&&(e.mode&1?(t=ms,ms<<=1,!(ms&130023424)&&(ms=4194304)):t=1);var n=Ln();e=To(e,t),e!==null&&(uu(e,t,n),Yn(e,n))}function w2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d_(e,n)}function _2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}r!==null&&r.delete(t),d_(e,n)}var p_;p_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)qn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qn=!1,l2(e,t,n);qn=!!(e.flags&131072)}else qn=!1,zt&&t.flags&1048576&&mw(t,cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Ta(t,jn.current);Sa(t,n),o=eg(null,t,r,e,o,n);var i=tg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qh(t),o.updater=Wc,t.stateNode=o,o._reactInternals=t,Mp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&Bh(t),In(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b2(r),e=Ir(r,e),o){case 0:t=zp(null,t,r,e,n);break e;case 1:t=P0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=j0(null,t,r,Ir(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),zp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),P0(e,t,r,o,n);case 3:e:{if(Yw(t),e===null)throw Error(ue(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_w(e,t),pc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ja(Error(ue(423)),t),t=R0(e,t,r,n,o);break e}else if(r!==o){o=ja(Error(ue(424)),t),t=R0(e,t,r,n,o);break e}else for(lr=ri(t.stateNode.containerInfo.firstChild),ur=t,zt=!0,Mr=null,n=Ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===o){t=Co(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return kw(t),e===null&&Dp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,jp(r,o)?l=null:i!==null&&jp(r,i)&&(t.flags|=32),Qw(e,t),In(e,t,l,n),t.child;case 6:return e===null&&Dp(t),null;case 13:return Xw(e,t,n);case 4:return Yh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),A0(e,t,r,o,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Pt(fc,r._currentValue),r._currentValue=l,i!==null)if(Ur(i.value,l)){if(i.children===o.children&&!Kn.current){t=Co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=xo(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ip(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ue(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ip(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}In(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),o=Tr(o),r=r(o),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,o=Ir(r,t.pendingProps),o=Ir(r.type,o),j0(e,t,r,o,n);case 15:return qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),Vs(e,t),t.tag=1,Qn(r)?(e=!0,uc(t)):e=!1,Sa(t,n),bw(t,r,o),Mp(t,r,o,n),Up(null,t,r,!0,e,n);case 19:return Zw(e,t,n);case 22:return Kw(e,t,n)}throw Error(ue(156,t.tag))};function h_(e,t){return z1(e,t)}function x2(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.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 Er(e,t,n,r){return new x2(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b2(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Ph)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Er(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&14680064,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}function Qs(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ua:return Ri(n.children,o,i,t);case Ah:l=8,o|=8;break;case up:return e=Er(12,n,t,o|2),e.elementType=up,e.lanes=i,e;case sp:return e=Er(13,n,t,o),e.elementType=sp,e.lanes=i,e;case cp:return e=Er(19,n,t,o),e.elementType=cp,e.lanes=i,e;case S1:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:l=10;break e;case b1:l=9;break e;case jh:l=11;break e;case Ph:l=14;break e;case Vo:l=16,r=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ri(e,t,n,r){return e=Er(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=Er(22,e,r,t),e.elementType=S1,e.lanes=n,e.stateNode={isHidden:!1},e}function Bd(e,t,n){return e=Er(6,e,null,t),e.lanes=n,e}function Hd(e,t,n){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,i,l,s,c){return e=new S2(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qh(i),e}function E2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),m1.exports=cr;var w_=m1.exports,W0=w_;ap.createRoot=W0.createRoot,ap.hydrateRoot=W0.hydrateRoot;function A2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const j2=j.forwardRef(A2),P2=j2;function R2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const $2=j.forwardRef(R2),G0=$2;function N2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const D2=j.forwardRef(N2),I2=D2;function L2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const M2=j.forwardRef(L2),V0=M2;function F2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const z2=j.forwardRef(F2),U2=z2;function B2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const H2=j.forwardRef(B2),W2=H2;function G2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const V2=j.forwardRef(G2),q2=V2;function K2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Q2=j.forwardRef(K2),__=Q2;function Y2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const X2=j.forwardRef(Y2),Z2=X2;function J2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const eT=j.forwardRef(J2),tT=eT;function nT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const rT=j.forwardRef(nT),oT=rT;async function q0(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function iT(e,t){const[n,r]=j.useState(null);return j.useEffect(()=>{async function o(){e&&r(await q0(e))}return o(),()=>{r(null)}},[e]),j.useEffect(()=>{async function o(){e&&r(await q0(e))}(t==null?void 0:t.status)!=="inflight"&&o()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages]:(t==null?void 0:t.messages)??n}function aT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const lT=j.forwardRef(aT),uT=lT;function sT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const cT=j.forwardRef(sT),fT=cT;function x_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(i)))==null?void 0:l.classGroupId}const K0=/^\[(.+)\]$/;function hT(e){if(K0.test(e)){const t=K0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function gT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vT(Object.entries(e.classGroups),n).forEach(([i,l])=>{Jp(l,r,i,t)}),r}function Jp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Q0(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(mT(o)){Jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Jp(l,Q0(t,i),n,r)})})}function Q0(e,t){let n=e;return t.split(mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function mT(e){return e.isThemeGetter}function vT(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function yT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const S_="!";function wT(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let c=0,f=0,h;for(let E=0;Ef?h-f:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function _T(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function xT(e){return{cache:yT(e.cacheSize),splitModifiers:wT(e),...pT(e)}}const bT=/\s+/;function ST(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bT).map(l=>{const{modifiers:s,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let p=r(h?f.substring(0,h):f),g=!!h;if(!p){if(!h)return{isTailwindClass:!1,originalClassName:l};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:l};g=!1}const y=_T(s).join(":");return{isTailwindClass:!0,modifierId:c?y+S_:y,classGroupId:p,originalClassName:l,hasPostfixModifier:g}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:c,hasPostfixModifier:f}=l,h=s+c;return i.has(h)?!1:(i.add(h),o(c,f).forEach(p=>i.add(s+p)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function ET(){let e=0,t,n,r="";for(;ep(h),e());return n=xT(f),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=ST(c,n);return o(c,h),h}return function(){return i(ET.apply(null,arguments))}}function Nt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const k_=/^\[(?:([a-z-]+):)?(.+)\]$/i,TT=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dr(e){return Ai(e)||CT.has(e)||TT.test(e)}function Ho(e){return Da(e,"length",FT)}function Ai(e){return!!e&&!Number.isNaN(Number(e))}function Os(e){return Da(e,"number",Ai)}function yl(e){return!!e&&Number.isInteger(Number(e))}function RT(e){return e.endsWith("%")&&Ai(e.slice(0,-1))}function Je(e){return k_.test(e)}function Wo(e){return OT.test(e)}const $T=new Set(["length","size","percentage"]);function NT(e){return Da(e,$T,T_)}function DT(e){return Da(e,"position",T_)}const IT=new Set(["image","url"]);function LT(e){return Da(e,IT,UT)}function MT(e){return Da(e,"",zT)}function wl(){return!0}function Da(e,t,n){const r=k_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function FT(e){return AT.test(e)}function T_(){return!1}function zT(e){return jT.test(e)}function UT(e){return PT.test(e)}function BT(){const e=Nt("colors"),t=Nt("spacing"),n=Nt("blur"),r=Nt("brightness"),o=Nt("borderColor"),i=Nt("borderRadius"),l=Nt("borderSpacing"),s=Nt("borderWidth"),c=Nt("contrast"),f=Nt("grayscale"),h=Nt("hueRotate"),p=Nt("invert"),g=Nt("gap"),y=Nt("gradientColorStops"),b=Nt("gradientColorStopPositions"),E=Nt("inset"),O=Nt("margin"),_=Nt("opacity"),w=Nt("padding"),S=Nt("saturate"),k=Nt("scale"),C=Nt("sepia"),$=Nt("skew"),L=Nt("space"),U=Nt("translate"),ce=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Je,t],W=()=>[Je,t],ge=()=>["",Dr,Ho],he=()=>["auto",Ai,Je],be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Je],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ai,Os],G=()=>[Ai,Je];return{cacheSize:500,separator:":",theme:{colors:[wl],spacing:[Dr,Ho],blur:["none","",Wo,Je],brightness:N(),borderColor:[e],borderRadius:["none","","full",Wo,Je],borderSpacing:W(),borderWidth:ge(),contrast:N(),grayscale:ne(),hueRotate:G(),invert:ne(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[RT,Ho],inset:K(),margin:K(),opacity:N(),padding:W(),saturate:N(),scale:N(),sepia:ne(),skew:G(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...be(),Je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,Je]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",yl,Je]}],"grid-cols":[{"grid-cols":[wl]}],"col-start-end":[{col:["auto",{span:["full",yl,Je]},Je]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[wl]}],"row-start-end":[{row:["auto",{span:[yl,Je]},Je]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Je,t]}],"min-w":[{"min-w":["min","max","fit",Je,Dr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,Je]}],h:[{h:[Je,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Dr,Je]}],"max-h":[{"max-h":[Je,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Os]}],"font-family":[{font:[wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Je]}],"line-clamp":[{"line-clamp":["none",Ai,Os]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,Ho]}],"underline-offset":[{"underline-offset":["auto",Dr,Je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...be(),DT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:De()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[Dr,Je]}],"outline-w":[{outline:[Dr,Ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Dr,Ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,MT]}],"shadow-color":[{shadow:[wl]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,Je]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,Ho,Os]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const HT=kT(BT);function On(...e){return HT(dT(e))}function C_(e){const[t,n]=j.useState(!1),r=e.disabled||t;return M.jsxs("form",{className:On("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async o=>{if(o.preventDefault(),r)return;const i=o.target,l=i.message.value;n(!0),await e.onSubmit(l),n(!1),i.message.value=""},children:[M.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[M.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:M.jsx(uT,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),M.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),M.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[M.jsx(fT,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function O_(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bi=vg();function A_(e){Bi=e}const j_=/[&<>"']/,WT=new RegExp(j_.source,"g"),P_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,GT=new RegExp(P_.source,"g"),VT={"&":"&","<":"<",">":">",'"':""","'":"'"},Y0=e=>VT[e];function ir(e,t){if(t){if(j_.test(e))return e.replace(WT,Y0)}else if(P_.test(e))return e.replace(GT,Y0);return e}const qT=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KT(e){return e.replace(qT,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const QT=/(^|[^\[])\^/g;function xt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(QT,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function X0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Z0(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let c=!1,f=l;for(;--f>=0&&s[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(` +`)}class Sc{constructor(t){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=t||Bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:As(r,` +`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XT(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=As(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=As(n[0].replace(/^ *>[ \t]?/gm,""),` +`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",c="",f=!1;for(;t;){let h=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let p=n[2].split(` +`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=t.split(` +`,1)[0],y=0;this.options.pedantic?(y=2,c=p.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=p.slice(y),y+=n[1].length);let b=!1;if(!p&&/^ *$/.test(g)&&(s+=g+` +`,t=t.substring(g.length+1),h=!0),!h){const _=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),S=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` +`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),S.test(g)||k.test(g)||_.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` +`+g.slice(y);else{if(b||p.search(/[^ ]/)>=4||S.test(p)||k.test(p)||w.test(p))break;c+=` +`+g}!b&&!g.trim()&&(b=!0),s+=C+` +`,t=t.substring(C.length+1),p=g.slice(y)}}i.loose||(f?i.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let E=null,O;this.options.gfm&&(E=/^\[[ xX]\] /.exec(c),E&&(O=E[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!E,checked:O,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let h=0;hy.type==="space"),g=p.length>0&&p.some(y=>/\n.*\n/.test(y.raw));i.loose=g}if(i.loose)for(let h=0;h$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Z0(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,c;for(i=0;i({text:f,tokens:[]}));for(o=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=As(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YT(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),J0(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return J0(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,c,f=l,h=0;const p=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+l);(o=p.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){f+=c;continue}else if((o[5]||o[6])&&l%3&&!((l+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);const g=[...o[0]][0].length,y=t.slice(0,l+o.index+g+c);if(Math.min(l,c)%2){const E=y.slice(1,-1);return{type:"em",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=ir(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=ir(n[1]),o="mailto:"+r):(r=ir(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=ir(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=ir(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=ir(n[0]),{type:"text",raw:n[0],text:r}}}}const je={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};je._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;je.def=xt(je.def).replace("label",je._label).replace("title",je._title).getRegex();je.bullet=/(?:[*+-]|\d{1,9}[.)])/;je.listItemStart=xt(/^( *)(bull) */).replace("bull",je.bullet).getRegex();je.list=xt(je.list).replace(/bull/g,je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+je.def.source+")").getRegex();je._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";je._comment=/|$)/;je.html=xt(je.html,"i").replace("comment",je._comment).replace("tag",je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();je.lheading=xt(je.lheading).replace(/bull/g,je.bullet).getRegex();je.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.blockquote=xt(je.blockquote).replace("paragraph",je.paragraph).getRegex();je.normal={...je};je.gfm={...je.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};je.gfm.table=xt(je.gfm.table).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.gfm.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.pedantic={...je.normal,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(je.normal._paragraph).replace("hr",je.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";me.punctuation=xt(me.punctuation,"u").replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;me.anyPunctuation=/\\[punct]/g;me._escapes=/\\([punct])/g;me._comment=xt(je._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=xt(me.emStrong.lDelim,"u").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=xt(me.emStrong.rDelimAst,"gu").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=xt(me.emStrong.rDelimUnd,"gu").replace(/punct/g,me._punctuation).getRegex();me.anyPunctuation=xt(me.anyPunctuation,"gu").replace(/punct/g,me._punctuation).getRegex();me._escapes=xt(me._escapes,"gu").replace(/punct/g,me._punctuation).getRegex();me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=xt(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=xt(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=xt(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=xt(me.reflink).replace("label",me._label).replace("ref",je._label).getRegex();me.nolink=xt(me.nolink).replace("ref",je._label).getRegex();me.reflinkSearch=xt(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal={...me};me.pedantic={...me.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()};me.gfm={...me.normal,escape:xt(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(f.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,c,f;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(f=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,f)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(i=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(f=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Ec{constructor(t){Ot(this,"options");this.options=t||Bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` +`,o?'
'+(r?t:ir(t,!0))+`
+`:"
"+(r?t:ir(t,!0))+`
+`}blockquote(t){return`
+${t}
+`}html(t,n){return t}heading(t,n,r){return`${t} +`}hr(){return`
+`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> +`+t+" +`}listitem(t,n,r){return`
  • ${t}
  • +`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    +`}table(t,n){return n&&(n=`${n}`),` + +`+t+` +`+n+`
    +`}tablerow(t){return` +${t} +`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i='",i}image(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=O+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=O+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:O+" "}):E+=O+" "}E+=this.parse(g.tokens,f),h+=this.renderer.listitem(E,b,!!y)}r+=this.renderer.list(h,s,c);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1{r=r.concat(this.walkTokens(s[c],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=l.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Ec(this.defaults);for(const l in r.renderer){const s=r.renderer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Sc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zl;for(const l in r.hooks){const s=r.hooks[l],c=l,f=i[c];zl.passThroughHooks.has(l)?i[c]=h=>{if(this.defaults.async)return Promise.resolve(s.call(i,h)).then(g=>f.call(i,g));const p=s.call(i,h);return f.call(i,p)}:i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(l.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}au=new WeakSet,eh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=ss(this,Ic,R_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(c=>t(c,l)).then(c=>l.walkTokens?Promise.all(this.walkTokens(c,l.walkTokens)).then(()=>c):c).then(c=>n(c,l)).then(c=>l.hooks?l.hooks.postprocess(c):c).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const c=t(r,l);l.walkTokens&&this.walkTokens(c,l.walkTokens);let f=n(c,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(c){return s(c)}}},Ic=new WeakSet,R_=function(t,n){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+ir(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Fi=new ZT;function _t(e,t){return Fi.parse(e,t)}_t.options=_t.setOptions=function(e){return Fi.setOptions(e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.getDefaults=vg;_t.defaults=Bi;_t.use=function(...e){return Fi.use(...e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.walkTokens=function(e,t){return Fi.walkTokens(e,t)};_t.parseInline=Fi.parseInline;_t.Parser=no;_t.parser=no.parse;_t.Renderer=Ec;_t.TextRenderer=yg;_t.Lexer=to;_t.lexer=to.lex;_t.Tokenizer=Sc;_t.Hooks=zl;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;no.parse;to.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:$_,setPrototypeOf:ey,isFrozen:JT,getPrototypeOf:eC,getOwnPropertyDescriptor:N_}=Object;let{freeze:Mn,seal:Br,create:D_}=Object,{apply:th,construct:nh}=typeof Reflect<"u"&&Reflect;Mn||(Mn=function(t){return t});Br||(Br=function(t){return t});th||(th=function(t,n,r){return t.apply(n,r)});nh||(nh=function(t,n){return new t(...n)});const js=Or(Array.prototype.forEach),ty=Or(Array.prototype.pop),_l=Or(Array.prototype.push),Ys=Or(String.prototype.toLowerCase),Wd=Or(String.prototype.toString),tC=Or(String.prototype.match),xl=Or(String.prototype.replace),nC=Or(String.prototype.indexOf),rC=Or(String.prototype.trim),rr=Or(RegExp.prototype.test),bl=oC(TypeError);function Or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ys;ey&&ey(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(JT(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ia(e){const t=D_(null);for(const[n,r]of $_(e))N_(e,n)!==void 0&&(t[n]=r);return t}function Ps(e,t){for(;e!==null;){const r=N_(e,t);if(r){if(r.get)return Or(r.get);if(typeof r.value=="function")return Or(r.value)}e=eC(e)}function n(r){return console.warn("fallback value for",r),null}return n}const ny=Mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gd=Mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vd=Mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iC=Mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qd=Mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aC=Mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ry=Mn(["#text"]),oy=Mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kd=Mn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iy=Mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=Mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lC=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=Br(/<%[\w\W]*|[\w\W]*%>/gm),sC=Br(/\${[\w\W]*}/gm),cC=Br(/^data-[\-\w.\u00B7-\uFFFF]/),fC=Br(/^aria-[\-\w]+$/),I_=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dC=Br(/^(?:\w+script|data):/i),pC=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L_=Br(/^html$/i);var ay=Object.freeze({__proto__:null,MUSTACHE_EXPR:lC,ERB_EXPR:uC,TMPLIT_EXPR:sC,DATA_ATTR:cC,ARIA_ATTR:fC,IS_ALLOWED_URI:I_,IS_SCRIPT_OR_DATA:dC,ATTR_WHITESPACE:pC,DOCTYPE_NAME:L_});const hC=function(){return typeof window>"u"?null:window},gC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function M_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hC();const t=ke=>M_(ke);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:y}=e,b=c.prototype,E=Ps(b,"cloneNode"),O=Ps(b,"nextSibling"),_=Ps(b,"childNodes"),w=Ps(b,"parentNode");if(typeof l=="function"){const ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,k="";const{implementation:C,createNodeIterator:$,createDocumentFragment:L,getElementsByTagName:U}=n,{importNode:ce}=r;let z={};t.isSupported=typeof $_=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:ge,DATA_ATTR:he,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:Be}=ay;let{IS_ALLOWED_URI:X}=ay,ne=null;const _e=et({},[...ny,...Gd,...Vd,...qd,...ry]);let N=null;const G=et({},[...oy,...Kd,...iy,...Rs]);let oe=Object.seal(D_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,ie=null,re=!0,Se=!0,Pe=!1,Fe=!0,Ke=!1,He=!1,xe=!1,Xe=!1,rt=!1,Ie=!1,Ze=!1,gt=!0,Mt=!1;const jt="user-content-";let yt=!0,kt=!1,$e={},Bt=null;const se=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const pt=et({},["audio","video","img","source","image","track"]);let Rt=null;const Yt=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Rn=pn,Xn=!1,A=null;const R=et({},[Pn,dn,pn],Wd);let I=null;const q=["application/xhtml+xml","text/html"],V="text/html";let de=null,ve=null;const Ge=n.createElement("form"),st=function(F){return F instanceof RegExp||F instanceof Function},Re=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===F)){if((!F||typeof F!="object")&&(F={}),F=ia(F),I=q.indexOf(F.PARSER_MEDIA_TYPE)===-1?I=V:I=F.PARSER_MEDIA_TYPE,de=I==="application/xhtml+xml"?Wd:Ys,ne="ALLOWED_TAGS"in F?et({},F.ALLOWED_TAGS,de):_e,N="ALLOWED_ATTR"in F?et({},F.ALLOWED_ATTR,de):G,A="ALLOWED_NAMESPACES"in F?et({},F.ALLOWED_NAMESPACES,Wd):R,Rt="ADD_URI_SAFE_ATTR"in F?et(ia(Yt),F.ADD_URI_SAFE_ATTR,de):Yt,Oe="ADD_DATA_URI_TAGS"in F?et(ia(pt),F.ADD_DATA_URI_TAGS,de):pt,Bt="FORBID_CONTENTS"in F?et({},F.FORBID_CONTENTS,de):se,Z="FORBID_TAGS"in F?et({},F.FORBID_TAGS,de):{},ie="FORBID_ATTR"in F?et({},F.FORBID_ATTR,de):{},$e="USE_PROFILES"in F?F.USE_PROFILES:!1,re=F.ALLOW_ARIA_ATTR!==!1,Se=F.ALLOW_DATA_ATTR!==!1,Pe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=F.SAFE_FOR_TEMPLATES||!1,He=F.WHOLE_DOCUMENT||!1,rt=F.RETURN_DOM||!1,Ie=F.RETURN_DOM_FRAGMENT||!1,Ze=F.RETURN_TRUSTED_TYPE||!1,Xe=F.FORCE_BODY||!1,gt=F.SANITIZE_DOM!==!1,Mt=F.SANITIZE_NAMED_PROPS||!1,yt=F.KEEP_CONTENT!==!1,kt=F.IN_PLACE||!1,X=F.ALLOWED_URI_REGEXP||I_,Rn=F.NAMESPACE||pn,oe=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ie&&(rt=!0),$e&&(ne=et({},[...ry]),N=[],$e.html===!0&&(et(ne,ny),et(N,oy)),$e.svg===!0&&(et(ne,Gd),et(N,Kd),et(N,Rs)),$e.svgFilters===!0&&(et(ne,Vd),et(N,Kd),et(N,Rs)),$e.mathMl===!0&&(et(ne,qd),et(N,iy),et(N,Rs))),F.ADD_TAGS&&(ne===_e&&(ne=ia(ne)),et(ne,F.ADD_TAGS,de)),F.ADD_ATTR&&(N===G&&(N=ia(N)),et(N,F.ADD_ATTR,de)),F.ADD_URI_SAFE_ATTR&&et(Rt,F.ADD_URI_SAFE_ATTR,de),F.FORBID_CONTENTS&&(Bt===se&&(Bt=ia(Bt)),et(Bt,F.FORBID_CONTENTS,de)),yt&&(ne["#text"]=!0),He&&et(ne,["html","head","body"]),ne.table&&(et(ne,["tbody"]),delete Z.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=F.TRUSTED_TYPES_POLICY,k=S.createHTML("")}else S===void 0&&(S=gC(y,o)),S!==null&&typeof k=="string"&&(k=S.createHTML(""));Mn&&Mn(F),ve=F}},ct=et({},["mi","mo","mn","ms","mtext"]),lt=et({},["foreignobject","desc","title","annotation-xml"]),Ft=et({},["title","style","font","a","script"]),ut=et({},Gd);et(ut,Vd),et(ut,iC);const Ht=et({},qd);et(Ht,aC);const bt=function(F){let ae=w(F);(!ae||!ae.tagName)&&(ae={namespaceURI:Rn,tagName:"template"});const ye=Ys(F.tagName),vt=Ys(ae.tagName);return A[F.namespaceURI]?F.namespaceURI===dn?ae.namespaceURI===pn?ye==="svg":ae.namespaceURI===Pn?ye==="svg"&&(vt==="annotation-xml"||ct[vt]):!!ut[ye]:F.namespaceURI===Pn?ae.namespaceURI===pn?ye==="math":ae.namespaceURI===dn?ye==="math"&<[vt]:!!Ht[ye]:F.namespaceURI===pn?ae.namespaceURI===dn&&!lt[vt]||ae.namespaceURI===Pn&&!ct[vt]?!1:!Ht[ye]&&(Ft[ye]||!ut[ye]):!!(I==="application/xhtml+xml"&&A[F.namespaceURI]):!1},Tt=function(F){_l(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},bn=function(F,ae){try{_l(t.removed,{attribute:ae.getAttributeNode(F),from:ae})}catch{_l(t.removed,{attribute:null,from:ae})}if(ae.removeAttribute(F),F==="is"&&!N[F])if(rt||Ie)try{Tt(ae)}catch{}else try{ae.setAttribute(F,"")}catch{}},Un=function(F){let ae=null,ye=null;if(Xe)F=""+F;else{const rn=tC(F,/^[\r\n\t ]+/);ye=rn&&rn[0]}I==="application/xhtml+xml"&&Rn===pn&&(F=''+F+"");const vt=S?S.createHTML(F):F;if(Rn===pn)try{ae=new g().parseFromString(vt,I)}catch{}if(!ae||!ae.documentElement){ae=C.createDocument(Rn,"template",null);try{ae.documentElement.innerHTML=Xn?k:vt}catch{}}const Qe=ae.body||ae.documentElement;return F&&ye&&Qe.insertBefore(n.createTextNode(ye),Qe.childNodes[0]||null),Rn===pn?U.call(ae,He?"html":"body")[0]:He?ae.documentElement:Qe},pr=function(F){return $.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Zn=function(F){return F instanceof p&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},vn=function(F){return typeof s=="function"&&F instanceof s},Xt=function(F,ae,ye){z[F]&&js(z[F],vt=>{vt.call(t,ae,ye,ve)})},Wr=function(F){let ae=null;if(Xt("beforeSanitizeElements",F,null),Zn(F))return Tt(F),!0;const ye=de(F.nodeName);if(Xt("uponSanitizeElement",F,{tagName:ye,allowedTags:ne}),F.hasChildNodes()&&!vn(F.firstElementChild)&&rr(/<[/\w]/g,F.innerHTML)&&rr(/<[/\w]/g,F.textContent))return Tt(F),!0;if(!ne[ye]||Z[ye]){if(!Z[ye]&&pi(ye)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye)))return!1;if(yt&&!Bt[ye]){const vt=w(F)||F.parentNode,Qe=_(F)||F.childNodes;if(Qe&&vt){const rn=Qe.length;for(let Zt=rn-1;Zt>=0;--Zt)vt.insertBefore(E(Qe[Zt],!0),O(F))}}return Tt(F),!0}return F instanceof c&&!bt(F)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&rr(/<\/no(script|embed|frames)/i,F.innerHTML)?(Tt(F),!0):(Ke&&F.nodeType===3&&(ae=F.textContent,js([K,W,ge],vt=>{ae=xl(ae,vt," ")}),F.textContent!==ae&&(_l(t.removed,{element:F.cloneNode()}),F.textContent=ae)),Xt("afterSanitizeElements",F,null),!1)},hr=function(F,ae,ye){if(gt&&(ae==="id"||ae==="name")&&(ye in n||ye in Ge))return!1;if(!(Se&&!ie[ae]&&rr(he,ae))){if(!(re&&rr(be,ae))){if(!N[ae]||ie[ae]){if(!(pi(F)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,F)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(F))&&(oe.attributeNameCheck instanceof RegExp&&rr(oe.attributeNameCheck,ae)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ae))||ae==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye))))return!1}else if(!Rt[ae]){if(!rr(X,xl(ye,Be,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&F!=="script"&&nC(ye,"data:")===0&&Oe[F])){if(!(Pe&&!rr(De,xl(ye,Be,"")))){if(ye)return!1}}}}}}return!0},pi=function(F){return F.indexOf("-")>0},ht=function(F){Xt("beforeSanitizeAttributes",F,null);const{attributes:ae}=F;if(!ae)return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};let vt=ae.length;for(;vt--;){const Qe=ae[vt],{name:rn,namespaceURI:Zt,value:Gr}=Qe,ao=de(rn);let Ct=rn==="value"?Gr:rC(Gr);if(ye.attrName=ao,ye.attrValue=Ct,ye.keepAttr=!0,ye.forceKeepAttr=void 0,Xt("uponSanitizeAttribute",F,ye),Ct=ye.attrValue,ye.forceKeepAttr||(bn(rn,F),!ye.keepAttr))continue;if(!Fe&&rr(/\/>/i,Ct)){bn(rn,F);continue}Ke&&js([K,W,ge],qa=>{Ct=xl(Ct,qa," ")});const Va=de(F.nodeName);if(hr(Va,ao,Ct)){if(Mt&&(ao==="id"||ao==="name")&&(bn(rn,F),Ct=jt+Ct),S&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Zt)switch(y.getAttributeType(Va,ao)){case"TrustedHTML":{Ct=S.createHTML(Ct);break}case"TrustedScriptURL":{Ct=S.createScriptURL(Ct);break}}try{Zt?F.setAttributeNS(Zt,rn,Ct):F.setAttribute(rn,Ct),ty(t.removed)}catch{}}}Xt("afterSanitizeAttributes",F,null)},mt=function ke(F){let ae=null;const ye=pr(F);for(Xt("beforeSanitizeShadowDOM",F,null);ae=ye.nextNode();)Xt("uponSanitizeShadowNode",ae,null),!Wr(ae)&&(ae.content instanceof i&&ke(ae.content),ht(ae));Xt("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ke){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,ye=null,vt=null,Qe=null;if(Xn=!ke,Xn&&(ke=""),typeof ke!="string"&&!vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw bl("dirty is not a string, aborting")}else throw bl("toString is not a function");if(!t.isSupported)return ke;if(xe||Re(F),t.removed=[],typeof ke=="string"&&(kt=!1),kt){if(ke.nodeName){const Gr=de(ke.nodeName);if(!ne[Gr]||Z[Gr])throw bl("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof s)ae=Un(""),ye=ae.ownerDocument.importNode(ke,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?ae=ye:ae.appendChild(ye);else{if(!rt&&!Ke&&!He&&ke.indexOf("<")===-1)return S&&Ze?S.createHTML(ke):ke;if(ae=Un(ke),!ae)return rt?null:Ze?k:""}ae&&Xe&&Tt(ae.firstChild);const rn=pr(kt?ke:ae);for(;vt=rn.nextNode();)Wr(vt)||(vt.content instanceof i&&mt(vt.content),ht(vt));if(kt)return ke;if(rt){if(Ie)for(Qe=L.call(ae.ownerDocument);ae.firstChild;)Qe.appendChild(ae.firstChild);else Qe=ae;return(N.shadowroot||N.shadowrootmode)&&(Qe=ce.call(r,Qe,!0)),Qe}let Zt=He?ae.outerHTML:ae.innerHTML;return He&&ne["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&rr(L_,ae.ownerDocument.doctype.name)&&(Zt=" +`+Zt),Ke&&js([K,W,ge],Gr=>{Zt=xl(Zt,Gr," ")}),S&&Ze?S.createHTML(Zt):Zt},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(ke),xe=!0},t.clearConfig=function(){ve=null,xe=!1},t.isValidAttribute=function(ke,F,ae){ve||Re({});const ye=de(ke),vt=de(F);return hr(ye,vt,ae)},t.addHook=function(ke,F){typeof F=="function"&&(z[ke]=z[ke]||[],_l(z[ke],F))},t.removeHook=function(ke){if(z[ke])return ty(z[ke])},t.removeHooks=function(ke){z[ke]&&(z[ke]=[])},t.removeAllHooks=function(){z={}},t}var mC=M_();function vC(e){const[t,n]=j.useState(null),r=async o=>{n({score:o,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:o}),headers:{"Content-Type":"application/json"}}),n({score:o,inflight:!1})};return M.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(W2,{className:"h-5 w-5","aria-hidden":"true"})}),M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(U2,{className:"h-5 w-5","aria-hidden":"true"})})]})}function yC(e){try{return JSON.parse(e)}catch{return{}}}function ly(e){return M.jsxs(M.Fragment,{children:[e.call&&M.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&M.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&M.jsx("span",{className:On("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:M.jsx(I2,{className:On("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&M.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:M.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:M.jsx("table",{className:"divide-y divide-gray-300",children:M.jsx("tbody",{children:Object.entries(yC(e.args)).map(([t,n],r)=>M.jsxs("tr",{children:[M.jsx("td",{className:On(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:M.jsx("div",{className:"font-medium text-gray-500",children:t})}),M.jsx("td",{className:On(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:O_(n)})]},r))})})})})]})}function wC(e){var r;const[t,n]=j.useState(!1);return M.jsxs("div",{className:"flex flex-col mb-8",children:[M.jsxs("div",{className:"leading-6 flex flex-row",children:[M.jsx("div",{className:On("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),M.jsxs("div",{className:"flex-1",children:[e.type==="function"&&M.jsx(ly,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&M.jsx(ly,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?M.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:mC.sanitize(_t(e.content)).trim()}}):M.jsx("div",{className:"text-gray-900 prose",children:O_(e.content)}):!1]})]}),e.runId&&M.jsx("div",{className:"mt-2 pl-[100px]",children:M.jsx(vC,{runId:e.runId})})]})}function _C(e){var n,r,o;const t=iT(e.chat.thread_id,e.stream);return j.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[t]),M.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((i,l)=>{var s,c;return j.createElement(wC,{...i,key:l,runId:l===t.length-1&&((s=e.stream)==null?void 0:s.status)==="done"?(c=e.stream)==null?void 0:c.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&M.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startStream,disabled:((o=e.stream)==null?void 0:o.status)==="inflight"})})]})}function xC(e){var t;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterChat(null),className:On(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Chat"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:On(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),M.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var bC=Object.defineProperty,SC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(SC(e,typeof t!="symbol"?t+"":t,n),n);let EC=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bo=new EC,Ar=(e,t)=>{bo.isServer?j.useEffect(e,t):j.useLayoutEffect(e,t)};function So(e){let t=j.useRef(e);return Ar(()=>{t.current=e},[e]),t}function Jc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Hi(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Jc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Hi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function wg(){let[e]=j.useState(Hi);return j.useEffect(()=>()=>e.dispose(),[e]),e}let Ut=function(e){let t=So(e);return ot.useCallback((...n)=>t.current(...n),[t])};function kC(){let e=typeof document>"u";return"useSyncExternalStore"in Ul?(t=>t.useSyncExternalStore)(Ul)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=kC(),[t,n]=j.useState(bo.isHandoffComplete);return t&&bo.isHandoffComplete===!1&&n(!1),j.useEffect(()=>{t!==!0&&n(!0)},[t]),j.useEffect(()=>bo.handoff(),[]),e?!1:t}var uy;let La=(uy=ot.useId)!=null?uy:function(){let e=Ia(),[t,n]=ot.useState(e?()=>bo.nextId():null);return Ar(()=>{t===null&&n(bo.nextId())},[t]),t!=null?""+t:void 0};function An(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}function F_(e){return bo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let rh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ei=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ei||{}),z_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(z_||{}),TC=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TC||{});function CC(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U_||{});function OC(e,t=0){var n;return e===((n=F_(e))==null?void 0:n.body)?!1:An(t,{0(){return e.matches(rh)},1(){let r=e;for(;r!==null;){if(r.matches(rh))return!0;r=r.parentElement}return!1}})}var AC=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(AC||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $i(e){e==null||e.focus({preventScroll:!0})}let jC=["textarea","input"].join(",");function PC(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,jC))!=null?n:!1}function RC(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?RC(e):e:CC(e);o.length>0&&l.length>1&&(l=l.filter(y=>!o.includes(y))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},h=0,p=l.length,g;do{if(h>=p||h+p<=0)return 0;let y=c+h;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}g=l[y],g==null||g.focus(f),h+=s}while(g!==i.activeElement);return t&6&&PC(g)&&g.select(),2}function $s(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B_(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function $C(e,t,n=!0){let r=j.useRef(!1);j.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let c=s(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let h of f){if(h===null)continue;let p=h instanceof HTMLElement?h:h.current;if(p!=null&&p.contains(c)||l.composed&&l.composedPath().includes(p))return}return!OC(c,U_.Loose)&&c.tabIndex!==-1&&l.preventDefault(),t(l,c)}let i=j.useRef(null);$s("pointerdown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("mousedown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("click",l=>{i.current&&(o(l,()=>i.current),i.current=null)},!0),$s("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),B_("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H_=Symbol();function NC(e,t=!0){return Object.assign(e,{[H_]:t})}function Hr(...e){let t=j.useRef(e);j.useEffect(()=>{t.current=e},[e]);let n=Ut(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H_]))?void 0:n}function kc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Tc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tc||{}),Jo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Jo||{});function jr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=W_(t,e);if(i)return Ns(s,n,r,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Ns(h,n,r,l)}if(c&1){let{unmount:f=!0,...h}=s;return An(f?0:1,{0(){return null},1(){return Ns({...h,hidden:!0,style:{display:"none"}},n,r,l)}})}return Ns(s,n,r,l)}function Ns(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=Yd(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let h={};if(t){let p=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&g.push(y);p&&(h["data-headlessui-state"]=g.join(" "))}if(o===j.Fragment&&Object.keys(sy(s)).length>0){if(!j.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(b=>` - ${b}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` +`)].join(` +`));let p=f.props,g=typeof(p==null?void 0:p.className)=="function"?(...b)=>kc(p==null?void 0:p.className(...b),s.className):kc(p==null?void 0:p.className,s.className),y=g?{className:g}:{};return j.cloneElement(f,Object.assign({},W_(f.props,sy(Yd(s,["ref"]))),h,c,DC(f.ref,c.ref),y))}return j.createElement(o,Object.assign({},Yd(s,["ref"]),o!==j.Fragment&&c,o!==j.Fragment&&h),f)}function DC(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function dr(e){var t;return Object.assign(j.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function sy(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function IC(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&LC(n)?!1:r}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let MC="div";var Cc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cc||{});function FC(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return jr({ourProps:o,theirProps:r,slot:{},defaultTag:MC,name:"Hidden"})}let oh=dr(FC),_g=j.createContext(null);_g.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function xg(){return j.useContext(_g)}function zC({value:e,children:t}){return ot.createElement(_g.Provider,{value:e},t)}var G_=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(G_||{});function bg(e,t){let n=j.useRef([]),r=Ut(e);j.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let s=r(t,o);return n.current=t,s}},[r,...t])}function UC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function du(...e){return j.useMemo(()=>F_(...e),[...e])}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function BC(){let e=j.useRef(0);return B_("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pu(){let e=j.useRef(!1);return Ar(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function V_(e,t,n,r){let o=So(n);j.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function HC(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function q_(e){let t=Ut(e),n=j.useRef(!1);j.useEffect(()=>(n.current=!1,()=>{n.current=!0,Jc(()=>{n.current&&t()})}),[t])}function K_(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let WC="div";var Q_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Q_||{});function GC(e,t){let n=j.useRef(null),r=Hr(n,t),{initialFocus:o,containers:i,features:l=30,...s}=e;Ia()||(l=1);let c=du(n);KC({ownerDocument:c},!!(l&16));let f=QC({ownerDocument:c,container:n,initialFocus:o},!!(l&2));YC({ownerDocument:c,container:n,containers:i,previousActiveElement:f},!!(l&8));let h=BC(),p=Ut(E=>{let O=n.current;O&&(_=>_())(()=>{An(h.current,{[jl.Forwards]:()=>{Xs(O,Ei.First,{skipElements:[E.relatedTarget]})},[jl.Backwards]:()=>{Xs(O,Ei.Last,{skipElements:[E.relatedTarget]})}})})}),g=wg(),y=j.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(E){let O=K_(i);n.current instanceof HTMLElement&&O.add(n.current);let _=E.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Y_(O,_)||(y.current?Xs(n.current,An(h.current,{[jl.Forwards]:()=>Ei.Next,[jl.Backwards]:()=>Ei.Previous})|Ei.WrapAround,{relativeTo:E.target}):E.target instanceof HTMLElement&&$i(E.target)))}};return ot.createElement(ot.Fragment,null,!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}),jr({ourProps:b,theirProps:s,defaultTag:WC,name:"FocusTrap"}),!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}))}let VC=dr(GC),Sl=Object.assign(VC,{features:Q_}),Yo=[];HC(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Yo[0]!==t.target&&(Yo.unshift(t.target),Yo=Yo.filter(n=>n!=null&&n.isConnected),Yo.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function qC(e=!0){let t=j.useRef(Yo.slice());return bg(([n],[r])=>{r===!0&&n===!1&&Jc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Yo.slice())},[e,Yo,t]),Ut(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function KC({ownerDocument:e},t){let n=qC(t);bg(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$i(n())},[t]),q_(()=>{t&&$i(n())})}function QC({ownerDocument:e,container:t,initialFocus:n},r){let o=j.useRef(null),i=pu();return bg(()=>{if(!r)return;let l=t.current;l&&Jc(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}n!=null&&n.current?$i(n.current):Xs(l,Ei.First)===z_.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function YC({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pu();V_(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=K_(n);t.current instanceof HTMLElement&&s.add(t.current);let c=r.current;if(!c)return;let f=l.target;f&&f instanceof HTMLElement?Y_(s,f)?(r.current=f,$i(f)):(l.preventDefault(),l.stopPropagation(),$i(c)):$i(r.current)},!0)}function Y_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X_=j.createContext(!1);function XC(){return j.useContext(X_)}function ih(e){return ot.createElement(X_.Provider,{value:e.force},e.children)}function ZC(e){let t=XC(),n=j.useContext(Z_),r=du(e),[o,i]=j.useState(()=>{if(!t&&n!==null||bo.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return j.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),j.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let JC=j.Fragment;function eO(e,t){let n=e,r=j.useRef(null),o=Hr(NC(h=>{r.current=h}),t),i=du(r),l=ZC(r),[s]=j.useState(()=>{var h;return bo.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),c=j.useContext(ah),f=Ia();return Ar(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Ar(()=>{if(s&&c)return c.register(s)},[c,s]),q_(()=>{var h;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))}),f?!l||!s?null:w_.createPortal(jr({ourProps:{ref:o},theirProps:n,defaultTag:JC,name:"Portal"}),s):null}let tO=j.Fragment,Z_=j.createContext(null);function nO(e,t){let{target:n,...r}=e,o={ref:Hr(t)};return ot.createElement(Z_.Provider,{value:n},jr({ourProps:o,theirProps:r,defaultTag:tO,name:"Popover.Group"}))}let ah=j.createContext(null);function rO(){let e=j.useContext(ah),t=j.useRef([]),n=Ut(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Ut(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=j.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,j.useMemo(()=>function({children:i}){return ot.createElement(ah.Provider,{value:o},i)},[o])]}let oO=dr(eO),iO=dr(nO),lh=Object.assign(oO,{Group:iO}),J_=j.createContext(null);function ex(){let e=j.useContext(J_);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return e}function aO(){let[e,t]=j.useState([]);return[e.length>0?e.join(" "):void 0,j.useMemo(()=>function(n){let r=Ut(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),c=s.indexOf(i);return c!==-1&&s.splice(c,1),s}))),o=j.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return ot.createElement(J_.Provider,{value:o},n.children)},[t])]}let lO="p";function uO(e,t){let n=La(),{id:r=`headlessui-description-${n}`,...o}=e,i=ex(),l=Hr(t);Ar(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return jr({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:lO,name:i.name||"Description"})}let sO=dr(uO),cO=Object.assign(sO,{}),Sg=j.createContext(()=>{});Sg.displayName="StackContext";var uh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uh||{});function fO(){return j.useContext(Sg)}function dO({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=fO(),l=Ut((...s)=>{t==null||t(...s),i(...s)});return Ar(()=>{let s=o===void 0||o===!0;return s&&l(0,n,r),()=>{s&&l(1,n,r)}},[l,n,r,o]),ot.createElement(Sg.Provider,{value:l},e)}function pO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const hO=typeof Object.is=="function"?Object.is:pO,{useState:gO,useEffect:mO,useLayoutEffect:vO,useDebugValue:yO}=Ul;function wO(e,t,n){const r=t(),[{inst:o},i]=gO({inst:{value:r,getSnapshot:t}});return vO(()=>{o.value=r,o.getSnapshot=t,Xd(o)&&i({inst:o})},[e,r,t]),mO(()=>(Xd(o)&&i({inst:o}),e(()=>{Xd(o)&&i({inst:o})})),[e]),yO(r),r}function Xd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!hO(n,r)}catch{return!0}}function _O(e,t,n){return t()}const xO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=!xO,SO=bO?_O:wO,EO="useSyncExternalStore"in Ul?(e=>e.useSyncExternalStore)(Ul):SO;function kO(e){return EO(e.subscribe,e.getSnapshot,e.getSnapshot)}function TO(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function CO(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function OO(){if(!UC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(l=>l()).some(l=>l.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=Hi();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:c}=new URL(s.href),f=t.querySelector(c);f&&!o(f)&&(i=f)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!o(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function AO(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jO(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ji=TO(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Hi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:jO(n)},o=[OO(),CO(),AO()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ji.subscribe(()=>{let e=ji.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&ji.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ji.dispatch("TEARDOWN",n)}});function PO(e,t,n){let r=kO(ji),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Ar(()=>{if(!(!e||!t))return ji.dispatch("PUSH",e,n),()=>ji.dispatch("POP",e,n)},[t,e]),i}let Zd=new Map,El=new Map;function cy(e,t=!0){Ar(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=El.get(r))!=null?l:1;if(s===1?El.delete(r):El.set(r,s-1),s!==1)return;let c=Zd.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Zd.delete(r))}let i=(n=El.get(r))!=null?n:0;return El.set(r,i+1),i!==0||(Zd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function RO({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=j.useRef((r=n==null?void 0:n.current)!=null?r:null),i=du(o),l=Ut(()=>{var s;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:Ut(s=>l().some(c=>c.contains(s))),mainTreeNodeRef:o,MainTreeNode:j.useMemo(()=>function(){return n!=null?null:ot.createElement(oh,{features:Cc.Hidden,ref:o})},[o,n])}}var $O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($O||{}),NO=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(NO||{});let DO={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Oc=j.createContext(null);Oc.displayName="DialogContext";function hu(e){let t=j.useContext(Oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hu),n}return t}function IO(e,t,n=()=>[document.body]){PO(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function LO(e,t){return An(t.type,DO,e,t)}let MO="div",FO=Tc.RenderStrategy|Tc.Static;function zO(e,t){var n;let r=La(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:s,__demoMode:c=!1,...f}=e,[h,p]=j.useState(0),g=xg();i===void 0&&g!==null&&(i=(g&ar.Open)===ar.Open);let y=j.useRef(null),b=Hr(y,t),E=du(y),O=e.hasOwnProperty("open")||g!==null,_=e.hasOwnProperty("onClose");if(!O&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let w=i?0:1,[S,k]=j.useReducer(LO,{titleId:null,descriptionId:null,panelRef:j.createRef()}),C=Ut(()=>l(!1)),$=Ut(Fe=>k({type:0,id:Fe})),L=Ia()?c?!1:w===0:!1,U=h>1,ce=j.useContext(Oc)!==null,[z,K]=rO(),{resolveContainers:W,mainTreeNodeRef:ge,MainTreeNode:he}=RO({portals:z,defaultContainers:[(n=S.panelRef.current)!=null?n:y.current]}),be=U?"parent":"leaf",De=g!==null?(g&ar.Closing)===ar.Closing:!1,Be=(()=>ce||De?!1:L)(),X=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("body > *"))!=null?Fe:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(X,Be);let ne=(()=>U?!0:L)(),_e=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("[data-headlessui-portal]"))!=null?Fe:[]).find(He=>He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(_e,ne);let N=(()=>!(!L||U))();$C(W,C,N);let G=(()=>!(U||w!==0))();V_(E==null?void 0:E.defaultView,"keydown",Fe=>{G&&(Fe.defaultPrevented||Fe.key===G_.Escape&&(Fe.preventDefault(),Fe.stopPropagation(),C()))});let oe=(()=>!(De||w!==0||ce))();IO(E,oe,W),j.useEffect(()=>{if(w!==0||!y.current)return;let Fe=new ResizeObserver(Ke=>{for(let He of Ke){let xe=He.target.getBoundingClientRect();xe.x===0&&xe.y===0&&xe.width===0&&xe.height===0&&C()}});return Fe.observe(y.current),()=>Fe.disconnect()},[w,y,C]);let[Z,ie]=aO(),re=j.useMemo(()=>[{dialogState:w,close:C,setTitleId:$},S],[w,S,C,$]),Se=j.useMemo(()=>({open:w===0}),[w]),Pe={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":Z};return ot.createElement(dO,{type:"Dialog",enabled:w===0,element:y,onUpdate:Ut((Fe,Ke)=>{Ke==="Dialog"&&An(Fe,{[uh.Add]:()=>p(He=>He+1),[uh.Remove]:()=>p(He=>He-1)})})},ot.createElement(ih,{force:!0},ot.createElement(lh,null,ot.createElement(Oc.Provider,{value:re},ot.createElement(lh.Group,{target:y},ot.createElement(ih,{force:!1},ot.createElement(ie,{slot:Se,name:"Dialog.Description"},ot.createElement(Sl,{initialFocus:s,containers:W,features:L?An(be,{parent:Sl.features.RestoreFocus,leaf:Sl.features.All&~Sl.features.FocusLock}):Sl.features.None},ot.createElement(K,null,jr({ourProps:Pe,theirProps:f,slot:Se,defaultTag:MO,features:FO,visible:w===0,name:"Dialog"}))))))))),ot.createElement(he,null))}let UO="div";function BO(e,t){let n=La(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=hu("Dialog.Overlay"),s=Hr(t),c=Ut(h=>{if(h.target===h.currentTarget){if(IC(h.currentTarget))return h.preventDefault();h.preventDefault(),h.stopPropagation(),l()}}),f=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:f,defaultTag:UO,name:"Dialog.Overlay"})}let HO="div";function WO(e,t){let n=La(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Backdrop"),s=Hr(t);j.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let c=j.useMemo(()=>({open:i===0}),[i]);return ot.createElement(ih,{force:!0},ot.createElement(lh,null,jr({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:HO,name:"Dialog.Backdrop"})))}let GO="div";function VO(e,t){let n=La(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Panel"),s=Hr(t,l.panelRef),c=j.useMemo(()=>({open:i===0}),[i]),f=Ut(h=>{h.stopPropagation()});return jr({ourProps:{ref:s,id:r,onClick:f},theirProps:o,slot:c,defaultTag:GO,name:"Dialog.Panel"})}let qO="h2";function KO(e,t){let n=La(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=hu("Dialog.Title"),s=Hr(t);j.useEffect(()=>(l(r),()=>l(null)),[r,l]);let c=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r},theirProps:o,slot:c,defaultTag:qO,name:"Dialog.Title"})}let QO=dr(zO),YO=dr(WO),XO=dr(VO),ZO=dr(BO),JO=dr(KO),fy=Object.assign(QO,{Backdrop:YO,Panel:XO,Overlay:ZO,Title:JO,Description:cO});function eA(e=0){let[t,n]=j.useState(e),r=pu(),o=j.useCallback(c=>{r.current&&n(f=>f|c)},[t,r]),i=j.useCallback(c=>!!(t&c),[t]),l=j.useCallback(c=>{r.current&&n(f=>f&~c)},[n,r]),s=j.useCallback(c=>{r.current&&n(f=>f^c)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}function tA(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function ep(e,...t){e&&t.length>0&&e.classList.remove(...t)}function nA(e,t){let n=Hi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,p)=>p-h);return f}),s=i+l;if(s!==0){n.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&f.dispose()})});let c=n.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function rA(e,t,n,r){let o=n?"enter":"leave",i=Hi(),l=r!==void 0?tA(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=An(o,{enter:()=>t.enter,leave:()=>t.leave}),c=An(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=An(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ep(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...s,...f),i.nextFrame(()=>{ep(e,...t.base,...s,...f),Jd(e,...t.base,...s,...c),nA(e,()=>(ep(e,...t.base,...s),Jd(e,...t.base,...t.entered),l()))}),i.dispose}function oA({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=pu(),s=wg(),c=So(n);Ar(()=>{e&&(c.current="enter")},[e]),Ar(()=>{let f=Hi();s.add(f.dispose);let h=t.current;if(h&&c.current!=="idle"&&l.current)return f.dispose(),o.current(c.current),f.add(rA(h,r.current,c.current==="enter",()=>{f.dispose(),i.current(c.current)})),f.dispose},[n])}function Go(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let ef=j.createContext(null);ef.displayName="TransitionContext";var iA=(e=>(e.Visible="visible",e.Hidden="hidden",e))(iA||{});function aA(){let e=j.useContext(ef);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function lA(){let e=j.useContext(tf);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let tf=j.createContext(null);tf.displayName="NestingContext";function nf(e){return"children"in e?nf(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tx(e,t){let n=So(e),r=j.useRef([]),o=pu(),i=wg(),l=Ut((y,b=Jo.Hidden)=>{let E=r.current.findIndex(({el:O})=>O===y);E!==-1&&(An(b,{[Jo.Unmount](){r.current.splice(E,1)},[Jo.Hidden](){r.current[E].state="hidden"}}),i.microTask(()=>{var O;!nf(r)&&o.current&&((O=n.current)==null||O.call(n))}))}),s=Ut(y=>{let b=r.current.find(({el:E})=>E===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>l(y,Jo.Unmount)}),c=j.useRef([]),f=j.useRef(Promise.resolve()),h=j.useRef({enter:[],leave:[],idle:[]}),p=Ut((y,b,E)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([O])=>O!==y)),t==null||t.chains.current[b].push([y,new Promise(O=>{c.current.push(O)})]),t==null||t.chains.current[b].push([y,new Promise(O=>{Promise.all(h.current[b].map(([_,w])=>w)).then(()=>O())})]),b==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>E(b)):E(b)}),g=Ut((y,b,E)=>{Promise.all(h.current[b].splice(0).map(([O,_])=>_)).then(()=>{var O;(O=c.current.shift())==null||O()}).then(()=>E(b))});return j.useMemo(()=>({children:r,register:s,unregister:l,onStart:p,onStop:g,wait:f,chains:h}),[s,l,r,p,g,h,f])}function uA(){}let sA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dy(e){var t;let n={};for(let r of sA)n[r]=(t=e[r])!=null?t:uA;return n}function cA(e){let t=j.useRef(dy(e));return j.useEffect(()=>{t.current=dy(e)},[e]),t}let fA="div",nx=Tc.RenderStrategy;function dA(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:c,enterFrom:f,enterTo:h,entered:p,leave:g,leaveFrom:y,leaveTo:b,...E}=e,O=j.useRef(null),_=Hr(O,t),w=(n=E.unmount)==null||n?Jo.Unmount:Jo.Hidden,{show:S,appear:k,initial:C}=aA(),[$,L]=j.useState(S?"visible":"hidden"),U=lA(),{register:ce,unregister:z}=U;j.useEffect(()=>ce(O),[ce,O]),j.useEffect(()=>{if(w===Jo.Hidden&&O.current){if(S&&$!=="visible"){L("visible");return}return An($,{hidden:()=>z(O),visible:()=>ce(O)})}},[$,O,ce,z,S,w]);let K=So({base:Go(E.className),enter:Go(c),enterFrom:Go(f),enterTo:Go(h),entered:Go(p),leave:Go(g),leaveFrom:Go(y),leaveTo:Go(b)}),W=cA({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),ge=Ia();j.useEffect(()=>{if(ge&&$==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,$,ge]);let he=C&&!k,be=k&&S&&C,De=(()=>!ge||he?"idle":S?"enter":"leave")(),Be=eA(0),X=Ut(oe=>An(oe,{enter:()=>{Be.addFlag(ar.Opening),W.current.beforeEnter()},leave:()=>{Be.addFlag(ar.Closing),W.current.beforeLeave()},idle:()=>{}})),ne=Ut(oe=>An(oe,{enter:()=>{Be.removeFlag(ar.Opening),W.current.afterEnter()},leave:()=>{Be.removeFlag(ar.Closing),W.current.afterLeave()},idle:()=>{}})),_e=tx(()=>{L("hidden"),z(O)},U);oA({immediate:be,container:O,classes:K,direction:De,onStart:So(oe=>{_e.onStart(O,oe,X)}),onStop:So(oe=>{_e.onStop(O,oe,ne),oe==="leave"&&!nf(_e)&&(L("hidden"),z(O))})});let N=E,G={ref:_};return be?N={...N,className:kc(E.className,...K.current.enter,...K.current.enterFrom)}:(N.className=kc(E.className,(r=O.current)==null?void 0:r.className),N.className===""&&delete N.className),ot.createElement(tf.Provider,{value:_e},ot.createElement(zC,{value:An($,{visible:ar.Open,hidden:ar.Closed})|Be.flags},jr({ourProps:G,theirProps:N,defaultTag:fA,features:nx,visible:$==="visible",name:"Transition.Child"})))}function pA(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=j.useRef(null),s=Hr(l,t);Ia();let c=xg();if(n===void 0&&c!==null&&(n=(c&ar.Open)===ar.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[f,h]=j.useState(n?"visible":"hidden"),p=tx(()=>{h("hidden")}),[g,y]=j.useState(!0),b=j.useRef([n]);Ar(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let E=j.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);j.useEffect(()=>{if(n)h("visible");else if(!nf(p))h("hidden");else{let S=l.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&h("hidden")}},[n,p]);let O={unmount:o},_=Ut(()=>{var S;g&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),w=Ut(()=>{var S;g&&y(!1),(S=e.beforeLeave)==null||S.call(e)});return ot.createElement(tf.Provider,{value:p},ot.createElement(ef.Provider,{value:E},jr({ourProps:{...O,as:j.Fragment,children:ot.createElement(rx,{ref:s,...O,...i,beforeEnter:_,beforeLeave:w})},theirProps:{},defaultTag:j.Fragment,features:nx,visible:f==="visible",name:"Transition"})))}function hA(e,t){let n=j.useContext(ef)!==null,r=xg()!==null;return ot.createElement(ot.Fragment,null,!n&&r?ot.createElement(sh,{ref:t,...e}):ot.createElement(rx,{ref:t,...e}))}let sh=dr(pA),rx=dr(dA),gA=dr(hA),Ds=Object.assign(sh,{Child:gA,Root:sh});function mA(e){return M.jsxs(M.Fragment,{children:[M.jsx(Ds.Root,{show:e.sidebarOpen,as:j.Fragment,children:M.jsxs(fy,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),M.jsx("div",{className:"fixed inset-0 flex",children:M.jsx(Ds.Child,{as:j.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:M.jsxs(fy.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[M.jsx("span",{className:"sr-only",children:"Close sidebar"}),M.jsx(oT,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})]})})})]})}),M.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})}),M.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[M.jsx("span",{className:"sr-only",children:"Open sidebar"}),M.jsx(P2,{className:"h-6 w-6","aria-hidden":"true"})]}),M.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?M.jsxs(M.Fragment,{children:["OpenGPTs: ",M.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),M.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),M.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:M.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function py(e){var t;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:On(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),M.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function vA(e){var t,n;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterConfig(null),className:On(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Bot"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var ox={exports:{}},yA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wA=yA,_A=wA;function ix(){}function ax(){}ax.resetWarningCache=ix;var xA=function(){function e(r,o,i,l,s,c){if(c!==_A){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ax,resetWarningCache:ix};return n.PropTypes=n,n};ox.exports=xA();var bA=ox.exports;const At=xh(bA);function Ma(e,t,n,r){function o(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function c(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?i(h.value):o(h.value).then(s,c)}f((r=r.apply(e,t||[])).next())})}function Fa(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){l={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function gy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function EA(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=SA.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kA=[".DS_Store","Thumbs.db"];function TA(e){return Ma(this,void 0,void 0,function(){return Fa(this,function(t){return Ac(e)&&CA(e.dataTransfer)?[2,PA(e.dataTransfer,e.type)]:OA(e)?[2,AA(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jA(e)]:[2,[]]})})}function CA(e){return Ac(e)}function OA(e){return Ac(e)&&Ac(e.target)}function Ac(e){return typeof e=="object"&&e!==null}function AA(e){return ch(e.target.files).map(function(t){return gu(t)})}function jA(e){return Ma(this,void 0,void 0,function(){var t;return Fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return gu(r)})]}})})}function PA(e,t){return Ma(this,void 0,void 0,function(){var n,r;return Fa(this,function(o){switch(o.label){case 0:return e.items?(n=ch(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RA))]):[3,2];case 1:return r=o.sent(),[2,my(lx(r))];case 2:return[2,my(ch(e.files).map(function(i){return gu(i)}))]}})})}function my(e){return e.filter(function(t){return kA.indexOf(t.name)===-1})}function ch(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,xy(n)];if(e.sizen)return[!1,xy(n)]}return[!0,null]}function ki(e){return e!=null}function KA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=fx(c,n),h=iu(f,1),p=h[0],g=dx(c,r,o),y=iu(g,1),b=y[0],E=s?s(c):null;return p&&b&&!E})}function jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Is(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sy(e){e.preventDefault()}function QA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YA(e){return e.indexOf("Edge/")!==-1}function XA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QA(e)||YA(e)}function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eg=j.forwardRef(function(e,t){var n=e.children,r=Pc(e,rj),o=vx(r),i=o.open,l=Pc(o,oj);return j.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(j.Fragment,null,n(Vt(Vt({},l),{},{open:i})))});Eg.displayName="Dropzone";var mx={disabled:!1,getFilesFromEvent:TA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Eg.defaultProps=mx;Eg.propTypes={children:At.func,accept:At.objectOf(At.arrayOf(At.string)),multiple:At.bool,preventDropOnDocument:At.bool,noClick:At.bool,noKeyboard:At.bool,noDrag:At.bool,noDragEventsBubbling:At.bool,minSize:At.number,maxSize:At.number,maxFiles:At.number,disabled:At.bool,getFilesFromEvent:At.func,onFileDialogCancel:At.func,onFileDialogOpen:At.func,useFsAccessApi:At.bool,autoFocus:At.bool,onDragEnter:At.func,onDragLeave:At.func,onDragOver:At.func,onDrop:At.func,onDropAccepted:At.func,onDropRejected:At.func,onError:At.func,validator:At.func};var hh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vt(Vt({},mx),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,s=t.multiple,c=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,g=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,E=t.onFileDialogCancel,O=t.onFileDialogOpen,_=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,C=t.noKeyboard,$=t.noDrag,L=t.noDragEventsBubbling,U=t.onError,ce=t.validator,z=j.useMemo(function(){return ej(n)},[n]),K=j.useMemo(function(){return JA(n)},[n]),W=j.useMemo(function(){return typeof O=="function"?O:ky},[O]),ge=j.useMemo(function(){return typeof E=="function"?E:ky},[E]),he=j.useRef(null),be=j.useRef(null),De=j.useReducer(gj,hh),Be=tp(De,2),X=Be[0],ne=Be[1],_e=X.isFocused,N=X.isFileDialogActive,G=j.useRef(typeof window<"u"&&window.isSecureContext&&_&&ZA()),oe=function(){!G.current&&N&&setTimeout(function(){if(be.current){var Oe=be.current.files;Oe.length||(ne({type:"closeDialog"}),ge())}},300)};j.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[be,N,ge,G]);var Z=j.useRef([]),ie=function(Oe){he.current&&he.current.contains(Oe.target)||(Oe.preventDefault(),Z.current=[])};j.useEffect(function(){return S&&(document.addEventListener("dragover",Sy,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",Sy),document.removeEventListener("drop",ie))}},[he,S]),j.useEffect(function(){return!r&&w&&he.current&&he.current.focus(),function(){}},[he,w,r]);var re=j.useCallback(function(se){U?U(se):console.error(se)},[U]),Se=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[].concat(lj(Z.current),[se.target]),Is(se)&&Promise.resolve(o(se)).then(function(Oe){if(!(jc(se)&&!L)){var pt=Oe.length,Rt=pt>0&&KA({files:Oe,accept:z,minSize:l,maxSize:i,multiple:s,maxFiles:c,validator:ce}),Yt=pt>0&&!Rt;ne({isDragAccept:Rt,isDragReject:Yt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(Oe){return re(Oe)})},[o,f,re,L,z,l,i,s,c,ce]),Pe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Is(se);if(Oe&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return Oe&&p&&p(se),!1},[p,L]),Fe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Z.current.filter(function(Rt){return he.current&&he.current.contains(Rt)}),pt=Oe.indexOf(se.target);pt!==-1&&Oe.splice(pt,1),Z.current=Oe,!(Oe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Is(se)&&h&&h(se))},[he,h,L]),Ke=j.useCallback(function(se,Oe){var pt=[],Rt=[];se.forEach(function(Yt){var Pn=fx(Yt,z),dn=tp(Pn,2),pn=dn[0],Rn=dn[1],Xn=dx(Yt,l,i),A=tp(Xn,2),R=A[0],I=A[1],q=ce?ce(Yt):null;if(pn&&R&&!q)pt.push(Yt);else{var V=[Rn,I];q&&(V=V.concat(q)),Rt.push({file:Yt,errors:V.filter(function(de){return de})})}}),(!s&&pt.length>1||s&&c>=1&&pt.length>c)&&(pt.forEach(function(Yt){Rt.push({file:Yt,errors:[qA]})}),pt.splice(0)),ne({acceptedFiles:pt,fileRejections:Rt,type:"setFiles"}),g&&g(pt,Rt,Oe),Rt.length>0&&b&&b(Rt,Oe),pt.length>0&&y&&y(pt,Oe)},[ne,s,z,l,i,c,g,y,b,ce]),He=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[],Is(se)&&Promise.resolve(o(se)).then(function(Oe){jc(se)&&!L||Ke(Oe,se)}).catch(function(Oe){return re(Oe)}),ne({type:"reset"})},[o,Ke,re,L]),xe=j.useCallback(function(){if(G.current){ne({type:"openDialog"}),W();var se={multiple:s,types:K};window.showOpenFilePicker(se).then(function(Oe){return o(Oe)}).then(function(Oe){Ke(Oe,null),ne({type:"closeDialog"})}).catch(function(Oe){tj(Oe)?(ge(Oe),ne({type:"closeDialog"})):nj(Oe)?(G.current=!1,be.current?(be.current.value=null,be.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):re(Oe)});return}be.current&&(ne({type:"openDialog"}),W(),be.current.value=null,be.current.click())},[ne,W,ge,_,Ke,re,K,s]),Xe=j.useCallback(function(se){!he.current||!he.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),xe())},[he,xe]),rt=j.useCallback(function(){ne({type:"focus"})},[]),Ie=j.useCallback(function(){ne({type:"blur"})},[]),Ze=j.useCallback(function(){k||(XA()?setTimeout(xe,0):xe())},[k,xe]),gt=function(Oe){return r?null:Oe},Mt=function(Oe){return C?null:gt(Oe)},jt=function(Oe){return $?null:gt(Oe)},yt=function(Oe){L&&Oe.stopPropagation()},kt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.role,Yt=se.onKeyDown,Pn=se.onFocus,dn=se.onBlur,pn=se.onClick,Rn=se.onDragEnter,Xn=se.onDragOver,A=se.onDragLeave,R=se.onDrop,I=Pc(se,ij);return Vt(Vt(ph({onKeyDown:Mt(Zr(Yt,Xe)),onFocus:Mt(Zr(Pn,rt)),onBlur:Mt(Zr(dn,Ie)),onClick:gt(Zr(pn,Ze)),onDragEnter:jt(Zr(Rn,Se)),onDragOver:jt(Zr(Xn,Pe)),onDragLeave:jt(Zr(A,Fe)),onDrop:jt(Zr(R,He)),role:typeof Rt=="string"&&Rt!==""?Rt:"presentation"},pt,he),!r&&!C?{tabIndex:0}:{}),I)}},[he,Xe,rt,Ie,Ze,Se,Pe,Fe,He,C,$,r]),$e=j.useCallback(function(se){se.stopPropagation()},[]),Bt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.onChange,Yt=se.onClick,Pn=Pc(se,aj),dn=ph({accept:z,multiple:s,type:"file",style:{display:"none"},onChange:gt(Zr(Rt,He)),onClick:gt(Zr(Yt,$e)),tabIndex:-1},pt,be);return Vt(Vt({},dn),Pn)}},[be,n,s,He,r]);return Vt(Vt({},X),{},{isFocused:_e&&!r,getRootProps:kt,getInputProps:Bt,rootRef:he,inputRef:be,open:gt(xe)})}function gj(e,t){switch(t.type){case"focus":return Vt(Vt({},e),{},{isFocused:!0});case"blur":return Vt(Vt({},e),{},{isFocused:!1});case"openDialog":return Vt(Vt({},hh),{},{isFileDialogActive:!0});case"closeDialog":return Vt(Vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vt(Vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vt(Vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vt({},hh);default:return e}}function ky(){}const mj={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},vj={borderColor:"#2196f3"},yj={borderColor:"#00e676"},wj={borderColor:"#ff1744"};function _j(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function xj(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,o=e.files.map((l,s)=>M.jsxs("li",{children:[l.name," - ",l.size," bytes",M.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(c=>c.filter(f=>f!==l)),children:M.jsx(tT,{className:"h-4 w-4"})})]},s)),i=j.useMemo(()=>({...mj,...e.state.isFocused?vj:{},...e.state.isDragAccept?yj:{},...e.state.isDragReject?wj:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return M.jsxs("section",{className:"",children:[M.jsxs("aside",{children:[M.jsx(_j,{id:"files",title:"Files"}),M.jsx("div",{className:"prose",children:M.jsx("ul",{children:o})})]}),M.jsxs("div",{...t({style:i}),children:[M.jsx("input",{...n()}),M.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",M.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",M.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:M.jsx("ul",{children:r.map((l,s)=>M.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},s))})})]})]})}function kg(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function bj(e){return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Ty(e){var t;return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsxs("fieldset",{children:[M.jsx("legend",{className:"sr-only",children:e.field.title}),M.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>M.jsxs("div",{className:"flex items-center",children:[M.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),M.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const Sj={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function Ej(e){var t,n,r;return M.jsxs("fieldset",{children:[M.jsx(kg,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),M.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>{var i;return M.jsxs("div",{className:"relative flex items-start",children:[M.jsx("div",{className:"flex h-6 items-center",children:M.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(s=>s!==o))}})}),M.jsxs("div",{className:"ml-3 text-sm leading-6",children:[M.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o}),((i=e.descriptions)==null?void 0:i[o])&&M.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:_t(e.descriptions[o])}})]})]},o)})})]})}function kj(e){const t=window.location.href+"?shared_id="+e.assistantId;return M.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[M.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[M.jsx(Z2,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),M.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function Tj(e){var p,g,y,b,E,O;const[t,n]=j.useState(((p=e.config)==null?void 0:p.config)??e.configDefaults),[r,o]=j.useState([]),i=vx({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,s]=j.useState(((g=e.config)==null?void 0:g.public)??!1);j.useEffect(()=>{var _;n(((_=e.config)==null?void 0:_.config)??e.configDefaults)},[e.config,e.configDefaults]),j.useEffect(()=>{i.acceptedFiles.length>0&&(n(_=>{var w;return{configurable:{..._==null?void 0:_.configurable,tools:[...(((w=_==null?void 0:_.configurable)==null?void 0:w.tools)??[]).filter(S=>S!=="Retrieval"),"Retrieval"]}}}),o(_=>[..._.filter(w=>!i.acceptedFiles.includes(w)),...i.acceptedFiles]))},[i.acceptedFiles]);const[c,f]=j.useState(!1),h=!!e.config&&!c;return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:M.jsxs("span",{children:["Bot: ",((y=e.config)==null?void 0:y.name)??"New Bot"," ",M.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((b=e.config)==null?void 0:b.public)&&M.jsx(kj,{assistantId:(E=e.config)==null?void 0:E.assistant_id}),M.jsxs("form",{className:On("flex flex-col gap-8"),onSubmit:async _=>{_.preventDefault(),_.stopPropagation();const S=_.target.key.value;S&&(f(!0),await e.saveConfig(S,t,i.acceptedFiles,l),f(!1))},children:[M.jsxs("div",{className:On("flex flex-col gap-8",h&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((O=e.configSchema)==null?void 0:O.properties.configurable.properties)??{}).map(([_,w])=>{var k,C,$,L;const S=w.title;if(((k=w.allOf)==null?void 0:k.length)===1&&(w=w.allOf[0]),_==="agent_type")return M.jsx(Ty,{id:_,field:w,title:S,value:(C=t==null?void 0:t.configurable)==null?void 0:C[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="system_message")return M.jsx(bj,{id:_,field:w,title:S,value:($=t==null?void 0:t.configurable)==null?void 0:$[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="tools")return M.jsx(Ej,{id:_,field:w,title:S,value:(L=t==null?void 0:t.configurable)==null?void 0:L[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h,descriptions:Sj},_)}),!e.config&&M.jsx(xj,{state:i,files:r,setFiles:o}),M.jsx(Ty,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:_=>s(_==="Yes"),readonly:h})]}),!e.config&&M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:M.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),M.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:c?"Saving...":"Save"})]})]})]})}function Cj(e){var t;return M.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[M.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[M.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:M.jsx(vA,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),M.jsx("main",{className:"flex-1",children:M.jsx("div",{className:"px-4",children:M.jsx(Tj,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startChat})})]})}function Oj(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var CP=TP,OP=lf;function AP(e,t){var n=this.__data__,r=OP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var jP=AP,PP=pP,RP=xP,$P=EP,NP=CP,DP=jP;function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,y=n&E$?new _$:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=jN}var Rg=PN,RN=mu,$N=Rg,NN=vu,DN="[object Arguments]",IN="[object Array]",LN="[object Boolean]",MN="[object Date]",FN="[object Error]",zN="[object Function]",UN="[object Map]",BN="[object Number]",HN="[object Object]",WN="[object RegExp]",GN="[object Set]",VN="[object String]",qN="[object WeakMap]",KN="[object ArrayBuffer]",QN="[object DataView]",YN="[object Float32Array]",XN="[object Float64Array]",ZN="[object Int8Array]",JN="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",n4="[object Uint8ClampedArray]",r4="[object Uint16Array]",o4="[object Uint32Array]",It={};It[YN]=It[XN]=It[ZN]=It[JN]=It[e4]=It[t4]=It[n4]=It[r4]=It[o4]=!0;It[DN]=It[IN]=It[KN]=It[LN]=It[QN]=It[MN]=It[FN]=It[zN]=It[UN]=It[BN]=It[HN]=It[WN]=It[GN]=It[VN]=It[qN]=!1;function i4(e){return NN(e)&&$N(e.length)&&!!It[RN(e)]}var a4=i4;function l4(e){return function(t){return e(t)}}var $x=l4,Nc={exports:{}};Nc.exports;(function(e,t){var n=wx,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,l=i&&n.process,s=function(){try{var c=o&&o.require&&o.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nc,Nc.exports);var u4=Nc.exports,s4=a4,c4=$x,Uy=u4,By=Uy&&Uy.isTypedArray,f4=By?c4(By):s4,Nx=f4,d4=gN,p4=jx,h4=io,g4=Px,m4=Rx,v4=Nx,y4=Object.prototype,w4=y4.hasOwnProperty;function _4(e,t){var n=h4(e),r=!n&&p4(e),o=!n&&!r&&g4(e),i=!n&&!r&&!o&&v4(e),l=n||r||o||i,s=l?d4(e.length,String):[],c=s.length;for(var f in e)(t||w4.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m4(f,c)))&&s.push(f);return s}var x4=_4,b4=Object.prototype;function S4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b4;return e===n}var E4=S4;function k4(e,t){return function(n){return e(t(n))}}var T4=k4,C4=T4,O4=C4(Object.keys,Object),A4=O4,j4=E4,P4=A4,R4=Object.prototype,$4=R4.hasOwnProperty;function N4(e){if(!j4(e))return P4(e);var t=[];for(var n in Object(e))$4.call(e,n)&&n!="constructor"&&t.push(n);return t}var D4=N4,I4=xx,L4=Rg;function M4(e){return e!=null&&L4(e.length)&&!I4(e)}var $g=M4,F4=x4,z4=D4,U4=$g;function B4(e){return U4(e)?F4(e):z4(e)}var Ng=B4,H4=rN,W4=pN,G4=Ng;function V4(e){return H4(e,G4,W4)}var q4=V4,Hy=q4,K4=1,Q4=Object.prototype,Y4=Q4.hasOwnProperty;function X4(e,t,n,r,o,i){var l=n&K4,s=Hy(e),c=s.length,f=Hy(t),h=f.length;if(c!=h&&!l)return!1;for(var p=c;p--;){var g=s[p];if(!(l?g in t:Y4.call(t,g)))return!1}var y=i.get(e),b=i.get(t);if(y&&b)return y==t&&b==e;var E=!0;i.set(e,t),i.set(t,e);for(var O=l;++pt||i&&l&&c&&!s&&!f||r&&l&&c||!n&&c||!o)return 1;if(!r&&!i&&!f&&e=s)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var hL=pL,ip=yx,gL=Pg,mL=UI,vL=lL,yL=sL,wL=$x,_L=hL,xL=zx,bL=io;function SL(e,t,n){t.length?t=ip(t,function(i){return bL(i)?function(l){return gL(l,i.length===1?i[0]:i)}:i}):t=[xL];var r=-1;t=ip(t,wL(mL));var o=vL(e,function(i,l,s){var c=ip(t,function(f){return f(i)});return{criteria:c,index:++r,value:i}});return yL(o,function(i,l){return _L(i,l,n)})}var EL=SL,kL=EL,r1=io;function TL(e,t,n,r){return e==null?[]:(r1(t)||(t=t==null?[]:[t]),n=r?void 0:n,r1(n)||(n=n==null?[]:[n]),kL(e,t,n))}var CL=TL;const Ux=xh(CL);function OL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return Ux(t,"updated_at","desc")}function AL(){const[e,t]=j.useReducer(OL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const s=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(c=>c.json());t(s)}l()},[]);const o=j.useCallback(async(l,s,c=crypto.randomUUID())=>{const f=await fetch(`/threads/${c}`,{method:"PUT",body:JSON.stringify({assistant_id:s,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(h=>h.json());return t(f),r(f.thread_id),f},[]),i=j.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:o,enterChat:i}}const jL=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)n.d(i,l,(function(s){return r[s]}).bind(null,l));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}var o=n(47),i=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(i,l){var s=o(i,l);return r(s)?s:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(l){return i(l)?r(l):o(l)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(i){return i!=null&&o(i.length)&&!r(i)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),l=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":l&&l in Object(s)?o(s):i(s)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),l=n(61),s=n(134),c=n(8),f=n(48),h=f(r),p=f(o),g=f(i),y=f(l),b=f(s),E=c;(r&&E(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&E(new o)!="[object Map]"||i&&E(i.resolve())!="[object Promise]"||l&&E(new l)!="[object Set]"||s&&E(new s)!="[object WeakMap]")&&(E=function(O){var _=c(O),w=_=="[object Object]"?O.constructor:void 0,S=w?f(w):"";if(S)switch(S){case h:return"[object DataView]";case p:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return _}),e.exports=E},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(p)}var i=n(2),l=n(121),s=o(t)=="object"&&t&&!t.nodeType&&t,c=s&&o(r)=="object"&&r&&!r.nodeType&&r,f=c&&c.exports===s?i.Buffer:void 0,h=(f?f.isBuffer:void 0)||l;r.exports=h}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(O){if(n===setTimeout)return setTimeout(O,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:i}catch{n=i}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,f=[],h=!1,p=-1;function g(){h&&c&&(h=!1,c.length?f=c.concat(f):p=-1,f.length&&y())}function y(){if(!h){var O=s(g);h=!0;for(var _=f.length;_;){for(c=f,f=[];++p<_;)c&&c[p].run();p=-1,_=f.length}c=null,h=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(O)}}function b(O,_){this.fun=O,this.array=_}function E(){}o.nextTick=function(O){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;wO){var _=E;E=O,O=_}return E+""+O+""+(o.isUndefined(b)?"\0":b)}function f(p,g,y,b){var E=""+g,O=""+y;if(!p&&E>O){var _=E;E=O,O=_}var w={v:E,w:O};return b&&(w.name=b),w}function h(p,g){return c(p,g.v,g.w,g.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(p){return this._label=p,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultNodeLabelFn=p,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._in[g])})},i.prototype.sinks=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._out[g])})},i.prototype.setNodes=function(p,g){var y=arguments,b=this;return o.each(p,function(E){y.length>1?b.setNode(E,g):b.setNode(E)}),this},i.prototype.setNode=function(p,g){return o.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=g),this):(this._nodes[p]=arguments.length>1?g:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]="\0",this._children[p]={},this._children["\0"][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},i.prototype.node=function(p){return this._nodes[p]},i.prototype.hasNode=function(p){return o.has(this._nodes,p)},i.prototype.removeNode=function(p){var g=this;if(o.has(this._nodes,p)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],o.each(this.children(p),function(b){g.setParent(b)}),delete this._children[p]),o.each(o.keys(this._in[p]),y),delete this._in[p],delete this._preds[p],o.each(o.keys(this._out[p]),y),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},i.prototype.setParent=function(p,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===p)throw new Error("Setting "+g+" as parent of "+p+" would create a cycle");this.setNode(g)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=g,this._children[g][p]=!0,this},i.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},i.prototype.parent=function(p){if(this._isCompound){var g=this._parent[p];if(g!=="\0")return g}},i.prototype.children=function(p){if(o.isUndefined(p)&&(p="\0"),this._isCompound){var g=this._children[p];if(g)return o.keys(g)}else{if(p==="\0")return this.nodes();if(this.hasNode(p))return[]}},i.prototype.predecessors=function(p){var g=this._preds[p];if(g)return o.keys(g)},i.prototype.successors=function(p){var g=this._sucs[p];if(g)return o.keys(g)},i.prototype.neighbors=function(p){var g=this.predecessors(p);if(g)return o.union(g,this.successors(p))},i.prototype.isLeaf=function(p){return(this.isDirected()?this.successors(p):this.neighbors(p)).length===0},i.prototype.filterNodes=function(p){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(E,O){p(O)&&g.setNode(O,E)}),o.each(this._edgeObjs,function(E){g.hasNode(E.v)&&g.hasNode(E.w)&&g.setEdge(E,y.edge(E))});var b={};return this._isCompound&&o.each(g.nodes(),function(E){g.setParent(E,function O(_){var w=y.parent(_);return w===void 0||g.hasNode(w)?(b[_]=w,w):w in b?b[w]:O(w)}(E))}),g},i.prototype.setDefaultEdgeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultEdgeLabelFn=p,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(p,g){var y=this,b=arguments;return o.reduce(p,function(E,O){return b.length>1?y.setEdge(E,O,g):y.setEdge(E,O),O}),this},i.prototype.setEdge=function(){var p,g,y,b,E=!1,O=arguments[0];r(O)==="object"&&O!==null&&"v"in O?(p=O.v,g=O.w,y=O.name,arguments.length===2&&(b=arguments[1],E=!0)):(p=O,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],E=!0)),p=""+p,g=""+g,o.isUndefined(y)||(y=""+y);var _=c(this._isDirected,p,g,y);if(o.has(this._edgeLabels,_))return E&&(this._edgeLabels[_]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(g),this._edgeLabels[_]=E?b:this._defaultEdgeLabelFn(p,g,y);var w=f(this._isDirected,p,g,y);return p=w.v,g=w.w,Object.freeze(w),this._edgeObjs[_]=w,l(this._preds[g],p),l(this._sucs[p],g),this._in[g][_]=w,this._out[p][_]=w,this._edgeCount++,this},i.prototype.edge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return this._edgeLabels[b]},i.prototype.hasEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return o.has(this._edgeLabels,b)},i.prototype.removeEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y),E=this._edgeObjs[b];return E&&(p=E.v,g=E.w,delete this._edgeLabels[b],delete this._edgeObjs[b],s(this._preds[g],p),s(this._sucs[p],g),delete this._in[g][b],delete this._out[p][b],this._edgeCount--),this},i.prototype.inEdges=function(p,g){var y=this._in[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.v===g}):b}},i.prototype.outEdges=function(p,g){var y=this._out[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.w===g}):b}},i.prototype.nodeEdges=function(p,g){var y=this.inEdges(p,g);if(y)return y.concat(this.outEdges(p,g))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),l=n(97),s=n(98),c=n(99);function f(h){var p=this.__data__=new r(h);this.size=p.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=l,f.prototype.has=s,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),l=n(116),s=n(117);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}var i=n(47),l=o(t)=="object"&&t&&!t.nodeType&&t,s=l&&o(r)=="object"&&r&&!r.nodeType&&r,c=s&&s.exports===l&&i.process,f=function(){try{var h=s&&s.require&&s.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();r.exports=f}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return o(l);var s=[];for(var c in Object(l))i.call(l,c)&&c!="constructor"&&s.push(c);return s}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,s=l?function(c){return c==null?[]:(c=Object(c),r(l(c),function(f){return i.call(c,f)}))}:o;e.exports=s},function(e,t){e.exports=function(n,r){for(var o=-1,i=r.length,l=n.length;++o-1&&o%1==0&&oy))return!1;var E=p.get(l);if(E&&p.get(s))return E==s;var O=-1,_=!0,w=2&c?new r:void 0;for(p.set(l,s),p.set(s,l);++O0&&(b=_.removeMin(),(E=O[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return O}(l,String(s),c||i,f||function(h){return l.outEdges(h)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(i){return i.key})},o.prototype.has=function(i){return r.has(this._keyIndices,i)},o.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(i,l){var s=this._keyIndices;if(i=String(i),!r.has(s,i)){var c=this._arr,f=c.length;return s[i]=f,c.push({key:i,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},o.prototype.decrease=function(i,l){var s=this._keyIndices[i];if(l>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[s].priority+" New: "+l);this._arr[s].priority=l,this._decrease(s)},o.prototype._heapify=function(i){var l=this._arr,s=2*i,c=s+1,f=i;s>1].priority0&&E(_,W))}catch(ge){k.call(new $(W),ge)}}}function k(z){var K=this;K.triggered||(K.triggered=!0,K.def&&(K=K.def),K.msg=z,K.state=2,K.chain.length>0&&E(_,K))}function C(z,K,W,ge){for(var he=0;he-1?Z=ie:(oe=o.isUndefined(N)?void 0:z(N),o.isUndefined(oe)?Z=ie:((Z=oe).path=f(l.join(oe.path,ie.path)),Z.query=function(re,Se){var Pe={};function Fe(Ke){o.forOwn(Ke,function(He,xe){Pe[xe]=He})}return Fe(c.parse(re||"")),Fe(c.parse(Se||"")),Object.keys(Pe).length===0?void 0:c.stringify(Pe)}(oe.query,ie.query))),Z.fragment=void 0,(b.indexOf(Z.reference)===-1&&Z.path.indexOf("../")===0?"../":"")+h.serialize(Z)}function _(N){return y.indexOf(C(N))>-1}function w(N){return o.isUndefined(N.error)&&N.type!=="invalid"}function S(N,G){var oe=N;return G.forEach(function(Z){if(!(Z in oe))throw Error("JSON Pointer points to missing location: "+ne(G));oe=oe[Z]}),oe}function k(N){return Object.keys(N).filter(function(G){return G!=="$ref"})}function C(N){var G;switch(N.uriDetails.reference){case"absolute":case"uri":G="remote";break;case"same-document":G="local";break;default:G=N.uriDetails.reference}return G}function $(N,G){var oe=g[N],Z=Promise.resolve(),ie=o.cloneDeep(G.loaderOptions||{});return o.isUndefined(oe)?(o.isUndefined(ie.processContent)&&(ie.processContent=function(re,Se){Se(void 0,JSON.parse(re.text))}),Z=(Z=s.load(decodeURI(N),ie)).then(function(re){return g[N]={value:re},re}).catch(function(re){throw g[N]={error:re},re})):Z=Z.then(function(){if(o.isError(oe.error))throw oe.error;return oe.value}),Z=Z.then(function(re){return o.cloneDeep(re)})}function L(N,G){var oe=!0;try{if(!o.isPlainObject(N))throw new Error("obj is not an Object");if(!o.isString(N.$ref))throw new Error("obj.$ref is not a String")}catch(Z){if(G)throw Z;oe=!1}return oe}function U(N){return N.indexOf("://")!==-1||l.isAbsolute(N)?N:l.resolve(r.cwd(),N)}function ce(N,G){N.error=G.message,N.missing=!0}function z(N){return h.parse(N)}function K(N,G,oe){S(N,G.slice(0,G.length-1))[G[G.length-1]]=oe}function W(N,G){var oe,Z;if(N=o.isUndefined(N)?{}:o.cloneDeep(N),!o.isObject(N))throw new TypeError("options must be an Object");if(!o.isUndefined(N.resolveCirculars)&&!o.isBoolean(N.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(N.filter)||o.isArray(N.filter)||o.isFunction(N.filter)||o.isString(N.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(N.includeInvalid)&&!o.isBoolean(N.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(N.location)&&!o.isString(N.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(N.refPreProcessor)&&!o.isFunction(N.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(N.refPostProcessor)&&!o.isFunction(N.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(N.subDocPath)&&!o.isArray(N.subDocPath)&&!Be(N.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(N.resolveCirculars)&&(N.resolveCirculars=!1),N.filter=function(ie){var re,Se;return o.isArray(ie.filter)||o.isString(ie.filter)?(Se=o.isString(ie.filter)?[ie.filter]:ie.filter,re=function(Pe){return Se.indexOf(Pe.type)>-1||Se.indexOf(C(Pe))>-1}):o.isFunction(ie.filter)?re=ie.filter:o.isUndefined(ie.filter)&&(re=function(){return!0}),function(Pe,Fe){return(Pe.type!=="invalid"||ie.includeInvalid===!0)&&re(Pe,Fe)}}(N),o.isUndefined(N.location)&&(N.location=U("./root.json")),(oe=N.location.split("#")).length>1&&(N.subDocPath="#"+oe[1]),Z=decodeURI(N.location)===N.location,N.location=O(N.location,void 0),Z&&(N.location=decodeURI(N.location)),N.subDocPath=function(ie){var re;return o.isArray(ie.subDocPath)?re=ie.subDocPath:o.isString(ie.subDocPath)?re=X(ie.subDocPath):o.isUndefined(ie.subDocPath)&&(re=[]),re}(N),!o.isUndefined(G))try{S(G,N.subDocPath)}catch(ie){throw ie.message=ie.message.replace("JSON Pointer","options.subDocPath"),ie}return N}function ge(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~1/g,"/").replace(/~0/g,"~")})}function he(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~/g,"~0").replace(/\//g,"~1")})}function be(N,G){var oe={};if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");return function Z(ie,re,Se,Pe){var Fe=!0;function Ke(He,xe){Se.push(xe),Z(ie,He,Se,Pe),Se.pop()}o.isFunction(Pe)&&(Fe=Pe(ie,re,Se)),ie.indexOf(re)===-1&&(ie.push(re),Fe!==!1&&(o.isArray(re)?re.forEach(function(He,xe){Ke(He,xe.toString())}):o.isObject(re)&&o.forOwn(re,function(He,xe){Ke(He,xe)})),ie.pop())}(function(Z,ie){var re,Se=[];return ie.length>0&&(re=Z,ie.slice(0,ie.length-1).forEach(function(Pe){Pe in re&&(re=re[Pe],Se.push(re))})),Se}(N,(G=W(G,N)).subDocPath),S(N,G.subDocPath),o.cloneDeep(G.subDocPath),function(Z,ie,re){var Se,Pe,Fe=!0;return L(ie)&&(o.isUndefined(G.refPreProcessor)||(ie=G.refPreProcessor(o.cloneDeep(ie),re)),Se=De(ie),o.isUndefined(G.refPostProcessor)||(Se=G.refPostProcessor(Se,re)),G.filter(Se,re)&&(Pe=ne(re),oe[Pe]=Se),k(ie).length>0&&(Fe=!1)),Fe}),oe}function De(N){var G,oe,Z,ie={def:N};try{if(L(N,!0),G=N.$ref,Z=E[G],o.isUndefined(Z)&&(Z=E[G]=z(G)),ie.uri=G,ie.uriDetails=Z,o.isUndefined(Z.error)){ie.type=C(ie);try{["#","/"].indexOf(G[0])>-1?Be(G,!0):G.indexOf("#")>-1&&Be(Z.fragment,!0)}catch(re){ie.error=re.message,ie.type="invalid"}}else ie.error=ie.uriDetails.error,ie.type="invalid";(oe=k(N)).length>0&&(ie.warning="Extra JSON Reference properties will be ignored: "+oe.join(", "))}catch(re){ie.error=re.message,ie.type="invalid"}return ie}function Be(N,G){var oe,Z=!0;try{if(!o.isString(N))throw new Error("ptr is not a String");if(N!==""){if(oe=N.charAt(0),["#","/"].indexOf(oe)===-1)throw new Error("ptr must start with a / or #/");if(oe==="#"&&N!=="#"&&N.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(N.match(p))throw new Error("ptr has invalid token(s)")}}catch(ie){if(G===!0)throw ie;Z=!1}return Z}function X(N){try{Be(N,!0)}catch(oe){throw new Error("ptr must be a JSON Pointer: "+oe.message)}var G=N.split("/");return G.shift(),ge(G)}function ne(N,G){if(!o.isArray(N))throw new Error("path must be an Array");return(G!==!1?"#":"")+(N.length>0?"/":"")+he(N).join("/")}function _e(N,G){var oe=Promise.resolve();return oe=oe.then(function(){if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");G=W(G,N),N=o.cloneDeep(N)}).then(function(){var Z={deps:{},docs:{},refs:{}};return function ie(re,Se,Pe){var Fe,Ke,He=Promise.resolve(),xe=ne(Se.subDocPath),Xe=U(Se.location),rt=l.dirname(Se.location),Ie=Xe+xe;return o.isUndefined(Pe.docs[Xe])&&(Pe.docs[Xe]=re),o.isUndefined(Pe.deps[Ie])&&(Pe.deps[Ie]={},Fe=be(re,Se),o.forOwn(Fe,function(Ze,gt){var Mt,jt,yt=U(Se.location)+gt,kt=Ze.refdId=decodeURI(U(_(Ze)?O(rt,Ze.uri):Se.location)+"#"+(Ze.uri.indexOf("#")>-1?Ze.uri.split("#")[1]:""));Pe.refs[yt]=Ze,w(Ze)&&(Ze.fqURI=kt,Pe.deps[Ie][gt===xe?"#":gt.replace(xe+"/","#/")]=kt,yt.indexOf(kt+"/")!==0&&yt!==kt?((Ke=o.cloneDeep(Se)).subDocPath=o.isUndefined(Ze.uriDetails.fragment)?[]:X(decodeURI(Ze.uriDetails.fragment)),_(Ze)?(delete Ke.filter,Ke.location=kt.split("#")[0],He=He.then((Mt=Pe,jt=Ke,function(){var $e=U(jt.location),Bt=Mt.docs[$e];return o.isUndefined(Bt)?$($e,jt).catch(function(se){return Mt.docs[$e]=se,se}):Promise.resolve().then(function(){return Bt})}))):He=He.then(function(){return re}),He=He.then(function($e,Bt,se){return function(Oe){if(o.isError(Oe))ce(se,Oe);else try{return ie(Oe,Bt,$e).catch(function(pt){ce(se,pt)})}catch(pt){ce(se,pt)}}}(Pe,Ke,Ze))):Ze.circular=!0)})),He}(N,G,Z).then(function(){return Z})}).then(function(Z){var ie={},re=[],Se=[],Pe=new i.Graph,Fe=U(G.location),Ke=Fe+ne(G.subDocPath),He=l.dirname(Fe);return Object.keys(Z.deps).forEach(function(xe){Pe.setNode(xe)}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt){Pe.setEdge(Xe,rt)})}),(re=i.alg.findCycles(Pe)).forEach(function(xe){xe.forEach(function(Xe){Se.indexOf(Xe)===-1&&Se.push(Xe)})}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt,Ie){var Ze,gt=!1,Mt=Xe+Ie.slice(1),jt=Z.refs[Xe+Ie.slice(1)],yt=_(jt);Se.indexOf(rt)>-1&&re.forEach(function(kt){gt||(Ze=kt.indexOf(rt))>-1&&kt.forEach(function($e){gt||Mt.indexOf($e+"/")===0&&(yt&&Ze!==kt.length-1&&rt[rt.length-1]==="#"||(gt=!0))})}),gt&&(jt.circular=!0)})}),o.forOwn(Object.keys(Z.deps).reverse(),function(xe){var Xe=Z.deps[xe],rt=xe.split("#"),Ie=Z.docs[rt[0]],Ze=X(rt[1]);o.forOwn(Xe,function(gt,Mt){var jt=gt.split("#"),yt=Z.docs[jt[0]],kt=Ze.concat(X(Mt)),$e=Z.refs[rt[0]+ne(kt)];if(o.isUndefined($e.error)&&o.isUndefined($e.missing))if(!G.resolveCirculars&&$e.circular)$e.value=o.cloneDeep($e.def);else{try{$e.value=S(yt,X(jt[1]))}catch(Bt){return void ce($e,Bt)}rt[1]===""&&Mt==="#"?Z.docs[rt[0]]=$e.value:K(Ie,kt,$e.value)}})}),Object.keys(Z.refs).forEach(function(xe){var Xe,rt,Ie=Z.refs[xe];Ie.type!=="invalid"&&(Ie.fqURI[Ie.fqURI.length-1]==="#"&&Ie.uri[Ie.uri.length-1]!=="#"&&(Ie.fqURI=Ie.fqURI.substr(0,Ie.fqURI.length-1)),Xe=Ie.fqURI.split("/"),rt=Ie.uri.split("/"),o.times(rt.length-1,function(Ze){var gt=rt[rt.length-Ze-1],Mt=rt[rt.length-Ze],jt=Xe.length-Ze-1;gt!=="."&>!==".."&&Mt!==".."&&(Xe[jt]=gt)}),Ie.fqURI=Xe.join("/"),Ie.fqURI.indexOf(Fe)===0?Ie.fqURI=Ie.fqURI.replace(Fe,""):Ie.fqURI.indexOf(He)===0&&(Ie.fqURI=Ie.fqURI.replace(He,"")),Ie.fqURI[0]==="/"&&(Ie.fqURI="."+Ie.fqURI)),xe.indexOf(Ke)===0&&function Ze(gt,Mt,jt){var yt,kt=Mt.split("#"),$e=Z.refs[Mt];ie[kt[0]===G.location?"#"+kt[1]:ne(G.subDocPath.concat(jt))]=$e,!$e.circular&&w($e)?(yt=Z.deps[$e.refdId],$e.refdId.indexOf(gt)!==0&&Object.keys(yt).forEach(function(Bt){Ze($e.refdId,$e.refdId+Bt.substr(1),jt.concat(X(Bt)))})):!$e.circular&&$e.error&&($e.error=$e.error.replace("options.subDocPath","JSON Pointer"),$e.error.indexOf("#")>-1&&($e.error=$e.error.replace($e.uri.substr($e.uri.indexOf("#")),$e.uri)),$e.error.indexOf("ENOENT:")!==0&&$e.error.indexOf("Not Found")!==0||($e.error="JSON Pointer points to missing location: "+$e.uri))}(Ke,xe,X(xe.substr(Ke.length)))}),o.forOwn(ie,function(xe,Xe){delete xe.refdId,xe.circular&&xe.type==="local"&&(xe.value.$ref=xe.fqURI,K(Z.docs[Fe],X(Xe),xe.value)),xe.missing&&(xe.error=xe.error.split(": ")[0]+": "+xe.def.$ref)}),{refs:ie,resolved:Z.docs[Fe]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(N){return ge(N)},e.exports.encodePath=function(N){return he(N)},e.exports.findRefs=function(N,G){return be(N,G)},e.exports.findRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){var Se=o.cloneDeep(g[Z.location]),Pe=o.cloneDeep(Z);return o.isUndefined(Se.refs)&&(delete Pe.filter,delete Pe.subDocPath,Pe.includeInvalid=!0,g[Z.location].refs=be(re,Pe)),o.isUndefined(Z.filter)||(Pe.filter=Z.filter),{refs:be(re,Pe),value:re}})}(N,G)},e.exports.getRefDetails=function(N){return De(N)},e.exports.isPtr=function(N,G){return Be(N,G)},e.exports.isRef=function(N,G){return function(oe,Z){return L(oe,Z)&&De(oe).type!=="invalid"}(N,G)},e.exports.pathFromPtr=function(N){return X(N)},e.exports.pathToPtr=function(N,G){return ne(N,G)},e.exports.resolveRefs=function(N,G){return _e(N,G)},e.exports.resolveRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){return _e(re,Z).then(function(Se){return{refs:Se.refs,resolved:Se.resolved,value:re}})})}(N,G)}}).call(this,n(13))},function(e,t,n){(function(r,o){var i;function l(s){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(){var s="Expected a function",c="__lodash_placeholder__",f=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",O="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object RegExp]",C="[object Set]",$="[object String]",L="[object Symbol]",U="[object WeakMap]",ce="[object ArrayBuffer]",z="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",be="[object Int32Array]",De="[object Uint8Array]",Be="[object Uint16Array]",X="[object Uint32Array]",ne=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,oe=/[&<>"']/g,Z=RegExp(G.source),ie=RegExp(oe.source),re=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xe=/[\\^$.*+?()[\]{}|]/g,Xe=RegExp(xe.source),rt=/^\s+|\s+$/g,Ie=/^\s+/,Ze=/\s+$/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kt=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Rn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="[\\ud800-\\udfff]",R="["+Xn+"]",I="["+Rn+"]",q="\\d+",V="[\\u2700-\\u27bf]",de="[a-z\\xdf-\\xf6\\xf8-\\xff]",ve="[^\\ud800-\\udfff"+Xn+q+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ge="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ft="(?:"+de+"|"+ve+")",ut="(?:"+lt+"|"+ve+")",Ht="(?:"+I+"|"+Ge+")?",bt="[\\ufe0e\\ufe0f]?"+Ht+("(?:\\u200d(?:"+[st,Re,ct].join("|")+")[\\ufe0e\\ufe0f]?"+Ht+")*"),Tt="(?:"+[V,Re,ct].join("|")+")"+bt,bn="(?:"+[st+I+"?",I,Re,ct,A].join("|")+")",Un=RegExp("['’]","g"),pr=RegExp(I,"g"),Zn=RegExp(Ge+"(?="+Ge+")|"+bn+bt,"g"),vn=RegExp([lt+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[R,lt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[R,lt+Ft,"$"].join("|")+")",lt+"?"+Ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,Tt].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+Rn+"\\ufe0e\\ufe0f]"),Wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pi=-1,ht={};ht[K]=ht[W]=ht[ge]=ht[he]=ht[be]=ht[De]=ht["[object Uint8ClampedArray]"]=ht[Be]=ht[X]=!0,ht[h]=ht[p]=ht[ce]=ht[g]=ht[z]=ht[y]=ht[b]=ht[E]=ht[_]=ht[w]=ht[S]=ht[k]=ht[C]=ht[$]=ht[U]=!1;var mt={};mt[h]=mt[p]=mt[ce]=mt[z]=mt[g]=mt[y]=mt[K]=mt[W]=mt[ge]=mt[he]=mt[be]=mt[_]=mt[w]=mt[S]=mt[k]=mt[C]=mt[$]=mt[L]=mt[De]=mt["[object Uint8ClampedArray]"]=mt[Be]=mt[X]=!0,mt[b]=mt[E]=mt[U]=!1;var ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},F=parseFloat,ae=parseInt,ye=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,vt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,Qe=ye||vt||Function("return this")(),rn=l(t)=="object"&&t&&!t.nodeType&&t,Zt=rn&&l(o)=="object"&&o&&!o.nodeType&&o,Gr=Zt&&Zt.exports===rn,ao=Gr&&ye.process,Ct=function(){try{var H=Zt&&Zt.require&&Zt.require("util").types;return H||ao&&ao.binding&&ao.binding("util")}catch{}}(),Va=Ct&&Ct.isArrayBuffer,qa=Ct&&Ct.isDate,Ig=Ct&&Ct.isMap,Lg=Ct&&Ct.isRegExp,Mg=Ct&&Ct.isSet,Fg=Ct&&Ct.isTypedArray;function Jn(H,ee,J){switch(J.length){case 0:return H.call(ee);case 1:return H.call(ee,J[0]);case 2:return H.call(ee,J[0],J[1]);case 3:return H.call(ee,J[0],J[1],J[2])}return H.apply(ee,J)}function Hx(H,ee,J,pe){for(var Ve=-1,ft=H==null?0:H.length;++Ve-1}function df(H,ee,J){for(var pe=-1,Ve=H==null?0:H.length;++pe-1;);return J}function Vg(H,ee){for(var J=H.length;J--&&Wi(ee,H[J],0)>-1;);return J}function Kx(H,ee){for(var J=H.length,pe=0;J--;)H[J]===ee&&++pe;return pe}var Qx=mf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yx=mf({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xx(H){return"\\"+ke[H]}function Gi(H){return Xt.test(H)}function _f(H){var ee=-1,J=Array(H.size);return H.forEach(function(pe,Ve){J[++ee]=[Ve,pe]}),J}function qg(H,ee){return function(J){return H(ee(J))}}function Ro(H,ee){for(var J=-1,pe=H.length,Ve=0,ft=[];++J",""":'"',"'":"'"}),$o=function H(ee){var J,pe=(ee=ee==null?Qe:$o.defaults(Qe.Object(),ee,$o.pick(Qe,hr))).Array,Ve=ee.Date,ft=ee.Error,an=ee.Function,Vr=ee.Math,$t=ee.Object,xf=ee.RegExp,eb=ee.String,mr=ee.TypeError,xu=pe.prototype,tb=an.prototype,qi=$t.prototype,bu=ee["__core-js_shared__"],Su=tb.toString,St=qi.hasOwnProperty,nb=0,Kg=(J=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Eu=qi.toString,rb=Su.call($t),ob=Qe._,ib=xf("^"+Su.call(St).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Gr?ee.Buffer:void 0,No=ee.Symbol,Tu=ee.Uint8Array,Qg=ku?ku.allocUnsafe:void 0,Cu=qg($t.getPrototypeOf,$t),Yg=$t.create,Xg=qi.propertyIsEnumerable,Ou=xu.splice,Zg=No?No.isConcatSpreadable:void 0,Qa=No?No.iterator:void 0,hi=No?No.toStringTag:void 0,Au=function(){try{var a=yi($t,"defineProperty");return a({},"",{}),a}catch{}}(),ab=ee.clearTimeout!==Qe.clearTimeout&&ee.clearTimeout,lb=Ve&&Ve.now!==Qe.Date.now&&Ve.now,ub=ee.setTimeout!==Qe.setTimeout&&ee.setTimeout,ju=Vr.ceil,Pu=Vr.floor,bf=$t.getOwnPropertySymbols,sb=ku?ku.isBuffer:void 0,Jg=ee.isFinite,cb=xu.join,fb=qg($t.keys,$t),ln=Vr.max,Sn=Vr.min,db=Ve.now,pb=ee.parseInt,em=Vr.random,hb=xu.reverse,Sf=yi(ee,"DataView"),Ya=yi(ee,"Map"),Ef=yi(ee,"Promise"),Ki=yi(ee,"Set"),Xa=yi(ee,"WeakMap"),Za=yi($t,"create"),Ru=Xa&&new Xa,Qi={},gb=wi(Sf),mb=wi(Ya),vb=wi(Ef),yb=wi(Ki),wb=wi(Xa),$u=No?No.prototype:void 0,Ja=$u?$u.valueOf:void 0,tm=$u?$u.toString:void 0;function x(a){if(Jt(a)&&!qe(a)&&!(a instanceof it)){if(a instanceof vr)return a;if(St.call(a,"__wrapped__"))return nv(a)}return new vr(a)}var Yi=function(){function a(){}return function(u){if(!Gt(u))return{};if(Yg)return Yg(u);a.prototype=u;var d=new a;return a.prototype=void 0,d}}();function Nu(){}function vr(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}function it(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function gi(a){var u=-1,d=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function yr(a,u,d,m,v,T){var P,D=1&u,B=2&u,Y=4&u;if(d&&(P=v?d(a,m,v,T):d(a)),P!==void 0)return P;if(!Gt(a))return a;var Q=qe(a);if(Q){if(P=function(te){var fe=te.length,ze=new te.constructor(fe);return fe&&typeof te[0]=="string"&&St.call(te,"index")&&(ze.index=te.index,ze.input=te.input),ze}(a),!D)return Bn(a,P)}else{var le=En(a),Te=le==E||le==O;if(Fo(a))return Om(a,D);if(le==S||le==h||Te&&!v){if(P=B||Te?{}:qm(a),!D)return B?function(te,fe){return Kr(te,Gm(te),fe)}(a,function(te,fe){return te&&Kr(fe,Wn(fe),te)}(P,a)):function(te,fe){return Kr(te,Qf(te),fe)}(a,om(P,a))}else{if(!mt[le])return v?a:{};P=function(te,fe,ze){var Ee=te.constructor;switch(fe){case ce:return Bf(te);case g:case y:return new Ee(+te);case z:return function(We,nt){var Ae=nt?Bf(We.buffer):We.buffer;return new We.constructor(Ae,We.byteOffset,We.byteLength)}(te,ze);case K:case W:case ge:case he:case be:case De:case"[object Uint8ClampedArray]":case Be:case X:return Am(te,ze);case _:return new Ee;case w:case $:return new Ee(te);case k:return function(We){var nt=new We.constructor(We.source,Bt.exec(We));return nt.lastIndex=We.lastIndex,nt}(te);case C:return new Ee;case L:return Ue=te,Ja?$t(Ja.call(Ue)):{}}var Ue}(a,le,D)}}T||(T=new Rr);var Ce=T.get(a);if(Ce)return Ce;T.set(a,P),_v(a)?a.forEach(function(te){P.add(yr(te,u,d,te,a,T))}):yv(a)&&a.forEach(function(te,fe){P.set(fe,yr(te,u,d,fe,a,T))});var Le=Q?void 0:(Y?B?Vf:Gf:B?Wn:hn)(a);return gr(Le||a,function(te,fe){Le&&(te=a[fe=te]),el(P,fe,yr(te,u,d,fe,a,T))}),P}function im(a,u,d){var m=d.length;if(a==null)return!m;for(a=$t(a);m--;){var v=d[m],T=u[v],P=a[v];if(P===void 0&&!(v in a)||!T(P))return!1}return!0}function am(a,u,d){if(typeof a!="function")throw new mr(s);return ll(function(){a.apply(void 0,d)},u)}function tl(a,u,d,m){var v=-1,T=yu,P=!0,D=a.length,B=[],Y=u.length;if(!D)return B;d&&(u=Wt(u,er(d))),m?(T=df,P=!1):u.length>=200&&(T=Ka,P=!1,u=new mi(u));e:for(;++v-1},lo.prototype.set=function(a,u){var d=this.__data__,m=Du(d,a);return m<0?(++this.size,d.push([a,u])):d[m][1]=u,this},uo.prototype.clear=function(){this.size=0,this.__data__={hash:new gi,map:new(Ya||lo),string:new gi}},uo.prototype.delete=function(a){var u=qu(this,a).delete(a);return this.size-=u?1:0,u},uo.prototype.get=function(a){return qu(this,a).get(a)},uo.prototype.has=function(a){return qu(this,a).has(a)},uo.prototype.set=function(a,u){var d=qu(this,a),m=d.size;return d.set(a,u),this.size+=d.size==m?0:1,this},mi.prototype.add=mi.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},mi.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.clear=function(){this.__data__=new lo,this.size=0},Rr.prototype.delete=function(a){var u=this.__data__,d=u.delete(a);return this.size=u.size,d},Rr.prototype.get=function(a){return this.__data__.get(a)},Rr.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.set=function(a,u){var d=this.__data__;if(d instanceof lo){var m=d.__data__;if(!Ya||m.length<199)return m.push([a,u]),this.size=++d.size,this;d=this.__data__=new uo(m)}return d.set(a,u),this.size=d.size,this};var Do=$m(qr),lm=$m(Of,!0);function Sb(a,u){var d=!0;return Do(a,function(m,v,T){return d=!!u(m,v,T)}),d}function Iu(a,u,d){for(var m=-1,v=a.length;++m0&&d(D)?u>1?yn(D,u-1,d,m,v):Po(v,D):m||(v[v.length]=D)}return v}var Cf=Nm(),sm=Nm(!0);function qr(a,u){return a&&Cf(a,u,hn)}function Of(a,u){return a&&sm(a,u,hn)}function Lu(a,u){return jo(u,function(d){return ho(a[d])})}function Xi(a,u){for(var d=0,m=(u=Lo(u,a)).length;a!=null&&du}function Eb(a,u){return a!=null&&St.call(a,u)}function kb(a,u){return a!=null&&u in $t(a)}function jf(a,u,d){for(var m=d?df:yu,v=a[0].length,T=a.length,P=T,D=pe(T),B=1/0,Y=[];P--;){var Q=a[P];P&&u&&(Q=Wt(Q,er(u))),B=Sn(Q.length,B),D[P]=!d&&(u||v>=120&&Q.length>=120)?new mi(P&&Q):void 0}Q=a[0];var le=-1,Te=D[0];e:for(;++le=Ce)return Le;var te=B[Y];return Le*(te=="desc"?-1:1)}}return P.index-D.index}(v,T,d)})}function wm(a,u,d){for(var m=-1,v=u.length,T={};++m-1;)D!==a&&Ou.call(D,B,1),Ou.call(a,B,1);return a}function _m(a,u){for(var d=a?u.length:0,m=d-1;d--;){var v=u[d];if(d==m||v!==T){var T=v;po(v)?Ou.call(a,v,1):Mf(a,v)}}return a}function Df(a,u){return a+Pu(em()*(u-a+1))}function If(a,u){var d="";if(!a||u<1||u>9007199254740991)return d;do u%2&&(d+=a),(u=Pu(u/2))&&(a+=a);while(u);return d}function tt(a,u){return Jf(Ym(a,u,Gn),a+"")}function Cb(a){return rm(na(a))}function Ob(a,u){var d=na(a);return Ku(d,vi(u,0,d.length))}function ol(a,u,d,m){if(!Gt(a))return a;for(var v=-1,T=(u=Lo(u,a)).length,P=T-1,D=a;D!=null&&++vv?0:v+u),(d=d>v?v:d)<0&&(d+=v),v=u>d?0:d-u>>>0,u>>>=0;for(var T=pe(v);++m>>1,P=a[T];P!==null&&!nr(P)&&(d?P<=u:P=200){var Y=u?null:$b(a);if(Y)return _u(Y);P=!1,v=Ka,B=new mi}else B=u?[]:D;e:for(;++m=m?a:wr(a,u,d)}var Cm=ab||function(a){return Qe.clearTimeout(a)};function Om(a,u){if(u)return a.slice();var d=a.length,m=Qg?Qg(d):new a.constructor(d);return a.copy(m),m}function Bf(a){var u=new a.constructor(a.byteLength);return new Tu(u).set(new Tu(a)),u}function Am(a,u){var d=u?Bf(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function jm(a,u){if(a!==u){var d=a!==void 0,m=a===null,v=a==a,T=nr(a),P=u!==void 0,D=u===null,B=u==u,Y=nr(u);if(!D&&!Y&&!T&&a>u||T&&P&&B&&!D&&!Y||m&&P&&B||!d&&B||!v)return 1;if(!m&&!T&&!Y&&a1?d[v-1]:void 0,P=v>2?d[2]:void 0;for(T=a.length>3&&typeof T=="function"?(v--,T):void 0,P&&Nn(d[0],d[1],P)&&(T=v<3?void 0:T,v=1),u=$t(u);++m-1?v[T?u[P]:P]:void 0}}function Lm(a){return fo(function(u){var d=u.length,m=d,v=vr.prototype.thru;for(a&&u.reverse();m--;){var T=u[m];if(typeof T!="function")throw new mr(s);if(v&&!P&&Vu(T)=="wrapper")var P=new vr([],!0)}for(m=P?m:d;++m1&&Ee.reverse(),Q&&BD))return!1;var Y=T.get(a);if(Y&&T.get(u))return Y==u;var Q=-1,le=!0,Te=2&d?new mi:void 0;for(T.set(a,u),T.set(u,a);++Q-1&&a%1==0&&a1?"& ":"")+T[D],T=T.join(P>2?", ":" "),v.replace(gt,`{ +/* [wrapped with `+T+`] */ +`)}(m,function(v,T){return gr(f,function(P){var D="_."+P[0];T&P[1]&&!yu(v,D)&&v.push(D)}),v.sort()}(function(v){var T=v.match(Mt);return T?T[1].split(jt):[]}(m),d)))}function ev(a){var u=0,d=0;return function(){var m=db(),v=16-(m-d);if(d=m,v>0){if(++u>=800)return arguments[0]}else u=0;return a.apply(void 0,arguments)}}function Ku(a,u){var d=-1,m=a.length,v=m-1;for(u=u===void 0?m:u;++d1?a[u-1]:void 0;return d=typeof d=="function"?(a.pop(),d):void 0,uv(a,d)});function sv(a){var u=x(a);return u.__chain__=!0,u}function Qu(a,u){return u(a)}var tS=fo(function(a){var u=a.length,d=u?a[0]:0,m=this.__wrapped__,v=function(T){return Tf(T,a)};return!(u>1||this.__actions__.length)&&m instanceof it&&po(d)?((m=m.slice(d,+d+(u?1:0))).__actions__.push({func:Qu,args:[v],thisArg:void 0}),new vr(m,this.__chain__).thru(function(T){return u&&!T.length&&T.push(void 0),T})):this.thru(v)}),nS=Uu(function(a,u,d){St.call(a,d)?++a[d]:so(a,d,1)}),rS=Im(rv),oS=Im(ov);function cv(a,u){return(qe(a)?gr:Do)(a,Ne(u,3))}function fv(a,u){return(qe(a)?Wx:lm)(a,Ne(u,3))}var iS=Uu(function(a,u,d){St.call(a,d)?a[d].push(u):so(a,d,[u])}),aS=tt(function(a,u,d){var m=-1,v=typeof u=="function",T=Hn(a)?pe(a.length):[];return Do(a,function(P){T[++m]=v?Jn(u,P,d):nl(P,u,d)}),T}),lS=Uu(function(a,u,d){so(a,d,u)});function Yu(a,u){return(qe(a)?Wt:hm)(a,Ne(u,3))}var uS=Uu(function(a,u,d){a[d?0:1].push(u)},function(){return[[],[]]}),sS=tt(function(a,u){if(a==null)return[];var d=u.length;return d>1&&Nn(a,u[0],u[1])?u=[]:d>2&&Nn(u[0],u[1],u[2])&&(u=[u[0]]),ym(a,yn(u,1),[])}),Xu=lb||function(){return Qe.Date.now()};function dv(a,u,d){return u=d?void 0:u,co(a,128,void 0,void 0,void 0,void 0,u=a&&u==null?a.length:u)}function pv(a,u){var d;if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){return--a>0&&(d=u.apply(this,arguments)),a<=1&&(u=void 0),d}}var nd=tt(function(a,u,d){var m=1;if(d.length){var v=Ro(d,ea(nd));m|=32}return co(a,m,u,d,v)}),hv=tt(function(a,u,d){var m=3;if(d.length){var v=Ro(d,ea(hv));m|=32}return co(u,m,a,d,v)});function gv(a,u,d){var m,v,T,P,D,B,Y=0,Q=!1,le=!1,Te=!0;if(typeof a!="function")throw new mr(s);function Ce(Ue){var We=m,nt=v;return m=v=void 0,Y=Ue,P=a.apply(nt,We)}function Le(Ue){return Y=Ue,D=ll(fe,u),Q?Ce(Ue):P}function te(Ue){var We=Ue-B;return B===void 0||We>=u||We<0||le&&Ue-Y>=T}function fe(){var Ue=Xu();if(te(Ue))return ze(Ue);D=ll(fe,function(We){var nt=u-(We-B);return le?Sn(nt,T-(We-Y)):nt}(Ue))}function ze(Ue){return D=void 0,Te&&m?Ce(Ue):(m=v=void 0,P)}function Ee(){var Ue=Xu(),We=te(Ue);if(m=arguments,v=this,B=Ue,We){if(D===void 0)return Le(B);if(le)return Cm(D),D=ll(fe,u),Ce(B)}return D===void 0&&(D=ll(fe,u)),P}return u=xr(u)||0,Gt(d)&&(Q=!!d.leading,T=(le="maxWait"in d)?ln(xr(d.maxWait)||0,u):T,Te="trailing"in d?!!d.trailing:Te),Ee.cancel=function(){D!==void 0&&Cm(D),Y=0,m=B=v=D=void 0},Ee.flush=function(){return D===void 0?P:ze(Xu())},Ee}var cS=tt(function(a,u){return am(a,1,u)}),fS=tt(function(a,u,d){return am(a,xr(u)||0,d)});function Zu(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new mr(s);var d=function m(){var v=arguments,T=u?u.apply(this,v):v[0],P=m.cache;if(P.has(T))return P.get(T);var D=a.apply(this,v);return m.cache=P.set(T,D)||P,D};return d.cache=new(Zu.Cache||uo),d}function Ju(a){if(typeof a!="function")throw new mr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}Zu.Cache=uo;var dS=Rb(function(a,u){var d=(u=u.length==1&&qe(u[0])?Wt(u[0],er(Ne())):Wt(yn(u,1),er(Ne()))).length;return tt(function(m){for(var v=-1,T=Sn(m.length,d);++v=u}),_i=fm(function(){return arguments}())?fm:function(a){return Jt(a)&&St.call(a,"callee")&&!Xg.call(a,"callee")},qe=pe.isArray,mS=Va?er(Va):function(a){return Jt(a)&&$n(a)==ce};function Hn(a){return a!=null&&es(a.length)&&!ho(a)}function tn(a){return Jt(a)&&Hn(a)}var Fo=sb||hd,vS=qa?er(qa):function(a){return Jt(a)&&$n(a)==y};function od(a){if(!Jt(a))return!1;var u=$n(a);return u==b||u=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!ul(a)}function ho(a){if(!Gt(a))return!1;var u=$n(a);return u==E||u==O||u=="[object AsyncFunction]"||u=="[object Proxy]"}function vv(a){return typeof a=="number"&&a==Ye(a)}function es(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function Gt(a){var u=l(a);return a!=null&&(u=="object"||u=="function")}function Jt(a){return a!=null&&l(a)=="object"}var yv=Ig?er(Ig):function(a){return Jt(a)&&En(a)==_};function wv(a){return typeof a=="number"||Jt(a)&&$n(a)==w}function ul(a){if(!Jt(a)||$n(a)!=S)return!1;var u=Cu(a);if(u===null)return!0;var d=St.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&Su.call(d)==rb}var id=Lg?er(Lg):function(a){return Jt(a)&&$n(a)==k},_v=Mg?er(Mg):function(a){return Jt(a)&&En(a)==C};function ts(a){return typeof a=="string"||!qe(a)&&Jt(a)&&$n(a)==$}function nr(a){return l(a)=="symbol"||Jt(a)&&$n(a)==L}var ta=Fg?er(Fg):function(a){return Jt(a)&&es(a.length)&&!!ht[$n(a)]},yS=Gu($f),wS=Gu(function(a,u){return a<=u});function xv(a){if(!a)return[];if(Hn(a))return ts(a)?Pr(a):Bn(a);if(Qa&&a[Qa])return function(d){for(var m,v=[];!(m=d.next()).done;)v.push(m.value);return v}(a[Qa]());var u=En(a);return(u==_?_f:u==C?_u:na)(a)}function go(a){return a?(a=xr(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ye(a){var u=go(a),d=u%1;return u==u?d?u-d:u:0}function bv(a){return a?vi(Ye(a),0,4294967295):0}function xr(a){if(typeof a=="number")return a;if(nr(a))return NaN;if(Gt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Gt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=a.replace(rt,"");var d=Oe.test(a);return d||Rt.test(a)?ae(a.slice(2),d?2:8):se.test(a)?NaN:+a}function Sv(a){return Kr(a,Wn(a))}function wt(a){return a==null?"":tr(a)}var _S=Zi(function(a,u){if(al(u)||Hn(u))Kr(u,hn(u),a);else for(var d in u)St.call(u,d)&&el(a,d,u[d])}),Ev=Zi(function(a,u){Kr(u,Wn(u),a)}),ns=Zi(function(a,u,d,m){Kr(u,Wn(u),a,m)}),xS=Zi(function(a,u,d,m){Kr(u,hn(u),a,m)}),bS=fo(Tf),SS=tt(function(a,u){a=$t(a);var d=-1,m=u.length,v=m>2?u[2]:void 0;for(v&&Nn(u[0],u[1],v)&&(m=1);++d1),T}),Kr(a,Vf(a),d),m&&(d=yr(d,7,Nb));for(var v=u.length;v--;)Mf(d,u[v]);return d}),jS=fo(function(a,u){return a==null?{}:function(d,m){return wm(d,m,function(v,T){return ld(d,T)})}(a,u)});function Tv(a,u){if(a==null)return{};var d=Wt(Vf(a),function(m){return[m]});return u=Ne(u),wm(a,d,function(m,v){return u(m,v[0])})}var Cv=Um(hn),Ov=Um(Wn);function na(a){return a==null?[]:wf(a,hn(a))}var PS=Ji(function(a,u,d){return u=u.toLowerCase(),a+(d?Av(u):u)});function Av(a){return ud(wt(a).toLowerCase())}function jv(a){return(a=wt(a))&&a.replace(Pn,Qx).replace(pr,"")}var RS=Ji(function(a,u,d){return a+(d?"-":"")+u.toLowerCase()}),$S=Ji(function(a,u,d){return a+(d?" ":"")+u.toLowerCase()}),NS=Dm("toLowerCase"),DS=Ji(function(a,u,d){return a+(d?"_":"")+u.toLowerCase()}),IS=Ji(function(a,u,d){return a+(d?" ":"")+ud(u)}),LS=Ji(function(a,u,d){return a+(d?" ":"")+u.toUpperCase()}),ud=Dm("toUpperCase");function Pv(a,u,d){return a=wt(a),(u=d?void 0:u)===void 0?function(m){return Wr.test(m)}(a)?function(m){return m.match(vn)||[]}(a):function(m){return m.match(yt)||[]}(a):a.match(u)||[]}var Rv=tt(function(a,u){try{return Jn(a,void 0,u)}catch(d){return od(d)?d:new ft(d)}}),MS=fo(function(a,u){return gr(u,function(d){d=Qr(d),so(a,d,nd(a[d],a))}),a});function sd(a){return function(){return a}}var FS=Lm(),zS=Lm(!0);function Gn(a){return a}function cd(a){return pm(typeof a=="function"?a:yr(a,1))}var US=tt(function(a,u){return function(d){return nl(d,a,u)}}),BS=tt(function(a,u){return function(d){return nl(a,d,u)}});function fd(a,u,d){var m=hn(u),v=Lu(u,m);d!=null||Gt(u)&&(v.length||!m.length)||(d=u,u=a,a=this,v=Lu(u,hn(u)));var T=!(Gt(d)&&"chain"in d&&!d.chain),P=ho(a);return gr(v,function(D){var B=u[D];a[D]=B,P&&(a.prototype[D]=function(){var Y=this.__chain__;if(T||Y){var Q=a(this.__wrapped__),le=Q.__actions__=Bn(this.__actions__);return le.push({func:B,args:arguments,thisArg:a}),Q.__chain__=Y,Q}return B.apply(a,Po([this.value()],arguments))})}),a}function dd(){}var HS=Hf(Wt),WS=Hf(zg),GS=Hf(hf);function $v(a){return Yf(a)?gf(Qr(a)):function(u){return function(d){return Xi(d,u)}}(a)}var VS=Fm(),qS=Fm(!0);function pd(){return[]}function hd(){return!1}var KS=Hu(function(a,u){return a+u},0),QS=Wf("ceil"),YS=Hu(function(a,u){return a/u},1),XS=Wf("floor"),gd,ZS=Hu(function(a,u){return a*u},1),JS=Wf("round"),eE=Hu(function(a,u){return a-u},0);return x.after=function(a,u){if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){if(--a<1)return u.apply(this,arguments)}},x.ary=dv,x.assign=_S,x.assignIn=Ev,x.assignInWith=ns,x.assignWith=xS,x.at=bS,x.before=pv,x.bind=nd,x.bindAll=MS,x.bindKey=hv,x.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return qe(a)?a:[a]},x.chain=sv,x.chunk=function(a,u,d){u=(d?Nn(a,u,d):u===void 0)?1:ln(Ye(u),0);var m=a==null?0:a.length;if(!m||u<1)return[];for(var v=0,T=0,P=pe(ju(m/u));vY?0:Y+D),(B=B===void 0||B>Y?Y:Ye(B))<0&&(B+=Y),B=D>B?0:bv(B);D>>0)?(a=wt(a))&&(typeof u=="string"||u!=null&&!id(u))&&!(u=tr(u))&&Gi(a)?Mo(Pr(a),0,d):a.split(u,d):[]},x.spread=function(a,u){if(typeof a!="function")throw new mr(s);return u=u==null?0:ln(Ye(u),0),tt(function(d){var m=d[u],v=Mo(d,0,u);return m&&Po(v,m),Jn(a,this,v)})},x.tail=function(a){var u=a==null?0:a.length;return u?wr(a,1,u):[]},x.take=function(a,u,d){return a&&a.length?wr(a,0,(u=d||u===void 0?1:Ye(u))<0?0:u):[]},x.takeRight=function(a,u,d){var m=a==null?0:a.length;return m?wr(a,(u=m-(u=d||u===void 0?1:Ye(u)))<0?0:u,m):[]},x.takeRightWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3),!1,!0):[]},x.takeWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3)):[]},x.tap=function(a,u){return u(a),a},x.throttle=function(a,u,d){var m=!0,v=!0;if(typeof a!="function")throw new mr(s);return Gt(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),gv(a,u,{leading:m,maxWait:u,trailing:v})},x.thru=Qu,x.toArray=xv,x.toPairs=Cv,x.toPairsIn=Ov,x.toPath=function(a){return qe(a)?Wt(a,Qr):nr(a)?[a]:Bn(tv(wt(a)))},x.toPlainObject=Sv,x.transform=function(a,u,d){var m=qe(a),v=m||Fo(a)||ta(a);if(u=Ne(u,4),d==null){var T=a&&a.constructor;d=v?m?new T:[]:Gt(a)&&ho(T)?Yi(Cu(a)):{}}return(v?gr:qr)(a,function(P,D,B){return u(d,P,D,B)}),d},x.unary=function(a){return dv(a,1)},x.union=Vb,x.unionBy=qb,x.unionWith=Kb,x.uniq=function(a){return a&&a.length?Io(a):[]},x.uniqBy=function(a,u){return a&&a.length?Io(a,Ne(u,2)):[]},x.uniqWith=function(a,u){return u=typeof u=="function"?u:void 0,a&&a.length?Io(a,void 0,u):[]},x.unset=function(a,u){return a==null||Mf(a,u)},x.unzip=td,x.unzipWith=uv,x.update=function(a,u,d){return a==null?a:Em(a,u,Uf(d))},x.updateWith=function(a,u,d,m){return m=typeof m=="function"?m:void 0,a==null?a:Em(a,u,Uf(d),m)},x.values=na,x.valuesIn=function(a){return a==null?[]:wf(a,Wn(a))},x.without=Qb,x.words=Pv,x.wrap=function(a,u){return rd(Uf(u),a)},x.xor=Yb,x.xorBy=Xb,x.xorWith=Zb,x.zip=Jb,x.zipObject=function(a,u){return Tm(a||[],u||[],el)},x.zipObjectDeep=function(a,u){return Tm(a||[],u||[],ol)},x.zipWith=eS,x.entries=Cv,x.entriesIn=Ov,x.extend=Ev,x.extendWith=ns,fd(x,x),x.add=KS,x.attempt=Rv,x.camelCase=PS,x.capitalize=Av,x.ceil=QS,x.clamp=function(a,u,d){return d===void 0&&(d=u,u=void 0),d!==void 0&&(d=(d=xr(d))==d?d:0),u!==void 0&&(u=(u=xr(u))==u?u:0),vi(xr(a),u,d)},x.clone=function(a){return yr(a,4)},x.cloneDeep=function(a){return yr(a,5)},x.cloneDeepWith=function(a,u){return yr(a,5,u=typeof u=="function"?u:void 0)},x.cloneWith=function(a,u){return yr(a,4,u=typeof u=="function"?u:void 0)},x.conformsTo=function(a,u){return u==null||im(a,u,hn(u))},x.deburr=jv,x.defaultTo=function(a,u){return a==null||a!=a?u:a},x.divide=YS,x.endsWith=function(a,u,d){a=wt(a),u=tr(u);var m=a.length,v=d=d===void 0?m:vi(Ye(d),0,m);return(d-=u.length)>=0&&a.slice(d,v)==u},x.eq=$r,x.escape=function(a){return(a=wt(a))&&ie.test(a)?a.replace(oe,Yx):a},x.escapeRegExp=function(a){return(a=wt(a))&&Xe.test(a)?a.replace(xe,"\\$&"):a},x.every=function(a,u,d){var m=qe(a)?zg:Sb;return d&&Nn(a,u,d)&&(u=void 0),m(a,Ne(u,3))},x.find=rS,x.findIndex=rv,x.findKey=function(a,u){return Ug(a,Ne(u,3),qr)},x.findLast=oS,x.findLastIndex=ov,x.findLastKey=function(a,u){return Ug(a,Ne(u,3),Of)},x.floor=XS,x.forEach=cv,x.forEachRight=fv,x.forIn=function(a,u){return a==null?a:Cf(a,Ne(u,3),Wn)},x.forInRight=function(a,u){return a==null?a:sm(a,Ne(u,3),Wn)},x.forOwn=function(a,u){return a&&qr(a,Ne(u,3))},x.forOwnRight=function(a,u){return a&&Of(a,Ne(u,3))},x.get=ad,x.gt=hS,x.gte=gS,x.has=function(a,u){return a!=null&&Vm(a,u,Eb)},x.hasIn=ld,x.head=av,x.identity=Gn,x.includes=function(a,u,d,m){a=Hn(a)?a:na(a),d=d&&!m?Ye(d):0;var v=a.length;return d<0&&(d=ln(v+d,0)),ts(a)?d<=v&&a.indexOf(u,d)>-1:!!v&&Wi(a,u,d)>-1},x.indexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=d==null?0:Ye(d);return v<0&&(v=ln(m+v,0)),Wi(a,u,v)},x.inRange=function(a,u,d){return u=go(u),d===void 0?(d=u,u=0):d=go(d),function(m,v,T){return m>=Sn(v,T)&&m=-9007199254740991&&a<=9007199254740991},x.isSet=_v,x.isString=ts,x.isSymbol=nr,x.isTypedArray=ta,x.isUndefined=function(a){return a===void 0},x.isWeakMap=function(a){return Jt(a)&&En(a)==U},x.isWeakSet=function(a){return Jt(a)&&$n(a)=="[object WeakSet]"},x.join=function(a,u){return a==null?"":cb.call(a,u)},x.kebabCase=RS,x.last=_r,x.lastIndexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=m;return d!==void 0&&(v=(v=Ye(d))<0?ln(m+v,0):Sn(v,m-1)),u==u?function(T,P,D){for(var B=D+1;B--;)if(T[B]===P)return B;return B}(a,u,v):wu(a,Bg,v,!0)},x.lowerCase=$S,x.lowerFirst=NS,x.lt=yS,x.lte=wS,x.max=function(a){return a&&a.length?Iu(a,Gn,Af):void 0},x.maxBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),Af):void 0},x.mean=function(a){return Hg(a,Gn)},x.meanBy=function(a,u){return Hg(a,Ne(u,2))},x.min=function(a){return a&&a.length?Iu(a,Gn,$f):void 0},x.minBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),$f):void 0},x.stubArray=pd,x.stubFalse=hd,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=ZS,x.nth=function(a,u){return a&&a.length?vm(a,Ye(u)):void 0},x.noConflict=function(){return Qe._===this&&(Qe._=ob),this},x.noop=dd,x.now=Xu,x.pad=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;if(!u||m>=u)return a;var v=(u-m)/2;return Wu(Pu(v),d)+a+Wu(ju(v),d)},x.padEnd=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;return u&&mu){var m=a;a=u,u=m}if(d||a%1||u%1){var v=em();return Sn(a+v*(u-a+F("1e-"+((v+"").length-1))),u)}return Df(a,u)},x.reduce=function(a,u,d){var m=qe(a)?pf:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,Do)},x.reduceRight=function(a,u,d){var m=qe(a)?Gx:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,lm)},x.repeat=function(a,u,d){return u=(d?Nn(a,u,d):u===void 0)?1:Ye(u),If(wt(a),u)},x.replace=function(){var a=arguments,u=wt(a[0]);return a.length<3?u:u.replace(a[1],a[2])},x.result=function(a,u,d){var m=-1,v=(u=Lo(u,a)).length;for(v||(v=1,a=void 0);++m9007199254740991)return[];var d=4294967295,m=Sn(a,4294967295);a-=4294967295;for(var v=yf(m,u=Ne(u));++d=T)return a;var D=d-Vi(m);if(D<1)return m;var B=P?Mo(P,0,D).join(""):a.slice(0,D);if(v===void 0)return B+m;if(P&&(D+=B.length-D),id(v)){if(a.slice(D).search(v)){var Y,Q=B;for(v.global||(v=xf(v.source,wt(Bt.exec(v))+"g")),v.lastIndex=0;Y=v.exec(Q);)var le=Y.index;B=B.slice(0,le===void 0?D:le)}}else if(a.indexOf(tr(v),D)!=D){var Te=B.lastIndexOf(v);Te>-1&&(B=B.slice(0,Te))}return B+m},x.unescape=function(a){return(a=wt(a))&&Z.test(a)?a.replace(G,Jx):a},x.uniqueId=function(a){var u=++nb;return wt(a)+u},x.upperCase=LS,x.upperFirst=ud,x.each=cv,x.eachRight=fv,x.first=av,fd(x,(gd={},qr(x,function(a,u){St.call(x.prototype,u)||(gd[u]=a)}),gd),{chain:!1}),x.VERSION="4.17.15",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){x[a].placeholder=x}),gr(["drop","take"],function(a,u){it.prototype[a]=function(d){d=d===void 0?1:ln(Ye(d),0);var m=this.__filtered__&&!u?new it(this):this.clone();return m.__filtered__?m.__takeCount__=Sn(d,m.__takeCount__):m.__views__.push({size:Sn(d,4294967295),type:a+(m.__dir__<0?"Right":"")}),m},it.prototype[a+"Right"]=function(d){return this.reverse()[a](d).reverse()}}),gr(["filter","map","takeWhile"],function(a,u){var d=u+1,m=d==1||d==3;it.prototype[a]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ne(v,3),type:d}),T.__filtered__=T.__filtered__||m,T}}),gr(["head","last"],function(a,u){var d="take"+(u?"Right":"");it.prototype[a]=function(){return this[d](1).value()[0]}}),gr(["initial","tail"],function(a,u){var d="drop"+(u?"":"Right");it.prototype[a]=function(){return this.__filtered__?new it(this):this[d](1)}}),it.prototype.compact=function(){return this.filter(Gn)},it.prototype.find=function(a){return this.filter(a).head()},it.prototype.findLast=function(a){return this.reverse().find(a)},it.prototype.invokeMap=tt(function(a,u){return typeof a=="function"?new it(this):this.map(function(d){return nl(d,a,u)})}),it.prototype.reject=function(a){return this.filter(Ju(Ne(a)))},it.prototype.slice=function(a,u){a=Ye(a);var d=this;return d.__filtered__&&(a>0||u<0)?new it(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),u!==void 0&&(d=(u=Ye(u))<0?d.dropRight(-u):d.take(u-a)),d)},it.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},it.prototype.toArray=function(){return this.take(4294967295)},qr(it.prototype,function(a,u){var d=/^(?:filter|find|map|reject)|While$/.test(u),m=/^(?:head|last)$/.test(u),v=x[m?"take"+(u=="last"?"Right":""):u],T=m||/^find/.test(u);v&&(x.prototype[u]=function(){var P=this.__wrapped__,D=m?[1]:arguments,B=P instanceof it,Y=D[0],Q=B||qe(P),le=function(ze){var Ee=v.apply(x,Po([ze],D));return m&&Te?Ee[0]:Ee};Q&&d&&typeof Y=="function"&&Y.length!=1&&(B=Q=!1);var Te=this.__chain__,Ce=!!this.__actions__.length,Le=T&&!Te,te=B&&!Ce;if(!T&&Q){P=te?P:new it(this);var fe=a.apply(P,D);return fe.__actions__.push({func:Qu,args:[le],thisArg:void 0}),new vr(fe,Te)}return Le&&te?a.apply(this,D):(fe=this.thru(le),Le?m?fe.value()[0]:fe.value():fe)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var u=xu[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);x.prototype[a]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return u.apply(qe(T)?T:[],v)}return this[d](function(P){return u.apply(qe(P)?P:[],v)})}}),qr(it.prototype,function(a,u){var d=x[u];if(d){var m=d.name+"";St.call(Qi,m)||(Qi[m]=[]),Qi[m].push({name:u,func:d})}}),Qi[Bu(void 0,2).name]=[{name:"wrapper",func:void 0}],it.prototype.clone=function(){var a=new it(this.__wrapped__);return a.__actions__=Bn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Bn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Bn(this.__views__),a},it.prototype.reverse=function(){if(this.__filtered__){var a=new it(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},it.prototype.value=function(){var a=this.__wrapped__.value(),u=this.__dir__,d=qe(a),m=u<0,v=d?a.length:0,T=function(nt,Ae,Me){for(var un=-1,Dn=Me.length;++un=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},x.prototype.plant=function(a){for(var u,d=this;d instanceof Nu;){var m=nv(d);m.__index__=0,m.__values__=void 0,u?v.__wrapped__=m:u=m;var v=m;d=d.__wrapped__}return v.__wrapped__=a,u},x.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof it){var u=a;return this.__actions__.length&&(u=new it(this)),(u=u.reverse()).__actions__.push({func:Qu,args:[ed],thisArg:void 0}),new vr(u,this.__chain__)}return this.thru(ed)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return km(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Qa&&(x.prototype[Qa]=function(){return this}),x}();l(n(46))=="object"&&n(46)?(Qe._=$o,(i=(function(){return $o}).call(t,n,t,o))===void 0||(o.exports=i)):Zt?((Zt.exports=$o)._=$o,rn._=$o):Qe._=$o}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),l=n(118),s=n(124),c=n(127),f=n(128),h=n(129),p=n(130),g=n(59),y=n(131),b=n(10),E=n(135),O=n(136),_=n(141),w=n(0),S=n(12),k=n(142),C=n(5),$=n(144),L=n(6),U={};U["[object Arguments]"]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U["[object Object]"]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U["[object Function]"]=U["[object WeakMap]"]=!1,e.exports=function ce(z,K,W,ge,he,be){var De,Be=1&K,X=2&K,ne=4&K;if(W&&(De=he?W(z,ge,he,be):W(z)),De!==void 0)return De;if(!C(z))return z;var _e=w(z);if(_e){if(De=E(z),!Be)return f(z,De)}else{var N=b(z),G=N=="[object Function]"||N=="[object GeneratorFunction]";if(S(z))return c(z,Be);if(N=="[object Object]"||N=="[object Arguments]"||G&&!he){if(De=X||G?{}:_(z),!Be)return X?p(z,s(De,z)):h(z,l(De,z))}else{if(!U[N])return he?z:{};De=O(z,N,Be)}}be||(be=new r);var oe=be.get(z);if(oe)return oe;be.set(z,De),$(z)?z.forEach(function(re){De.add(ce(re,K,W,re,z,be))}):k(z)&&z.forEach(function(re,Se){De.set(Se,ce(re,K,W,Se,z,be))});var Z=ne?X?y:g:X?keysIn:L,ie=_e?void 0:Z(z);return o(ie||z,function(re,Se){ie&&(re=z[Se=re]),i(De,Se,ce(re,K,W,Se,z,be))}),De}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(i){var l=this.__data__,s=r(l,i);return!(s<0)&&(s==l.length-1?l.pop():o.call(l,s,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var i=this.__data__,l=r(i,o);return l<0?void 0:i[l][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,i){var l=this.__data__,s=r(l,o);return s<0?(++this.size,l.push([o,i])):l[s][1]=i,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(l,s){var c=this.__data__;if(c instanceof r){var f=c.__data__;if(!o||f.length<199)return f.push([l,s]),this.size=++c.size,this;c=this.__data__=new i(f)}return c.set(l,s),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),l=n(48),s=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!i(y)||o(y))&&(r(y)?g:s).test(l(y))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=function(c){var f=i.call(c,s),h=c[s];try{c[s]=void 0;var p=!0}catch{}var g=l.call(c);return p&&(f?c[s]=h:delete c[s]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!i&&i in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),l=n(111),s=n(112);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h0&&c(y)?s>1?i(y,s-1,c,f,h):r(h,y):f||(h[h.length]=y)}return h}},function(e,t,n){var r=n(9),o=n(21),i=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(s){return i(s)||o(s)||!!(l&&s&&s[l])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(l,s){return i(o(l,s,r),l+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(i,l,s){return l=o(l===void 0?i.length-1:l,0),function(){for(var c=arguments,f=-1,h=o(c.length-l,0),p=Array(h);++f0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),l=n(69),s=n(207),c=n(42);e.exports=function(f,h,p){var g=-1,y=o,b=f.length,E=!0,O=[],_=O;if(p)E=!1,y=i;else if(b>=200){var w=h?null:s(f);if(w)return c(w);E=!1,y=l,_=new r}else _=h?[]:O;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(l,s,c){return s==s?i(l,s,c):r(l,o,c)}},function(e,t){e.exports=function(n,r,o,i){for(var l=n.length,s=o+(i?1:-1);i?s--:++s1||l.length===1&&i.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(i,l,s){return function(c,f,h){var p={},g=c.nodes();return g.forEach(function(y){p[y]={},p[y][y]={distance:0},g.forEach(function(b){y!==b&&(p[y][b]={distance:Number.POSITIVE_INFINITY})}),h(y).forEach(function(b){var E=b.v===y?b.w:b.v,O=f(b);p[y][E]={distance:O,predecessor:y}})}),g.forEach(function(y){var b=p[y];g.forEach(function(E){var O=p[E];g.forEach(function(_){var w=O[y],S=b[_],k=O[_],C=w.distance+S.distance;C0;){if(c=p.removeMin(),r.has(h,c))f.setEdge(c,h[c]);else{if(y)throw new Error("Input graph is not connected: "+l);y=!0}l.nodeEdges(c).forEach(g)}return f}},function(e,t,n){(function(r){function o(s,c){for(var f=0,h=s.length-1;h>=0;h--){var p=s[h];p==="."?s.splice(h,1):p===".."?(s.splice(h,1),f++):f&&(s.splice(h,1),f--)}if(c)for(;f--;f)s.unshift("..");return s}function i(s,c){if(s.filter)return s.filter(c);for(var f=[],h=0;h=-1&&!c;f--){var h=f>=0?arguments[f]:r.cwd();if(typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");h&&(s=h+"/"+s,c=h.charAt(0)==="/")}return(c?"/":"")+(s=o(i(s.split("/"),function(p){return!!p}),!c).join("/"))||"."},t.normalize=function(s){var c=t.isAbsolute(s),f=l(s,-1)==="/";return(s=o(i(s.split("/"),function(h){return!!h}),!c).join("/"))||c||(s="."),s&&f&&(s+="/"),(c?"/":"")+s},t.isAbsolute=function(s){return s.charAt(0)==="/"},t.join=function(){var s=Array.prototype.slice.call(arguments,0);return t.normalize(i(s,function(c,f){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(s,c){function f(O){for(var _=0;_=0&&O[w]==="";w--);return _>w?[]:O.slice(_,w-_+1)}s=t.resolve(s).substr(1),c=t.resolve(c).substr(1);for(var h=f(s.split("/")),p=f(c.split("/")),g=Math.min(h.length,p.length),y=g,b=0;b=1;--g)if((c=s.charCodeAt(g))===47){if(!p){h=g;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"/":s.slice(0,h)},t.basename=function(s,c){var f=function(h){typeof h!="string"&&(h+="");var p,g=0,y=-1,b=!0;for(p=h.length-1;p>=0;--p)if(h.charCodeAt(p)===47){if(!b){g=p+1;break}}else y===-1&&(b=!1,y=p+1);return y===-1?"":h.slice(g,y)}(s);return c&&f.substr(-1*c.length)===c&&(f=f.substr(0,f.length-c.length)),f},t.extname=function(s){typeof s!="string"&&(s+="");for(var c=-1,f=0,h=-1,p=!0,g=0,y=s.length-1;y>=0;--y){var b=s.charCodeAt(y);if(b!==47)h===-1&&(p=!1,h=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){f=y+1;break}}return c===-1||h===-1||g===0||g===1&&c===h-1&&c===f+1?"":s.slice(c,h)};var l="ab".substr(-1)==="b"?function(s,c,f){return s.substr(c,f)}:function(s,c,f){return c<0&&(c=s.length+c),s.substr(c,f)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var o={file:n(225),http:n(81),https:n(81)},i=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,s){var c=Promise.resolve();return s===void 0&&(s={}),c=(c=c.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(s!==void 0){if(r(s)!=="object")throw new TypeError("options must be an object");if(s.processContent!==void 0&&typeof s.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(f,h){(function(p){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(p),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=i}return y})(l).load(l,s||{},function(p,g){p?h(p):f(g)})})}).then(function(f){return s.processContent?new Promise(function(h,p){r(f)!=="object"&&(f={text:f}),f.location=l,s.processContent(f,function(g,y){g?p(g):h(y)})}):r(f)==="object"?f.text:f})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(k){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),l=n(228),s=n(82),c=n(229),f=n(231);function h(){}var p=t=e.exports=function(k,C){return typeof C=="function"?new t.Request("GET",k).end(C):arguments.length==1?new t.Request("GET",k):new t.Request(k,C)};t.Request=w,p.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(k){return k.trim()}:function(k){return k.replace(/(^\s*|\s*$)/g,"")};function y(k){if(!s(k))return k;var C=[];for(var $ in k)b(C,$,k[$]);return C.join("&")}function b(k,C,$){if($!=null)if(Array.isArray($))$.forEach(function(U){b(k,C,U)});else if(s($))for(var L in $)b(k,C+"["+L+"]",$[L]);else k.push(encodeURIComponent(C)+"="+encodeURIComponent($));else $===null&&k.push(encodeURIComponent(C))}function E(k){for(var C,$,L={},U=k.split("&"),ce=0,z=U.length;ce=2&&k._responseTimeoutTimer&&clearTimeout(k._responseTimeoutTimer),K==4){var W;try{W=C.status}catch{W=0}if(!W)return k.timedout||k._aborted?void 0:k.crossDomainError();k.emit("end")}};var L=function(K,W){W.total>0&&(W.percent=W.loaded/W.total*100),W.direction=K,k.emit("progress",W)};if(this.hasListeners("progress"))try{C.onprogress=L.bind(null,"download"),C.upload&&(C.upload.onprogress=L.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(K){return this.callback(K)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof $!="string"&&!this._isHost($)){var U=this._header["content-type"],ce=this._serializer||p.serialize[U?U.split(";")[0]:""];!ce&&O(U)&&(ce=p.serialize["application/json"]),ce&&($=ce($))}for(var z in this.header)this.header[z]!=null&&this.header.hasOwnProperty(z)&&C.setRequestHeader(z,this.header[z]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send($!==void 0?$:null),this},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(k){f.prototype[k.toLowerCase()]=function(C,$){var L=new p.Request(k,C);return this._setDefaults(L),$&&L.end($),L}}),f.prototype.del=f.prototype.delete,p.get=function(k,C,$){var L=p("GET",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.head=function(k,C,$){var L=p("HEAD",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.options=function(k,C,$){var L=p("OPTIONS",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.del=S,p.delete=S,p.patch=function(k,C,$){var L=p("PATCH",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.post=function(k,C,$){var L=p("POST",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.put=function(k,C,$){var L=p("PUT",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L}},function(e,t,n){function r(o){if(o)return function(i){for(var l in r.prototype)i[l]=r.prototype[l];return i}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(i),this},r.prototype.once=function(o,i){function l(){this.off(o,l),i.apply(this,arguments)}return l.fn=i,this.on(o,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,s=this._callbacks["$"+o];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var f=this._retryCallback(s,c);if(f===!0)return!0;if(f===!1)return!1}catch(h){console.error(h)}return!!(c&&c.status&&c.status>=500&&c.status!=501||s&&(s.code&&~l.indexOf(s.code)||s.timeout&&s.code=="ECONNABORTED"||s.crossDomain))},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(s,c){if(!this._fullfilledPromise){var f=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(h,p){f.end(function(g,y){g?p(g):h(y)})})}return this._fullfilledPromise.then(s,c)},i.prototype.catch=function(s){return this.then(void 0,s)},i.prototype.use=function(s){return s(this),this},i.prototype.ok=function(s){if(typeof s!="function")throw Error("Callback required");return this._okCallback=s,this},i.prototype._isResponseOK=function(s){return!!s&&(this._okCallback?this._okCallback(s):s.status>=200&&s.status<300)},i.prototype.get=function(s){return this._header[s.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(s,c){if(o(s)){for(var f in s)this.set(f,s[f]);return this}return this._header[s.toLowerCase()]=c,this.header[s]=c,this},i.prototype.unset=function(s){return delete this._header[s.toLowerCase()],delete this.header[s],this},i.prototype.field=function(s,c){if(s==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(s)){for(var f in s)this.field(f,s[f]);return this}if(Array.isArray(c)){for(var h in c)this.field(s,c[h]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(s,c),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(s,c,f,h){switch(f.type){case"basic":this.set("Authorization","Basic "+h(s+":"+c));break;case"auto":this.username=s,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+s)}return this},i.prototype.withCredentials=function(s){return s==null&&(s=!0),this._withCredentials=s,this},i.prototype.redirects=function(s){return this._maxRedirects=s,this},i.prototype.maxResponseSize=function(s){if(typeof s!="number")throw TypeError("Invalid argument");return this._maxResponseSize=s,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(s){var c=o(s),f=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(s)?this._data=[]:this._isHost(s)||(this._data={});else if(s&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var h in s)this._data[h]=s[h];else typeof s=="string"?(f||this.type("form"),f=this._header["content-type"],this._data=f=="application/x-www-form-urlencoded"?this._data?this._data+"&"+s:s:(this._data||"")+s):this._data=s;return!c||this._isHost(s)||f||this.type("json"),this},i.prototype.sortQuery=function(s){return this._sort=s===void 0||s,this},i.prototype._finalizeQueryString=function(){var s=this._query.join("&");if(s&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+s),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var f=this.url.substring(c+1).split("&");typeof this._sort=="function"?f.sort(this._sort):f.sort(),this.url=this.url.substring(0,c)+"?"+f.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(s,c,f){if(!this._aborted){var h=new Error(s+c+"ms exceeded");h.timeout=c,h.code="ECONNABORTED",h.errno=f,this.timedout=!0,this.abort(),this.callback(h)}},i.prototype._setTimeouts=function(){var s=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){s._timeoutError("Timeout of ",s._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){s._timeoutError("Response timeout of ",s._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(i){if(i)return function(l){for(var s in o.prototype)l[s]=o.prototype[s];return l}(i)}e.exports=o,o.prototype.get=function(i){return this.header[i.toLowerCase()]},o.prototype._setHeaderProperties=function(i){var l=i["content-type"]||"";this.type=r.type(l);var s=r.params(l);for(var c in s)this[c]=s[c];this.links={};try{i.link&&(this.links=r.parseLinks(i.link))}catch{}},o.prototype._setStatusProperties=function(i){var l=i/100|0;this.status=this.statusCode=i,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=i==201,this.accepted=i==202,this.noContent=i==204,this.badRequest=i==400,this.unauthorized=i==401,this.notAcceptable=i==406,this.forbidden=i==403,this.notFound=i==404,this.unprocessableEntity=i==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,i){var l=i.split(/ *= */),s=l.shift(),c=l.shift();return s&&c&&(o[s]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,i){var l=i.split(/ *; */),s=l[0].slice(1,-1);return o[l[1].split(/ *= */)[1].slice(1,-1)]=s,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,i=Function.prototype.apply;function l(s,c){this._id=s,this._clearFn=c}t.setTimeout=function(){return new l(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new l(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(s){s&&s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(s,c){clearTimeout(s._idleTimeoutId),s._idleTimeout=c},t.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},t._unrefActive=t.active=function(s){clearTimeout(s._idleTimeoutId);var c=s._idleTimeout;c>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(i,l){if(!i.setImmediate){var s,c,f,h,p,g=1,y={},b=!1,E=i.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(i);O=O&&O.setTimeout?O:i,{}.toString.call(i.process)==="[object process]"?s=function(S){o.nextTick(function(){w(S)})}:function(){if(i.postMessage&&!i.importScripts){var S=!0,k=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=k,S}}()?(h="setImmediate$"+Math.random()+"$",p=function(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&w(+S.data.slice(h.length))},i.addEventListener?i.addEventListener("message",p,!1):i.attachEvent("onmessage",p),s=function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},s=function(S){f.port2.postMessage(S)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,s=function(S){var k=E.createElement("script");k.onreadystatechange=function(){w(S),k.onreadystatechange=null,c.removeChild(k),k=null},c.appendChild(k)}):s=function(S){setTimeout(w,0,S)},O.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(i,l){return Object.prototype.hasOwnProperty.call(i,l)}e.exports=function(i,l,s,c){l=l||"&",s=s||"=";var f={};if(typeof i!="string"||i.length===0)return f;var h=/\+/g;i=i.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var g=i.length;p>0&&g>p&&(g=p);for(var y=0;y=0?(b=w.substr(0,S),E=w.substr(S+1)):(b=w,E=""),O=decodeURIComponent(b),_=decodeURIComponent(E),r(f,O)?o(f[O])?f[O].push(_):f[O]=[f[O],_]:f[O]=_}return f};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,f,h,p){return f=f||"&",h=h||"=",c===null&&(c=void 0),r(c)==="object"?l(s(c),function(g){var y=encodeURIComponent(o(g))+h;return i(c[g])?l(c[g],function(b){return y+encodeURIComponent(o(b))}).join(f):y+encodeURIComponent(o(c[g]))}).join(f):p?encodeURIComponent(o(p))+h+encodeURIComponent(o(c)):""};var i=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function l(c,f){if(c.map)return c.map(f);for(var h=[],p=0;p1){R[0]=R[0].slice(0,-1);for(var q=R.length-1,V=1;V= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,L=String.fromCharCode;function U(A){throw new RangeError(C[A])}function ce(A,R){var I=A.split("@"),q="";I.length>1&&(q=I[0]+"@",A=I[1]);var V=function(de,ve){for(var Ge=[],st=de.length;st--;)Ge[st]=ve(de[st]);return Ge}((A=A.replace(k,".")).split("."),R).join(".");return q+V}function z(A){for(var R=[],I=0,q=A.length;I=55296&&V<=56319&&I>1,A+=$(A/R);A>455;q+=36)A=$(A/35);return $(q+36*A/(A+38))},ge=function(A){var R,I=[],q=A.length,V=0,de=128,ve=72,Ge=A.lastIndexOf("-");Ge<0&&(Ge=0);for(var st=0;st=128&&U("not-basic"),I.push(A.charCodeAt(st));for(var Re=Ge>0?Ge+1:0;Re=q&&U("invalid-input");var ut=(R=A.charCodeAt(Re++))-48<10?R-22:R-65<26?R-65:R-97<26?R-97:36;(ut>=36||ut>$((_-V)/lt))&&U("overflow"),V+=ut*lt;var Ht=Ft<=ve?1:Ft>=ve+26?26:Ft-ve;if(ut$(_/bt)&&U("overflow"),lt*=bt}var Tt=I.length+1;ve=W(V-ct,Tt,ct==0),$(V/Tt)>_-de&&U("overflow"),de+=$(V/Tt),V%=Tt,I.splice(V++,0,de)}return String.fromCodePoint.apply(String,I)},he=function(A){var R=[],I=(A=z(A)).length,q=128,V=0,de=72,ve=!0,Ge=!1,st=void 0;try{for(var Re,ct=A[Symbol.iterator]();!(ve=(Re=ct.next()).done);ve=!0){var lt=Re.value;lt<128&&R.push(L(lt))}}catch(Qe){Ge=!0,st=Qe}finally{try{!ve&&ct.return&&ct.return()}finally{if(Ge)throw st}}var Ft=R.length,ut=Ft;for(Ft&&R.push("-");ut=q&&Zn$((_-V)/vn)&&U("overflow"),V+=(Ht-q)*vn,q=Ht;var Xt=!0,Wr=!1,hr=void 0;try{for(var pi,ht=A[Symbol.iterator]();!(Xt=(pi=ht.next()).done);Xt=!0){var mt=pi.value;if(mt_&&U("overflow"),mt==q){for(var ke=V,F=36;;F+=36){var ae=F<=de?1:F>=de+26?26:F-de;if(ke>6|192).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase():"%"+(R>>12|224).toString(16).toUpperCase()+"%"+(R>>6&63|128).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase()}function ne(A){for(var R="",I=0,q=A.length;I=194&&V<224){if(q-I>=6){var de=parseInt(A.substr(I+4,2),16);R+=String.fromCharCode((31&V)<<6|63&de)}else R+=A.substr(I,6);I+=6}else if(V>=224){if(q-I>=9){var ve=parseInt(A.substr(I+4,2),16),Ge=parseInt(A.substr(I+7,2),16);R+=String.fromCharCode((15&V)<<12|(63&ve)<<6|63&Ge)}else R+=A.substr(I,9);I+=9}else R+=A.substr(I,3),I+=3}return R}function _e(A,R){function I(q){var V=ne(q);return V.match(R.UNRESERVED)?V:q}return A.scheme&&(A.scheme=String(A.scheme).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(R.PCT_ENCODED,I).replace(R.NOT_USERINFO,X).replace(R.PCT_ENCODED,g)),A.host!==void 0&&(A.host=String(A.host).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_HOST,X).replace(R.PCT_ENCODED,g)),A.path!==void 0&&(A.path=String(A.path).replace(R.PCT_ENCODED,I).replace(A.scheme?R.NOT_PATH:R.NOT_PATH_NOSCHEME,X).replace(R.PCT_ENCODED,g)),A.query!==void 0&&(A.query=String(A.query).replace(R.PCT_ENCODED,I).replace(R.NOT_QUERY,X).replace(R.PCT_ENCODED,g)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(R.PCT_ENCODED,I).replace(R.NOT_FRAGMENT,X).replace(R.PCT_ENCODED,g)),A}function N(A){return A.replace(/^0*(.*)/,"$1")||"0"}function G(A,R){var I=A.match(R.IPV4ADDRESS)||[],q=O(I,2)[1];return q?q.split(".").map(N).join("."):A}function oe(A,R){var I=A.match(R.IPV6ADDRESS)||[],q=O(I,3),V=q[1],de=q[2];if(V){for(var ve=V.toLowerCase().split("::").reverse(),Ge=O(ve,2),st=Ge[0],Re=Ge[1],ct=Re?Re.split(":").map(N):[],lt=st.split(":").map(N),Ft=R.IPV4ADDRESS.test(lt[lt.length-1]),ut=Ft?7:8,Ht=lt.length-ut,bt=Array(ut),Tt=0;Tt1){var pr=bt.slice(0,bn.index),Zn=bt.slice(bn.index+bn.length);Un=pr.join(":")+"::"+Zn.join(":")}else Un=bt.join(":");return de&&(Un+="%"+de),Un}return A}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie="".match(/(){0}/)[1]===void 0;function re(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},q=R.iri!==!1?E:b;R.reference==="suffix"&&(A=(R.scheme?R.scheme+":":"")+"//"+A);var V=A.match(Z);if(V){ie?(I.scheme=V[1],I.userinfo=V[3],I.host=V[4],I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=V[7],I.fragment=V[8],isNaN(I.port)&&(I.port=V[5])):(I.scheme=V[1]||void 0,I.userinfo=A.indexOf("@")!==-1?V[3]:void 0,I.host=A.indexOf("//")!==-1?V[4]:void 0,I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=A.indexOf("?")!==-1?V[7]:void 0,I.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(I.port)&&(I.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),I.host&&(I.host=oe(G(I.host,q),q)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",R.reference&&R.reference!=="suffix"&&R.reference!==I.reference&&(I.error=I.error||"URI is not a "+R.reference+" reference.");var de=Be[(R.scheme||I.scheme||"").toLowerCase()];if(R.unicodeSupport||de&&de.unicodeSupport)_e(I,q);else{if(I.host&&(R.domainHost||de&&de.domainHost))try{I.host=be(I.host.replace(q.PCT_ENCODED,ne).toLowerCase())}catch(ve){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}_e(I,b)}de&&de.parse&&de.parse(I,R)}else I.error=I.error||"URI can not be parsed.";return I}function Se(A,R){var I=R.iri!==!1?E:b,q=[];return A.userinfo!==void 0&&(q.push(A.userinfo),q.push("@")),A.host!==void 0&&q.push(oe(G(String(A.host),I),I).replace(I.IPV6ADDRESS,function(V,de,ve){return"["+de+(ve?"%25"+ve:"")+"]"})),typeof A.port=="number"&&(q.push(":"),q.push(A.port.toString(10))),q.length?q.join(""):void 0}var Pe=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Ke=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function xe(A){for(var R=[];A.length;)if(A.match(Pe))A=A.replace(Pe,"");else if(A.match(Fe))A=A.replace(Fe,"/");else if(A.match(Ke))A=A.replace(Ke,"/"),R.pop();else if(A==="."||A==="..")A="";else{var I=A.match(He);if(!I)throw new Error("Unexpected dot segment condition");var q=I[0];A=A.slice(q.length),R.push(q)}return R.join("")}function Xe(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=R.iri?E:b,q=[],V=Be[(R.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,R),A.host&&!I.IPV6ADDRESS.test(A.host)){if(R.domainHost||V&&V.domainHost)try{A.host=R.iri?De(A.host):be(A.host.replace(I.PCT_ENCODED,ne).toLowerCase())}catch(Ge){A.error=A.error||"Host's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+Ge}}_e(A,I),R.reference!=="suffix"&&A.scheme&&(q.push(A.scheme),q.push(":"));var de=Se(A,R);if(de!==void 0&&(R.reference!=="suffix"&&q.push("//"),q.push(de),A.path&&A.path.charAt(0)!=="/"&&q.push("/")),A.path!==void 0){var ve=A.path;R.absolutePath||V&&V.absolutePath||(ve=xe(ve)),de===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),q.push(ve)}return A.query!==void 0&&(q.push("?"),q.push(A.query)),A.fragment!==void 0&&(q.push("#"),q.push(A.fragment)),q.join("")}function rt(A,R){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],V={};return q||(A=re(Xe(A,I),I),R=re(Xe(R,I),I)),!(I=I||{}).tolerant&&R.scheme?(V.scheme=R.scheme,V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.path?(R.path.charAt(0)==="/"?V.path=xe(R.path):(A.userinfo===void 0&&A.host===void 0&&A.port===void 0||A.path?A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+R.path:V.path=R.path:V.path="/"+R.path,V.path=xe(V.path)),V.query=R.query):(V.path=A.path,R.query!==void 0?V.query=R.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=R.fragment,V}function Ie(A,R){return A&&A.toString().replace(R&&R.iri?E.PCT_ENCODED:b.PCT_ENCODED,ne)}var Ze={scheme:"http",domainHost:!0,parse:function(A,R){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,R){return A.port!==(String(A.scheme).toLowerCase()!=="https"?80:443)&&A.port!==""||(A.port=void 0),A.path||(A.path="/"),A}},gt={scheme:"https",domainHost:Ze.domainHost,parse:Ze.parse,serialize:Ze.serialize},Mt={},jt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",yt="[0-9A-Fa-f]",kt=h(h("%[EFef][0-9A-Fa-f]%"+yt+yt+"%"+yt+yt)+"|"+h("%[89A-Fa-f][0-9A-Fa-f]%"+yt+yt)+"|"+h("%"+yt+yt)),$e=f("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Bt=new RegExp(jt,"g"),se=new RegExp(kt,"g"),Oe=new RegExp(f("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',$e),"g"),pt=new RegExp(f("[^]",jt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Rt=pt;function Yt(A){var R=ne(A);return R.match(Bt)?R:A}var Pn={scheme:"mailto",parse:function(A,R){var I=A,q=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var V=!1,de={},ve=I.query.split("&"),Ge=0,st=ve.length;Get.resolved)}const Dc=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),ff=e=>JSON.parse(JSON.stringify(e)),Dg=(e,t)=>{e=ff(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];Dc(r)&&Dc(o)?e[n]=Dg(o,r):e[n]=r}return e},Bx=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(i,l){const s=i.shift();return s?l[s]?i.length?r(i,l[s]):l[s]:{}:{}},o=r(n,t);return Dc(o)?ff(o):o},RL=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=RL(e.allOf,t);return aa(n,t)}else if(typeof e.$ref<"u"){const n=Bx(e.$ref,t);return aa(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=aa(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(i=>aa(i,t));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>n&&o.pop();return o.every(i=>typeof i>"u")?void 0:o}const r=aa(e.items,t);if(typeof r>"u")return[];{const o=[];for(let i=0;i"u"?t=e.definitions||{}:Dc(e.definitions)&&(t=Dg(t,e.definitions)),aa(ff(e),t)}function NL(){const[e,t]=j.useState({configSchema:null,configDefaults:null});return j.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(o=>o.json()).then(PL);t({configSchema:r,configDefaults:$L(r)})}n()},[]),e}async function DL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function IL(e){let t,n,r,o=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=ML(t,l);const s=t.length;let c=0;for(;n0){const c=o.decode(l.subarray(0,s)),f=s+(l[s+1]===32?2:1),h=o.decode(l.subarray(f));switch(c){case"data":r.data=r.data?r.data+` +`+h:h;break;case"event":r.event=h;break;case"id":e(r.id=h);break;case"retry":const p=parseInt(h,10);isNaN(p)||t(r.retry=p);break}}}}function ML(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o1(){return{data:"",event:"",id:"",retry:void 0}}var FL=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=_h);let b;function E(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",E);let O=zL,_=0;function w(){document.removeEventListener("visibilitychange",E),window.clearTimeout(_),b.abort()}n==null||n.addEventListener("abort",()=>{w(),p()});const S=f??window.fetch,k=o??BL;async function C(){var $;b=new AbortController;try{const L=await S(e,Object.assign(Object.assign({},h),{headers:y,signal:b.signal}));await k(L),await DL(L.body,IL(LL(U=>{U?y[i1]=U:delete y[i1]},U=>{O=U},i))),l==null||l(),w(),p()}catch(L){if(!b.signal.aborted)try{const U=($=s==null?void 0:s(L))!==null&&$!==void 0?$:O;window.clearTimeout(_),_=window.setTimeout(C,U)}catch(U){w(),g(U)}}}C()})}function BL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(_h)))throw new Error(`Expected content-type to be ${_h}, Actual: ${t}`)}function HL(){const[e,t]=j.useState(null),[n,r]=j.useState(null),o=j.useCallback(async(l,s,c)=>{const f=new AbortController;r(f),t({status:"inflight",messages:l.messages,merge:!0}),await UL("/runs",{signal:f.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:s,thread_id:c,stream:!0}),onmessage(h){if(h.event==="data"){const{messages:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:p,run_id:g==null?void 0:g.run_id}))}else if(h.event==="metadata"){const{run_id:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:(g==null?void 0:g.messages)??[],run_id:p}))}else h.event==="error"&&t(p=>({status:"error",messages:(p==null?void 0:p.messages)??[],run_id:p==null?void 0:p.run_id}))},onclose(){t(h=>({status:(h==null?void 0:h.status)==="error"?h.status:"done",messages:(h==null?void 0:h.messages)??[],run_id:h==null?void 0:h.run_id})),r(null)},onerror(h){throw t(p=>({status:"error",messages:(p==null?void 0:p.messages)??[],run_id:p==null?void 0:p.run_id})),r(null),h}})},[]),i=j.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:o,stopStream:i,stream:e}}function WL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return Ux(t,"updated_at","desc")}function GL(){const[e,t]=j.useReducer(WL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const c=new URLSearchParams(window.location.search).get("shared_id"),[f,h]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(p=>p.json()).then(p=>p.map(g=>({...g,mine:!0}))),fetch("/assistants/public/"+(c?`?shared_id=${c}`:""),{headers:{Accept:"application/json"}}).then(p=>p.json())]);t(f.concat(h)),h.find(p=>p.assistant_id===c)&&r(c)}l()},[]);const o=j.useCallback(async(l,s,c,f,h=crypto.randomUUID())=>{const p=c.reduce((y,b)=>(y.append("files",b),y),new FormData);p.append("config",JSON.stringify({configurable:{assistant_id:h}}));const[g]=await Promise.all([fetch(`/assistants/${h}`,{method:"PUT",body:JSON.stringify({name:l,config:s,public:f}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(y=>y.json()),c.length?fetch("/ingest",{method:"POST",body:p}):Promise.resolve()]);t({...g,mine:!0}),r(g.assistant_id)},[]),i=j.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:o,enterConfig:i}}function VL(){const[e,t]=j.useState(!1),{configSchema:n,configDefaults:r}=NL(),{chats:o,currentChat:i,createChat:l,enterChat:s}=AL(),{configs:c,currentConfig:f,saveConfig:h,enterConfig:p}=GL(),{startStream:g,stopStream:y,stream:b}=HL(),E=j.useCallback(async(k,C=i)=>{var L;!C||!((L=c==null?void 0:c.find(U=>U.assistant_id===C.assistant_id))!=null&&L.config)||await g({messages:[{content:k,additional_kwargs:{},type:"human",example:!1}]},C.assistant_id,C.thread_id)},[i,g,c]),O=j.useCallback(async k=>{if(!f)return;const C=await l(k,f.assistant_id);return E(k,C)},[l,E,f]),_=j.useCallback(async k=>{i&&(y==null||y(!0)),s(k),e&&t(!1)},[s,y,e,i]),w=i?M.jsx(_C,{chat:i,startStream:E,stopStream:y,stream:b}):M.jsx(Cj,{startChat:O,configSchema:n,configDefaults:r,configs:c,currentConfig:f,saveConfig:h,enterConfig:p}),S=c==null?void 0:c.find(k=>k.assistant_id===(i==null?void 0:i.assistant_id));return M.jsx(mA,{subtitle:S?M.jsxs("span",{className:"inline-flex gap-1 items-center",children:[S.name,M.jsx(q2,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{s(null),p(S.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:M.jsx(xC,{chats:j.useMemo(()=>c===null||o===null?null:o.filter(k=>c.some(C=>C.assistant_id===k.assistant_id)),[o,c]),currentChat:i,enterChat:_}),children:n?w:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);ap.createRoot(document.getElementById("root")).render(M.jsx(VL,{})); diff --git a/backend/ui/assets/index-659277e1.js b/backend/ui/assets/index-659277e1.js new file mode 100644 index 00000000..43be4f42 --- /dev/null +++ b/backend/ui/assets/index-659277e1.js @@ -0,0 +1,123 @@ +var tE=Object.defineProperty;var nE=(e,t,n)=>t in e?tE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ot=(e,t,n)=>(nE(e,typeof t!="symbol"?t+"":t,n),n),rE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var ss=(e,t,n)=>(rE(e,t,"access private method"),n);function oE(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Lc={},l1={exports:{}},at={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var lu=Symbol.for("react.element"),iE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),uE=Symbol.for("react.profiler"),sE=Symbol.for("react.provider"),cE=Symbol.for("react.context"),fE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),hE=Symbol.for("react.lazy"),Iv=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=Iv&&e[Iv]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,c1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}Ra.prototype.isReactComponent={};Ra.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ra.prototype;function bh(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}var Sh=bh.prototype=new f1;Sh.constructor=bh;s1(Sh,Ra.prototype);Sh.isPureReactComponent=!0;var Lv=Array.isArray,d1=Object.prototype.hasOwnProperty,Eh={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,G=X[N];if(0>>1;No(ie,_e))reo(Se,ie)?(X[N]=Se,X[re]=_e,N=re):(X[N]=ie,X[Z]=_e,N=Z);else if(reo(Se,_e))X[N]=Se,X[re]=_e,N=re;else break e}}return ne}function o(X,ne){var _e=X.sortIndex-ne.sortIndex;return _e!==0?_e:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=X)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function k(X){if(E=!1,S(X),!b)if(n(c)!==null)b=!0,De(C);else{var ne=n(f);ne!==null&&Be(k,ne.startTime-X)}}function C(X,ne){b=!1,E&&(E=!1,_(U),U=-1),y=!0;var _e=g;try{for(S(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||X&&!K());){var N=p.callback;if(typeof N=="function"){p.callback=null,g=p.priorityLevel;var G=N(p.expirationTime<=ne);ne=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(c)&&r(c),S(ne)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var Z=n(f);Z!==null&&Be(k,Z.startTime-ne),oe=!1}return oe}finally{p=null,g=_e,y=!1}}var $=!1,L=null,U=-1,ce=5,z=-1;function K(){return!(e.unstable_now()-zX||125N?(X.sortIndex=_e,t(f,X),n(c)===null&&X===n(f)&&(E?(_(U),U=-1):E=!0,Be(k,_e-N))):(X.sortIndex=G,t(c,X),b||y||(b=!0,De(C))),X},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(X){var ne=g;return function(){var _e=g;g=ne;try{return X.apply(this,arguments)}finally{g=_e}}}})(y1);v1.exports=y1;var TE=v1.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var w1=j,sr=TE;function ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lp=Object.prototype.hasOwnProperty,CE=/^[: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]*$/,Fv={},zv={};function OE(e){return lp.call(zv,e)?!0:lp.call(Fv,e)?!1:CE.test(e)?zv[e]=!0:(Fv[e]=!0,!1)}function AE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jE(e,t,n,r){if(t===null||typeof t>"u"||AE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xn[e]=new zn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Ch(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});xn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var o=xn.hasOwnProperty(t)?xn[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var c=` +`+o[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{_d=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tl(e):""}function PE(e){switch(e.tag){case 5:return Tl(e.type);case 16:return Tl("Lazy");case 13:return Tl("Suspense");case 19:return Tl("SuspenseList");case 0:case 2:case 15:return e=xd(e.type,!1),e;case 11:return e=xd(e.type.render,!1),e;case 1:return e=xd(e.type,!0),e;default:return""}}function fp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ua:return"Fragment";case la:return"Portal";case up:return"Profiler";case Ah:return"StrictMode";case sp:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function RE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fp(t);case 8:return t===Ah?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ps(e){e._valueTracker||(e._valueTracker=$E(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dp(e,t){var n=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function T1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function pp(e,t){T1(e,t);var n=ui(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hp(e,t.type,n):t.hasOwnProperty("defaultValue")&&hp(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hp(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},NE=["Webkit","ms","Moz","O"];Object.keys(Pl).forEach(function(e){NE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pl[t]=Pl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pl.hasOwnProperty(e)&&Pl[e]?(""+t).trim():t+"px"}function P1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var DE=Qt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vp(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function yp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 wp=null;function Rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _p=null,_a=null,xa=null;function Vv(e){if(e=cu(e)){if(typeof _p!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=Bc(t),_p(e.stateNode,e.type,t))}}function R1(e){_a?xa?xa.push(e):xa=[e]:_a=e}function $1(){if(_a){var e=_a,t=xa;if(xa=_a=null,Vv(e),t)for(e=0;e>>=0,e===0?32:31-(VE(e)/qE|0)|0}var gs=64,ms=4194304;function Ol(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ol(s):(i&=l,i!==0&&(r=Ol(i)))}else l=n&~o,l!==0?r=Ol(l):i!==0&&(r=Ol(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function uu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fr(t),e[t]=n}function XE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=$l),t0=String.fromCharCode(32),n0=!1;function J1(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function Ck(e,t){switch(e){case"compositionend":return ew(t);case"keypress":return t.which!==32?null:(n0=!0,t0);case"textInput":return e=t.data,e===t0&&n0?null:e;default:return null}}function Ok(e,t){if(sa)return e==="compositionend"||!zh&&J1(e,t)?(e=X1(),Us=Lh=Xo=null,sa=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=a0(n)}}function ow(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ow(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iw(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Uh(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")}function Lk(e){var t=iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ow(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=l0(n,i);var l=l0(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ca=null,Tp=null,Dl=null,Cp=!1;function u0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||ca==null||ca!==Zs(r)||(r=ca,"selectionStart"in r&&Uh(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}),Dl&&Ql(Dl,r)||(Dl=r,r=ic(Tp,"onSelect"),0pa||(e.current=$p[pa],$p[pa]=null,pa--)}function Pt(e,t){pa++,$p[pa]=e.current,e.current=t}var si={},jn=fi(si),Kn=fi(!1),Ni=si;function Ta(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function lc(){Lt(Kn),Lt(jn)}function g0(e,t,n){if(jn.current!==si)throw Error(ue(168));Pt(jn,t),Pt(Kn,n)}function hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ue(108,RE(e)||"Unknown",o));return Qt({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ni=jn.current,Pt(jn,e),Pt(Kn,Kn.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=hw(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Lt(Kn),Lt(jn),Pt(jn,e)):Lt(Kn),Pt(Kn,n)}var yo=null,Hc=!1,Dd=!1;function gw(e){yo===null?yo=[e]:yo.push(e)}function Qk(e){Hc=!0,gw(e)}function di(){if(!Dd&&yo!==null){Dd=!0;var e=0,t=Et;try{var n=yo;for(Et=1;e>=l,o-=l,wo=1<<32-Fr(t)+o|n<U?(ce=L,L=null):ce=L.sibling;var z=g(_,L,S[U],k);if(z===null){L===null&&(L=ce);break}e&&L&&z.alternate===null&&t(_,L),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z,L=ce}if(U===S.length)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;UU?(ce=L,L=null):ce=L.sibling;var K=g(_,L,z.value,k);if(K===null){L===null&&(L=ce);break}e&&L&&K.alternate===null&&t(_,L),w=i(K,w,U),$===null?C=K:$.sibling=K,$=K,L=ce}if(z.done)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;!z.done;U++,z=S.next())z=p(_,z.value,k),z!==null&&(w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return zt&&xi(_,U),C}for(L=r(_,L);!z.done;U++,z=S.next())z=y(L,_,U,z.value,k),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?U:z.key),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return e&&L.forEach(function(W){return t(_,W)}),zt&&xi(_,U),C}function O(_,w,S,k){if(typeof S=="object"&&S!==null&&S.type===ua&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:e:{for(var C=S.key,$=w;$!==null;){if($.key===C){if(C=S.type,C===ua){if($.tag===7){n(_,$.sibling),w=o($,S.props.children),w.return=_,_=w;break e}}else if($.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Vo&&S0(C)===$.type){n(_,$.sibling),w=o($,S.props),w.ref=gl(_,$,S),w.return=_,_=w;break e}n(_,$);break}else t(_,$);$=$.sibling}S.type===ua?(w=Ri(S.props.children,_.mode,k,S.key),w.return=_,_=w):(k=Qs(S.type,S.key,S.props,null,_.mode,k),k.ref=gl(_,w,S),k.return=_,_=k)}return l(_);case la:e:{for($=S.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=o(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=Hd(S,_.mode,k),w.return=_,_=w}return l(_);case Vo:return $=S._init,O(_,w,$(S._payload),k)}if(Cl(S))return b(_,w,S,k);if(cl(S))return E(_,w,S,k);Ss(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=o(w,S),w.return=_,_=w):(n(_,w),w=Bd(S,_.mode,k),w.return=_,_=w),l(_)):n(_,w)}return O}var Oa=Sw(!0),Ew=Sw(!1),fu={},oo=fi(fu),Jl=fi(fu),eu=fi(fu);function Oi(e){if(e===fu)throw Error(ue(174));return e}function Yh(e,t){switch(Pt(eu,t),Pt(Jl,e),Pt(oo,fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mp(t,e)}Lt(oo),Pt(oo,t)}function Aa(){Lt(oo),Lt(Jl),Lt(eu)}function kw(e){Oi(eu.current);var t=Oi(oo.current),n=mp(t,e.type);t!==n&&(Pt(Jl,e),Pt(oo,n))}function Xh(e){Jl.current===e&&(Lt(oo),Lt(Jl))}var qt=fi(0);function hc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 Id=[];function Zh(){for(var e=0;en?n:4,e(!0);var r=Ld.transition;Ld.transition={};try{e(!1),t()}finally{Et=n,Ld.transition=r}}function Uw(){return Cr().memoizedState}function Jk(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bw(e))Hw(t,n);else if(n=ww(e,t,n,r),n!==null){var o=Ln();zr(n,e,r,o),Ww(n,t,r)}}function e2(e,t,n){var r=ai(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bw(e))Hw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Ur(s,l)){var c=t.interleaved;c===null?(o.next=o,Kh(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=ww(e,t,o,r),n!==null&&(o=Ln(),zr(n,e,r,o),Ww(n,t,r))}}function Bw(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function Hw(e,t){Il=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var mc={readContext:Tr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},t2={readContext:Tr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:k0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,Iw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jk.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:E0,useDebugValue:rg,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=E0(!1),t=e[0];return e=Zk.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,o=Jr();if(zt){if(n===void 0)throw Error(ue(407));n=n()}else{if(n=t(),mn===null)throw Error(ue(349));Ii&30||Ow(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,k0(jw.bind(null,r,i,e),[e]),r.flags|=2048,ru(9,Aw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=mn.identifierPrefix;if(zt){var n=_o,r=wo;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[eo]=t,e[Zl]=r,Jw(e,t,!1,!1),t.stateNode=e;e:{switch(l=yp(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),o=r;break;case"iframe":case"object":case"embed":Dt("load",e),o=r;break;case"video":case"audio":for(o=0;oPa&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=hc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!zt)return Tn(t),null}else 2*nn()-i.renderingStartTime>Pa&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=qt.current,Pt(qt,r?n&1|2:n&1),t):(Tn(t),null);case 22:case 23:return sg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function s2(e,t){switch(Hh(t),t.tag){case 1:return Qn(t.type)&&lc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(),Lt(Kn),Lt(jn),Zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xh(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Aa(),null;case 10:return qh(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var ks=!1,Cn=!1,c2=typeof WeakSet=="function"?WeakSet:Set,we=null;function va(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Gp(e,t,n){try{n()}catch(r){en(e,t,r)}}var N0=!1;function f2(e,t){if(Op=rc,e=iw(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,f=0,h=0,p=e,g=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(s=l+o),p!==i||r!==0&&p.nodeType!==3||(c=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===e)break t;if(g===n&&++f===o&&(s=l),g===i&&++h===r&&(c=l),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ap={focusedElem:e,selectionRange:n},rc=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var E=b.memoizedProps,O=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ir(t.type,E),O);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(k){en(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return b=N0,N0=!1,b}function Ll(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gp(t,n,i)}o=o.next}while(o!==r)}}function Vc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function n_(e){var t=e.alternate;t!==null&&(e.alternate=null,n_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Zl],delete t[Rp],delete t[qk],delete t[Kk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function r_(e){return e.tag===5||e.tag===3||e.tag===4}function D0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r_(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ac));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Kp(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&&(e=e.child,e!==null))for(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}var wn=null,Lr=!1;function Bo(e,t,n){for(n=n.child;n!==null;)o_(e,t,n),n=n.sibling}function o_(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Cn||va(n,t);case 6:var r=wn,o=Lr;wn=null,Bo(e,t,n),wn=r,Lr=o,wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ql(e)):Nd(wn,n.stateNode));break;case 4:r=wn,o=Lr,wn=n.stateNode.containerInfo,Lr=!0,Bo(e,t,n),wn=r,Lr=o;break;case 0:case 11:case 14:case 15:if(!Cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Gp(n,t,l),o=o.next}while(o!==r)}Bo(e,t,n);break;case 1:if(!Cn&&(va(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:n.mode&1?(Cn=(r=Cn)||n.memoizedState!==null,Bo(e,t,n),Cn=r):Bo(e,t,n);break;default:Bo(e,t,n)}}function I0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c2),t.forEach(function(r){var o=_2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p2(r/1960))-r,10e?16:e,Zo===null)var r=!1;else{if(e=Zo,Zo=null,wc=0,dt&6)throw Error(ue(331));var o=dt;for(dt|=4,we=e.current;we!==null;){var i=we,l=i.child;if(we.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cnn()-lg?Pi(e,0):ag|=n),Yn(e,t)}function d_(e,t){t===0&&(e.mode&1?(t=ms,ms<<=1,!(ms&130023424)&&(ms=4194304)):t=1);var n=Ln();e=To(e,t),e!==null&&(uu(e,t,n),Yn(e,n))}function w2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d_(e,n)}function _2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}r!==null&&r.delete(t),d_(e,n)}var p_;p_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)qn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qn=!1,l2(e,t,n);qn=!!(e.flags&131072)}else qn=!1,zt&&t.flags&1048576&&mw(t,cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Ta(t,jn.current);Sa(t,n),o=eg(null,t,r,e,o,n);var i=tg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qh(t),o.updater=Wc,t.stateNode=o,o._reactInternals=t,Mp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&Bh(t),In(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b2(r),e=Ir(r,e),o){case 0:t=zp(null,t,r,e,n);break e;case 1:t=P0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=j0(null,t,r,Ir(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),zp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),P0(e,t,r,o,n);case 3:e:{if(Yw(t),e===null)throw Error(ue(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_w(e,t),pc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ja(Error(ue(423)),t),t=R0(e,t,r,n,o);break e}else if(r!==o){o=ja(Error(ue(424)),t),t=R0(e,t,r,n,o);break e}else for(lr=ri(t.stateNode.containerInfo.firstChild),ur=t,zt=!0,Mr=null,n=Ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===o){t=Co(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return kw(t),e===null&&Dp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,jp(r,o)?l=null:i!==null&&jp(r,i)&&(t.flags|=32),Qw(e,t),In(e,t,l,n),t.child;case 6:return e===null&&Dp(t),null;case 13:return Xw(e,t,n);case 4:return Yh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),A0(e,t,r,o,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Pt(fc,r._currentValue),r._currentValue=l,i!==null)if(Ur(i.value,l)){if(i.children===o.children&&!Kn.current){t=Co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=xo(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ip(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ue(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ip(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}In(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),o=Tr(o),r=r(o),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,o=Ir(r,t.pendingProps),o=Ir(r.type,o),j0(e,t,r,o,n);case 15:return qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),Vs(e,t),t.tag=1,Qn(r)?(e=!0,uc(t)):e=!1,Sa(t,n),bw(t,r,o),Mp(t,r,o,n),Up(null,t,r,!0,e,n);case 19:return Zw(e,t,n);case 22:return Kw(e,t,n)}throw Error(ue(156,t.tag))};function h_(e,t){return z1(e,t)}function x2(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.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 Er(e,t,n,r){return new x2(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b2(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Ph)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Er(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&14680064,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}function Qs(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ua:return Ri(n.children,o,i,t);case Ah:l=8,o|=8;break;case up:return e=Er(12,n,t,o|2),e.elementType=up,e.lanes=i,e;case sp:return e=Er(13,n,t,o),e.elementType=sp,e.lanes=i,e;case cp:return e=Er(19,n,t,o),e.elementType=cp,e.lanes=i,e;case S1:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:l=10;break e;case b1:l=9;break e;case jh:l=11;break e;case Ph:l=14;break e;case Vo:l=16,r=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ri(e,t,n,r){return e=Er(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=Er(22,e,r,t),e.elementType=S1,e.lanes=n,e.stateNode={isHidden:!1},e}function Bd(e,t,n){return e=Er(6,e,null,t),e.lanes=n,e}function Hd(e,t,n){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,i,l,s,c){return e=new S2(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qh(i),e}function E2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),m1.exports=cr;var w_=m1.exports,W0=w_;ap.createRoot=W0.createRoot,ap.hydrateRoot=W0.hydrateRoot;function A2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const j2=j.forwardRef(A2),P2=j2;function R2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const $2=j.forwardRef(R2),G0=$2;function N2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const D2=j.forwardRef(N2),I2=D2;function L2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const M2=j.forwardRef(L2),V0=M2;function F2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const z2=j.forwardRef(F2),U2=z2;function B2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const H2=j.forwardRef(B2),W2=H2;function G2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const V2=j.forwardRef(G2),q2=V2;function K2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Q2=j.forwardRef(K2),__=Q2;function Y2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const X2=j.forwardRef(Y2),Z2=X2;function J2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const eT=j.forwardRef(J2),tT=eT;function nT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const rT=j.forwardRef(nT),oT=rT;async function q0(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function iT(e,t){const[n,r]=j.useState(null);return j.useEffect(()=>{async function o(){e&&r(await q0(e))}return o(),()=>{r(null)}},[e]),j.useEffect(()=>{async function o(){e&&r(await q0(e))}(t==null?void 0:t.status)!=="inflight"&&o()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages??[]]:(t==null?void 0:t.messages)??n}function aT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const lT=j.forwardRef(aT),uT=lT;function sT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const cT=j.forwardRef(sT),fT=cT;function x_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(i)))==null?void 0:l.classGroupId}const K0=/^\[(.+)\]$/;function hT(e){if(K0.test(e)){const t=K0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function gT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vT(Object.entries(e.classGroups),n).forEach(([i,l])=>{Jp(l,r,i,t)}),r}function Jp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Q0(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(mT(o)){Jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Jp(l,Q0(t,i),n,r)})})}function Q0(e,t){let n=e;return t.split(mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function mT(e){return e.isThemeGetter}function vT(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function yT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const S_="!";function wT(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let c=0,f=0,h;for(let E=0;Ef?h-f:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function _T(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function xT(e){return{cache:yT(e.cacheSize),splitModifiers:wT(e),...pT(e)}}const bT=/\s+/;function ST(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bT).map(l=>{const{modifiers:s,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let p=r(h?f.substring(0,h):f),g=!!h;if(!p){if(!h)return{isTailwindClass:!1,originalClassName:l};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:l};g=!1}const y=_T(s).join(":");return{isTailwindClass:!0,modifierId:c?y+S_:y,classGroupId:p,originalClassName:l,hasPostfixModifier:g}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:c,hasPostfixModifier:f}=l,h=s+c;return i.has(h)?!1:(i.add(h),o(c,f).forEach(p=>i.add(s+p)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function ET(){let e=0,t,n,r="";for(;ep(h),e());return n=xT(f),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=ST(c,n);return o(c,h),h}return function(){return i(ET.apply(null,arguments))}}function Nt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const k_=/^\[(?:([a-z-]+):)?(.+)\]$/i,TT=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dr(e){return Ai(e)||CT.has(e)||TT.test(e)}function Ho(e){return Da(e,"length",FT)}function Ai(e){return!!e&&!Number.isNaN(Number(e))}function Os(e){return Da(e,"number",Ai)}function yl(e){return!!e&&Number.isInteger(Number(e))}function RT(e){return e.endsWith("%")&&Ai(e.slice(0,-1))}function Je(e){return k_.test(e)}function Wo(e){return OT.test(e)}const $T=new Set(["length","size","percentage"]);function NT(e){return Da(e,$T,T_)}function DT(e){return Da(e,"position",T_)}const IT=new Set(["image","url"]);function LT(e){return Da(e,IT,UT)}function MT(e){return Da(e,"",zT)}function wl(){return!0}function Da(e,t,n){const r=k_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function FT(e){return AT.test(e)}function T_(){return!1}function zT(e){return jT.test(e)}function UT(e){return PT.test(e)}function BT(){const e=Nt("colors"),t=Nt("spacing"),n=Nt("blur"),r=Nt("brightness"),o=Nt("borderColor"),i=Nt("borderRadius"),l=Nt("borderSpacing"),s=Nt("borderWidth"),c=Nt("contrast"),f=Nt("grayscale"),h=Nt("hueRotate"),p=Nt("invert"),g=Nt("gap"),y=Nt("gradientColorStops"),b=Nt("gradientColorStopPositions"),E=Nt("inset"),O=Nt("margin"),_=Nt("opacity"),w=Nt("padding"),S=Nt("saturate"),k=Nt("scale"),C=Nt("sepia"),$=Nt("skew"),L=Nt("space"),U=Nt("translate"),ce=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Je,t],W=()=>[Je,t],ge=()=>["",Dr,Ho],he=()=>["auto",Ai,Je],be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Je],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ai,Os],G=()=>[Ai,Je];return{cacheSize:500,separator:":",theme:{colors:[wl],spacing:[Dr,Ho],blur:["none","",Wo,Je],brightness:N(),borderColor:[e],borderRadius:["none","","full",Wo,Je],borderSpacing:W(),borderWidth:ge(),contrast:N(),grayscale:ne(),hueRotate:G(),invert:ne(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[RT,Ho],inset:K(),margin:K(),opacity:N(),padding:W(),saturate:N(),scale:N(),sepia:ne(),skew:G(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...be(),Je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,Je]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",yl,Je]}],"grid-cols":[{"grid-cols":[wl]}],"col-start-end":[{col:["auto",{span:["full",yl,Je]},Je]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[wl]}],"row-start-end":[{row:["auto",{span:[yl,Je]},Je]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Je,t]}],"min-w":[{"min-w":["min","max","fit",Je,Dr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,Je]}],h:[{h:[Je,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Dr,Je]}],"max-h":[{"max-h":[Je,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Os]}],"font-family":[{font:[wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Je]}],"line-clamp":[{"line-clamp":["none",Ai,Os]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,Ho]}],"underline-offset":[{"underline-offset":["auto",Dr,Je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...be(),DT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:De()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[Dr,Je]}],"outline-w":[{outline:[Dr,Ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Dr,Ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,MT]}],"shadow-color":[{shadow:[wl]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,Je]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,Ho,Os]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const HT=kT(BT);function On(...e){return HT(dT(e))}function C_(e){const[t,n]=j.useState(!1),r=e.disabled||t;return M.jsxs("form",{className:On("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async o=>{if(o.preventDefault(),r)return;const i=o.target,l=i.message.value;n(!0),await e.onSubmit(l),n(!1),i.message.value=""},children:[M.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[M.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:M.jsx(uT,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),M.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),M.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[M.jsx(fT,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function O_(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bi=vg();function A_(e){Bi=e}const j_=/[&<>"']/,WT=new RegExp(j_.source,"g"),P_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,GT=new RegExp(P_.source,"g"),VT={"&":"&","<":"<",">":">",'"':""","'":"'"},Y0=e=>VT[e];function ir(e,t){if(t){if(j_.test(e))return e.replace(WT,Y0)}else if(P_.test(e))return e.replace(GT,Y0);return e}const qT=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KT(e){return e.replace(qT,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const QT=/(^|[^\[])\^/g;function xt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(QT,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function X0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Z0(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let c=!1,f=l;for(;--f>=0&&s[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(` +`)}class Sc{constructor(t){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=t||Bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:As(r,` +`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XT(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=As(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=As(n[0].replace(/^ *>[ \t]?/gm,""),` +`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",c="",f=!1;for(;t;){let h=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let p=n[2].split(` +`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=t.split(` +`,1)[0],y=0;this.options.pedantic?(y=2,c=p.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=p.slice(y),y+=n[1].length);let b=!1;if(!p&&/^ *$/.test(g)&&(s+=g+` +`,t=t.substring(g.length+1),h=!0),!h){const _=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),S=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` +`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),S.test(g)||k.test(g)||_.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` +`+g.slice(y);else{if(b||p.search(/[^ ]/)>=4||S.test(p)||k.test(p)||w.test(p))break;c+=` +`+g}!b&&!g.trim()&&(b=!0),s+=C+` +`,t=t.substring(C.length+1),p=g.slice(y)}}i.loose||(f?i.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let E=null,O;this.options.gfm&&(E=/^\[[ xX]\] /.exec(c),E&&(O=E[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!E,checked:O,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let h=0;hy.type==="space"),g=p.length>0&&p.some(y=>/\n.*\n/.test(y.raw));i.loose=g}if(i.loose)for(let h=0;h$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Z0(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,c;for(i=0;i({text:f,tokens:[]}));for(o=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=As(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YT(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),J0(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return J0(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,c,f=l,h=0;const p=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+l);(o=p.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){f+=c;continue}else if((o[5]||o[6])&&l%3&&!((l+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);const g=[...o[0]][0].length,y=t.slice(0,l+o.index+g+c);if(Math.min(l,c)%2){const E=y.slice(1,-1);return{type:"em",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=ir(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=ir(n[1]),o="mailto:"+r):(r=ir(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=ir(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=ir(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=ir(n[0]),{type:"text",raw:n[0],text:r}}}}const je={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};je._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;je.def=xt(je.def).replace("label",je._label).replace("title",je._title).getRegex();je.bullet=/(?:[*+-]|\d{1,9}[.)])/;je.listItemStart=xt(/^( *)(bull) */).replace("bull",je.bullet).getRegex();je.list=xt(je.list).replace(/bull/g,je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+je.def.source+")").getRegex();je._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";je._comment=/|$)/;je.html=xt(je.html,"i").replace("comment",je._comment).replace("tag",je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();je.lheading=xt(je.lheading).replace(/bull/g,je.bullet).getRegex();je.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.blockquote=xt(je.blockquote).replace("paragraph",je.paragraph).getRegex();je.normal={...je};je.gfm={...je.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};je.gfm.table=xt(je.gfm.table).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.gfm.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.pedantic={...je.normal,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(je.normal._paragraph).replace("hr",je.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";me.punctuation=xt(me.punctuation,"u").replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;me.anyPunctuation=/\\[punct]/g;me._escapes=/\\([punct])/g;me._comment=xt(je._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=xt(me.emStrong.lDelim,"u").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=xt(me.emStrong.rDelimAst,"gu").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=xt(me.emStrong.rDelimUnd,"gu").replace(/punct/g,me._punctuation).getRegex();me.anyPunctuation=xt(me.anyPunctuation,"gu").replace(/punct/g,me._punctuation).getRegex();me._escapes=xt(me._escapes,"gu").replace(/punct/g,me._punctuation).getRegex();me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=xt(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=xt(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=xt(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=xt(me.reflink).replace("label",me._label).replace("ref",je._label).getRegex();me.nolink=xt(me.nolink).replace("ref",je._label).getRegex();me.reflinkSearch=xt(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal={...me};me.pedantic={...me.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()};me.gfm={...me.normal,escape:xt(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(f.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,c,f;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(f=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,f)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(i=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(f=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Ec{constructor(t){Ot(this,"options");this.options=t||Bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` +`,o?'
    '+(r?t:ir(t,!0))+`
    +`:"
    "+(r?t:ir(t,!0))+`
    +`}blockquote(t){return`
    +${t}
    +`}html(t,n){return t}heading(t,n,r){return`${t} +`}hr(){return`
    +`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> +`+t+" +`}listitem(t,n,r){return`
  • ${t}
  • +`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    +`}table(t,n){return n&&(n=`${n}`),` + +`+t+` +`+n+`
    +`}tablerow(t){return` +${t} +`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i='
    ",i}image(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=O+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=O+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:O+" "}):E+=O+" "}E+=this.parse(g.tokens,f),h+=this.renderer.listitem(E,b,!!y)}r+=this.renderer.list(h,s,c);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1{r=r.concat(this.walkTokens(s[c],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=l.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Ec(this.defaults);for(const l in r.renderer){const s=r.renderer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Sc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zl;for(const l in r.hooks){const s=r.hooks[l],c=l,f=i[c];zl.passThroughHooks.has(l)?i[c]=h=>{if(this.defaults.async)return Promise.resolve(s.call(i,h)).then(g=>f.call(i,g));const p=s.call(i,h);return f.call(i,p)}:i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(l.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}au=new WeakSet,eh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=ss(this,Ic,R_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(c=>t(c,l)).then(c=>l.walkTokens?Promise.all(this.walkTokens(c,l.walkTokens)).then(()=>c):c).then(c=>n(c,l)).then(c=>l.hooks?l.hooks.postprocess(c):c).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const c=t(r,l);l.walkTokens&&this.walkTokens(c,l.walkTokens);let f=n(c,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(c){return s(c)}}},Ic=new WeakSet,R_=function(t,n){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+ir(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Fi=new ZT;function _t(e,t){return Fi.parse(e,t)}_t.options=_t.setOptions=function(e){return Fi.setOptions(e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.getDefaults=vg;_t.defaults=Bi;_t.use=function(...e){return Fi.use(...e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.walkTokens=function(e,t){return Fi.walkTokens(e,t)};_t.parseInline=Fi.parseInline;_t.Parser=no;_t.parser=no.parse;_t.Renderer=Ec;_t.TextRenderer=yg;_t.Lexer=to;_t.lexer=to.lex;_t.Tokenizer=Sc;_t.Hooks=zl;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;no.parse;to.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:$_,setPrototypeOf:ey,isFrozen:JT,getPrototypeOf:eC,getOwnPropertyDescriptor:N_}=Object;let{freeze:Mn,seal:Br,create:D_}=Object,{apply:th,construct:nh}=typeof Reflect<"u"&&Reflect;Mn||(Mn=function(t){return t});Br||(Br=function(t){return t});th||(th=function(t,n,r){return t.apply(n,r)});nh||(nh=function(t,n){return new t(...n)});const js=Or(Array.prototype.forEach),ty=Or(Array.prototype.pop),_l=Or(Array.prototype.push),Ys=Or(String.prototype.toLowerCase),Wd=Or(String.prototype.toString),tC=Or(String.prototype.match),xl=Or(String.prototype.replace),nC=Or(String.prototype.indexOf),rC=Or(String.prototype.trim),rr=Or(RegExp.prototype.test),bl=oC(TypeError);function Or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ys;ey&&ey(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(JT(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ia(e){const t=D_(null);for(const[n,r]of $_(e))N_(e,n)!==void 0&&(t[n]=r);return t}function Ps(e,t){for(;e!==null;){const r=N_(e,t);if(r){if(r.get)return Or(r.get);if(typeof r.value=="function")return Or(r.value)}e=eC(e)}function n(r){return console.warn("fallback value for",r),null}return n}const ny=Mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gd=Mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vd=Mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iC=Mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qd=Mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aC=Mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ry=Mn(["#text"]),oy=Mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kd=Mn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iy=Mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=Mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lC=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=Br(/<%[\w\W]*|[\w\W]*%>/gm),sC=Br(/\${[\w\W]*}/gm),cC=Br(/^data-[\-\w.\u00B7-\uFFFF]/),fC=Br(/^aria-[\-\w]+$/),I_=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dC=Br(/^(?:\w+script|data):/i),pC=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L_=Br(/^html$/i);var ay=Object.freeze({__proto__:null,MUSTACHE_EXPR:lC,ERB_EXPR:uC,TMPLIT_EXPR:sC,DATA_ATTR:cC,ARIA_ATTR:fC,IS_ALLOWED_URI:I_,IS_SCRIPT_OR_DATA:dC,ATTR_WHITESPACE:pC,DOCTYPE_NAME:L_});const hC=function(){return typeof window>"u"?null:window},gC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function M_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hC();const t=ke=>M_(ke);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:y}=e,b=c.prototype,E=Ps(b,"cloneNode"),O=Ps(b,"nextSibling"),_=Ps(b,"childNodes"),w=Ps(b,"parentNode");if(typeof l=="function"){const ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,k="";const{implementation:C,createNodeIterator:$,createDocumentFragment:L,getElementsByTagName:U}=n,{importNode:ce}=r;let z={};t.isSupported=typeof $_=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:ge,DATA_ATTR:he,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:Be}=ay;let{IS_ALLOWED_URI:X}=ay,ne=null;const _e=et({},[...ny,...Gd,...Vd,...qd,...ry]);let N=null;const G=et({},[...oy,...Kd,...iy,...Rs]);let oe=Object.seal(D_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,ie=null,re=!0,Se=!0,Pe=!1,Fe=!0,Ke=!1,He=!1,xe=!1,Xe=!1,rt=!1,Ie=!1,Ze=!1,gt=!0,Mt=!1;const jt="user-content-";let yt=!0,kt=!1,$e={},Bt=null;const se=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const pt=et({},["audio","video","img","source","image","track"]);let Rt=null;const Yt=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Rn=pn,Xn=!1,A=null;const R=et({},[Pn,dn,pn],Wd);let I=null;const q=["application/xhtml+xml","text/html"],V="text/html";let de=null,ve=null;const Ge=n.createElement("form"),st=function(F){return F instanceof RegExp||F instanceof Function},Re=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===F)){if((!F||typeof F!="object")&&(F={}),F=ia(F),I=q.indexOf(F.PARSER_MEDIA_TYPE)===-1?I=V:I=F.PARSER_MEDIA_TYPE,de=I==="application/xhtml+xml"?Wd:Ys,ne="ALLOWED_TAGS"in F?et({},F.ALLOWED_TAGS,de):_e,N="ALLOWED_ATTR"in F?et({},F.ALLOWED_ATTR,de):G,A="ALLOWED_NAMESPACES"in F?et({},F.ALLOWED_NAMESPACES,Wd):R,Rt="ADD_URI_SAFE_ATTR"in F?et(ia(Yt),F.ADD_URI_SAFE_ATTR,de):Yt,Oe="ADD_DATA_URI_TAGS"in F?et(ia(pt),F.ADD_DATA_URI_TAGS,de):pt,Bt="FORBID_CONTENTS"in F?et({},F.FORBID_CONTENTS,de):se,Z="FORBID_TAGS"in F?et({},F.FORBID_TAGS,de):{},ie="FORBID_ATTR"in F?et({},F.FORBID_ATTR,de):{},$e="USE_PROFILES"in F?F.USE_PROFILES:!1,re=F.ALLOW_ARIA_ATTR!==!1,Se=F.ALLOW_DATA_ATTR!==!1,Pe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=F.SAFE_FOR_TEMPLATES||!1,He=F.WHOLE_DOCUMENT||!1,rt=F.RETURN_DOM||!1,Ie=F.RETURN_DOM_FRAGMENT||!1,Ze=F.RETURN_TRUSTED_TYPE||!1,Xe=F.FORCE_BODY||!1,gt=F.SANITIZE_DOM!==!1,Mt=F.SANITIZE_NAMED_PROPS||!1,yt=F.KEEP_CONTENT!==!1,kt=F.IN_PLACE||!1,X=F.ALLOWED_URI_REGEXP||I_,Rn=F.NAMESPACE||pn,oe=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ie&&(rt=!0),$e&&(ne=et({},[...ry]),N=[],$e.html===!0&&(et(ne,ny),et(N,oy)),$e.svg===!0&&(et(ne,Gd),et(N,Kd),et(N,Rs)),$e.svgFilters===!0&&(et(ne,Vd),et(N,Kd),et(N,Rs)),$e.mathMl===!0&&(et(ne,qd),et(N,iy),et(N,Rs))),F.ADD_TAGS&&(ne===_e&&(ne=ia(ne)),et(ne,F.ADD_TAGS,de)),F.ADD_ATTR&&(N===G&&(N=ia(N)),et(N,F.ADD_ATTR,de)),F.ADD_URI_SAFE_ATTR&&et(Rt,F.ADD_URI_SAFE_ATTR,de),F.FORBID_CONTENTS&&(Bt===se&&(Bt=ia(Bt)),et(Bt,F.FORBID_CONTENTS,de)),yt&&(ne["#text"]=!0),He&&et(ne,["html","head","body"]),ne.table&&(et(ne,["tbody"]),delete Z.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=F.TRUSTED_TYPES_POLICY,k=S.createHTML("")}else S===void 0&&(S=gC(y,o)),S!==null&&typeof k=="string"&&(k=S.createHTML(""));Mn&&Mn(F),ve=F}},ct=et({},["mi","mo","mn","ms","mtext"]),lt=et({},["foreignobject","desc","title","annotation-xml"]),Ft=et({},["title","style","font","a","script"]),ut=et({},Gd);et(ut,Vd),et(ut,iC);const Ht=et({},qd);et(Ht,aC);const bt=function(F){let ae=w(F);(!ae||!ae.tagName)&&(ae={namespaceURI:Rn,tagName:"template"});const ye=Ys(F.tagName),vt=Ys(ae.tagName);return A[F.namespaceURI]?F.namespaceURI===dn?ae.namespaceURI===pn?ye==="svg":ae.namespaceURI===Pn?ye==="svg"&&(vt==="annotation-xml"||ct[vt]):!!ut[ye]:F.namespaceURI===Pn?ae.namespaceURI===pn?ye==="math":ae.namespaceURI===dn?ye==="math"&<[vt]:!!Ht[ye]:F.namespaceURI===pn?ae.namespaceURI===dn&&!lt[vt]||ae.namespaceURI===Pn&&!ct[vt]?!1:!Ht[ye]&&(Ft[ye]||!ut[ye]):!!(I==="application/xhtml+xml"&&A[F.namespaceURI]):!1},Tt=function(F){_l(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},bn=function(F,ae){try{_l(t.removed,{attribute:ae.getAttributeNode(F),from:ae})}catch{_l(t.removed,{attribute:null,from:ae})}if(ae.removeAttribute(F),F==="is"&&!N[F])if(rt||Ie)try{Tt(ae)}catch{}else try{ae.setAttribute(F,"")}catch{}},Un=function(F){let ae=null,ye=null;if(Xe)F=""+F;else{const rn=tC(F,/^[\r\n\t ]+/);ye=rn&&rn[0]}I==="application/xhtml+xml"&&Rn===pn&&(F=''+F+"");const vt=S?S.createHTML(F):F;if(Rn===pn)try{ae=new g().parseFromString(vt,I)}catch{}if(!ae||!ae.documentElement){ae=C.createDocument(Rn,"template",null);try{ae.documentElement.innerHTML=Xn?k:vt}catch{}}const Qe=ae.body||ae.documentElement;return F&&ye&&Qe.insertBefore(n.createTextNode(ye),Qe.childNodes[0]||null),Rn===pn?U.call(ae,He?"html":"body")[0]:He?ae.documentElement:Qe},pr=function(F){return $.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Zn=function(F){return F instanceof p&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},vn=function(F){return typeof s=="function"&&F instanceof s},Xt=function(F,ae,ye){z[F]&&js(z[F],vt=>{vt.call(t,ae,ye,ve)})},Wr=function(F){let ae=null;if(Xt("beforeSanitizeElements",F,null),Zn(F))return Tt(F),!0;const ye=de(F.nodeName);if(Xt("uponSanitizeElement",F,{tagName:ye,allowedTags:ne}),F.hasChildNodes()&&!vn(F.firstElementChild)&&rr(/<[/\w]/g,F.innerHTML)&&rr(/<[/\w]/g,F.textContent))return Tt(F),!0;if(!ne[ye]||Z[ye]){if(!Z[ye]&&pi(ye)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye)))return!1;if(yt&&!Bt[ye]){const vt=w(F)||F.parentNode,Qe=_(F)||F.childNodes;if(Qe&&vt){const rn=Qe.length;for(let Zt=rn-1;Zt>=0;--Zt)vt.insertBefore(E(Qe[Zt],!0),O(F))}}return Tt(F),!0}return F instanceof c&&!bt(F)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&rr(/<\/no(script|embed|frames)/i,F.innerHTML)?(Tt(F),!0):(Ke&&F.nodeType===3&&(ae=F.textContent,js([K,W,ge],vt=>{ae=xl(ae,vt," ")}),F.textContent!==ae&&(_l(t.removed,{element:F.cloneNode()}),F.textContent=ae)),Xt("afterSanitizeElements",F,null),!1)},hr=function(F,ae,ye){if(gt&&(ae==="id"||ae==="name")&&(ye in n||ye in Ge))return!1;if(!(Se&&!ie[ae]&&rr(he,ae))){if(!(re&&rr(be,ae))){if(!N[ae]||ie[ae]){if(!(pi(F)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,F)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(F))&&(oe.attributeNameCheck instanceof RegExp&&rr(oe.attributeNameCheck,ae)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ae))||ae==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye))))return!1}else if(!Rt[ae]){if(!rr(X,xl(ye,Be,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&F!=="script"&&nC(ye,"data:")===0&&Oe[F])){if(!(Pe&&!rr(De,xl(ye,Be,"")))){if(ye)return!1}}}}}}return!0},pi=function(F){return F.indexOf("-")>0},ht=function(F){Xt("beforeSanitizeAttributes",F,null);const{attributes:ae}=F;if(!ae)return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};let vt=ae.length;for(;vt--;){const Qe=ae[vt],{name:rn,namespaceURI:Zt,value:Gr}=Qe,ao=de(rn);let Ct=rn==="value"?Gr:rC(Gr);if(ye.attrName=ao,ye.attrValue=Ct,ye.keepAttr=!0,ye.forceKeepAttr=void 0,Xt("uponSanitizeAttribute",F,ye),Ct=ye.attrValue,ye.forceKeepAttr||(bn(rn,F),!ye.keepAttr))continue;if(!Fe&&rr(/\/>/i,Ct)){bn(rn,F);continue}Ke&&js([K,W,ge],qa=>{Ct=xl(Ct,qa," ")});const Va=de(F.nodeName);if(hr(Va,ao,Ct)){if(Mt&&(ao==="id"||ao==="name")&&(bn(rn,F),Ct=jt+Ct),S&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Zt)switch(y.getAttributeType(Va,ao)){case"TrustedHTML":{Ct=S.createHTML(Ct);break}case"TrustedScriptURL":{Ct=S.createScriptURL(Ct);break}}try{Zt?F.setAttributeNS(Zt,rn,Ct):F.setAttribute(rn,Ct),ty(t.removed)}catch{}}}Xt("afterSanitizeAttributes",F,null)},mt=function ke(F){let ae=null;const ye=pr(F);for(Xt("beforeSanitizeShadowDOM",F,null);ae=ye.nextNode();)Xt("uponSanitizeShadowNode",ae,null),!Wr(ae)&&(ae.content instanceof i&&ke(ae.content),ht(ae));Xt("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ke){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,ye=null,vt=null,Qe=null;if(Xn=!ke,Xn&&(ke=""),typeof ke!="string"&&!vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw bl("dirty is not a string, aborting")}else throw bl("toString is not a function");if(!t.isSupported)return ke;if(xe||Re(F),t.removed=[],typeof ke=="string"&&(kt=!1),kt){if(ke.nodeName){const Gr=de(ke.nodeName);if(!ne[Gr]||Z[Gr])throw bl("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof s)ae=Un(""),ye=ae.ownerDocument.importNode(ke,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?ae=ye:ae.appendChild(ye);else{if(!rt&&!Ke&&!He&&ke.indexOf("<")===-1)return S&&Ze?S.createHTML(ke):ke;if(ae=Un(ke),!ae)return rt?null:Ze?k:""}ae&&Xe&&Tt(ae.firstChild);const rn=pr(kt?ke:ae);for(;vt=rn.nextNode();)Wr(vt)||(vt.content instanceof i&&mt(vt.content),ht(vt));if(kt)return ke;if(rt){if(Ie)for(Qe=L.call(ae.ownerDocument);ae.firstChild;)Qe.appendChild(ae.firstChild);else Qe=ae;return(N.shadowroot||N.shadowrootmode)&&(Qe=ce.call(r,Qe,!0)),Qe}let Zt=He?ae.outerHTML:ae.innerHTML;return He&&ne["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&rr(L_,ae.ownerDocument.doctype.name)&&(Zt=" +`+Zt),Ke&&js([K,W,ge],Gr=>{Zt=xl(Zt,Gr," ")}),S&&Ze?S.createHTML(Zt):Zt},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(ke),xe=!0},t.clearConfig=function(){ve=null,xe=!1},t.isValidAttribute=function(ke,F,ae){ve||Re({});const ye=de(ke),vt=de(F);return hr(ye,vt,ae)},t.addHook=function(ke,F){typeof F=="function"&&(z[ke]=z[ke]||[],_l(z[ke],F))},t.removeHook=function(ke){if(z[ke])return ty(z[ke])},t.removeHooks=function(ke){z[ke]&&(z[ke]=[])},t.removeAllHooks=function(){z={}},t}var mC=M_();function vC(e){const[t,n]=j.useState(null),r=async o=>{n({score:o,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:o}),headers:{"Content-Type":"application/json"}}),n({score:o,inflight:!1})};return M.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(W2,{className:"h-5 w-5","aria-hidden":"true"})}),M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(U2,{className:"h-5 w-5","aria-hidden":"true"})})]})}function yC(e){try{return JSON.parse(e)}catch{return{}}}function ly(e){return M.jsxs(M.Fragment,{children:[e.call&&M.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&M.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&M.jsx("span",{className:On("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:M.jsx(I2,{className:On("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&M.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:M.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:M.jsx("table",{className:"divide-y divide-gray-300",children:M.jsx("tbody",{children:Object.entries(yC(e.args)).map(([t,n],r)=>M.jsxs("tr",{children:[M.jsx("td",{className:On(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:M.jsx("div",{className:"font-medium text-gray-500",children:t})}),M.jsx("td",{className:On(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:O_(n)})]},r))})})})})]})}function wC(e){var r;const[t,n]=j.useState(!1);return M.jsxs("div",{className:"flex flex-col mb-8",children:[M.jsxs("div",{className:"leading-6 flex flex-row",children:[M.jsx("div",{className:On("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),M.jsxs("div",{className:"flex-1",children:[e.type==="function"&&M.jsx(ly,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&M.jsx(ly,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?M.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:mC.sanitize(_t(e.content)).trim()}}):M.jsx("div",{className:"text-gray-900 prose",children:O_(e.content)}):!1]})]}),e.runId&&M.jsx("div",{className:"mt-2 pl-[100px]",children:M.jsx(vC,{runId:e.runId})})]})}function _C(e){var n,r,o;const t=iT(e.chat.thread_id,e.stream);return j.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[t]),M.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((i,l)=>{var s,c;return j.createElement(wC,{...i,key:l,runId:l===t.length-1&&((s=e.stream)==null?void 0:s.status)==="done"?(c=e.stream)==null?void 0:c.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&M.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startStream,disabled:((o=e.stream)==null?void 0:o.status)==="inflight"})})]})}function xC(e){var t;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterChat(null),className:On(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Chat"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:On(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),M.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var bC=Object.defineProperty,SC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(SC(e,typeof t!="symbol"?t+"":t,n),n);let EC=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bo=new EC,Ar=(e,t)=>{bo.isServer?j.useEffect(e,t):j.useLayoutEffect(e,t)};function So(e){let t=j.useRef(e);return Ar(()=>{t.current=e},[e]),t}function Jc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Hi(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Jc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Hi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function wg(){let[e]=j.useState(Hi);return j.useEffect(()=>()=>e.dispose(),[e]),e}let Ut=function(e){let t=So(e);return ot.useCallback((...n)=>t.current(...n),[t])};function kC(){let e=typeof document>"u";return"useSyncExternalStore"in Ul?(t=>t.useSyncExternalStore)(Ul)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=kC(),[t,n]=j.useState(bo.isHandoffComplete);return t&&bo.isHandoffComplete===!1&&n(!1),j.useEffect(()=>{t!==!0&&n(!0)},[t]),j.useEffect(()=>bo.handoff(),[]),e?!1:t}var uy;let La=(uy=ot.useId)!=null?uy:function(){let e=Ia(),[t,n]=ot.useState(e?()=>bo.nextId():null);return Ar(()=>{t===null&&n(bo.nextId())},[t]),t!=null?""+t:void 0};function An(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}function F_(e){return bo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let rh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ei=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ei||{}),z_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(z_||{}),TC=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TC||{});function CC(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U_||{});function OC(e,t=0){var n;return e===((n=F_(e))==null?void 0:n.body)?!1:An(t,{0(){return e.matches(rh)},1(){let r=e;for(;r!==null;){if(r.matches(rh))return!0;r=r.parentElement}return!1}})}var AC=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(AC||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $i(e){e==null||e.focus({preventScroll:!0})}let jC=["textarea","input"].join(",");function PC(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,jC))!=null?n:!1}function RC(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?RC(e):e:CC(e);o.length>0&&l.length>1&&(l=l.filter(y=>!o.includes(y))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},h=0,p=l.length,g;do{if(h>=p||h+p<=0)return 0;let y=c+h;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}g=l[y],g==null||g.focus(f),h+=s}while(g!==i.activeElement);return t&6&&PC(g)&&g.select(),2}function $s(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B_(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function $C(e,t,n=!0){let r=j.useRef(!1);j.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let c=s(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let h of f){if(h===null)continue;let p=h instanceof HTMLElement?h:h.current;if(p!=null&&p.contains(c)||l.composed&&l.composedPath().includes(p))return}return!OC(c,U_.Loose)&&c.tabIndex!==-1&&l.preventDefault(),t(l,c)}let i=j.useRef(null);$s("pointerdown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("mousedown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("click",l=>{i.current&&(o(l,()=>i.current),i.current=null)},!0),$s("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),B_("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H_=Symbol();function NC(e,t=!0){return Object.assign(e,{[H_]:t})}function Hr(...e){let t=j.useRef(e);j.useEffect(()=>{t.current=e},[e]);let n=Ut(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H_]))?void 0:n}function kc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Tc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tc||{}),Jo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Jo||{});function jr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=W_(t,e);if(i)return Ns(s,n,r,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Ns(h,n,r,l)}if(c&1){let{unmount:f=!0,...h}=s;return An(f?0:1,{0(){return null},1(){return Ns({...h,hidden:!0,style:{display:"none"}},n,r,l)}})}return Ns(s,n,r,l)}function Ns(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=Yd(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let h={};if(t){let p=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&g.push(y);p&&(h["data-headlessui-state"]=g.join(" "))}if(o===j.Fragment&&Object.keys(sy(s)).length>0){if(!j.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(b=>` - ${b}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` +`)].join(` +`));let p=f.props,g=typeof(p==null?void 0:p.className)=="function"?(...b)=>kc(p==null?void 0:p.className(...b),s.className):kc(p==null?void 0:p.className,s.className),y=g?{className:g}:{};return j.cloneElement(f,Object.assign({},W_(f.props,sy(Yd(s,["ref"]))),h,c,DC(f.ref,c.ref),y))}return j.createElement(o,Object.assign({},Yd(s,["ref"]),o!==j.Fragment&&c,o!==j.Fragment&&h),f)}function DC(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function dr(e){var t;return Object.assign(j.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function sy(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function IC(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&LC(n)?!1:r}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let MC="div";var Cc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cc||{});function FC(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return jr({ourProps:o,theirProps:r,slot:{},defaultTag:MC,name:"Hidden"})}let oh=dr(FC),_g=j.createContext(null);_g.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function xg(){return j.useContext(_g)}function zC({value:e,children:t}){return ot.createElement(_g.Provider,{value:e},t)}var G_=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(G_||{});function bg(e,t){let n=j.useRef([]),r=Ut(e);j.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let s=r(t,o);return n.current=t,s}},[r,...t])}function UC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function du(...e){return j.useMemo(()=>F_(...e),[...e])}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function BC(){let e=j.useRef(0);return B_("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pu(){let e=j.useRef(!1);return Ar(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function V_(e,t,n,r){let o=So(n);j.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function HC(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function q_(e){let t=Ut(e),n=j.useRef(!1);j.useEffect(()=>(n.current=!1,()=>{n.current=!0,Jc(()=>{n.current&&t()})}),[t])}function K_(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let WC="div";var Q_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Q_||{});function GC(e,t){let n=j.useRef(null),r=Hr(n,t),{initialFocus:o,containers:i,features:l=30,...s}=e;Ia()||(l=1);let c=du(n);KC({ownerDocument:c},!!(l&16));let f=QC({ownerDocument:c,container:n,initialFocus:o},!!(l&2));YC({ownerDocument:c,container:n,containers:i,previousActiveElement:f},!!(l&8));let h=BC(),p=Ut(E=>{let O=n.current;O&&(_=>_())(()=>{An(h.current,{[jl.Forwards]:()=>{Xs(O,Ei.First,{skipElements:[E.relatedTarget]})},[jl.Backwards]:()=>{Xs(O,Ei.Last,{skipElements:[E.relatedTarget]})}})})}),g=wg(),y=j.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(E){let O=K_(i);n.current instanceof HTMLElement&&O.add(n.current);let _=E.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Y_(O,_)||(y.current?Xs(n.current,An(h.current,{[jl.Forwards]:()=>Ei.Next,[jl.Backwards]:()=>Ei.Previous})|Ei.WrapAround,{relativeTo:E.target}):E.target instanceof HTMLElement&&$i(E.target)))}};return ot.createElement(ot.Fragment,null,!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}),jr({ourProps:b,theirProps:s,defaultTag:WC,name:"FocusTrap"}),!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}))}let VC=dr(GC),Sl=Object.assign(VC,{features:Q_}),Yo=[];HC(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Yo[0]!==t.target&&(Yo.unshift(t.target),Yo=Yo.filter(n=>n!=null&&n.isConnected),Yo.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function qC(e=!0){let t=j.useRef(Yo.slice());return bg(([n],[r])=>{r===!0&&n===!1&&Jc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Yo.slice())},[e,Yo,t]),Ut(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function KC({ownerDocument:e},t){let n=qC(t);bg(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$i(n())},[t]),q_(()=>{t&&$i(n())})}function QC({ownerDocument:e,container:t,initialFocus:n},r){let o=j.useRef(null),i=pu();return bg(()=>{if(!r)return;let l=t.current;l&&Jc(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}n!=null&&n.current?$i(n.current):Xs(l,Ei.First)===z_.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function YC({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pu();V_(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=K_(n);t.current instanceof HTMLElement&&s.add(t.current);let c=r.current;if(!c)return;let f=l.target;f&&f instanceof HTMLElement?Y_(s,f)?(r.current=f,$i(f)):(l.preventDefault(),l.stopPropagation(),$i(c)):$i(r.current)},!0)}function Y_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X_=j.createContext(!1);function XC(){return j.useContext(X_)}function ih(e){return ot.createElement(X_.Provider,{value:e.force},e.children)}function ZC(e){let t=XC(),n=j.useContext(Z_),r=du(e),[o,i]=j.useState(()=>{if(!t&&n!==null||bo.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return j.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),j.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let JC=j.Fragment;function eO(e,t){let n=e,r=j.useRef(null),o=Hr(NC(h=>{r.current=h}),t),i=du(r),l=ZC(r),[s]=j.useState(()=>{var h;return bo.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),c=j.useContext(ah),f=Ia();return Ar(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Ar(()=>{if(s&&c)return c.register(s)},[c,s]),q_(()=>{var h;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))}),f?!l||!s?null:w_.createPortal(jr({ourProps:{ref:o},theirProps:n,defaultTag:JC,name:"Portal"}),s):null}let tO=j.Fragment,Z_=j.createContext(null);function nO(e,t){let{target:n,...r}=e,o={ref:Hr(t)};return ot.createElement(Z_.Provider,{value:n},jr({ourProps:o,theirProps:r,defaultTag:tO,name:"Popover.Group"}))}let ah=j.createContext(null);function rO(){let e=j.useContext(ah),t=j.useRef([]),n=Ut(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Ut(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=j.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,j.useMemo(()=>function({children:i}){return ot.createElement(ah.Provider,{value:o},i)},[o])]}let oO=dr(eO),iO=dr(nO),lh=Object.assign(oO,{Group:iO}),J_=j.createContext(null);function ex(){let e=j.useContext(J_);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return e}function aO(){let[e,t]=j.useState([]);return[e.length>0?e.join(" "):void 0,j.useMemo(()=>function(n){let r=Ut(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),c=s.indexOf(i);return c!==-1&&s.splice(c,1),s}))),o=j.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return ot.createElement(J_.Provider,{value:o},n.children)},[t])]}let lO="p";function uO(e,t){let n=La(),{id:r=`headlessui-description-${n}`,...o}=e,i=ex(),l=Hr(t);Ar(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return jr({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:lO,name:i.name||"Description"})}let sO=dr(uO),cO=Object.assign(sO,{}),Sg=j.createContext(()=>{});Sg.displayName="StackContext";var uh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uh||{});function fO(){return j.useContext(Sg)}function dO({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=fO(),l=Ut((...s)=>{t==null||t(...s),i(...s)});return Ar(()=>{let s=o===void 0||o===!0;return s&&l(0,n,r),()=>{s&&l(1,n,r)}},[l,n,r,o]),ot.createElement(Sg.Provider,{value:l},e)}function pO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const hO=typeof Object.is=="function"?Object.is:pO,{useState:gO,useEffect:mO,useLayoutEffect:vO,useDebugValue:yO}=Ul;function wO(e,t,n){const r=t(),[{inst:o},i]=gO({inst:{value:r,getSnapshot:t}});return vO(()=>{o.value=r,o.getSnapshot=t,Xd(o)&&i({inst:o})},[e,r,t]),mO(()=>(Xd(o)&&i({inst:o}),e(()=>{Xd(o)&&i({inst:o})})),[e]),yO(r),r}function Xd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!hO(n,r)}catch{return!0}}function _O(e,t,n){return t()}const xO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=!xO,SO=bO?_O:wO,EO="useSyncExternalStore"in Ul?(e=>e.useSyncExternalStore)(Ul):SO;function kO(e){return EO(e.subscribe,e.getSnapshot,e.getSnapshot)}function TO(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function CO(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function OO(){if(!UC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(l=>l()).some(l=>l.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=Hi();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:c}=new URL(s.href),f=t.querySelector(c);f&&!o(f)&&(i=f)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!o(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function AO(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jO(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ji=TO(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Hi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:jO(n)},o=[OO(),CO(),AO()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ji.subscribe(()=>{let e=ji.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&ji.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ji.dispatch("TEARDOWN",n)}});function PO(e,t,n){let r=kO(ji),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Ar(()=>{if(!(!e||!t))return ji.dispatch("PUSH",e,n),()=>ji.dispatch("POP",e,n)},[t,e]),i}let Zd=new Map,El=new Map;function cy(e,t=!0){Ar(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=El.get(r))!=null?l:1;if(s===1?El.delete(r):El.set(r,s-1),s!==1)return;let c=Zd.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Zd.delete(r))}let i=(n=El.get(r))!=null?n:0;return El.set(r,i+1),i!==0||(Zd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function RO({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=j.useRef((r=n==null?void 0:n.current)!=null?r:null),i=du(o),l=Ut(()=>{var s;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:Ut(s=>l().some(c=>c.contains(s))),mainTreeNodeRef:o,MainTreeNode:j.useMemo(()=>function(){return n!=null?null:ot.createElement(oh,{features:Cc.Hidden,ref:o})},[o,n])}}var $O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($O||{}),NO=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(NO||{});let DO={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Oc=j.createContext(null);Oc.displayName="DialogContext";function hu(e){let t=j.useContext(Oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hu),n}return t}function IO(e,t,n=()=>[document.body]){PO(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function LO(e,t){return An(t.type,DO,e,t)}let MO="div",FO=Tc.RenderStrategy|Tc.Static;function zO(e,t){var n;let r=La(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:s,__demoMode:c=!1,...f}=e,[h,p]=j.useState(0),g=xg();i===void 0&&g!==null&&(i=(g&ar.Open)===ar.Open);let y=j.useRef(null),b=Hr(y,t),E=du(y),O=e.hasOwnProperty("open")||g!==null,_=e.hasOwnProperty("onClose");if(!O&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let w=i?0:1,[S,k]=j.useReducer(LO,{titleId:null,descriptionId:null,panelRef:j.createRef()}),C=Ut(()=>l(!1)),$=Ut(Fe=>k({type:0,id:Fe})),L=Ia()?c?!1:w===0:!1,U=h>1,ce=j.useContext(Oc)!==null,[z,K]=rO(),{resolveContainers:W,mainTreeNodeRef:ge,MainTreeNode:he}=RO({portals:z,defaultContainers:[(n=S.panelRef.current)!=null?n:y.current]}),be=U?"parent":"leaf",De=g!==null?(g&ar.Closing)===ar.Closing:!1,Be=(()=>ce||De?!1:L)(),X=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("body > *"))!=null?Fe:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(X,Be);let ne=(()=>U?!0:L)(),_e=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("[data-headlessui-portal]"))!=null?Fe:[]).find(He=>He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(_e,ne);let N=(()=>!(!L||U))();$C(W,C,N);let G=(()=>!(U||w!==0))();V_(E==null?void 0:E.defaultView,"keydown",Fe=>{G&&(Fe.defaultPrevented||Fe.key===G_.Escape&&(Fe.preventDefault(),Fe.stopPropagation(),C()))});let oe=(()=>!(De||w!==0||ce))();IO(E,oe,W),j.useEffect(()=>{if(w!==0||!y.current)return;let Fe=new ResizeObserver(Ke=>{for(let He of Ke){let xe=He.target.getBoundingClientRect();xe.x===0&&xe.y===0&&xe.width===0&&xe.height===0&&C()}});return Fe.observe(y.current),()=>Fe.disconnect()},[w,y,C]);let[Z,ie]=aO(),re=j.useMemo(()=>[{dialogState:w,close:C,setTitleId:$},S],[w,S,C,$]),Se=j.useMemo(()=>({open:w===0}),[w]),Pe={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":Z};return ot.createElement(dO,{type:"Dialog",enabled:w===0,element:y,onUpdate:Ut((Fe,Ke)=>{Ke==="Dialog"&&An(Fe,{[uh.Add]:()=>p(He=>He+1),[uh.Remove]:()=>p(He=>He-1)})})},ot.createElement(ih,{force:!0},ot.createElement(lh,null,ot.createElement(Oc.Provider,{value:re},ot.createElement(lh.Group,{target:y},ot.createElement(ih,{force:!1},ot.createElement(ie,{slot:Se,name:"Dialog.Description"},ot.createElement(Sl,{initialFocus:s,containers:W,features:L?An(be,{parent:Sl.features.RestoreFocus,leaf:Sl.features.All&~Sl.features.FocusLock}):Sl.features.None},ot.createElement(K,null,jr({ourProps:Pe,theirProps:f,slot:Se,defaultTag:MO,features:FO,visible:w===0,name:"Dialog"}))))))))),ot.createElement(he,null))}let UO="div";function BO(e,t){let n=La(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=hu("Dialog.Overlay"),s=Hr(t),c=Ut(h=>{if(h.target===h.currentTarget){if(IC(h.currentTarget))return h.preventDefault();h.preventDefault(),h.stopPropagation(),l()}}),f=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:f,defaultTag:UO,name:"Dialog.Overlay"})}let HO="div";function WO(e,t){let n=La(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Backdrop"),s=Hr(t);j.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let c=j.useMemo(()=>({open:i===0}),[i]);return ot.createElement(ih,{force:!0},ot.createElement(lh,null,jr({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:HO,name:"Dialog.Backdrop"})))}let GO="div";function VO(e,t){let n=La(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Panel"),s=Hr(t,l.panelRef),c=j.useMemo(()=>({open:i===0}),[i]),f=Ut(h=>{h.stopPropagation()});return jr({ourProps:{ref:s,id:r,onClick:f},theirProps:o,slot:c,defaultTag:GO,name:"Dialog.Panel"})}let qO="h2";function KO(e,t){let n=La(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=hu("Dialog.Title"),s=Hr(t);j.useEffect(()=>(l(r),()=>l(null)),[r,l]);let c=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r},theirProps:o,slot:c,defaultTag:qO,name:"Dialog.Title"})}let QO=dr(zO),YO=dr(WO),XO=dr(VO),ZO=dr(BO),JO=dr(KO),fy=Object.assign(QO,{Backdrop:YO,Panel:XO,Overlay:ZO,Title:JO,Description:cO});function eA(e=0){let[t,n]=j.useState(e),r=pu(),o=j.useCallback(c=>{r.current&&n(f=>f|c)},[t,r]),i=j.useCallback(c=>!!(t&c),[t]),l=j.useCallback(c=>{r.current&&n(f=>f&~c)},[n,r]),s=j.useCallback(c=>{r.current&&n(f=>f^c)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}function tA(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function ep(e,...t){e&&t.length>0&&e.classList.remove(...t)}function nA(e,t){let n=Hi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,p)=>p-h);return f}),s=i+l;if(s!==0){n.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&f.dispose()})});let c=n.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function rA(e,t,n,r){let o=n?"enter":"leave",i=Hi(),l=r!==void 0?tA(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=An(o,{enter:()=>t.enter,leave:()=>t.leave}),c=An(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=An(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ep(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...s,...f),i.nextFrame(()=>{ep(e,...t.base,...s,...f),Jd(e,...t.base,...s,...c),nA(e,()=>(ep(e,...t.base,...s),Jd(e,...t.base,...t.entered),l()))}),i.dispose}function oA({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=pu(),s=wg(),c=So(n);Ar(()=>{e&&(c.current="enter")},[e]),Ar(()=>{let f=Hi();s.add(f.dispose);let h=t.current;if(h&&c.current!=="idle"&&l.current)return f.dispose(),o.current(c.current),f.add(rA(h,r.current,c.current==="enter",()=>{f.dispose(),i.current(c.current)})),f.dispose},[n])}function Go(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let ef=j.createContext(null);ef.displayName="TransitionContext";var iA=(e=>(e.Visible="visible",e.Hidden="hidden",e))(iA||{});function aA(){let e=j.useContext(ef);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function lA(){let e=j.useContext(tf);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let tf=j.createContext(null);tf.displayName="NestingContext";function nf(e){return"children"in e?nf(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tx(e,t){let n=So(e),r=j.useRef([]),o=pu(),i=wg(),l=Ut((y,b=Jo.Hidden)=>{let E=r.current.findIndex(({el:O})=>O===y);E!==-1&&(An(b,{[Jo.Unmount](){r.current.splice(E,1)},[Jo.Hidden](){r.current[E].state="hidden"}}),i.microTask(()=>{var O;!nf(r)&&o.current&&((O=n.current)==null||O.call(n))}))}),s=Ut(y=>{let b=r.current.find(({el:E})=>E===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>l(y,Jo.Unmount)}),c=j.useRef([]),f=j.useRef(Promise.resolve()),h=j.useRef({enter:[],leave:[],idle:[]}),p=Ut((y,b,E)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([O])=>O!==y)),t==null||t.chains.current[b].push([y,new Promise(O=>{c.current.push(O)})]),t==null||t.chains.current[b].push([y,new Promise(O=>{Promise.all(h.current[b].map(([_,w])=>w)).then(()=>O())})]),b==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>E(b)):E(b)}),g=Ut((y,b,E)=>{Promise.all(h.current[b].splice(0).map(([O,_])=>_)).then(()=>{var O;(O=c.current.shift())==null||O()}).then(()=>E(b))});return j.useMemo(()=>({children:r,register:s,unregister:l,onStart:p,onStop:g,wait:f,chains:h}),[s,l,r,p,g,h,f])}function uA(){}let sA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dy(e){var t;let n={};for(let r of sA)n[r]=(t=e[r])!=null?t:uA;return n}function cA(e){let t=j.useRef(dy(e));return j.useEffect(()=>{t.current=dy(e)},[e]),t}let fA="div",nx=Tc.RenderStrategy;function dA(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:c,enterFrom:f,enterTo:h,entered:p,leave:g,leaveFrom:y,leaveTo:b,...E}=e,O=j.useRef(null),_=Hr(O,t),w=(n=E.unmount)==null||n?Jo.Unmount:Jo.Hidden,{show:S,appear:k,initial:C}=aA(),[$,L]=j.useState(S?"visible":"hidden"),U=lA(),{register:ce,unregister:z}=U;j.useEffect(()=>ce(O),[ce,O]),j.useEffect(()=>{if(w===Jo.Hidden&&O.current){if(S&&$!=="visible"){L("visible");return}return An($,{hidden:()=>z(O),visible:()=>ce(O)})}},[$,O,ce,z,S,w]);let K=So({base:Go(E.className),enter:Go(c),enterFrom:Go(f),enterTo:Go(h),entered:Go(p),leave:Go(g),leaveFrom:Go(y),leaveTo:Go(b)}),W=cA({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),ge=Ia();j.useEffect(()=>{if(ge&&$==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,$,ge]);let he=C&&!k,be=k&&S&&C,De=(()=>!ge||he?"idle":S?"enter":"leave")(),Be=eA(0),X=Ut(oe=>An(oe,{enter:()=>{Be.addFlag(ar.Opening),W.current.beforeEnter()},leave:()=>{Be.addFlag(ar.Closing),W.current.beforeLeave()},idle:()=>{}})),ne=Ut(oe=>An(oe,{enter:()=>{Be.removeFlag(ar.Opening),W.current.afterEnter()},leave:()=>{Be.removeFlag(ar.Closing),W.current.afterLeave()},idle:()=>{}})),_e=tx(()=>{L("hidden"),z(O)},U);oA({immediate:be,container:O,classes:K,direction:De,onStart:So(oe=>{_e.onStart(O,oe,X)}),onStop:So(oe=>{_e.onStop(O,oe,ne),oe==="leave"&&!nf(_e)&&(L("hidden"),z(O))})});let N=E,G={ref:_};return be?N={...N,className:kc(E.className,...K.current.enter,...K.current.enterFrom)}:(N.className=kc(E.className,(r=O.current)==null?void 0:r.className),N.className===""&&delete N.className),ot.createElement(tf.Provider,{value:_e},ot.createElement(zC,{value:An($,{visible:ar.Open,hidden:ar.Closed})|Be.flags},jr({ourProps:G,theirProps:N,defaultTag:fA,features:nx,visible:$==="visible",name:"Transition.Child"})))}function pA(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=j.useRef(null),s=Hr(l,t);Ia();let c=xg();if(n===void 0&&c!==null&&(n=(c&ar.Open)===ar.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[f,h]=j.useState(n?"visible":"hidden"),p=tx(()=>{h("hidden")}),[g,y]=j.useState(!0),b=j.useRef([n]);Ar(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let E=j.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);j.useEffect(()=>{if(n)h("visible");else if(!nf(p))h("hidden");else{let S=l.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&h("hidden")}},[n,p]);let O={unmount:o},_=Ut(()=>{var S;g&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),w=Ut(()=>{var S;g&&y(!1),(S=e.beforeLeave)==null||S.call(e)});return ot.createElement(tf.Provider,{value:p},ot.createElement(ef.Provider,{value:E},jr({ourProps:{...O,as:j.Fragment,children:ot.createElement(rx,{ref:s,...O,...i,beforeEnter:_,beforeLeave:w})},theirProps:{},defaultTag:j.Fragment,features:nx,visible:f==="visible",name:"Transition"})))}function hA(e,t){let n=j.useContext(ef)!==null,r=xg()!==null;return ot.createElement(ot.Fragment,null,!n&&r?ot.createElement(sh,{ref:t,...e}):ot.createElement(rx,{ref:t,...e}))}let sh=dr(pA),rx=dr(dA),gA=dr(hA),Ds=Object.assign(sh,{Child:gA,Root:sh});function mA(e){return M.jsxs(M.Fragment,{children:[M.jsx(Ds.Root,{show:e.sidebarOpen,as:j.Fragment,children:M.jsxs(fy,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),M.jsx("div",{className:"fixed inset-0 flex",children:M.jsx(Ds.Child,{as:j.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:M.jsxs(fy.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[M.jsx("span",{className:"sr-only",children:"Close sidebar"}),M.jsx(oT,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})]})})})]})}),M.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})}),M.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[M.jsx("span",{className:"sr-only",children:"Open sidebar"}),M.jsx(P2,{className:"h-6 w-6","aria-hidden":"true"})]}),M.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?M.jsxs(M.Fragment,{children:["OpenGPTs: ",M.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),M.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),M.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:M.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function py(e){var t;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:On(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),M.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function vA(e){var t,n;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterConfig(null),className:On(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Bot"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var ox={exports:{}},yA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wA=yA,_A=wA;function ix(){}function ax(){}ax.resetWarningCache=ix;var xA=function(){function e(r,o,i,l,s,c){if(c!==_A){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ax,resetWarningCache:ix};return n.PropTypes=n,n};ox.exports=xA();var bA=ox.exports;const At=xh(bA);function Ma(e,t,n,r){function o(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function c(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?i(h.value):o(h.value).then(s,c)}f((r=r.apply(e,t||[])).next())})}function Fa(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){l={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function gy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function EA(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=SA.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kA=[".DS_Store","Thumbs.db"];function TA(e){return Ma(this,void 0,void 0,function(){return Fa(this,function(t){return Ac(e)&&CA(e.dataTransfer)?[2,PA(e.dataTransfer,e.type)]:OA(e)?[2,AA(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jA(e)]:[2,[]]})})}function CA(e){return Ac(e)}function OA(e){return Ac(e)&&Ac(e.target)}function Ac(e){return typeof e=="object"&&e!==null}function AA(e){return ch(e.target.files).map(function(t){return gu(t)})}function jA(e){return Ma(this,void 0,void 0,function(){var t;return Fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return gu(r)})]}})})}function PA(e,t){return Ma(this,void 0,void 0,function(){var n,r;return Fa(this,function(o){switch(o.label){case 0:return e.items?(n=ch(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RA))]):[3,2];case 1:return r=o.sent(),[2,my(lx(r))];case 2:return[2,my(ch(e.files).map(function(i){return gu(i)}))]}})})}function my(e){return e.filter(function(t){return kA.indexOf(t.name)===-1})}function ch(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,xy(n)];if(e.sizen)return[!1,xy(n)]}return[!0,null]}function ki(e){return e!=null}function KA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=fx(c,n),h=iu(f,1),p=h[0],g=dx(c,r,o),y=iu(g,1),b=y[0],E=s?s(c):null;return p&&b&&!E})}function jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Is(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sy(e){e.preventDefault()}function QA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YA(e){return e.indexOf("Edge/")!==-1}function XA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QA(e)||YA(e)}function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eg=j.forwardRef(function(e,t){var n=e.children,r=Pc(e,rj),o=vx(r),i=o.open,l=Pc(o,oj);return j.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(j.Fragment,null,n(Vt(Vt({},l),{},{open:i})))});Eg.displayName="Dropzone";var mx={disabled:!1,getFilesFromEvent:TA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Eg.defaultProps=mx;Eg.propTypes={children:At.func,accept:At.objectOf(At.arrayOf(At.string)),multiple:At.bool,preventDropOnDocument:At.bool,noClick:At.bool,noKeyboard:At.bool,noDrag:At.bool,noDragEventsBubbling:At.bool,minSize:At.number,maxSize:At.number,maxFiles:At.number,disabled:At.bool,getFilesFromEvent:At.func,onFileDialogCancel:At.func,onFileDialogOpen:At.func,useFsAccessApi:At.bool,autoFocus:At.bool,onDragEnter:At.func,onDragLeave:At.func,onDragOver:At.func,onDrop:At.func,onDropAccepted:At.func,onDropRejected:At.func,onError:At.func,validator:At.func};var hh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vt(Vt({},mx),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,s=t.multiple,c=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,g=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,E=t.onFileDialogCancel,O=t.onFileDialogOpen,_=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,C=t.noKeyboard,$=t.noDrag,L=t.noDragEventsBubbling,U=t.onError,ce=t.validator,z=j.useMemo(function(){return ej(n)},[n]),K=j.useMemo(function(){return JA(n)},[n]),W=j.useMemo(function(){return typeof O=="function"?O:ky},[O]),ge=j.useMemo(function(){return typeof E=="function"?E:ky},[E]),he=j.useRef(null),be=j.useRef(null),De=j.useReducer(gj,hh),Be=tp(De,2),X=Be[0],ne=Be[1],_e=X.isFocused,N=X.isFileDialogActive,G=j.useRef(typeof window<"u"&&window.isSecureContext&&_&&ZA()),oe=function(){!G.current&&N&&setTimeout(function(){if(be.current){var Oe=be.current.files;Oe.length||(ne({type:"closeDialog"}),ge())}},300)};j.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[be,N,ge,G]);var Z=j.useRef([]),ie=function(Oe){he.current&&he.current.contains(Oe.target)||(Oe.preventDefault(),Z.current=[])};j.useEffect(function(){return S&&(document.addEventListener("dragover",Sy,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",Sy),document.removeEventListener("drop",ie))}},[he,S]),j.useEffect(function(){return!r&&w&&he.current&&he.current.focus(),function(){}},[he,w,r]);var re=j.useCallback(function(se){U?U(se):console.error(se)},[U]),Se=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[].concat(lj(Z.current),[se.target]),Is(se)&&Promise.resolve(o(se)).then(function(Oe){if(!(jc(se)&&!L)){var pt=Oe.length,Rt=pt>0&&KA({files:Oe,accept:z,minSize:l,maxSize:i,multiple:s,maxFiles:c,validator:ce}),Yt=pt>0&&!Rt;ne({isDragAccept:Rt,isDragReject:Yt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(Oe){return re(Oe)})},[o,f,re,L,z,l,i,s,c,ce]),Pe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Is(se);if(Oe&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return Oe&&p&&p(se),!1},[p,L]),Fe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Z.current.filter(function(Rt){return he.current&&he.current.contains(Rt)}),pt=Oe.indexOf(se.target);pt!==-1&&Oe.splice(pt,1),Z.current=Oe,!(Oe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Is(se)&&h&&h(se))},[he,h,L]),Ke=j.useCallback(function(se,Oe){var pt=[],Rt=[];se.forEach(function(Yt){var Pn=fx(Yt,z),dn=tp(Pn,2),pn=dn[0],Rn=dn[1],Xn=dx(Yt,l,i),A=tp(Xn,2),R=A[0],I=A[1],q=ce?ce(Yt):null;if(pn&&R&&!q)pt.push(Yt);else{var V=[Rn,I];q&&(V=V.concat(q)),Rt.push({file:Yt,errors:V.filter(function(de){return de})})}}),(!s&&pt.length>1||s&&c>=1&&pt.length>c)&&(pt.forEach(function(Yt){Rt.push({file:Yt,errors:[qA]})}),pt.splice(0)),ne({acceptedFiles:pt,fileRejections:Rt,type:"setFiles"}),g&&g(pt,Rt,Oe),Rt.length>0&&b&&b(Rt,Oe),pt.length>0&&y&&y(pt,Oe)},[ne,s,z,l,i,c,g,y,b,ce]),He=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[],Is(se)&&Promise.resolve(o(se)).then(function(Oe){jc(se)&&!L||Ke(Oe,se)}).catch(function(Oe){return re(Oe)}),ne({type:"reset"})},[o,Ke,re,L]),xe=j.useCallback(function(){if(G.current){ne({type:"openDialog"}),W();var se={multiple:s,types:K};window.showOpenFilePicker(se).then(function(Oe){return o(Oe)}).then(function(Oe){Ke(Oe,null),ne({type:"closeDialog"})}).catch(function(Oe){tj(Oe)?(ge(Oe),ne({type:"closeDialog"})):nj(Oe)?(G.current=!1,be.current?(be.current.value=null,be.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):re(Oe)});return}be.current&&(ne({type:"openDialog"}),W(),be.current.value=null,be.current.click())},[ne,W,ge,_,Ke,re,K,s]),Xe=j.useCallback(function(se){!he.current||!he.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),xe())},[he,xe]),rt=j.useCallback(function(){ne({type:"focus"})},[]),Ie=j.useCallback(function(){ne({type:"blur"})},[]),Ze=j.useCallback(function(){k||(XA()?setTimeout(xe,0):xe())},[k,xe]),gt=function(Oe){return r?null:Oe},Mt=function(Oe){return C?null:gt(Oe)},jt=function(Oe){return $?null:gt(Oe)},yt=function(Oe){L&&Oe.stopPropagation()},kt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.role,Yt=se.onKeyDown,Pn=se.onFocus,dn=se.onBlur,pn=se.onClick,Rn=se.onDragEnter,Xn=se.onDragOver,A=se.onDragLeave,R=se.onDrop,I=Pc(se,ij);return Vt(Vt(ph({onKeyDown:Mt(Zr(Yt,Xe)),onFocus:Mt(Zr(Pn,rt)),onBlur:Mt(Zr(dn,Ie)),onClick:gt(Zr(pn,Ze)),onDragEnter:jt(Zr(Rn,Se)),onDragOver:jt(Zr(Xn,Pe)),onDragLeave:jt(Zr(A,Fe)),onDrop:jt(Zr(R,He)),role:typeof Rt=="string"&&Rt!==""?Rt:"presentation"},pt,he),!r&&!C?{tabIndex:0}:{}),I)}},[he,Xe,rt,Ie,Ze,Se,Pe,Fe,He,C,$,r]),$e=j.useCallback(function(se){se.stopPropagation()},[]),Bt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.onChange,Yt=se.onClick,Pn=Pc(se,aj),dn=ph({accept:z,multiple:s,type:"file",style:{display:"none"},onChange:gt(Zr(Rt,He)),onClick:gt(Zr(Yt,$e)),tabIndex:-1},pt,be);return Vt(Vt({},dn),Pn)}},[be,n,s,He,r]);return Vt(Vt({},X),{},{isFocused:_e&&!r,getRootProps:kt,getInputProps:Bt,rootRef:he,inputRef:be,open:gt(xe)})}function gj(e,t){switch(t.type){case"focus":return Vt(Vt({},e),{},{isFocused:!0});case"blur":return Vt(Vt({},e),{},{isFocused:!1});case"openDialog":return Vt(Vt({},hh),{},{isFileDialogActive:!0});case"closeDialog":return Vt(Vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vt(Vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vt(Vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vt({},hh);default:return e}}function ky(){}const mj={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},vj={borderColor:"#2196f3"},yj={borderColor:"#00e676"},wj={borderColor:"#ff1744"};function _j(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function xj(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,o=e.files.map((l,s)=>M.jsxs("li",{children:[l.name," - ",l.size," bytes",M.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(c=>c.filter(f=>f!==l)),children:M.jsx(tT,{className:"h-4 w-4"})})]},s)),i=j.useMemo(()=>({...mj,...e.state.isFocused?vj:{},...e.state.isDragAccept?yj:{},...e.state.isDragReject?wj:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return M.jsxs("section",{className:"",children:[M.jsxs("aside",{children:[M.jsx(_j,{id:"files",title:"Files"}),M.jsx("div",{className:"prose",children:M.jsx("ul",{children:o})})]}),M.jsxs("div",{...t({style:i}),children:[M.jsx("input",{...n()}),M.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",M.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",M.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:M.jsx("ul",{children:r.map((l,s)=>M.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},s))})})]})]})}function kg(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function bj(e){return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Ty(e){var t;return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsxs("fieldset",{children:[M.jsx("legend",{className:"sr-only",children:e.field.title}),M.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>M.jsxs("div",{className:"flex items-center",children:[M.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),M.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const Sj={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function Ej(e){var t,n,r;return M.jsxs("fieldset",{children:[M.jsx(kg,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),M.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>{var i;return M.jsxs("div",{className:"relative flex items-start",children:[M.jsx("div",{className:"flex h-6 items-center",children:M.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(s=>s!==o))}})}),M.jsxs("div",{className:"ml-3 text-sm leading-6",children:[M.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o}),((i=e.descriptions)==null?void 0:i[o])&&M.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:_t(e.descriptions[o])}})]})]},o)})})]})}function kj(e){const t=window.location.href+"?shared_id="+e.assistantId;return M.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[M.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[M.jsx(Z2,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),M.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function Tj(e){var p,g,y,b,E,O;const[t,n]=j.useState(((p=e.config)==null?void 0:p.config)??e.configDefaults),[r,o]=j.useState([]),i=vx({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,s]=j.useState(((g=e.config)==null?void 0:g.public)??!1);j.useEffect(()=>{var _;n(((_=e.config)==null?void 0:_.config)??e.configDefaults)},[e.config,e.configDefaults]),j.useEffect(()=>{i.acceptedFiles.length>0&&(n(_=>{var w;return{configurable:{..._==null?void 0:_.configurable,tools:[...(((w=_==null?void 0:_.configurable)==null?void 0:w.tools)??[]).filter(S=>S!=="Retrieval"),"Retrieval"]}}}),o(_=>[..._.filter(w=>!i.acceptedFiles.includes(w)),...i.acceptedFiles]))},[i.acceptedFiles]);const[c,f]=j.useState(!1),h=!!e.config&&!c;return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:M.jsxs("span",{children:["Bot: ",((y=e.config)==null?void 0:y.name)??"New Bot"," ",M.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((b=e.config)==null?void 0:b.public)&&M.jsx(kj,{assistantId:(E=e.config)==null?void 0:E.assistant_id}),M.jsxs("form",{className:On("flex flex-col gap-8"),onSubmit:async _=>{_.preventDefault(),_.stopPropagation();const S=_.target.key.value;S&&(f(!0),await e.saveConfig(S,t,i.acceptedFiles,l),f(!1))},children:[M.jsxs("div",{className:On("flex flex-col gap-8",h&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((O=e.configSchema)==null?void 0:O.properties.configurable.properties)??{}).map(([_,w])=>{var k,C,$,L;const S=w.title;if(((k=w.allOf)==null?void 0:k.length)===1&&(w=w.allOf[0]),_==="agent_type")return M.jsx(Ty,{id:_,field:w,title:S,value:(C=t==null?void 0:t.configurable)==null?void 0:C[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="system_message")return M.jsx(bj,{id:_,field:w,title:S,value:($=t==null?void 0:t.configurable)==null?void 0:$[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="tools")return M.jsx(Ej,{id:_,field:w,title:S,value:(L=t==null?void 0:t.configurable)==null?void 0:L[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h,descriptions:Sj},_)}),!e.config&&M.jsx(xj,{state:i,files:r,setFiles:o}),M.jsx(Ty,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:_=>s(_==="Yes"),readonly:h})]}),!e.config&&M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:M.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),M.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:c?"Saving...":"Save"})]})]})]})}function Cj(e){var t;return M.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[M.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[M.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:M.jsx(vA,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),M.jsx("main",{className:"flex-1",children:M.jsx("div",{className:"px-4",children:M.jsx(Tj,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startChat})})]})}function Oj(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var CP=TP,OP=lf;function AP(e,t){var n=this.__data__,r=OP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var jP=AP,PP=pP,RP=xP,$P=EP,NP=CP,DP=jP;function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,y=n&E$?new _$:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=jN}var Rg=PN,RN=mu,$N=Rg,NN=vu,DN="[object Arguments]",IN="[object Array]",LN="[object Boolean]",MN="[object Date]",FN="[object Error]",zN="[object Function]",UN="[object Map]",BN="[object Number]",HN="[object Object]",WN="[object RegExp]",GN="[object Set]",VN="[object String]",qN="[object WeakMap]",KN="[object ArrayBuffer]",QN="[object DataView]",YN="[object Float32Array]",XN="[object Float64Array]",ZN="[object Int8Array]",JN="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",n4="[object Uint8ClampedArray]",r4="[object Uint16Array]",o4="[object Uint32Array]",It={};It[YN]=It[XN]=It[ZN]=It[JN]=It[e4]=It[t4]=It[n4]=It[r4]=It[o4]=!0;It[DN]=It[IN]=It[KN]=It[LN]=It[QN]=It[MN]=It[FN]=It[zN]=It[UN]=It[BN]=It[HN]=It[WN]=It[GN]=It[VN]=It[qN]=!1;function i4(e){return NN(e)&&$N(e.length)&&!!It[RN(e)]}var a4=i4;function l4(e){return function(t){return e(t)}}var $x=l4,Nc={exports:{}};Nc.exports;(function(e,t){var n=wx,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,l=i&&n.process,s=function(){try{var c=o&&o.require&&o.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nc,Nc.exports);var u4=Nc.exports,s4=a4,c4=$x,Uy=u4,By=Uy&&Uy.isTypedArray,f4=By?c4(By):s4,Nx=f4,d4=gN,p4=jx,h4=io,g4=Px,m4=Rx,v4=Nx,y4=Object.prototype,w4=y4.hasOwnProperty;function _4(e,t){var n=h4(e),r=!n&&p4(e),o=!n&&!r&&g4(e),i=!n&&!r&&!o&&v4(e),l=n||r||o||i,s=l?d4(e.length,String):[],c=s.length;for(var f in e)(t||w4.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m4(f,c)))&&s.push(f);return s}var x4=_4,b4=Object.prototype;function S4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b4;return e===n}var E4=S4;function k4(e,t){return function(n){return e(t(n))}}var T4=k4,C4=T4,O4=C4(Object.keys,Object),A4=O4,j4=E4,P4=A4,R4=Object.prototype,$4=R4.hasOwnProperty;function N4(e){if(!j4(e))return P4(e);var t=[];for(var n in Object(e))$4.call(e,n)&&n!="constructor"&&t.push(n);return t}var D4=N4,I4=xx,L4=Rg;function M4(e){return e!=null&&L4(e.length)&&!I4(e)}var $g=M4,F4=x4,z4=D4,U4=$g;function B4(e){return U4(e)?F4(e):z4(e)}var Ng=B4,H4=rN,W4=pN,G4=Ng;function V4(e){return H4(e,G4,W4)}var q4=V4,Hy=q4,K4=1,Q4=Object.prototype,Y4=Q4.hasOwnProperty;function X4(e,t,n,r,o,i){var l=n&K4,s=Hy(e),c=s.length,f=Hy(t),h=f.length;if(c!=h&&!l)return!1;for(var p=c;p--;){var g=s[p];if(!(l?g in t:Y4.call(t,g)))return!1}var y=i.get(e),b=i.get(t);if(y&&b)return y==t&&b==e;var E=!0;i.set(e,t),i.set(t,e);for(var O=l;++pt||i&&l&&c&&!s&&!f||r&&l&&c||!n&&c||!o)return 1;if(!r&&!i&&!f&&e=s)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var hL=pL,ip=yx,gL=Pg,mL=UI,vL=lL,yL=sL,wL=$x,_L=hL,xL=zx,bL=io;function SL(e,t,n){t.length?t=ip(t,function(i){return bL(i)?function(l){return gL(l,i.length===1?i[0]:i)}:i}):t=[xL];var r=-1;t=ip(t,wL(mL));var o=vL(e,function(i,l,s){var c=ip(t,function(f){return f(i)});return{criteria:c,index:++r,value:i}});return yL(o,function(i,l){return _L(i,l,n)})}var EL=SL,kL=EL,r1=io;function TL(e,t,n,r){return e==null?[]:(r1(t)||(t=t==null?[]:[t]),n=r?void 0:n,r1(n)||(n=n==null?[]:[n]),kL(e,t,n))}var CL=TL;const Ux=xh(CL);function OL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return Ux(t,"updated_at","desc")}function AL(){const[e,t]=j.useReducer(OL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const s=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(c=>c.json());t(s)}l()},[]);const o=j.useCallback(async(l,s,c=crypto.randomUUID())=>{const f=await fetch(`/threads/${c}`,{method:"PUT",body:JSON.stringify({assistant_id:s,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(h=>h.json());return t(f),r(f.thread_id),f},[]),i=j.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:o,enterChat:i}}const jL=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)n.d(i,l,(function(s){return r[s]}).bind(null,l));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}var o=n(47),i=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(i,l){var s=o(i,l);return r(s)?s:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(l){return i(l)?r(l):o(l)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(i){return i!=null&&o(i.length)&&!r(i)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),l=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":l&&l in Object(s)?o(s):i(s)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),l=n(61),s=n(134),c=n(8),f=n(48),h=f(r),p=f(o),g=f(i),y=f(l),b=f(s),E=c;(r&&E(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&E(new o)!="[object Map]"||i&&E(i.resolve())!="[object Promise]"||l&&E(new l)!="[object Set]"||s&&E(new s)!="[object WeakMap]")&&(E=function(O){var _=c(O),w=_=="[object Object]"?O.constructor:void 0,S=w?f(w):"";if(S)switch(S){case h:return"[object DataView]";case p:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return _}),e.exports=E},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(p)}var i=n(2),l=n(121),s=o(t)=="object"&&t&&!t.nodeType&&t,c=s&&o(r)=="object"&&r&&!r.nodeType&&r,f=c&&c.exports===s?i.Buffer:void 0,h=(f?f.isBuffer:void 0)||l;r.exports=h}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(O){if(n===setTimeout)return setTimeout(O,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:i}catch{n=i}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,f=[],h=!1,p=-1;function g(){h&&c&&(h=!1,c.length?f=c.concat(f):p=-1,f.length&&y())}function y(){if(!h){var O=s(g);h=!0;for(var _=f.length;_;){for(c=f,f=[];++p<_;)c&&c[p].run();p=-1,_=f.length}c=null,h=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(O)}}function b(O,_){this.fun=O,this.array=_}function E(){}o.nextTick=function(O){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;wO){var _=E;E=O,O=_}return E+""+O+""+(o.isUndefined(b)?"\0":b)}function f(p,g,y,b){var E=""+g,O=""+y;if(!p&&E>O){var _=E;E=O,O=_}var w={v:E,w:O};return b&&(w.name=b),w}function h(p,g){return c(p,g.v,g.w,g.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(p){return this._label=p,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultNodeLabelFn=p,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._in[g])})},i.prototype.sinks=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._out[g])})},i.prototype.setNodes=function(p,g){var y=arguments,b=this;return o.each(p,function(E){y.length>1?b.setNode(E,g):b.setNode(E)}),this},i.prototype.setNode=function(p,g){return o.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=g),this):(this._nodes[p]=arguments.length>1?g:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]="\0",this._children[p]={},this._children["\0"][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},i.prototype.node=function(p){return this._nodes[p]},i.prototype.hasNode=function(p){return o.has(this._nodes,p)},i.prototype.removeNode=function(p){var g=this;if(o.has(this._nodes,p)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],o.each(this.children(p),function(b){g.setParent(b)}),delete this._children[p]),o.each(o.keys(this._in[p]),y),delete this._in[p],delete this._preds[p],o.each(o.keys(this._out[p]),y),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},i.prototype.setParent=function(p,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===p)throw new Error("Setting "+g+" as parent of "+p+" would create a cycle");this.setNode(g)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=g,this._children[g][p]=!0,this},i.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},i.prototype.parent=function(p){if(this._isCompound){var g=this._parent[p];if(g!=="\0")return g}},i.prototype.children=function(p){if(o.isUndefined(p)&&(p="\0"),this._isCompound){var g=this._children[p];if(g)return o.keys(g)}else{if(p==="\0")return this.nodes();if(this.hasNode(p))return[]}},i.prototype.predecessors=function(p){var g=this._preds[p];if(g)return o.keys(g)},i.prototype.successors=function(p){var g=this._sucs[p];if(g)return o.keys(g)},i.prototype.neighbors=function(p){var g=this.predecessors(p);if(g)return o.union(g,this.successors(p))},i.prototype.isLeaf=function(p){return(this.isDirected()?this.successors(p):this.neighbors(p)).length===0},i.prototype.filterNodes=function(p){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(E,O){p(O)&&g.setNode(O,E)}),o.each(this._edgeObjs,function(E){g.hasNode(E.v)&&g.hasNode(E.w)&&g.setEdge(E,y.edge(E))});var b={};return this._isCompound&&o.each(g.nodes(),function(E){g.setParent(E,function O(_){var w=y.parent(_);return w===void 0||g.hasNode(w)?(b[_]=w,w):w in b?b[w]:O(w)}(E))}),g},i.prototype.setDefaultEdgeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultEdgeLabelFn=p,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(p,g){var y=this,b=arguments;return o.reduce(p,function(E,O){return b.length>1?y.setEdge(E,O,g):y.setEdge(E,O),O}),this},i.prototype.setEdge=function(){var p,g,y,b,E=!1,O=arguments[0];r(O)==="object"&&O!==null&&"v"in O?(p=O.v,g=O.w,y=O.name,arguments.length===2&&(b=arguments[1],E=!0)):(p=O,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],E=!0)),p=""+p,g=""+g,o.isUndefined(y)||(y=""+y);var _=c(this._isDirected,p,g,y);if(o.has(this._edgeLabels,_))return E&&(this._edgeLabels[_]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(g),this._edgeLabels[_]=E?b:this._defaultEdgeLabelFn(p,g,y);var w=f(this._isDirected,p,g,y);return p=w.v,g=w.w,Object.freeze(w),this._edgeObjs[_]=w,l(this._preds[g],p),l(this._sucs[p],g),this._in[g][_]=w,this._out[p][_]=w,this._edgeCount++,this},i.prototype.edge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return this._edgeLabels[b]},i.prototype.hasEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return o.has(this._edgeLabels,b)},i.prototype.removeEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y),E=this._edgeObjs[b];return E&&(p=E.v,g=E.w,delete this._edgeLabels[b],delete this._edgeObjs[b],s(this._preds[g],p),s(this._sucs[p],g),delete this._in[g][b],delete this._out[p][b],this._edgeCount--),this},i.prototype.inEdges=function(p,g){var y=this._in[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.v===g}):b}},i.prototype.outEdges=function(p,g){var y=this._out[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.w===g}):b}},i.prototype.nodeEdges=function(p,g){var y=this.inEdges(p,g);if(y)return y.concat(this.outEdges(p,g))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),l=n(97),s=n(98),c=n(99);function f(h){var p=this.__data__=new r(h);this.size=p.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=l,f.prototype.has=s,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),l=n(116),s=n(117);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}var i=n(47),l=o(t)=="object"&&t&&!t.nodeType&&t,s=l&&o(r)=="object"&&r&&!r.nodeType&&r,c=s&&s.exports===l&&i.process,f=function(){try{var h=s&&s.require&&s.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();r.exports=f}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return o(l);var s=[];for(var c in Object(l))i.call(l,c)&&c!="constructor"&&s.push(c);return s}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,s=l?function(c){return c==null?[]:(c=Object(c),r(l(c),function(f){return i.call(c,f)}))}:o;e.exports=s},function(e,t){e.exports=function(n,r){for(var o=-1,i=r.length,l=n.length;++o-1&&o%1==0&&oy))return!1;var E=p.get(l);if(E&&p.get(s))return E==s;var O=-1,_=!0,w=2&c?new r:void 0;for(p.set(l,s),p.set(s,l);++O0&&(b=_.removeMin(),(E=O[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return O}(l,String(s),c||i,f||function(h){return l.outEdges(h)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(i){return i.key})},o.prototype.has=function(i){return r.has(this._keyIndices,i)},o.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(i,l){var s=this._keyIndices;if(i=String(i),!r.has(s,i)){var c=this._arr,f=c.length;return s[i]=f,c.push({key:i,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},o.prototype.decrease=function(i,l){var s=this._keyIndices[i];if(l>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[s].priority+" New: "+l);this._arr[s].priority=l,this._decrease(s)},o.prototype._heapify=function(i){var l=this._arr,s=2*i,c=s+1,f=i;s>1].priority0&&E(_,W))}catch(ge){k.call(new $(W),ge)}}}function k(z){var K=this;K.triggered||(K.triggered=!0,K.def&&(K=K.def),K.msg=z,K.state=2,K.chain.length>0&&E(_,K))}function C(z,K,W,ge){for(var he=0;he-1?Z=ie:(oe=o.isUndefined(N)?void 0:z(N),o.isUndefined(oe)?Z=ie:((Z=oe).path=f(l.join(oe.path,ie.path)),Z.query=function(re,Se){var Pe={};function Fe(Ke){o.forOwn(Ke,function(He,xe){Pe[xe]=He})}return Fe(c.parse(re||"")),Fe(c.parse(Se||"")),Object.keys(Pe).length===0?void 0:c.stringify(Pe)}(oe.query,ie.query))),Z.fragment=void 0,(b.indexOf(Z.reference)===-1&&Z.path.indexOf("../")===0?"../":"")+h.serialize(Z)}function _(N){return y.indexOf(C(N))>-1}function w(N){return o.isUndefined(N.error)&&N.type!=="invalid"}function S(N,G){var oe=N;return G.forEach(function(Z){if(!(Z in oe))throw Error("JSON Pointer points to missing location: "+ne(G));oe=oe[Z]}),oe}function k(N){return Object.keys(N).filter(function(G){return G!=="$ref"})}function C(N){var G;switch(N.uriDetails.reference){case"absolute":case"uri":G="remote";break;case"same-document":G="local";break;default:G=N.uriDetails.reference}return G}function $(N,G){var oe=g[N],Z=Promise.resolve(),ie=o.cloneDeep(G.loaderOptions||{});return o.isUndefined(oe)?(o.isUndefined(ie.processContent)&&(ie.processContent=function(re,Se){Se(void 0,JSON.parse(re.text))}),Z=(Z=s.load(decodeURI(N),ie)).then(function(re){return g[N]={value:re},re}).catch(function(re){throw g[N]={error:re},re})):Z=Z.then(function(){if(o.isError(oe.error))throw oe.error;return oe.value}),Z=Z.then(function(re){return o.cloneDeep(re)})}function L(N,G){var oe=!0;try{if(!o.isPlainObject(N))throw new Error("obj is not an Object");if(!o.isString(N.$ref))throw new Error("obj.$ref is not a String")}catch(Z){if(G)throw Z;oe=!1}return oe}function U(N){return N.indexOf("://")!==-1||l.isAbsolute(N)?N:l.resolve(r.cwd(),N)}function ce(N,G){N.error=G.message,N.missing=!0}function z(N){return h.parse(N)}function K(N,G,oe){S(N,G.slice(0,G.length-1))[G[G.length-1]]=oe}function W(N,G){var oe,Z;if(N=o.isUndefined(N)?{}:o.cloneDeep(N),!o.isObject(N))throw new TypeError("options must be an Object");if(!o.isUndefined(N.resolveCirculars)&&!o.isBoolean(N.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(N.filter)||o.isArray(N.filter)||o.isFunction(N.filter)||o.isString(N.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(N.includeInvalid)&&!o.isBoolean(N.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(N.location)&&!o.isString(N.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(N.refPreProcessor)&&!o.isFunction(N.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(N.refPostProcessor)&&!o.isFunction(N.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(N.subDocPath)&&!o.isArray(N.subDocPath)&&!Be(N.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(N.resolveCirculars)&&(N.resolveCirculars=!1),N.filter=function(ie){var re,Se;return o.isArray(ie.filter)||o.isString(ie.filter)?(Se=o.isString(ie.filter)?[ie.filter]:ie.filter,re=function(Pe){return Se.indexOf(Pe.type)>-1||Se.indexOf(C(Pe))>-1}):o.isFunction(ie.filter)?re=ie.filter:o.isUndefined(ie.filter)&&(re=function(){return!0}),function(Pe,Fe){return(Pe.type!=="invalid"||ie.includeInvalid===!0)&&re(Pe,Fe)}}(N),o.isUndefined(N.location)&&(N.location=U("./root.json")),(oe=N.location.split("#")).length>1&&(N.subDocPath="#"+oe[1]),Z=decodeURI(N.location)===N.location,N.location=O(N.location,void 0),Z&&(N.location=decodeURI(N.location)),N.subDocPath=function(ie){var re;return o.isArray(ie.subDocPath)?re=ie.subDocPath:o.isString(ie.subDocPath)?re=X(ie.subDocPath):o.isUndefined(ie.subDocPath)&&(re=[]),re}(N),!o.isUndefined(G))try{S(G,N.subDocPath)}catch(ie){throw ie.message=ie.message.replace("JSON Pointer","options.subDocPath"),ie}return N}function ge(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~1/g,"/").replace(/~0/g,"~")})}function he(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~/g,"~0").replace(/\//g,"~1")})}function be(N,G){var oe={};if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");return function Z(ie,re,Se,Pe){var Fe=!0;function Ke(He,xe){Se.push(xe),Z(ie,He,Se,Pe),Se.pop()}o.isFunction(Pe)&&(Fe=Pe(ie,re,Se)),ie.indexOf(re)===-1&&(ie.push(re),Fe!==!1&&(o.isArray(re)?re.forEach(function(He,xe){Ke(He,xe.toString())}):o.isObject(re)&&o.forOwn(re,function(He,xe){Ke(He,xe)})),ie.pop())}(function(Z,ie){var re,Se=[];return ie.length>0&&(re=Z,ie.slice(0,ie.length-1).forEach(function(Pe){Pe in re&&(re=re[Pe],Se.push(re))})),Se}(N,(G=W(G,N)).subDocPath),S(N,G.subDocPath),o.cloneDeep(G.subDocPath),function(Z,ie,re){var Se,Pe,Fe=!0;return L(ie)&&(o.isUndefined(G.refPreProcessor)||(ie=G.refPreProcessor(o.cloneDeep(ie),re)),Se=De(ie),o.isUndefined(G.refPostProcessor)||(Se=G.refPostProcessor(Se,re)),G.filter(Se,re)&&(Pe=ne(re),oe[Pe]=Se),k(ie).length>0&&(Fe=!1)),Fe}),oe}function De(N){var G,oe,Z,ie={def:N};try{if(L(N,!0),G=N.$ref,Z=E[G],o.isUndefined(Z)&&(Z=E[G]=z(G)),ie.uri=G,ie.uriDetails=Z,o.isUndefined(Z.error)){ie.type=C(ie);try{["#","/"].indexOf(G[0])>-1?Be(G,!0):G.indexOf("#")>-1&&Be(Z.fragment,!0)}catch(re){ie.error=re.message,ie.type="invalid"}}else ie.error=ie.uriDetails.error,ie.type="invalid";(oe=k(N)).length>0&&(ie.warning="Extra JSON Reference properties will be ignored: "+oe.join(", "))}catch(re){ie.error=re.message,ie.type="invalid"}return ie}function Be(N,G){var oe,Z=!0;try{if(!o.isString(N))throw new Error("ptr is not a String");if(N!==""){if(oe=N.charAt(0),["#","/"].indexOf(oe)===-1)throw new Error("ptr must start with a / or #/");if(oe==="#"&&N!=="#"&&N.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(N.match(p))throw new Error("ptr has invalid token(s)")}}catch(ie){if(G===!0)throw ie;Z=!1}return Z}function X(N){try{Be(N,!0)}catch(oe){throw new Error("ptr must be a JSON Pointer: "+oe.message)}var G=N.split("/");return G.shift(),ge(G)}function ne(N,G){if(!o.isArray(N))throw new Error("path must be an Array");return(G!==!1?"#":"")+(N.length>0?"/":"")+he(N).join("/")}function _e(N,G){var oe=Promise.resolve();return oe=oe.then(function(){if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");G=W(G,N),N=o.cloneDeep(N)}).then(function(){var Z={deps:{},docs:{},refs:{}};return function ie(re,Se,Pe){var Fe,Ke,He=Promise.resolve(),xe=ne(Se.subDocPath),Xe=U(Se.location),rt=l.dirname(Se.location),Ie=Xe+xe;return o.isUndefined(Pe.docs[Xe])&&(Pe.docs[Xe]=re),o.isUndefined(Pe.deps[Ie])&&(Pe.deps[Ie]={},Fe=be(re,Se),o.forOwn(Fe,function(Ze,gt){var Mt,jt,yt=U(Se.location)+gt,kt=Ze.refdId=decodeURI(U(_(Ze)?O(rt,Ze.uri):Se.location)+"#"+(Ze.uri.indexOf("#")>-1?Ze.uri.split("#")[1]:""));Pe.refs[yt]=Ze,w(Ze)&&(Ze.fqURI=kt,Pe.deps[Ie][gt===xe?"#":gt.replace(xe+"/","#/")]=kt,yt.indexOf(kt+"/")!==0&&yt!==kt?((Ke=o.cloneDeep(Se)).subDocPath=o.isUndefined(Ze.uriDetails.fragment)?[]:X(decodeURI(Ze.uriDetails.fragment)),_(Ze)?(delete Ke.filter,Ke.location=kt.split("#")[0],He=He.then((Mt=Pe,jt=Ke,function(){var $e=U(jt.location),Bt=Mt.docs[$e];return o.isUndefined(Bt)?$($e,jt).catch(function(se){return Mt.docs[$e]=se,se}):Promise.resolve().then(function(){return Bt})}))):He=He.then(function(){return re}),He=He.then(function($e,Bt,se){return function(Oe){if(o.isError(Oe))ce(se,Oe);else try{return ie(Oe,Bt,$e).catch(function(pt){ce(se,pt)})}catch(pt){ce(se,pt)}}}(Pe,Ke,Ze))):Ze.circular=!0)})),He}(N,G,Z).then(function(){return Z})}).then(function(Z){var ie={},re=[],Se=[],Pe=new i.Graph,Fe=U(G.location),Ke=Fe+ne(G.subDocPath),He=l.dirname(Fe);return Object.keys(Z.deps).forEach(function(xe){Pe.setNode(xe)}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt){Pe.setEdge(Xe,rt)})}),(re=i.alg.findCycles(Pe)).forEach(function(xe){xe.forEach(function(Xe){Se.indexOf(Xe)===-1&&Se.push(Xe)})}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt,Ie){var Ze,gt=!1,Mt=Xe+Ie.slice(1),jt=Z.refs[Xe+Ie.slice(1)],yt=_(jt);Se.indexOf(rt)>-1&&re.forEach(function(kt){gt||(Ze=kt.indexOf(rt))>-1&&kt.forEach(function($e){gt||Mt.indexOf($e+"/")===0&&(yt&&Ze!==kt.length-1&&rt[rt.length-1]==="#"||(gt=!0))})}),gt&&(jt.circular=!0)})}),o.forOwn(Object.keys(Z.deps).reverse(),function(xe){var Xe=Z.deps[xe],rt=xe.split("#"),Ie=Z.docs[rt[0]],Ze=X(rt[1]);o.forOwn(Xe,function(gt,Mt){var jt=gt.split("#"),yt=Z.docs[jt[0]],kt=Ze.concat(X(Mt)),$e=Z.refs[rt[0]+ne(kt)];if(o.isUndefined($e.error)&&o.isUndefined($e.missing))if(!G.resolveCirculars&&$e.circular)$e.value=o.cloneDeep($e.def);else{try{$e.value=S(yt,X(jt[1]))}catch(Bt){return void ce($e,Bt)}rt[1]===""&&Mt==="#"?Z.docs[rt[0]]=$e.value:K(Ie,kt,$e.value)}})}),Object.keys(Z.refs).forEach(function(xe){var Xe,rt,Ie=Z.refs[xe];Ie.type!=="invalid"&&(Ie.fqURI[Ie.fqURI.length-1]==="#"&&Ie.uri[Ie.uri.length-1]!=="#"&&(Ie.fqURI=Ie.fqURI.substr(0,Ie.fqURI.length-1)),Xe=Ie.fqURI.split("/"),rt=Ie.uri.split("/"),o.times(rt.length-1,function(Ze){var gt=rt[rt.length-Ze-1],Mt=rt[rt.length-Ze],jt=Xe.length-Ze-1;gt!=="."&>!==".."&&Mt!==".."&&(Xe[jt]=gt)}),Ie.fqURI=Xe.join("/"),Ie.fqURI.indexOf(Fe)===0?Ie.fqURI=Ie.fqURI.replace(Fe,""):Ie.fqURI.indexOf(He)===0&&(Ie.fqURI=Ie.fqURI.replace(He,"")),Ie.fqURI[0]==="/"&&(Ie.fqURI="."+Ie.fqURI)),xe.indexOf(Ke)===0&&function Ze(gt,Mt,jt){var yt,kt=Mt.split("#"),$e=Z.refs[Mt];ie[kt[0]===G.location?"#"+kt[1]:ne(G.subDocPath.concat(jt))]=$e,!$e.circular&&w($e)?(yt=Z.deps[$e.refdId],$e.refdId.indexOf(gt)!==0&&Object.keys(yt).forEach(function(Bt){Ze($e.refdId,$e.refdId+Bt.substr(1),jt.concat(X(Bt)))})):!$e.circular&&$e.error&&($e.error=$e.error.replace("options.subDocPath","JSON Pointer"),$e.error.indexOf("#")>-1&&($e.error=$e.error.replace($e.uri.substr($e.uri.indexOf("#")),$e.uri)),$e.error.indexOf("ENOENT:")!==0&&$e.error.indexOf("Not Found")!==0||($e.error="JSON Pointer points to missing location: "+$e.uri))}(Ke,xe,X(xe.substr(Ke.length)))}),o.forOwn(ie,function(xe,Xe){delete xe.refdId,xe.circular&&xe.type==="local"&&(xe.value.$ref=xe.fqURI,K(Z.docs[Fe],X(Xe),xe.value)),xe.missing&&(xe.error=xe.error.split(": ")[0]+": "+xe.def.$ref)}),{refs:ie,resolved:Z.docs[Fe]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(N){return ge(N)},e.exports.encodePath=function(N){return he(N)},e.exports.findRefs=function(N,G){return be(N,G)},e.exports.findRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){var Se=o.cloneDeep(g[Z.location]),Pe=o.cloneDeep(Z);return o.isUndefined(Se.refs)&&(delete Pe.filter,delete Pe.subDocPath,Pe.includeInvalid=!0,g[Z.location].refs=be(re,Pe)),o.isUndefined(Z.filter)||(Pe.filter=Z.filter),{refs:be(re,Pe),value:re}})}(N,G)},e.exports.getRefDetails=function(N){return De(N)},e.exports.isPtr=function(N,G){return Be(N,G)},e.exports.isRef=function(N,G){return function(oe,Z){return L(oe,Z)&&De(oe).type!=="invalid"}(N,G)},e.exports.pathFromPtr=function(N){return X(N)},e.exports.pathToPtr=function(N,G){return ne(N,G)},e.exports.resolveRefs=function(N,G){return _e(N,G)},e.exports.resolveRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){return _e(re,Z).then(function(Se){return{refs:Se.refs,resolved:Se.resolved,value:re}})})}(N,G)}}).call(this,n(13))},function(e,t,n){(function(r,o){var i;function l(s){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(){var s="Expected a function",c="__lodash_placeholder__",f=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",O="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object RegExp]",C="[object Set]",$="[object String]",L="[object Symbol]",U="[object WeakMap]",ce="[object ArrayBuffer]",z="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",be="[object Int32Array]",De="[object Uint8Array]",Be="[object Uint16Array]",X="[object Uint32Array]",ne=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,oe=/[&<>"']/g,Z=RegExp(G.source),ie=RegExp(oe.source),re=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xe=/[\\^$.*+?()[\]{}|]/g,Xe=RegExp(xe.source),rt=/^\s+|\s+$/g,Ie=/^\s+/,Ze=/\s+$/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kt=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Rn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="[\\ud800-\\udfff]",R="["+Xn+"]",I="["+Rn+"]",q="\\d+",V="[\\u2700-\\u27bf]",de="[a-z\\xdf-\\xf6\\xf8-\\xff]",ve="[^\\ud800-\\udfff"+Xn+q+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ge="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ft="(?:"+de+"|"+ve+")",ut="(?:"+lt+"|"+ve+")",Ht="(?:"+I+"|"+Ge+")?",bt="[\\ufe0e\\ufe0f]?"+Ht+("(?:\\u200d(?:"+[st,Re,ct].join("|")+")[\\ufe0e\\ufe0f]?"+Ht+")*"),Tt="(?:"+[V,Re,ct].join("|")+")"+bt,bn="(?:"+[st+I+"?",I,Re,ct,A].join("|")+")",Un=RegExp("['’]","g"),pr=RegExp(I,"g"),Zn=RegExp(Ge+"(?="+Ge+")|"+bn+bt,"g"),vn=RegExp([lt+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[R,lt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[R,lt+Ft,"$"].join("|")+")",lt+"?"+Ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,Tt].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+Rn+"\\ufe0e\\ufe0f]"),Wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pi=-1,ht={};ht[K]=ht[W]=ht[ge]=ht[he]=ht[be]=ht[De]=ht["[object Uint8ClampedArray]"]=ht[Be]=ht[X]=!0,ht[h]=ht[p]=ht[ce]=ht[g]=ht[z]=ht[y]=ht[b]=ht[E]=ht[_]=ht[w]=ht[S]=ht[k]=ht[C]=ht[$]=ht[U]=!1;var mt={};mt[h]=mt[p]=mt[ce]=mt[z]=mt[g]=mt[y]=mt[K]=mt[W]=mt[ge]=mt[he]=mt[be]=mt[_]=mt[w]=mt[S]=mt[k]=mt[C]=mt[$]=mt[L]=mt[De]=mt["[object Uint8ClampedArray]"]=mt[Be]=mt[X]=!0,mt[b]=mt[E]=mt[U]=!1;var ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},F=parseFloat,ae=parseInt,ye=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,vt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,Qe=ye||vt||Function("return this")(),rn=l(t)=="object"&&t&&!t.nodeType&&t,Zt=rn&&l(o)=="object"&&o&&!o.nodeType&&o,Gr=Zt&&Zt.exports===rn,ao=Gr&&ye.process,Ct=function(){try{var H=Zt&&Zt.require&&Zt.require("util").types;return H||ao&&ao.binding&&ao.binding("util")}catch{}}(),Va=Ct&&Ct.isArrayBuffer,qa=Ct&&Ct.isDate,Ig=Ct&&Ct.isMap,Lg=Ct&&Ct.isRegExp,Mg=Ct&&Ct.isSet,Fg=Ct&&Ct.isTypedArray;function Jn(H,ee,J){switch(J.length){case 0:return H.call(ee);case 1:return H.call(ee,J[0]);case 2:return H.call(ee,J[0],J[1]);case 3:return H.call(ee,J[0],J[1],J[2])}return H.apply(ee,J)}function Hx(H,ee,J,pe){for(var Ve=-1,ft=H==null?0:H.length;++Ve-1}function df(H,ee,J){for(var pe=-1,Ve=H==null?0:H.length;++pe-1;);return J}function Vg(H,ee){for(var J=H.length;J--&&Wi(ee,H[J],0)>-1;);return J}function Kx(H,ee){for(var J=H.length,pe=0;J--;)H[J]===ee&&++pe;return pe}var Qx=mf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yx=mf({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xx(H){return"\\"+ke[H]}function Gi(H){return Xt.test(H)}function _f(H){var ee=-1,J=Array(H.size);return H.forEach(function(pe,Ve){J[++ee]=[Ve,pe]}),J}function qg(H,ee){return function(J){return H(ee(J))}}function Ro(H,ee){for(var J=-1,pe=H.length,Ve=0,ft=[];++J",""":'"',"'":"'"}),$o=function H(ee){var J,pe=(ee=ee==null?Qe:$o.defaults(Qe.Object(),ee,$o.pick(Qe,hr))).Array,Ve=ee.Date,ft=ee.Error,an=ee.Function,Vr=ee.Math,$t=ee.Object,xf=ee.RegExp,eb=ee.String,mr=ee.TypeError,xu=pe.prototype,tb=an.prototype,qi=$t.prototype,bu=ee["__core-js_shared__"],Su=tb.toString,St=qi.hasOwnProperty,nb=0,Kg=(J=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Eu=qi.toString,rb=Su.call($t),ob=Qe._,ib=xf("^"+Su.call(St).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Gr?ee.Buffer:void 0,No=ee.Symbol,Tu=ee.Uint8Array,Qg=ku?ku.allocUnsafe:void 0,Cu=qg($t.getPrototypeOf,$t),Yg=$t.create,Xg=qi.propertyIsEnumerable,Ou=xu.splice,Zg=No?No.isConcatSpreadable:void 0,Qa=No?No.iterator:void 0,hi=No?No.toStringTag:void 0,Au=function(){try{var a=yi($t,"defineProperty");return a({},"",{}),a}catch{}}(),ab=ee.clearTimeout!==Qe.clearTimeout&&ee.clearTimeout,lb=Ve&&Ve.now!==Qe.Date.now&&Ve.now,ub=ee.setTimeout!==Qe.setTimeout&&ee.setTimeout,ju=Vr.ceil,Pu=Vr.floor,bf=$t.getOwnPropertySymbols,sb=ku?ku.isBuffer:void 0,Jg=ee.isFinite,cb=xu.join,fb=qg($t.keys,$t),ln=Vr.max,Sn=Vr.min,db=Ve.now,pb=ee.parseInt,em=Vr.random,hb=xu.reverse,Sf=yi(ee,"DataView"),Ya=yi(ee,"Map"),Ef=yi(ee,"Promise"),Ki=yi(ee,"Set"),Xa=yi(ee,"WeakMap"),Za=yi($t,"create"),Ru=Xa&&new Xa,Qi={},gb=wi(Sf),mb=wi(Ya),vb=wi(Ef),yb=wi(Ki),wb=wi(Xa),$u=No?No.prototype:void 0,Ja=$u?$u.valueOf:void 0,tm=$u?$u.toString:void 0;function x(a){if(Jt(a)&&!qe(a)&&!(a instanceof it)){if(a instanceof vr)return a;if(St.call(a,"__wrapped__"))return nv(a)}return new vr(a)}var Yi=function(){function a(){}return function(u){if(!Gt(u))return{};if(Yg)return Yg(u);a.prototype=u;var d=new a;return a.prototype=void 0,d}}();function Nu(){}function vr(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}function it(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function gi(a){var u=-1,d=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function yr(a,u,d,m,v,T){var P,D=1&u,B=2&u,Y=4&u;if(d&&(P=v?d(a,m,v,T):d(a)),P!==void 0)return P;if(!Gt(a))return a;var Q=qe(a);if(Q){if(P=function(te){var fe=te.length,ze=new te.constructor(fe);return fe&&typeof te[0]=="string"&&St.call(te,"index")&&(ze.index=te.index,ze.input=te.input),ze}(a),!D)return Bn(a,P)}else{var le=En(a),Te=le==E||le==O;if(Fo(a))return Om(a,D);if(le==S||le==h||Te&&!v){if(P=B||Te?{}:qm(a),!D)return B?function(te,fe){return Kr(te,Gm(te),fe)}(a,function(te,fe){return te&&Kr(fe,Wn(fe),te)}(P,a)):function(te,fe){return Kr(te,Qf(te),fe)}(a,om(P,a))}else{if(!mt[le])return v?a:{};P=function(te,fe,ze){var Ee=te.constructor;switch(fe){case ce:return Bf(te);case g:case y:return new Ee(+te);case z:return function(We,nt){var Ae=nt?Bf(We.buffer):We.buffer;return new We.constructor(Ae,We.byteOffset,We.byteLength)}(te,ze);case K:case W:case ge:case he:case be:case De:case"[object Uint8ClampedArray]":case Be:case X:return Am(te,ze);case _:return new Ee;case w:case $:return new Ee(te);case k:return function(We){var nt=new We.constructor(We.source,Bt.exec(We));return nt.lastIndex=We.lastIndex,nt}(te);case C:return new Ee;case L:return Ue=te,Ja?$t(Ja.call(Ue)):{}}var Ue}(a,le,D)}}T||(T=new Rr);var Ce=T.get(a);if(Ce)return Ce;T.set(a,P),_v(a)?a.forEach(function(te){P.add(yr(te,u,d,te,a,T))}):yv(a)&&a.forEach(function(te,fe){P.set(fe,yr(te,u,d,fe,a,T))});var Le=Q?void 0:(Y?B?Vf:Gf:B?Wn:hn)(a);return gr(Le||a,function(te,fe){Le&&(te=a[fe=te]),el(P,fe,yr(te,u,d,fe,a,T))}),P}function im(a,u,d){var m=d.length;if(a==null)return!m;for(a=$t(a);m--;){var v=d[m],T=u[v],P=a[v];if(P===void 0&&!(v in a)||!T(P))return!1}return!0}function am(a,u,d){if(typeof a!="function")throw new mr(s);return ll(function(){a.apply(void 0,d)},u)}function tl(a,u,d,m){var v=-1,T=yu,P=!0,D=a.length,B=[],Y=u.length;if(!D)return B;d&&(u=Wt(u,er(d))),m?(T=df,P=!1):u.length>=200&&(T=Ka,P=!1,u=new mi(u));e:for(;++v-1},lo.prototype.set=function(a,u){var d=this.__data__,m=Du(d,a);return m<0?(++this.size,d.push([a,u])):d[m][1]=u,this},uo.prototype.clear=function(){this.size=0,this.__data__={hash:new gi,map:new(Ya||lo),string:new gi}},uo.prototype.delete=function(a){var u=qu(this,a).delete(a);return this.size-=u?1:0,u},uo.prototype.get=function(a){return qu(this,a).get(a)},uo.prototype.has=function(a){return qu(this,a).has(a)},uo.prototype.set=function(a,u){var d=qu(this,a),m=d.size;return d.set(a,u),this.size+=d.size==m?0:1,this},mi.prototype.add=mi.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},mi.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.clear=function(){this.__data__=new lo,this.size=0},Rr.prototype.delete=function(a){var u=this.__data__,d=u.delete(a);return this.size=u.size,d},Rr.prototype.get=function(a){return this.__data__.get(a)},Rr.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.set=function(a,u){var d=this.__data__;if(d instanceof lo){var m=d.__data__;if(!Ya||m.length<199)return m.push([a,u]),this.size=++d.size,this;d=this.__data__=new uo(m)}return d.set(a,u),this.size=d.size,this};var Do=$m(qr),lm=$m(Of,!0);function Sb(a,u){var d=!0;return Do(a,function(m,v,T){return d=!!u(m,v,T)}),d}function Iu(a,u,d){for(var m=-1,v=a.length;++m0&&d(D)?u>1?yn(D,u-1,d,m,v):Po(v,D):m||(v[v.length]=D)}return v}var Cf=Nm(),sm=Nm(!0);function qr(a,u){return a&&Cf(a,u,hn)}function Of(a,u){return a&&sm(a,u,hn)}function Lu(a,u){return jo(u,function(d){return ho(a[d])})}function Xi(a,u){for(var d=0,m=(u=Lo(u,a)).length;a!=null&&du}function Eb(a,u){return a!=null&&St.call(a,u)}function kb(a,u){return a!=null&&u in $t(a)}function jf(a,u,d){for(var m=d?df:yu,v=a[0].length,T=a.length,P=T,D=pe(T),B=1/0,Y=[];P--;){var Q=a[P];P&&u&&(Q=Wt(Q,er(u))),B=Sn(Q.length,B),D[P]=!d&&(u||v>=120&&Q.length>=120)?new mi(P&&Q):void 0}Q=a[0];var le=-1,Te=D[0];e:for(;++le=Ce)return Le;var te=B[Y];return Le*(te=="desc"?-1:1)}}return P.index-D.index}(v,T,d)})}function wm(a,u,d){for(var m=-1,v=u.length,T={};++m-1;)D!==a&&Ou.call(D,B,1),Ou.call(a,B,1);return a}function _m(a,u){for(var d=a?u.length:0,m=d-1;d--;){var v=u[d];if(d==m||v!==T){var T=v;po(v)?Ou.call(a,v,1):Mf(a,v)}}return a}function Df(a,u){return a+Pu(em()*(u-a+1))}function If(a,u){var d="";if(!a||u<1||u>9007199254740991)return d;do u%2&&(d+=a),(u=Pu(u/2))&&(a+=a);while(u);return d}function tt(a,u){return Jf(Ym(a,u,Gn),a+"")}function Cb(a){return rm(na(a))}function Ob(a,u){var d=na(a);return Ku(d,vi(u,0,d.length))}function ol(a,u,d,m){if(!Gt(a))return a;for(var v=-1,T=(u=Lo(u,a)).length,P=T-1,D=a;D!=null&&++vv?0:v+u),(d=d>v?v:d)<0&&(d+=v),v=u>d?0:d-u>>>0,u>>>=0;for(var T=pe(v);++m>>1,P=a[T];P!==null&&!nr(P)&&(d?P<=u:P=200){var Y=u?null:$b(a);if(Y)return _u(Y);P=!1,v=Ka,B=new mi}else B=u?[]:D;e:for(;++m=m?a:wr(a,u,d)}var Cm=ab||function(a){return Qe.clearTimeout(a)};function Om(a,u){if(u)return a.slice();var d=a.length,m=Qg?Qg(d):new a.constructor(d);return a.copy(m),m}function Bf(a){var u=new a.constructor(a.byteLength);return new Tu(u).set(new Tu(a)),u}function Am(a,u){var d=u?Bf(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function jm(a,u){if(a!==u){var d=a!==void 0,m=a===null,v=a==a,T=nr(a),P=u!==void 0,D=u===null,B=u==u,Y=nr(u);if(!D&&!Y&&!T&&a>u||T&&P&&B&&!D&&!Y||m&&P&&B||!d&&B||!v)return 1;if(!m&&!T&&!Y&&a1?d[v-1]:void 0,P=v>2?d[2]:void 0;for(T=a.length>3&&typeof T=="function"?(v--,T):void 0,P&&Nn(d[0],d[1],P)&&(T=v<3?void 0:T,v=1),u=$t(u);++m-1?v[T?u[P]:P]:void 0}}function Lm(a){return fo(function(u){var d=u.length,m=d,v=vr.prototype.thru;for(a&&u.reverse();m--;){var T=u[m];if(typeof T!="function")throw new mr(s);if(v&&!P&&Vu(T)=="wrapper")var P=new vr([],!0)}for(m=P?m:d;++m1&&Ee.reverse(),Q&&BD))return!1;var Y=T.get(a);if(Y&&T.get(u))return Y==u;var Q=-1,le=!0,Te=2&d?new mi:void 0;for(T.set(a,u),T.set(u,a);++Q-1&&a%1==0&&a1?"& ":"")+T[D],T=T.join(P>2?", ":" "),v.replace(gt,`{ +/* [wrapped with `+T+`] */ +`)}(m,function(v,T){return gr(f,function(P){var D="_."+P[0];T&P[1]&&!yu(v,D)&&v.push(D)}),v.sort()}(function(v){var T=v.match(Mt);return T?T[1].split(jt):[]}(m),d)))}function ev(a){var u=0,d=0;return function(){var m=db(),v=16-(m-d);if(d=m,v>0){if(++u>=800)return arguments[0]}else u=0;return a.apply(void 0,arguments)}}function Ku(a,u){var d=-1,m=a.length,v=m-1;for(u=u===void 0?m:u;++d1?a[u-1]:void 0;return d=typeof d=="function"?(a.pop(),d):void 0,uv(a,d)});function sv(a){var u=x(a);return u.__chain__=!0,u}function Qu(a,u){return u(a)}var tS=fo(function(a){var u=a.length,d=u?a[0]:0,m=this.__wrapped__,v=function(T){return Tf(T,a)};return!(u>1||this.__actions__.length)&&m instanceof it&&po(d)?((m=m.slice(d,+d+(u?1:0))).__actions__.push({func:Qu,args:[v],thisArg:void 0}),new vr(m,this.__chain__).thru(function(T){return u&&!T.length&&T.push(void 0),T})):this.thru(v)}),nS=Uu(function(a,u,d){St.call(a,d)?++a[d]:so(a,d,1)}),rS=Im(rv),oS=Im(ov);function cv(a,u){return(qe(a)?gr:Do)(a,Ne(u,3))}function fv(a,u){return(qe(a)?Wx:lm)(a,Ne(u,3))}var iS=Uu(function(a,u,d){St.call(a,d)?a[d].push(u):so(a,d,[u])}),aS=tt(function(a,u,d){var m=-1,v=typeof u=="function",T=Hn(a)?pe(a.length):[];return Do(a,function(P){T[++m]=v?Jn(u,P,d):nl(P,u,d)}),T}),lS=Uu(function(a,u,d){so(a,d,u)});function Yu(a,u){return(qe(a)?Wt:hm)(a,Ne(u,3))}var uS=Uu(function(a,u,d){a[d?0:1].push(u)},function(){return[[],[]]}),sS=tt(function(a,u){if(a==null)return[];var d=u.length;return d>1&&Nn(a,u[0],u[1])?u=[]:d>2&&Nn(u[0],u[1],u[2])&&(u=[u[0]]),ym(a,yn(u,1),[])}),Xu=lb||function(){return Qe.Date.now()};function dv(a,u,d){return u=d?void 0:u,co(a,128,void 0,void 0,void 0,void 0,u=a&&u==null?a.length:u)}function pv(a,u){var d;if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){return--a>0&&(d=u.apply(this,arguments)),a<=1&&(u=void 0),d}}var nd=tt(function(a,u,d){var m=1;if(d.length){var v=Ro(d,ea(nd));m|=32}return co(a,m,u,d,v)}),hv=tt(function(a,u,d){var m=3;if(d.length){var v=Ro(d,ea(hv));m|=32}return co(u,m,a,d,v)});function gv(a,u,d){var m,v,T,P,D,B,Y=0,Q=!1,le=!1,Te=!0;if(typeof a!="function")throw new mr(s);function Ce(Ue){var We=m,nt=v;return m=v=void 0,Y=Ue,P=a.apply(nt,We)}function Le(Ue){return Y=Ue,D=ll(fe,u),Q?Ce(Ue):P}function te(Ue){var We=Ue-B;return B===void 0||We>=u||We<0||le&&Ue-Y>=T}function fe(){var Ue=Xu();if(te(Ue))return ze(Ue);D=ll(fe,function(We){var nt=u-(We-B);return le?Sn(nt,T-(We-Y)):nt}(Ue))}function ze(Ue){return D=void 0,Te&&m?Ce(Ue):(m=v=void 0,P)}function Ee(){var Ue=Xu(),We=te(Ue);if(m=arguments,v=this,B=Ue,We){if(D===void 0)return Le(B);if(le)return Cm(D),D=ll(fe,u),Ce(B)}return D===void 0&&(D=ll(fe,u)),P}return u=xr(u)||0,Gt(d)&&(Q=!!d.leading,T=(le="maxWait"in d)?ln(xr(d.maxWait)||0,u):T,Te="trailing"in d?!!d.trailing:Te),Ee.cancel=function(){D!==void 0&&Cm(D),Y=0,m=B=v=D=void 0},Ee.flush=function(){return D===void 0?P:ze(Xu())},Ee}var cS=tt(function(a,u){return am(a,1,u)}),fS=tt(function(a,u,d){return am(a,xr(u)||0,d)});function Zu(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new mr(s);var d=function m(){var v=arguments,T=u?u.apply(this,v):v[0],P=m.cache;if(P.has(T))return P.get(T);var D=a.apply(this,v);return m.cache=P.set(T,D)||P,D};return d.cache=new(Zu.Cache||uo),d}function Ju(a){if(typeof a!="function")throw new mr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}Zu.Cache=uo;var dS=Rb(function(a,u){var d=(u=u.length==1&&qe(u[0])?Wt(u[0],er(Ne())):Wt(yn(u,1),er(Ne()))).length;return tt(function(m){for(var v=-1,T=Sn(m.length,d);++v=u}),_i=fm(function(){return arguments}())?fm:function(a){return Jt(a)&&St.call(a,"callee")&&!Xg.call(a,"callee")},qe=pe.isArray,mS=Va?er(Va):function(a){return Jt(a)&&$n(a)==ce};function Hn(a){return a!=null&&es(a.length)&&!ho(a)}function tn(a){return Jt(a)&&Hn(a)}var Fo=sb||hd,vS=qa?er(qa):function(a){return Jt(a)&&$n(a)==y};function od(a){if(!Jt(a))return!1;var u=$n(a);return u==b||u=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!ul(a)}function ho(a){if(!Gt(a))return!1;var u=$n(a);return u==E||u==O||u=="[object AsyncFunction]"||u=="[object Proxy]"}function vv(a){return typeof a=="number"&&a==Ye(a)}function es(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function Gt(a){var u=l(a);return a!=null&&(u=="object"||u=="function")}function Jt(a){return a!=null&&l(a)=="object"}var yv=Ig?er(Ig):function(a){return Jt(a)&&En(a)==_};function wv(a){return typeof a=="number"||Jt(a)&&$n(a)==w}function ul(a){if(!Jt(a)||$n(a)!=S)return!1;var u=Cu(a);if(u===null)return!0;var d=St.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&Su.call(d)==rb}var id=Lg?er(Lg):function(a){return Jt(a)&&$n(a)==k},_v=Mg?er(Mg):function(a){return Jt(a)&&En(a)==C};function ts(a){return typeof a=="string"||!qe(a)&&Jt(a)&&$n(a)==$}function nr(a){return l(a)=="symbol"||Jt(a)&&$n(a)==L}var ta=Fg?er(Fg):function(a){return Jt(a)&&es(a.length)&&!!ht[$n(a)]},yS=Gu($f),wS=Gu(function(a,u){return a<=u});function xv(a){if(!a)return[];if(Hn(a))return ts(a)?Pr(a):Bn(a);if(Qa&&a[Qa])return function(d){for(var m,v=[];!(m=d.next()).done;)v.push(m.value);return v}(a[Qa]());var u=En(a);return(u==_?_f:u==C?_u:na)(a)}function go(a){return a?(a=xr(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ye(a){var u=go(a),d=u%1;return u==u?d?u-d:u:0}function bv(a){return a?vi(Ye(a),0,4294967295):0}function xr(a){if(typeof a=="number")return a;if(nr(a))return NaN;if(Gt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Gt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=a.replace(rt,"");var d=Oe.test(a);return d||Rt.test(a)?ae(a.slice(2),d?2:8):se.test(a)?NaN:+a}function Sv(a){return Kr(a,Wn(a))}function wt(a){return a==null?"":tr(a)}var _S=Zi(function(a,u){if(al(u)||Hn(u))Kr(u,hn(u),a);else for(var d in u)St.call(u,d)&&el(a,d,u[d])}),Ev=Zi(function(a,u){Kr(u,Wn(u),a)}),ns=Zi(function(a,u,d,m){Kr(u,Wn(u),a,m)}),xS=Zi(function(a,u,d,m){Kr(u,hn(u),a,m)}),bS=fo(Tf),SS=tt(function(a,u){a=$t(a);var d=-1,m=u.length,v=m>2?u[2]:void 0;for(v&&Nn(u[0],u[1],v)&&(m=1);++d1),T}),Kr(a,Vf(a),d),m&&(d=yr(d,7,Nb));for(var v=u.length;v--;)Mf(d,u[v]);return d}),jS=fo(function(a,u){return a==null?{}:function(d,m){return wm(d,m,function(v,T){return ld(d,T)})}(a,u)});function Tv(a,u){if(a==null)return{};var d=Wt(Vf(a),function(m){return[m]});return u=Ne(u),wm(a,d,function(m,v){return u(m,v[0])})}var Cv=Um(hn),Ov=Um(Wn);function na(a){return a==null?[]:wf(a,hn(a))}var PS=Ji(function(a,u,d){return u=u.toLowerCase(),a+(d?Av(u):u)});function Av(a){return ud(wt(a).toLowerCase())}function jv(a){return(a=wt(a))&&a.replace(Pn,Qx).replace(pr,"")}var RS=Ji(function(a,u,d){return a+(d?"-":"")+u.toLowerCase()}),$S=Ji(function(a,u,d){return a+(d?" ":"")+u.toLowerCase()}),NS=Dm("toLowerCase"),DS=Ji(function(a,u,d){return a+(d?"_":"")+u.toLowerCase()}),IS=Ji(function(a,u,d){return a+(d?" ":"")+ud(u)}),LS=Ji(function(a,u,d){return a+(d?" ":"")+u.toUpperCase()}),ud=Dm("toUpperCase");function Pv(a,u,d){return a=wt(a),(u=d?void 0:u)===void 0?function(m){return Wr.test(m)}(a)?function(m){return m.match(vn)||[]}(a):function(m){return m.match(yt)||[]}(a):a.match(u)||[]}var Rv=tt(function(a,u){try{return Jn(a,void 0,u)}catch(d){return od(d)?d:new ft(d)}}),MS=fo(function(a,u){return gr(u,function(d){d=Qr(d),so(a,d,nd(a[d],a))}),a});function sd(a){return function(){return a}}var FS=Lm(),zS=Lm(!0);function Gn(a){return a}function cd(a){return pm(typeof a=="function"?a:yr(a,1))}var US=tt(function(a,u){return function(d){return nl(d,a,u)}}),BS=tt(function(a,u){return function(d){return nl(a,d,u)}});function fd(a,u,d){var m=hn(u),v=Lu(u,m);d!=null||Gt(u)&&(v.length||!m.length)||(d=u,u=a,a=this,v=Lu(u,hn(u)));var T=!(Gt(d)&&"chain"in d&&!d.chain),P=ho(a);return gr(v,function(D){var B=u[D];a[D]=B,P&&(a.prototype[D]=function(){var Y=this.__chain__;if(T||Y){var Q=a(this.__wrapped__),le=Q.__actions__=Bn(this.__actions__);return le.push({func:B,args:arguments,thisArg:a}),Q.__chain__=Y,Q}return B.apply(a,Po([this.value()],arguments))})}),a}function dd(){}var HS=Hf(Wt),WS=Hf(zg),GS=Hf(hf);function $v(a){return Yf(a)?gf(Qr(a)):function(u){return function(d){return Xi(d,u)}}(a)}var VS=Fm(),qS=Fm(!0);function pd(){return[]}function hd(){return!1}var KS=Hu(function(a,u){return a+u},0),QS=Wf("ceil"),YS=Hu(function(a,u){return a/u},1),XS=Wf("floor"),gd,ZS=Hu(function(a,u){return a*u},1),JS=Wf("round"),eE=Hu(function(a,u){return a-u},0);return x.after=function(a,u){if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){if(--a<1)return u.apply(this,arguments)}},x.ary=dv,x.assign=_S,x.assignIn=Ev,x.assignInWith=ns,x.assignWith=xS,x.at=bS,x.before=pv,x.bind=nd,x.bindAll=MS,x.bindKey=hv,x.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return qe(a)?a:[a]},x.chain=sv,x.chunk=function(a,u,d){u=(d?Nn(a,u,d):u===void 0)?1:ln(Ye(u),0);var m=a==null?0:a.length;if(!m||u<1)return[];for(var v=0,T=0,P=pe(ju(m/u));vY?0:Y+D),(B=B===void 0||B>Y?Y:Ye(B))<0&&(B+=Y),B=D>B?0:bv(B);D>>0)?(a=wt(a))&&(typeof u=="string"||u!=null&&!id(u))&&!(u=tr(u))&&Gi(a)?Mo(Pr(a),0,d):a.split(u,d):[]},x.spread=function(a,u){if(typeof a!="function")throw new mr(s);return u=u==null?0:ln(Ye(u),0),tt(function(d){var m=d[u],v=Mo(d,0,u);return m&&Po(v,m),Jn(a,this,v)})},x.tail=function(a){var u=a==null?0:a.length;return u?wr(a,1,u):[]},x.take=function(a,u,d){return a&&a.length?wr(a,0,(u=d||u===void 0?1:Ye(u))<0?0:u):[]},x.takeRight=function(a,u,d){var m=a==null?0:a.length;return m?wr(a,(u=m-(u=d||u===void 0?1:Ye(u)))<0?0:u,m):[]},x.takeRightWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3),!1,!0):[]},x.takeWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3)):[]},x.tap=function(a,u){return u(a),a},x.throttle=function(a,u,d){var m=!0,v=!0;if(typeof a!="function")throw new mr(s);return Gt(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),gv(a,u,{leading:m,maxWait:u,trailing:v})},x.thru=Qu,x.toArray=xv,x.toPairs=Cv,x.toPairsIn=Ov,x.toPath=function(a){return qe(a)?Wt(a,Qr):nr(a)?[a]:Bn(tv(wt(a)))},x.toPlainObject=Sv,x.transform=function(a,u,d){var m=qe(a),v=m||Fo(a)||ta(a);if(u=Ne(u,4),d==null){var T=a&&a.constructor;d=v?m?new T:[]:Gt(a)&&ho(T)?Yi(Cu(a)):{}}return(v?gr:qr)(a,function(P,D,B){return u(d,P,D,B)}),d},x.unary=function(a){return dv(a,1)},x.union=Vb,x.unionBy=qb,x.unionWith=Kb,x.uniq=function(a){return a&&a.length?Io(a):[]},x.uniqBy=function(a,u){return a&&a.length?Io(a,Ne(u,2)):[]},x.uniqWith=function(a,u){return u=typeof u=="function"?u:void 0,a&&a.length?Io(a,void 0,u):[]},x.unset=function(a,u){return a==null||Mf(a,u)},x.unzip=td,x.unzipWith=uv,x.update=function(a,u,d){return a==null?a:Em(a,u,Uf(d))},x.updateWith=function(a,u,d,m){return m=typeof m=="function"?m:void 0,a==null?a:Em(a,u,Uf(d),m)},x.values=na,x.valuesIn=function(a){return a==null?[]:wf(a,Wn(a))},x.without=Qb,x.words=Pv,x.wrap=function(a,u){return rd(Uf(u),a)},x.xor=Yb,x.xorBy=Xb,x.xorWith=Zb,x.zip=Jb,x.zipObject=function(a,u){return Tm(a||[],u||[],el)},x.zipObjectDeep=function(a,u){return Tm(a||[],u||[],ol)},x.zipWith=eS,x.entries=Cv,x.entriesIn=Ov,x.extend=Ev,x.extendWith=ns,fd(x,x),x.add=KS,x.attempt=Rv,x.camelCase=PS,x.capitalize=Av,x.ceil=QS,x.clamp=function(a,u,d){return d===void 0&&(d=u,u=void 0),d!==void 0&&(d=(d=xr(d))==d?d:0),u!==void 0&&(u=(u=xr(u))==u?u:0),vi(xr(a),u,d)},x.clone=function(a){return yr(a,4)},x.cloneDeep=function(a){return yr(a,5)},x.cloneDeepWith=function(a,u){return yr(a,5,u=typeof u=="function"?u:void 0)},x.cloneWith=function(a,u){return yr(a,4,u=typeof u=="function"?u:void 0)},x.conformsTo=function(a,u){return u==null||im(a,u,hn(u))},x.deburr=jv,x.defaultTo=function(a,u){return a==null||a!=a?u:a},x.divide=YS,x.endsWith=function(a,u,d){a=wt(a),u=tr(u);var m=a.length,v=d=d===void 0?m:vi(Ye(d),0,m);return(d-=u.length)>=0&&a.slice(d,v)==u},x.eq=$r,x.escape=function(a){return(a=wt(a))&&ie.test(a)?a.replace(oe,Yx):a},x.escapeRegExp=function(a){return(a=wt(a))&&Xe.test(a)?a.replace(xe,"\\$&"):a},x.every=function(a,u,d){var m=qe(a)?zg:Sb;return d&&Nn(a,u,d)&&(u=void 0),m(a,Ne(u,3))},x.find=rS,x.findIndex=rv,x.findKey=function(a,u){return Ug(a,Ne(u,3),qr)},x.findLast=oS,x.findLastIndex=ov,x.findLastKey=function(a,u){return Ug(a,Ne(u,3),Of)},x.floor=XS,x.forEach=cv,x.forEachRight=fv,x.forIn=function(a,u){return a==null?a:Cf(a,Ne(u,3),Wn)},x.forInRight=function(a,u){return a==null?a:sm(a,Ne(u,3),Wn)},x.forOwn=function(a,u){return a&&qr(a,Ne(u,3))},x.forOwnRight=function(a,u){return a&&Of(a,Ne(u,3))},x.get=ad,x.gt=hS,x.gte=gS,x.has=function(a,u){return a!=null&&Vm(a,u,Eb)},x.hasIn=ld,x.head=av,x.identity=Gn,x.includes=function(a,u,d,m){a=Hn(a)?a:na(a),d=d&&!m?Ye(d):0;var v=a.length;return d<0&&(d=ln(v+d,0)),ts(a)?d<=v&&a.indexOf(u,d)>-1:!!v&&Wi(a,u,d)>-1},x.indexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=d==null?0:Ye(d);return v<0&&(v=ln(m+v,0)),Wi(a,u,v)},x.inRange=function(a,u,d){return u=go(u),d===void 0?(d=u,u=0):d=go(d),function(m,v,T){return m>=Sn(v,T)&&m=-9007199254740991&&a<=9007199254740991},x.isSet=_v,x.isString=ts,x.isSymbol=nr,x.isTypedArray=ta,x.isUndefined=function(a){return a===void 0},x.isWeakMap=function(a){return Jt(a)&&En(a)==U},x.isWeakSet=function(a){return Jt(a)&&$n(a)=="[object WeakSet]"},x.join=function(a,u){return a==null?"":cb.call(a,u)},x.kebabCase=RS,x.last=_r,x.lastIndexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=m;return d!==void 0&&(v=(v=Ye(d))<0?ln(m+v,0):Sn(v,m-1)),u==u?function(T,P,D){for(var B=D+1;B--;)if(T[B]===P)return B;return B}(a,u,v):wu(a,Bg,v,!0)},x.lowerCase=$S,x.lowerFirst=NS,x.lt=yS,x.lte=wS,x.max=function(a){return a&&a.length?Iu(a,Gn,Af):void 0},x.maxBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),Af):void 0},x.mean=function(a){return Hg(a,Gn)},x.meanBy=function(a,u){return Hg(a,Ne(u,2))},x.min=function(a){return a&&a.length?Iu(a,Gn,$f):void 0},x.minBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),$f):void 0},x.stubArray=pd,x.stubFalse=hd,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=ZS,x.nth=function(a,u){return a&&a.length?vm(a,Ye(u)):void 0},x.noConflict=function(){return Qe._===this&&(Qe._=ob),this},x.noop=dd,x.now=Xu,x.pad=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;if(!u||m>=u)return a;var v=(u-m)/2;return Wu(Pu(v),d)+a+Wu(ju(v),d)},x.padEnd=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;return u&&mu){var m=a;a=u,u=m}if(d||a%1||u%1){var v=em();return Sn(a+v*(u-a+F("1e-"+((v+"").length-1))),u)}return Df(a,u)},x.reduce=function(a,u,d){var m=qe(a)?pf:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,Do)},x.reduceRight=function(a,u,d){var m=qe(a)?Gx:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,lm)},x.repeat=function(a,u,d){return u=(d?Nn(a,u,d):u===void 0)?1:Ye(u),If(wt(a),u)},x.replace=function(){var a=arguments,u=wt(a[0]);return a.length<3?u:u.replace(a[1],a[2])},x.result=function(a,u,d){var m=-1,v=(u=Lo(u,a)).length;for(v||(v=1,a=void 0);++m9007199254740991)return[];var d=4294967295,m=Sn(a,4294967295);a-=4294967295;for(var v=yf(m,u=Ne(u));++d=T)return a;var D=d-Vi(m);if(D<1)return m;var B=P?Mo(P,0,D).join(""):a.slice(0,D);if(v===void 0)return B+m;if(P&&(D+=B.length-D),id(v)){if(a.slice(D).search(v)){var Y,Q=B;for(v.global||(v=xf(v.source,wt(Bt.exec(v))+"g")),v.lastIndex=0;Y=v.exec(Q);)var le=Y.index;B=B.slice(0,le===void 0?D:le)}}else if(a.indexOf(tr(v),D)!=D){var Te=B.lastIndexOf(v);Te>-1&&(B=B.slice(0,Te))}return B+m},x.unescape=function(a){return(a=wt(a))&&Z.test(a)?a.replace(G,Jx):a},x.uniqueId=function(a){var u=++nb;return wt(a)+u},x.upperCase=LS,x.upperFirst=ud,x.each=cv,x.eachRight=fv,x.first=av,fd(x,(gd={},qr(x,function(a,u){St.call(x.prototype,u)||(gd[u]=a)}),gd),{chain:!1}),x.VERSION="4.17.15",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){x[a].placeholder=x}),gr(["drop","take"],function(a,u){it.prototype[a]=function(d){d=d===void 0?1:ln(Ye(d),0);var m=this.__filtered__&&!u?new it(this):this.clone();return m.__filtered__?m.__takeCount__=Sn(d,m.__takeCount__):m.__views__.push({size:Sn(d,4294967295),type:a+(m.__dir__<0?"Right":"")}),m},it.prototype[a+"Right"]=function(d){return this.reverse()[a](d).reverse()}}),gr(["filter","map","takeWhile"],function(a,u){var d=u+1,m=d==1||d==3;it.prototype[a]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ne(v,3),type:d}),T.__filtered__=T.__filtered__||m,T}}),gr(["head","last"],function(a,u){var d="take"+(u?"Right":"");it.prototype[a]=function(){return this[d](1).value()[0]}}),gr(["initial","tail"],function(a,u){var d="drop"+(u?"":"Right");it.prototype[a]=function(){return this.__filtered__?new it(this):this[d](1)}}),it.prototype.compact=function(){return this.filter(Gn)},it.prototype.find=function(a){return this.filter(a).head()},it.prototype.findLast=function(a){return this.reverse().find(a)},it.prototype.invokeMap=tt(function(a,u){return typeof a=="function"?new it(this):this.map(function(d){return nl(d,a,u)})}),it.prototype.reject=function(a){return this.filter(Ju(Ne(a)))},it.prototype.slice=function(a,u){a=Ye(a);var d=this;return d.__filtered__&&(a>0||u<0)?new it(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),u!==void 0&&(d=(u=Ye(u))<0?d.dropRight(-u):d.take(u-a)),d)},it.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},it.prototype.toArray=function(){return this.take(4294967295)},qr(it.prototype,function(a,u){var d=/^(?:filter|find|map|reject)|While$/.test(u),m=/^(?:head|last)$/.test(u),v=x[m?"take"+(u=="last"?"Right":""):u],T=m||/^find/.test(u);v&&(x.prototype[u]=function(){var P=this.__wrapped__,D=m?[1]:arguments,B=P instanceof it,Y=D[0],Q=B||qe(P),le=function(ze){var Ee=v.apply(x,Po([ze],D));return m&&Te?Ee[0]:Ee};Q&&d&&typeof Y=="function"&&Y.length!=1&&(B=Q=!1);var Te=this.__chain__,Ce=!!this.__actions__.length,Le=T&&!Te,te=B&&!Ce;if(!T&&Q){P=te?P:new it(this);var fe=a.apply(P,D);return fe.__actions__.push({func:Qu,args:[le],thisArg:void 0}),new vr(fe,Te)}return Le&&te?a.apply(this,D):(fe=this.thru(le),Le?m?fe.value()[0]:fe.value():fe)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var u=xu[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);x.prototype[a]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return u.apply(qe(T)?T:[],v)}return this[d](function(P){return u.apply(qe(P)?P:[],v)})}}),qr(it.prototype,function(a,u){var d=x[u];if(d){var m=d.name+"";St.call(Qi,m)||(Qi[m]=[]),Qi[m].push({name:u,func:d})}}),Qi[Bu(void 0,2).name]=[{name:"wrapper",func:void 0}],it.prototype.clone=function(){var a=new it(this.__wrapped__);return a.__actions__=Bn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Bn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Bn(this.__views__),a},it.prototype.reverse=function(){if(this.__filtered__){var a=new it(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},it.prototype.value=function(){var a=this.__wrapped__.value(),u=this.__dir__,d=qe(a),m=u<0,v=d?a.length:0,T=function(nt,Ae,Me){for(var un=-1,Dn=Me.length;++un=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},x.prototype.plant=function(a){for(var u,d=this;d instanceof Nu;){var m=nv(d);m.__index__=0,m.__values__=void 0,u?v.__wrapped__=m:u=m;var v=m;d=d.__wrapped__}return v.__wrapped__=a,u},x.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof it){var u=a;return this.__actions__.length&&(u=new it(this)),(u=u.reverse()).__actions__.push({func:Qu,args:[ed],thisArg:void 0}),new vr(u,this.__chain__)}return this.thru(ed)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return km(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Qa&&(x.prototype[Qa]=function(){return this}),x}();l(n(46))=="object"&&n(46)?(Qe._=$o,(i=(function(){return $o}).call(t,n,t,o))===void 0||(o.exports=i)):Zt?((Zt.exports=$o)._=$o,rn._=$o):Qe._=$o}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),l=n(118),s=n(124),c=n(127),f=n(128),h=n(129),p=n(130),g=n(59),y=n(131),b=n(10),E=n(135),O=n(136),_=n(141),w=n(0),S=n(12),k=n(142),C=n(5),$=n(144),L=n(6),U={};U["[object Arguments]"]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U["[object Object]"]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U["[object Function]"]=U["[object WeakMap]"]=!1,e.exports=function ce(z,K,W,ge,he,be){var De,Be=1&K,X=2&K,ne=4&K;if(W&&(De=he?W(z,ge,he,be):W(z)),De!==void 0)return De;if(!C(z))return z;var _e=w(z);if(_e){if(De=E(z),!Be)return f(z,De)}else{var N=b(z),G=N=="[object Function]"||N=="[object GeneratorFunction]";if(S(z))return c(z,Be);if(N=="[object Object]"||N=="[object Arguments]"||G&&!he){if(De=X||G?{}:_(z),!Be)return X?p(z,s(De,z)):h(z,l(De,z))}else{if(!U[N])return he?z:{};De=O(z,N,Be)}}be||(be=new r);var oe=be.get(z);if(oe)return oe;be.set(z,De),$(z)?z.forEach(function(re){De.add(ce(re,K,W,re,z,be))}):k(z)&&z.forEach(function(re,Se){De.set(Se,ce(re,K,W,Se,z,be))});var Z=ne?X?y:g:X?keysIn:L,ie=_e?void 0:Z(z);return o(ie||z,function(re,Se){ie&&(re=z[Se=re]),i(De,Se,ce(re,K,W,Se,z,be))}),De}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(i){var l=this.__data__,s=r(l,i);return!(s<0)&&(s==l.length-1?l.pop():o.call(l,s,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var i=this.__data__,l=r(i,o);return l<0?void 0:i[l][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,i){var l=this.__data__,s=r(l,o);return s<0?(++this.size,l.push([o,i])):l[s][1]=i,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(l,s){var c=this.__data__;if(c instanceof r){var f=c.__data__;if(!o||f.length<199)return f.push([l,s]),this.size=++c.size,this;c=this.__data__=new i(f)}return c.set(l,s),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),l=n(48),s=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!i(y)||o(y))&&(r(y)?g:s).test(l(y))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=function(c){var f=i.call(c,s),h=c[s];try{c[s]=void 0;var p=!0}catch{}var g=l.call(c);return p&&(f?c[s]=h:delete c[s]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!i&&i in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),l=n(111),s=n(112);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h0&&c(y)?s>1?i(y,s-1,c,f,h):r(h,y):f||(h[h.length]=y)}return h}},function(e,t,n){var r=n(9),o=n(21),i=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(s){return i(s)||o(s)||!!(l&&s&&s[l])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(l,s){return i(o(l,s,r),l+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(i,l,s){return l=o(l===void 0?i.length-1:l,0),function(){for(var c=arguments,f=-1,h=o(c.length-l,0),p=Array(h);++f0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),l=n(69),s=n(207),c=n(42);e.exports=function(f,h,p){var g=-1,y=o,b=f.length,E=!0,O=[],_=O;if(p)E=!1,y=i;else if(b>=200){var w=h?null:s(f);if(w)return c(w);E=!1,y=l,_=new r}else _=h?[]:O;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(l,s,c){return s==s?i(l,s,c):r(l,o,c)}},function(e,t){e.exports=function(n,r,o,i){for(var l=n.length,s=o+(i?1:-1);i?s--:++s1||l.length===1&&i.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(i,l,s){return function(c,f,h){var p={},g=c.nodes();return g.forEach(function(y){p[y]={},p[y][y]={distance:0},g.forEach(function(b){y!==b&&(p[y][b]={distance:Number.POSITIVE_INFINITY})}),h(y).forEach(function(b){var E=b.v===y?b.w:b.v,O=f(b);p[y][E]={distance:O,predecessor:y}})}),g.forEach(function(y){var b=p[y];g.forEach(function(E){var O=p[E];g.forEach(function(_){var w=O[y],S=b[_],k=O[_],C=w.distance+S.distance;C0;){if(c=p.removeMin(),r.has(h,c))f.setEdge(c,h[c]);else{if(y)throw new Error("Input graph is not connected: "+l);y=!0}l.nodeEdges(c).forEach(g)}return f}},function(e,t,n){(function(r){function o(s,c){for(var f=0,h=s.length-1;h>=0;h--){var p=s[h];p==="."?s.splice(h,1):p===".."?(s.splice(h,1),f++):f&&(s.splice(h,1),f--)}if(c)for(;f--;f)s.unshift("..");return s}function i(s,c){if(s.filter)return s.filter(c);for(var f=[],h=0;h=-1&&!c;f--){var h=f>=0?arguments[f]:r.cwd();if(typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");h&&(s=h+"/"+s,c=h.charAt(0)==="/")}return(c?"/":"")+(s=o(i(s.split("/"),function(p){return!!p}),!c).join("/"))||"."},t.normalize=function(s){var c=t.isAbsolute(s),f=l(s,-1)==="/";return(s=o(i(s.split("/"),function(h){return!!h}),!c).join("/"))||c||(s="."),s&&f&&(s+="/"),(c?"/":"")+s},t.isAbsolute=function(s){return s.charAt(0)==="/"},t.join=function(){var s=Array.prototype.slice.call(arguments,0);return t.normalize(i(s,function(c,f){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(s,c){function f(O){for(var _=0;_=0&&O[w]==="";w--);return _>w?[]:O.slice(_,w-_+1)}s=t.resolve(s).substr(1),c=t.resolve(c).substr(1);for(var h=f(s.split("/")),p=f(c.split("/")),g=Math.min(h.length,p.length),y=g,b=0;b=1;--g)if((c=s.charCodeAt(g))===47){if(!p){h=g;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"/":s.slice(0,h)},t.basename=function(s,c){var f=function(h){typeof h!="string"&&(h+="");var p,g=0,y=-1,b=!0;for(p=h.length-1;p>=0;--p)if(h.charCodeAt(p)===47){if(!b){g=p+1;break}}else y===-1&&(b=!1,y=p+1);return y===-1?"":h.slice(g,y)}(s);return c&&f.substr(-1*c.length)===c&&(f=f.substr(0,f.length-c.length)),f},t.extname=function(s){typeof s!="string"&&(s+="");for(var c=-1,f=0,h=-1,p=!0,g=0,y=s.length-1;y>=0;--y){var b=s.charCodeAt(y);if(b!==47)h===-1&&(p=!1,h=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){f=y+1;break}}return c===-1||h===-1||g===0||g===1&&c===h-1&&c===f+1?"":s.slice(c,h)};var l="ab".substr(-1)==="b"?function(s,c,f){return s.substr(c,f)}:function(s,c,f){return c<0&&(c=s.length+c),s.substr(c,f)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var o={file:n(225),http:n(81),https:n(81)},i=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,s){var c=Promise.resolve();return s===void 0&&(s={}),c=(c=c.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(s!==void 0){if(r(s)!=="object")throw new TypeError("options must be an object");if(s.processContent!==void 0&&typeof s.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(f,h){(function(p){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(p),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=i}return y})(l).load(l,s||{},function(p,g){p?h(p):f(g)})})}).then(function(f){return s.processContent?new Promise(function(h,p){r(f)!=="object"&&(f={text:f}),f.location=l,s.processContent(f,function(g,y){g?p(g):h(y)})}):r(f)==="object"?f.text:f})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(k){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),l=n(228),s=n(82),c=n(229),f=n(231);function h(){}var p=t=e.exports=function(k,C){return typeof C=="function"?new t.Request("GET",k).end(C):arguments.length==1?new t.Request("GET",k):new t.Request(k,C)};t.Request=w,p.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(k){return k.trim()}:function(k){return k.replace(/(^\s*|\s*$)/g,"")};function y(k){if(!s(k))return k;var C=[];for(var $ in k)b(C,$,k[$]);return C.join("&")}function b(k,C,$){if($!=null)if(Array.isArray($))$.forEach(function(U){b(k,C,U)});else if(s($))for(var L in $)b(k,C+"["+L+"]",$[L]);else k.push(encodeURIComponent(C)+"="+encodeURIComponent($));else $===null&&k.push(encodeURIComponent(C))}function E(k){for(var C,$,L={},U=k.split("&"),ce=0,z=U.length;ce=2&&k._responseTimeoutTimer&&clearTimeout(k._responseTimeoutTimer),K==4){var W;try{W=C.status}catch{W=0}if(!W)return k.timedout||k._aborted?void 0:k.crossDomainError();k.emit("end")}};var L=function(K,W){W.total>0&&(W.percent=W.loaded/W.total*100),W.direction=K,k.emit("progress",W)};if(this.hasListeners("progress"))try{C.onprogress=L.bind(null,"download"),C.upload&&(C.upload.onprogress=L.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(K){return this.callback(K)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof $!="string"&&!this._isHost($)){var U=this._header["content-type"],ce=this._serializer||p.serialize[U?U.split(";")[0]:""];!ce&&O(U)&&(ce=p.serialize["application/json"]),ce&&($=ce($))}for(var z in this.header)this.header[z]!=null&&this.header.hasOwnProperty(z)&&C.setRequestHeader(z,this.header[z]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send($!==void 0?$:null),this},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(k){f.prototype[k.toLowerCase()]=function(C,$){var L=new p.Request(k,C);return this._setDefaults(L),$&&L.end($),L}}),f.prototype.del=f.prototype.delete,p.get=function(k,C,$){var L=p("GET",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.head=function(k,C,$){var L=p("HEAD",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.options=function(k,C,$){var L=p("OPTIONS",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.del=S,p.delete=S,p.patch=function(k,C,$){var L=p("PATCH",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.post=function(k,C,$){var L=p("POST",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.put=function(k,C,$){var L=p("PUT",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L}},function(e,t,n){function r(o){if(o)return function(i){for(var l in r.prototype)i[l]=r.prototype[l];return i}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(i),this},r.prototype.once=function(o,i){function l(){this.off(o,l),i.apply(this,arguments)}return l.fn=i,this.on(o,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,s=this._callbacks["$"+o];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var f=this._retryCallback(s,c);if(f===!0)return!0;if(f===!1)return!1}catch(h){console.error(h)}return!!(c&&c.status&&c.status>=500&&c.status!=501||s&&(s.code&&~l.indexOf(s.code)||s.timeout&&s.code=="ECONNABORTED"||s.crossDomain))},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(s,c){if(!this._fullfilledPromise){var f=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(h,p){f.end(function(g,y){g?p(g):h(y)})})}return this._fullfilledPromise.then(s,c)},i.prototype.catch=function(s){return this.then(void 0,s)},i.prototype.use=function(s){return s(this),this},i.prototype.ok=function(s){if(typeof s!="function")throw Error("Callback required");return this._okCallback=s,this},i.prototype._isResponseOK=function(s){return!!s&&(this._okCallback?this._okCallback(s):s.status>=200&&s.status<300)},i.prototype.get=function(s){return this._header[s.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(s,c){if(o(s)){for(var f in s)this.set(f,s[f]);return this}return this._header[s.toLowerCase()]=c,this.header[s]=c,this},i.prototype.unset=function(s){return delete this._header[s.toLowerCase()],delete this.header[s],this},i.prototype.field=function(s,c){if(s==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(s)){for(var f in s)this.field(f,s[f]);return this}if(Array.isArray(c)){for(var h in c)this.field(s,c[h]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(s,c),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(s,c,f,h){switch(f.type){case"basic":this.set("Authorization","Basic "+h(s+":"+c));break;case"auto":this.username=s,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+s)}return this},i.prototype.withCredentials=function(s){return s==null&&(s=!0),this._withCredentials=s,this},i.prototype.redirects=function(s){return this._maxRedirects=s,this},i.prototype.maxResponseSize=function(s){if(typeof s!="number")throw TypeError("Invalid argument");return this._maxResponseSize=s,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(s){var c=o(s),f=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(s)?this._data=[]:this._isHost(s)||(this._data={});else if(s&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var h in s)this._data[h]=s[h];else typeof s=="string"?(f||this.type("form"),f=this._header["content-type"],this._data=f=="application/x-www-form-urlencoded"?this._data?this._data+"&"+s:s:(this._data||"")+s):this._data=s;return!c||this._isHost(s)||f||this.type("json"),this},i.prototype.sortQuery=function(s){return this._sort=s===void 0||s,this},i.prototype._finalizeQueryString=function(){var s=this._query.join("&");if(s&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+s),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var f=this.url.substring(c+1).split("&");typeof this._sort=="function"?f.sort(this._sort):f.sort(),this.url=this.url.substring(0,c)+"?"+f.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(s,c,f){if(!this._aborted){var h=new Error(s+c+"ms exceeded");h.timeout=c,h.code="ECONNABORTED",h.errno=f,this.timedout=!0,this.abort(),this.callback(h)}},i.prototype._setTimeouts=function(){var s=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){s._timeoutError("Timeout of ",s._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){s._timeoutError("Response timeout of ",s._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(i){if(i)return function(l){for(var s in o.prototype)l[s]=o.prototype[s];return l}(i)}e.exports=o,o.prototype.get=function(i){return this.header[i.toLowerCase()]},o.prototype._setHeaderProperties=function(i){var l=i["content-type"]||"";this.type=r.type(l);var s=r.params(l);for(var c in s)this[c]=s[c];this.links={};try{i.link&&(this.links=r.parseLinks(i.link))}catch{}},o.prototype._setStatusProperties=function(i){var l=i/100|0;this.status=this.statusCode=i,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=i==201,this.accepted=i==202,this.noContent=i==204,this.badRequest=i==400,this.unauthorized=i==401,this.notAcceptable=i==406,this.forbidden=i==403,this.notFound=i==404,this.unprocessableEntity=i==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,i){var l=i.split(/ *= */),s=l.shift(),c=l.shift();return s&&c&&(o[s]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,i){var l=i.split(/ *; */),s=l[0].slice(1,-1);return o[l[1].split(/ *= */)[1].slice(1,-1)]=s,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,i=Function.prototype.apply;function l(s,c){this._id=s,this._clearFn=c}t.setTimeout=function(){return new l(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new l(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(s){s&&s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(s,c){clearTimeout(s._idleTimeoutId),s._idleTimeout=c},t.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},t._unrefActive=t.active=function(s){clearTimeout(s._idleTimeoutId);var c=s._idleTimeout;c>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(i,l){if(!i.setImmediate){var s,c,f,h,p,g=1,y={},b=!1,E=i.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(i);O=O&&O.setTimeout?O:i,{}.toString.call(i.process)==="[object process]"?s=function(S){o.nextTick(function(){w(S)})}:function(){if(i.postMessage&&!i.importScripts){var S=!0,k=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=k,S}}()?(h="setImmediate$"+Math.random()+"$",p=function(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&w(+S.data.slice(h.length))},i.addEventListener?i.addEventListener("message",p,!1):i.attachEvent("onmessage",p),s=function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},s=function(S){f.port2.postMessage(S)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,s=function(S){var k=E.createElement("script");k.onreadystatechange=function(){w(S),k.onreadystatechange=null,c.removeChild(k),k=null},c.appendChild(k)}):s=function(S){setTimeout(w,0,S)},O.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(i,l){return Object.prototype.hasOwnProperty.call(i,l)}e.exports=function(i,l,s,c){l=l||"&",s=s||"=";var f={};if(typeof i!="string"||i.length===0)return f;var h=/\+/g;i=i.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var g=i.length;p>0&&g>p&&(g=p);for(var y=0;y=0?(b=w.substr(0,S),E=w.substr(S+1)):(b=w,E=""),O=decodeURIComponent(b),_=decodeURIComponent(E),r(f,O)?o(f[O])?f[O].push(_):f[O]=[f[O],_]:f[O]=_}return f};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,f,h,p){return f=f||"&",h=h||"=",c===null&&(c=void 0),r(c)==="object"?l(s(c),function(g){var y=encodeURIComponent(o(g))+h;return i(c[g])?l(c[g],function(b){return y+encodeURIComponent(o(b))}).join(f):y+encodeURIComponent(o(c[g]))}).join(f):p?encodeURIComponent(o(p))+h+encodeURIComponent(o(c)):""};var i=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function l(c,f){if(c.map)return c.map(f);for(var h=[],p=0;p1){R[0]=R[0].slice(0,-1);for(var q=R.length-1,V=1;V= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,L=String.fromCharCode;function U(A){throw new RangeError(C[A])}function ce(A,R){var I=A.split("@"),q="";I.length>1&&(q=I[0]+"@",A=I[1]);var V=function(de,ve){for(var Ge=[],st=de.length;st--;)Ge[st]=ve(de[st]);return Ge}((A=A.replace(k,".")).split("."),R).join(".");return q+V}function z(A){for(var R=[],I=0,q=A.length;I=55296&&V<=56319&&I>1,A+=$(A/R);A>455;q+=36)A=$(A/35);return $(q+36*A/(A+38))},ge=function(A){var R,I=[],q=A.length,V=0,de=128,ve=72,Ge=A.lastIndexOf("-");Ge<0&&(Ge=0);for(var st=0;st=128&&U("not-basic"),I.push(A.charCodeAt(st));for(var Re=Ge>0?Ge+1:0;Re=q&&U("invalid-input");var ut=(R=A.charCodeAt(Re++))-48<10?R-22:R-65<26?R-65:R-97<26?R-97:36;(ut>=36||ut>$((_-V)/lt))&&U("overflow"),V+=ut*lt;var Ht=Ft<=ve?1:Ft>=ve+26?26:Ft-ve;if(ut$(_/bt)&&U("overflow"),lt*=bt}var Tt=I.length+1;ve=W(V-ct,Tt,ct==0),$(V/Tt)>_-de&&U("overflow"),de+=$(V/Tt),V%=Tt,I.splice(V++,0,de)}return String.fromCodePoint.apply(String,I)},he=function(A){var R=[],I=(A=z(A)).length,q=128,V=0,de=72,ve=!0,Ge=!1,st=void 0;try{for(var Re,ct=A[Symbol.iterator]();!(ve=(Re=ct.next()).done);ve=!0){var lt=Re.value;lt<128&&R.push(L(lt))}}catch(Qe){Ge=!0,st=Qe}finally{try{!ve&&ct.return&&ct.return()}finally{if(Ge)throw st}}var Ft=R.length,ut=Ft;for(Ft&&R.push("-");ut=q&&Zn$((_-V)/vn)&&U("overflow"),V+=(Ht-q)*vn,q=Ht;var Xt=!0,Wr=!1,hr=void 0;try{for(var pi,ht=A[Symbol.iterator]();!(Xt=(pi=ht.next()).done);Xt=!0){var mt=pi.value;if(mt_&&U("overflow"),mt==q){for(var ke=V,F=36;;F+=36){var ae=F<=de?1:F>=de+26?26:F-de;if(ke>6|192).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase():"%"+(R>>12|224).toString(16).toUpperCase()+"%"+(R>>6&63|128).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase()}function ne(A){for(var R="",I=0,q=A.length;I=194&&V<224){if(q-I>=6){var de=parseInt(A.substr(I+4,2),16);R+=String.fromCharCode((31&V)<<6|63&de)}else R+=A.substr(I,6);I+=6}else if(V>=224){if(q-I>=9){var ve=parseInt(A.substr(I+4,2),16),Ge=parseInt(A.substr(I+7,2),16);R+=String.fromCharCode((15&V)<<12|(63&ve)<<6|63&Ge)}else R+=A.substr(I,9);I+=9}else R+=A.substr(I,3),I+=3}return R}function _e(A,R){function I(q){var V=ne(q);return V.match(R.UNRESERVED)?V:q}return A.scheme&&(A.scheme=String(A.scheme).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(R.PCT_ENCODED,I).replace(R.NOT_USERINFO,X).replace(R.PCT_ENCODED,g)),A.host!==void 0&&(A.host=String(A.host).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_HOST,X).replace(R.PCT_ENCODED,g)),A.path!==void 0&&(A.path=String(A.path).replace(R.PCT_ENCODED,I).replace(A.scheme?R.NOT_PATH:R.NOT_PATH_NOSCHEME,X).replace(R.PCT_ENCODED,g)),A.query!==void 0&&(A.query=String(A.query).replace(R.PCT_ENCODED,I).replace(R.NOT_QUERY,X).replace(R.PCT_ENCODED,g)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(R.PCT_ENCODED,I).replace(R.NOT_FRAGMENT,X).replace(R.PCT_ENCODED,g)),A}function N(A){return A.replace(/^0*(.*)/,"$1")||"0"}function G(A,R){var I=A.match(R.IPV4ADDRESS)||[],q=O(I,2)[1];return q?q.split(".").map(N).join("."):A}function oe(A,R){var I=A.match(R.IPV6ADDRESS)||[],q=O(I,3),V=q[1],de=q[2];if(V){for(var ve=V.toLowerCase().split("::").reverse(),Ge=O(ve,2),st=Ge[0],Re=Ge[1],ct=Re?Re.split(":").map(N):[],lt=st.split(":").map(N),Ft=R.IPV4ADDRESS.test(lt[lt.length-1]),ut=Ft?7:8,Ht=lt.length-ut,bt=Array(ut),Tt=0;Tt1){var pr=bt.slice(0,bn.index),Zn=bt.slice(bn.index+bn.length);Un=pr.join(":")+"::"+Zn.join(":")}else Un=bt.join(":");return de&&(Un+="%"+de),Un}return A}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie="".match(/(){0}/)[1]===void 0;function re(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},q=R.iri!==!1?E:b;R.reference==="suffix"&&(A=(R.scheme?R.scheme+":":"")+"//"+A);var V=A.match(Z);if(V){ie?(I.scheme=V[1],I.userinfo=V[3],I.host=V[4],I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=V[7],I.fragment=V[8],isNaN(I.port)&&(I.port=V[5])):(I.scheme=V[1]||void 0,I.userinfo=A.indexOf("@")!==-1?V[3]:void 0,I.host=A.indexOf("//")!==-1?V[4]:void 0,I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=A.indexOf("?")!==-1?V[7]:void 0,I.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(I.port)&&(I.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),I.host&&(I.host=oe(G(I.host,q),q)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",R.reference&&R.reference!=="suffix"&&R.reference!==I.reference&&(I.error=I.error||"URI is not a "+R.reference+" reference.");var de=Be[(R.scheme||I.scheme||"").toLowerCase()];if(R.unicodeSupport||de&&de.unicodeSupport)_e(I,q);else{if(I.host&&(R.domainHost||de&&de.domainHost))try{I.host=be(I.host.replace(q.PCT_ENCODED,ne).toLowerCase())}catch(ve){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}_e(I,b)}de&&de.parse&&de.parse(I,R)}else I.error=I.error||"URI can not be parsed.";return I}function Se(A,R){var I=R.iri!==!1?E:b,q=[];return A.userinfo!==void 0&&(q.push(A.userinfo),q.push("@")),A.host!==void 0&&q.push(oe(G(String(A.host),I),I).replace(I.IPV6ADDRESS,function(V,de,ve){return"["+de+(ve?"%25"+ve:"")+"]"})),typeof A.port=="number"&&(q.push(":"),q.push(A.port.toString(10))),q.length?q.join(""):void 0}var Pe=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Ke=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function xe(A){for(var R=[];A.length;)if(A.match(Pe))A=A.replace(Pe,"");else if(A.match(Fe))A=A.replace(Fe,"/");else if(A.match(Ke))A=A.replace(Ke,"/"),R.pop();else if(A==="."||A==="..")A="";else{var I=A.match(He);if(!I)throw new Error("Unexpected dot segment condition");var q=I[0];A=A.slice(q.length),R.push(q)}return R.join("")}function Xe(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=R.iri?E:b,q=[],V=Be[(R.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,R),A.host&&!I.IPV6ADDRESS.test(A.host)){if(R.domainHost||V&&V.domainHost)try{A.host=R.iri?De(A.host):be(A.host.replace(I.PCT_ENCODED,ne).toLowerCase())}catch(Ge){A.error=A.error||"Host's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+Ge}}_e(A,I),R.reference!=="suffix"&&A.scheme&&(q.push(A.scheme),q.push(":"));var de=Se(A,R);if(de!==void 0&&(R.reference!=="suffix"&&q.push("//"),q.push(de),A.path&&A.path.charAt(0)!=="/"&&q.push("/")),A.path!==void 0){var ve=A.path;R.absolutePath||V&&V.absolutePath||(ve=xe(ve)),de===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),q.push(ve)}return A.query!==void 0&&(q.push("?"),q.push(A.query)),A.fragment!==void 0&&(q.push("#"),q.push(A.fragment)),q.join("")}function rt(A,R){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],V={};return q||(A=re(Xe(A,I),I),R=re(Xe(R,I),I)),!(I=I||{}).tolerant&&R.scheme?(V.scheme=R.scheme,V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.path?(R.path.charAt(0)==="/"?V.path=xe(R.path):(A.userinfo===void 0&&A.host===void 0&&A.port===void 0||A.path?A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+R.path:V.path=R.path:V.path="/"+R.path,V.path=xe(V.path)),V.query=R.query):(V.path=A.path,R.query!==void 0?V.query=R.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=R.fragment,V}function Ie(A,R){return A&&A.toString().replace(R&&R.iri?E.PCT_ENCODED:b.PCT_ENCODED,ne)}var Ze={scheme:"http",domainHost:!0,parse:function(A,R){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,R){return A.port!==(String(A.scheme).toLowerCase()!=="https"?80:443)&&A.port!==""||(A.port=void 0),A.path||(A.path="/"),A}},gt={scheme:"https",domainHost:Ze.domainHost,parse:Ze.parse,serialize:Ze.serialize},Mt={},jt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",yt="[0-9A-Fa-f]",kt=h(h("%[EFef][0-9A-Fa-f]%"+yt+yt+"%"+yt+yt)+"|"+h("%[89A-Fa-f][0-9A-Fa-f]%"+yt+yt)+"|"+h("%"+yt+yt)),$e=f("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Bt=new RegExp(jt,"g"),se=new RegExp(kt,"g"),Oe=new RegExp(f("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',$e),"g"),pt=new RegExp(f("[^]",jt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Rt=pt;function Yt(A){var R=ne(A);return R.match(Bt)?R:A}var Pn={scheme:"mailto",parse:function(A,R){var I=A,q=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var V=!1,de={},ve=I.query.split("&"),Ge=0,st=ve.length;Get.resolved)}const Dc=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),ff=e=>JSON.parse(JSON.stringify(e)),Dg=(e,t)=>{e=ff(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];Dc(r)&&Dc(o)?e[n]=Dg(o,r):e[n]=r}return e},Bx=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(i,l){const s=i.shift();return s?l[s]?i.length?r(i,l[s]):l[s]:{}:{}},o=r(n,t);return Dc(o)?ff(o):o},RL=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=RL(e.allOf,t);return aa(n,t)}else if(typeof e.$ref<"u"){const n=Bx(e.$ref,t);return aa(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=aa(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(i=>aa(i,t));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>n&&o.pop();return o.every(i=>typeof i>"u")?void 0:o}const r=aa(e.items,t);if(typeof r>"u")return[];{const o=[];for(let i=0;i"u"?t=e.definitions||{}:Dc(e.definitions)&&(t=Dg(t,e.definitions)),aa(ff(e),t)}function NL(){const[e,t]=j.useState({configSchema:null,configDefaults:null});return j.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(o=>o.json()).then(PL);t({configSchema:r,configDefaults:$L(r)})}n()},[]),e}async function DL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function IL(e){let t,n,r,o=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=ML(t,l);const s=t.length;let c=0;for(;n0){const c=o.decode(l.subarray(0,s)),f=s+(l[s+1]===32?2:1),h=o.decode(l.subarray(f));switch(c){case"data":r.data=r.data?r.data+` +`+h:h;break;case"event":r.event=h;break;case"id":e(r.id=h);break;case"retry":const p=parseInt(h,10);isNaN(p)||t(r.retry=p);break}}}}function ML(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o1(){return{data:"",event:"",id:"",retry:void 0}}var FL=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=_h);let b;function E(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",E);let O=zL,_=0;function w(){document.removeEventListener("visibilitychange",E),window.clearTimeout(_),b.abort()}n==null||n.addEventListener("abort",()=>{w(),p()});const S=f??window.fetch,k=o??BL;async function C(){var $;b=new AbortController;try{const L=await S(e,Object.assign(Object.assign({},h),{headers:y,signal:b.signal}));await k(L),await DL(L.body,IL(LL(U=>{U?y[i1]=U:delete y[i1]},U=>{O=U},i))),l==null||l(),w(),p()}catch(L){if(!b.signal.aborted)try{const U=($=s==null?void 0:s(L))!==null&&$!==void 0?$:O;window.clearTimeout(_),_=window.setTimeout(C,U)}catch(U){w(),g(U)}}}C()})}function BL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(_h)))throw new Error(`Expected content-type to be ${_h}, Actual: ${t}`)}function HL(){const[e,t]=j.useState(null),[n,r]=j.useState(null),o=j.useCallback(async(l,s,c)=>{const f=new AbortController;r(f),t({status:"inflight",messages:l.messages,merge:!0}),await UL("/runs",{signal:f.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:s,thread_id:c,stream:!0}),onmessage(h){if(h.event==="data"){const{messages:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:p,run_id:g==null?void 0:g.run_id}))}else if(h.event==="metadata"){const{run_id:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:g==null?void 0:g.messages,run_id:p}))}else h.event==="error"&&t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id}))},onclose(){t(h=>({status:(h==null?void 0:h.status)==="error"?h.status:"done",messages:h==null?void 0:h.messages,run_id:h==null?void 0:h.run_id,merge:h==null?void 0:h.merge})),r(null)},onerror(h){throw t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id,merge:p==null?void 0:p.merge})),r(null),h}})},[]),i=j.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:o,stopStream:i,stream:e}}function WL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return Ux(t,"updated_at","desc")}function GL(){const[e,t]=j.useReducer(WL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const c=new URLSearchParams(window.location.search).get("shared_id"),[f,h]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(p=>p.json()).then(p=>p.map(g=>({...g,mine:!0}))),fetch("/assistants/public/"+(c?`?shared_id=${c}`:""),{headers:{Accept:"application/json"}}).then(p=>p.json())]);t(f.concat(h)),h.find(p=>p.assistant_id===c)&&r(c)}l()},[]);const o=j.useCallback(async(l,s,c,f,h=crypto.randomUUID())=>{const p=c.reduce((y,b)=>(y.append("files",b),y),new FormData);p.append("config",JSON.stringify({configurable:{assistant_id:h}}));const[g]=await Promise.all([fetch(`/assistants/${h}`,{method:"PUT",body:JSON.stringify({name:l,config:s,public:f}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(y=>y.json()),c.length?fetch("/ingest",{method:"POST",body:p}):Promise.resolve()]);t({...g,mine:!0}),r(g.assistant_id)},[]),i=j.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:o,enterConfig:i}}function VL(){const[e,t]=j.useState(!1),{configSchema:n,configDefaults:r}=NL(),{chats:o,currentChat:i,createChat:l,enterChat:s}=AL(),{configs:c,currentConfig:f,saveConfig:h,enterConfig:p}=GL(),{startStream:g,stopStream:y,stream:b}=HL(),E=j.useCallback(async(k,C=i)=>{var L;!C||!((L=c==null?void 0:c.find(U=>U.assistant_id===C.assistant_id))!=null&&L.config)||await g({messages:[{content:k,additional_kwargs:{},type:"human",example:!1}]},C.assistant_id,C.thread_id)},[i,g,c]),O=j.useCallback(async k=>{if(!f)return;const C=await l(k,f.assistant_id);return E(k,C)},[l,E,f]),_=j.useCallback(async k=>{i&&(y==null||y(!0)),s(k),e&&t(!1)},[s,y,e,i]),w=i?M.jsx(_C,{chat:i,startStream:E,stopStream:y,stream:b}):M.jsx(Cj,{startChat:O,configSchema:n,configDefaults:r,configs:c,currentConfig:f,saveConfig:h,enterConfig:p}),S=c==null?void 0:c.find(k=>k.assistant_id===(i==null?void 0:i.assistant_id));return M.jsx(mA,{subtitle:S?M.jsxs("span",{className:"inline-flex gap-1 items-center",children:[S.name,M.jsx(q2,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{s(null),p(S.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:M.jsx(xC,{chats:j.useMemo(()=>c===null||o===null?null:o.filter(k=>c.some(C=>C.assistant_id===k.assistant_id)),[o,c]),currentChat:i,enterChat:_}),children:n?w:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);ap.createRoot(document.getElementById("root")).render(M.jsx(VL,{})); diff --git a/backend/ui/assets/index-86d2f9e8.css b/backend/ui/assets/index-86d2f9e8.css new file mode 100644 index 00000000..bcf699ef --- /dev/null +++ b/backend/ui/assets/index-86d2f9e8.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\[1px\]{top:-1px}.bottom-0{bottom:0}.left-0{left:0}.left-full{left:100%}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.top-\[1px\]{top:1px}.z-40{z-index:40}.z-50{z-index:50}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-ml-0{margin-left:-0px}.-ml-0\.5{margin-left:-.125rem}.-ml-px{margin-left:-1px}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-16{margin-right:4rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.min-h-\[calc\(100\%-56px\)\]{min-height:calc(100% - 56px)}.w-16{width:4rem}.w-24{width:6rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-full{width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-5{row-gap:1.25rem}.gap-y-7{row-gap:1.75rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(209 213 219 / var(--tw-divide-opacity))}.self-stretch{align-self:stretch}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-l-0{border-left-width:0px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-r-gray-300{--tw-border-opacity: 1;border-right-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-900\/80{background-color:#111827cc}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 231 243 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-\[76px\]{padding-bottom:76px}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-\[100px\]{padding-left:100px}.pr-6{padding-right:1.5rem}.pt-2{padding-top:.5rem}.pt-20{padding-top:5rem}.pt-5{padding-top:1.25rem}.text-\[0\.625rem\]{font-size:.625rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-500\/10{--tw-ring-color: rgb(107 114 128 / .1)}.ring-yellow-600\/20{--tw-ring-color: rgb(202 138 4 / .2)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}html,body,#root{height:100%}body{background:#f5f5f5}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.focus-within\:z-10:focus-within{z-index:10}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.group:hover .group-hover\:border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.group:hover .group-hover\:text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.prose-a\:text-gray-500 :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width: 768px){.md\:flex-row{flex-direction:row}}@media (min-width: 1024px){.lg\:fixed{position:fixed}.lg\:inset-y-0{top:0;bottom:0}.lg\:left-72{left:18rem}.lg\:z-50{z-index:50}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-72{width:18rem}.lg\:flex-col{flex-direction:column}.lg\:items-stretch{align-items:stretch}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pl-72{padding-left:18rem}} diff --git a/backend/ui/assets/index-fd5a17b9.js b/backend/ui/assets/index-fd5a17b9.js new file mode 100644 index 00000000..7897afd6 --- /dev/null +++ b/backend/ui/assets/index-fd5a17b9.js @@ -0,0 +1,123 @@ +var tE=Object.defineProperty;var nE=(e,t,n)=>t in e?tE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ot=(e,t,n)=>(nE(e,typeof t!="symbol"?t+"":t,n),n),rE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var ss=(e,t,n)=>(rE(e,t,"access private method"),n);function oE(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Lc={},l1={exports:{}},at={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var lu=Symbol.for("react.element"),iE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),uE=Symbol.for("react.profiler"),sE=Symbol.for("react.provider"),cE=Symbol.for("react.context"),fE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),hE=Symbol.for("react.lazy"),Iv=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=Iv&&e[Iv]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,c1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}Ra.prototype.isReactComponent={};Ra.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ra.prototype;function bh(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}var Sh=bh.prototype=new f1;Sh.constructor=bh;s1(Sh,Ra.prototype);Sh.isPureReactComponent=!0;var Lv=Array.isArray,d1=Object.prototype.hasOwnProperty,Eh={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,G=X[N];if(0>>1;No(ie,_e))reo(Se,ie)?(X[N]=Se,X[re]=_e,N=re):(X[N]=ie,X[Z]=_e,N=Z);else if(reo(Se,_e))X[N]=Se,X[re]=_e,N=re;else break e}}return ne}function o(X,ne){var _e=X.sortIndex-ne.sortIndex;return _e!==0?_e:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=X)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function k(X){if(E=!1,S(X),!b)if(n(c)!==null)b=!0,De(C);else{var ne=n(f);ne!==null&&Be(k,ne.startTime-X)}}function C(X,ne){b=!1,E&&(E=!1,_(U),U=-1),y=!0;var _e=g;try{for(S(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||X&&!K());){var N=p.callback;if(typeof N=="function"){p.callback=null,g=p.priorityLevel;var G=N(p.expirationTime<=ne);ne=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(c)&&r(c),S(ne)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var Z=n(f);Z!==null&&Be(k,Z.startTime-ne),oe=!1}return oe}finally{p=null,g=_e,y=!1}}var $=!1,L=null,U=-1,ce=5,z=-1;function K(){return!(e.unstable_now()-zX||125N?(X.sortIndex=_e,t(f,X),n(c)===null&&X===n(f)&&(E?(_(U),U=-1):E=!0,Be(k,_e-N))):(X.sortIndex=G,t(c,X),b||y||(b=!0,De(C))),X},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(X){var ne=g;return function(){var _e=g;g=ne;try{return X.apply(this,arguments)}finally{g=_e}}}})(y1);v1.exports=y1;var TE=v1.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var w1=j,sr=TE;function ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lp=Object.prototype.hasOwnProperty,CE=/^[: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]*$/,Fv={},zv={};function OE(e){return lp.call(zv,e)?!0:lp.call(Fv,e)?!1:CE.test(e)?zv[e]=!0:(Fv[e]=!0,!1)}function AE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jE(e,t,n,r){if(t===null||typeof t>"u"||AE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xn[e]=new zn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Ch(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});xn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var o=xn.hasOwnProperty(t)?xn[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var c=` +`+o[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{_d=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tl(e):""}function PE(e){switch(e.tag){case 5:return Tl(e.type);case 16:return Tl("Lazy");case 13:return Tl("Suspense");case 19:return Tl("SuspenseList");case 0:case 2:case 15:return e=xd(e.type,!1),e;case 11:return e=xd(e.type.render,!1),e;case 1:return e=xd(e.type,!0),e;default:return""}}function fp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ua:return"Fragment";case la:return"Portal";case up:return"Profiler";case Ah:return"StrictMode";case sp:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function RE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fp(t);case 8:return t===Ah?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ps(e){e._valueTracker||(e._valueTracker=$E(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dp(e,t){var n=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function T1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function pp(e,t){T1(e,t);var n=ui(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hp(e,t.type,n):t.hasOwnProperty("defaultValue")&&hp(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hp(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},NE=["Webkit","ms","Moz","O"];Object.keys(Pl).forEach(function(e){NE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pl[t]=Pl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pl.hasOwnProperty(e)&&Pl[e]?(""+t).trim():t+"px"}function P1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var DE=Qt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vp(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function yp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 wp=null;function Rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _p=null,_a=null,xa=null;function Vv(e){if(e=cu(e)){if(typeof _p!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=Bc(t),_p(e.stateNode,e.type,t))}}function R1(e){_a?xa?xa.push(e):xa=[e]:_a=e}function $1(){if(_a){var e=_a,t=xa;if(xa=_a=null,Vv(e),t)for(e=0;e>>=0,e===0?32:31-(VE(e)/qE|0)|0}var gs=64,ms=4194304;function Ol(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ol(s):(i&=l,i!==0&&(r=Ol(i)))}else l=n&~o,l!==0?r=Ol(l):i!==0&&(r=Ol(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function uu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fr(t),e[t]=n}function XE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=$l),t0=String.fromCharCode(32),n0=!1;function J1(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function Ck(e,t){switch(e){case"compositionend":return ew(t);case"keypress":return t.which!==32?null:(n0=!0,t0);case"textInput":return e=t.data,e===t0&&n0?null:e;default:return null}}function Ok(e,t){if(sa)return e==="compositionend"||!zh&&J1(e,t)?(e=X1(),Us=Lh=Xo=null,sa=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=a0(n)}}function ow(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ow(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iw(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Uh(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")}function Lk(e){var t=iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ow(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=l0(n,i);var l=l0(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ca=null,Tp=null,Dl=null,Cp=!1;function u0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||ca==null||ca!==Zs(r)||(r=ca,"selectionStart"in r&&Uh(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}),Dl&&Ql(Dl,r)||(Dl=r,r=ic(Tp,"onSelect"),0pa||(e.current=$p[pa],$p[pa]=null,pa--)}function Pt(e,t){pa++,$p[pa]=e.current,e.current=t}var si={},jn=fi(si),Kn=fi(!1),Ni=si;function Ta(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function lc(){Lt(Kn),Lt(jn)}function g0(e,t,n){if(jn.current!==si)throw Error(ue(168));Pt(jn,t),Pt(Kn,n)}function hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ue(108,RE(e)||"Unknown",o));return Qt({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ni=jn.current,Pt(jn,e),Pt(Kn,Kn.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=hw(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Lt(Kn),Lt(jn),Pt(jn,e)):Lt(Kn),Pt(Kn,n)}var yo=null,Hc=!1,Dd=!1;function gw(e){yo===null?yo=[e]:yo.push(e)}function Qk(e){Hc=!0,gw(e)}function di(){if(!Dd&&yo!==null){Dd=!0;var e=0,t=Et;try{var n=yo;for(Et=1;e>=l,o-=l,wo=1<<32-Fr(t)+o|n<U?(ce=L,L=null):ce=L.sibling;var z=g(_,L,S[U],k);if(z===null){L===null&&(L=ce);break}e&&L&&z.alternate===null&&t(_,L),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z,L=ce}if(U===S.length)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;UU?(ce=L,L=null):ce=L.sibling;var K=g(_,L,z.value,k);if(K===null){L===null&&(L=ce);break}e&&L&&K.alternate===null&&t(_,L),w=i(K,w,U),$===null?C=K:$.sibling=K,$=K,L=ce}if(z.done)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;!z.done;U++,z=S.next())z=p(_,z.value,k),z!==null&&(w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return zt&&xi(_,U),C}for(L=r(_,L);!z.done;U++,z=S.next())z=y(L,_,U,z.value,k),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?U:z.key),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return e&&L.forEach(function(W){return t(_,W)}),zt&&xi(_,U),C}function O(_,w,S,k){if(typeof S=="object"&&S!==null&&S.type===ua&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:e:{for(var C=S.key,$=w;$!==null;){if($.key===C){if(C=S.type,C===ua){if($.tag===7){n(_,$.sibling),w=o($,S.props.children),w.return=_,_=w;break e}}else if($.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Vo&&S0(C)===$.type){n(_,$.sibling),w=o($,S.props),w.ref=gl(_,$,S),w.return=_,_=w;break e}n(_,$);break}else t(_,$);$=$.sibling}S.type===ua?(w=Ri(S.props.children,_.mode,k,S.key),w.return=_,_=w):(k=Qs(S.type,S.key,S.props,null,_.mode,k),k.ref=gl(_,w,S),k.return=_,_=k)}return l(_);case la:e:{for($=S.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=o(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=Hd(S,_.mode,k),w.return=_,_=w}return l(_);case Vo:return $=S._init,O(_,w,$(S._payload),k)}if(Cl(S))return b(_,w,S,k);if(cl(S))return E(_,w,S,k);Ss(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=o(w,S),w.return=_,_=w):(n(_,w),w=Bd(S,_.mode,k),w.return=_,_=w),l(_)):n(_,w)}return O}var Oa=Sw(!0),Ew=Sw(!1),fu={},oo=fi(fu),Jl=fi(fu),eu=fi(fu);function Oi(e){if(e===fu)throw Error(ue(174));return e}function Yh(e,t){switch(Pt(eu,t),Pt(Jl,e),Pt(oo,fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mp(t,e)}Lt(oo),Pt(oo,t)}function Aa(){Lt(oo),Lt(Jl),Lt(eu)}function kw(e){Oi(eu.current);var t=Oi(oo.current),n=mp(t,e.type);t!==n&&(Pt(Jl,e),Pt(oo,n))}function Xh(e){Jl.current===e&&(Lt(oo),Lt(Jl))}var qt=fi(0);function hc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 Id=[];function Zh(){for(var e=0;en?n:4,e(!0);var r=Ld.transition;Ld.transition={};try{e(!1),t()}finally{Et=n,Ld.transition=r}}function Uw(){return Cr().memoizedState}function Jk(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bw(e))Hw(t,n);else if(n=ww(e,t,n,r),n!==null){var o=Ln();zr(n,e,r,o),Ww(n,t,r)}}function e2(e,t,n){var r=ai(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bw(e))Hw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Ur(s,l)){var c=t.interleaved;c===null?(o.next=o,Kh(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=ww(e,t,o,r),n!==null&&(o=Ln(),zr(n,e,r,o),Ww(n,t,r))}}function Bw(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function Hw(e,t){Il=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var mc={readContext:Tr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},t2={readContext:Tr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:k0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,Iw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jk.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:E0,useDebugValue:rg,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=E0(!1),t=e[0];return e=Zk.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,o=Jr();if(zt){if(n===void 0)throw Error(ue(407));n=n()}else{if(n=t(),mn===null)throw Error(ue(349));Ii&30||Ow(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,k0(jw.bind(null,r,i,e),[e]),r.flags|=2048,ru(9,Aw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=mn.identifierPrefix;if(zt){var n=_o,r=wo;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[eo]=t,e[Zl]=r,Jw(e,t,!1,!1),t.stateNode=e;e:{switch(l=yp(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),o=r;break;case"iframe":case"object":case"embed":Dt("load",e),o=r;break;case"video":case"audio":for(o=0;oPa&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=hc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!zt)return Tn(t),null}else 2*nn()-i.renderingStartTime>Pa&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=qt.current,Pt(qt,r?n&1|2:n&1),t):(Tn(t),null);case 22:case 23:return sg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function s2(e,t){switch(Hh(t),t.tag){case 1:return Qn(t.type)&&lc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(),Lt(Kn),Lt(jn),Zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xh(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Aa(),null;case 10:return qh(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var ks=!1,Cn=!1,c2=typeof WeakSet=="function"?WeakSet:Set,we=null;function va(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Gp(e,t,n){try{n()}catch(r){en(e,t,r)}}var N0=!1;function f2(e,t){if(Op=rc,e=iw(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,f=0,h=0,p=e,g=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(s=l+o),p!==i||r!==0&&p.nodeType!==3||(c=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===e)break t;if(g===n&&++f===o&&(s=l),g===i&&++h===r&&(c=l),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ap={focusedElem:e,selectionRange:n},rc=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var E=b.memoizedProps,O=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ir(t.type,E),O);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(k){en(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return b=N0,N0=!1,b}function Ll(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gp(t,n,i)}o=o.next}while(o!==r)}}function Vc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function n_(e){var t=e.alternate;t!==null&&(e.alternate=null,n_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Zl],delete t[Rp],delete t[qk],delete t[Kk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function r_(e){return e.tag===5||e.tag===3||e.tag===4}function D0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r_(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ac));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Kp(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&&(e=e.child,e!==null))for(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}var wn=null,Lr=!1;function Bo(e,t,n){for(n=n.child;n!==null;)o_(e,t,n),n=n.sibling}function o_(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Cn||va(n,t);case 6:var r=wn,o=Lr;wn=null,Bo(e,t,n),wn=r,Lr=o,wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ql(e)):Nd(wn,n.stateNode));break;case 4:r=wn,o=Lr,wn=n.stateNode.containerInfo,Lr=!0,Bo(e,t,n),wn=r,Lr=o;break;case 0:case 11:case 14:case 15:if(!Cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Gp(n,t,l),o=o.next}while(o!==r)}Bo(e,t,n);break;case 1:if(!Cn&&(va(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:n.mode&1?(Cn=(r=Cn)||n.memoizedState!==null,Bo(e,t,n),Cn=r):Bo(e,t,n);break;default:Bo(e,t,n)}}function I0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c2),t.forEach(function(r){var o=_2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p2(r/1960))-r,10e?16:e,Zo===null)var r=!1;else{if(e=Zo,Zo=null,wc=0,dt&6)throw Error(ue(331));var o=dt;for(dt|=4,we=e.current;we!==null;){var i=we,l=i.child;if(we.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cnn()-lg?Pi(e,0):ag|=n),Yn(e,t)}function d_(e,t){t===0&&(e.mode&1?(t=ms,ms<<=1,!(ms&130023424)&&(ms=4194304)):t=1);var n=Ln();e=To(e,t),e!==null&&(uu(e,t,n),Yn(e,n))}function w2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d_(e,n)}function _2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}r!==null&&r.delete(t),d_(e,n)}var p_;p_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)qn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qn=!1,l2(e,t,n);qn=!!(e.flags&131072)}else qn=!1,zt&&t.flags&1048576&&mw(t,cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Ta(t,jn.current);Sa(t,n),o=eg(null,t,r,e,o,n);var i=tg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qh(t),o.updater=Wc,t.stateNode=o,o._reactInternals=t,Mp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&Bh(t),In(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b2(r),e=Ir(r,e),o){case 0:t=zp(null,t,r,e,n);break e;case 1:t=P0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=j0(null,t,r,Ir(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),zp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),P0(e,t,r,o,n);case 3:e:{if(Yw(t),e===null)throw Error(ue(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_w(e,t),pc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ja(Error(ue(423)),t),t=R0(e,t,r,n,o);break e}else if(r!==o){o=ja(Error(ue(424)),t),t=R0(e,t,r,n,o);break e}else for(lr=ri(t.stateNode.containerInfo.firstChild),ur=t,zt=!0,Mr=null,n=Ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===o){t=Co(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return kw(t),e===null&&Dp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,jp(r,o)?l=null:i!==null&&jp(r,i)&&(t.flags|=32),Qw(e,t),In(e,t,l,n),t.child;case 6:return e===null&&Dp(t),null;case 13:return Xw(e,t,n);case 4:return Yh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),A0(e,t,r,o,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Pt(fc,r._currentValue),r._currentValue=l,i!==null)if(Ur(i.value,l)){if(i.children===o.children&&!Kn.current){t=Co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=xo(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ip(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ue(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ip(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}In(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),o=Tr(o),r=r(o),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,o=Ir(r,t.pendingProps),o=Ir(r.type,o),j0(e,t,r,o,n);case 15:return qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),Vs(e,t),t.tag=1,Qn(r)?(e=!0,uc(t)):e=!1,Sa(t,n),bw(t,r,o),Mp(t,r,o,n),Up(null,t,r,!0,e,n);case 19:return Zw(e,t,n);case 22:return Kw(e,t,n)}throw Error(ue(156,t.tag))};function h_(e,t){return z1(e,t)}function x2(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.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 Er(e,t,n,r){return new x2(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b2(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Ph)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Er(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&14680064,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}function Qs(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ua:return Ri(n.children,o,i,t);case Ah:l=8,o|=8;break;case up:return e=Er(12,n,t,o|2),e.elementType=up,e.lanes=i,e;case sp:return e=Er(13,n,t,o),e.elementType=sp,e.lanes=i,e;case cp:return e=Er(19,n,t,o),e.elementType=cp,e.lanes=i,e;case S1:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:l=10;break e;case b1:l=9;break e;case jh:l=11;break e;case Ph:l=14;break e;case Vo:l=16,r=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ri(e,t,n,r){return e=Er(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=Er(22,e,r,t),e.elementType=S1,e.lanes=n,e.stateNode={isHidden:!1},e}function Bd(e,t,n){return e=Er(6,e,null,t),e.lanes=n,e}function Hd(e,t,n){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,i,l,s,c){return e=new S2(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qh(i),e}function E2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),m1.exports=cr;var w_=m1.exports,W0=w_;ap.createRoot=W0.createRoot,ap.hydrateRoot=W0.hydrateRoot;function A2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const j2=j.forwardRef(A2),P2=j2;function R2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const $2=j.forwardRef(R2),G0=$2;function N2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const D2=j.forwardRef(N2),I2=D2;function L2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const M2=j.forwardRef(L2),V0=M2;function F2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const z2=j.forwardRef(F2),U2=z2;function B2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const H2=j.forwardRef(B2),W2=H2;function G2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const V2=j.forwardRef(G2),q2=V2;function K2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Q2=j.forwardRef(K2),__=Q2;function Y2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const X2=j.forwardRef(Y2),Z2=X2;function J2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const eT=j.forwardRef(J2),tT=eT;function nT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const rT=j.forwardRef(nT),oT=rT;async function q0(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function iT(e,t){const[n,r]=j.useState(null);return j.useEffect(()=>{async function o(){e&&r(await q0(e))}return o(),()=>{r(null)}},[e]),j.useEffect(()=>{async function o(){e&&r(await q0(e))}(t==null?void 0:t.status)!=="inflight"&&o()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages??[]]:(t==null?void 0:t.messages)??n}function aT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const lT=j.forwardRef(aT),uT=lT;function sT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const cT=j.forwardRef(sT),fT=cT;function x_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(i)))==null?void 0:l.classGroupId}const K0=/^\[(.+)\]$/;function hT(e){if(K0.test(e)){const t=K0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function gT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vT(Object.entries(e.classGroups),n).forEach(([i,l])=>{Jp(l,r,i,t)}),r}function Jp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Q0(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(mT(o)){Jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Jp(l,Q0(t,i),n,r)})})}function Q0(e,t){let n=e;return t.split(mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function mT(e){return e.isThemeGetter}function vT(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function yT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const S_="!";function wT(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let c=0,f=0,h;for(let E=0;Ef?h-f:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function _T(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function xT(e){return{cache:yT(e.cacheSize),splitModifiers:wT(e),...pT(e)}}const bT=/\s+/;function ST(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bT).map(l=>{const{modifiers:s,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let p=r(h?f.substring(0,h):f),g=!!h;if(!p){if(!h)return{isTailwindClass:!1,originalClassName:l};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:l};g=!1}const y=_T(s).join(":");return{isTailwindClass:!0,modifierId:c?y+S_:y,classGroupId:p,originalClassName:l,hasPostfixModifier:g}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:c,hasPostfixModifier:f}=l,h=s+c;return i.has(h)?!1:(i.add(h),o(c,f).forEach(p=>i.add(s+p)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function ET(){let e=0,t,n,r="";for(;ep(h),e());return n=xT(f),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=ST(c,n);return o(c,h),h}return function(){return i(ET.apply(null,arguments))}}function Nt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const k_=/^\[(?:([a-z-]+):)?(.+)\]$/i,TT=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dr(e){return Ai(e)||CT.has(e)||TT.test(e)}function Ho(e){return Da(e,"length",FT)}function Ai(e){return!!e&&!Number.isNaN(Number(e))}function Os(e){return Da(e,"number",Ai)}function yl(e){return!!e&&Number.isInteger(Number(e))}function RT(e){return e.endsWith("%")&&Ai(e.slice(0,-1))}function Je(e){return k_.test(e)}function Wo(e){return OT.test(e)}const $T=new Set(["length","size","percentage"]);function NT(e){return Da(e,$T,T_)}function DT(e){return Da(e,"position",T_)}const IT=new Set(["image","url"]);function LT(e){return Da(e,IT,UT)}function MT(e){return Da(e,"",zT)}function wl(){return!0}function Da(e,t,n){const r=k_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function FT(e){return AT.test(e)}function T_(){return!1}function zT(e){return jT.test(e)}function UT(e){return PT.test(e)}function BT(){const e=Nt("colors"),t=Nt("spacing"),n=Nt("blur"),r=Nt("brightness"),o=Nt("borderColor"),i=Nt("borderRadius"),l=Nt("borderSpacing"),s=Nt("borderWidth"),c=Nt("contrast"),f=Nt("grayscale"),h=Nt("hueRotate"),p=Nt("invert"),g=Nt("gap"),y=Nt("gradientColorStops"),b=Nt("gradientColorStopPositions"),E=Nt("inset"),O=Nt("margin"),_=Nt("opacity"),w=Nt("padding"),S=Nt("saturate"),k=Nt("scale"),C=Nt("sepia"),$=Nt("skew"),L=Nt("space"),U=Nt("translate"),ce=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Je,t],W=()=>[Je,t],ge=()=>["",Dr,Ho],he=()=>["auto",Ai,Je],be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Je],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ai,Os],G=()=>[Ai,Je];return{cacheSize:500,separator:":",theme:{colors:[wl],spacing:[Dr,Ho],blur:["none","",Wo,Je],brightness:N(),borderColor:[e],borderRadius:["none","","full",Wo,Je],borderSpacing:W(),borderWidth:ge(),contrast:N(),grayscale:ne(),hueRotate:G(),invert:ne(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[RT,Ho],inset:K(),margin:K(),opacity:N(),padding:W(),saturate:N(),scale:N(),sepia:ne(),skew:G(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...be(),Je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,Je]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",yl,Je]}],"grid-cols":[{"grid-cols":[wl]}],"col-start-end":[{col:["auto",{span:["full",yl,Je]},Je]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[wl]}],"row-start-end":[{row:["auto",{span:[yl,Je]},Je]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Je,t]}],"min-w":[{"min-w":["min","max","fit",Je,Dr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,Je]}],h:[{h:[Je,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Dr,Je]}],"max-h":[{"max-h":[Je,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Os]}],"font-family":[{font:[wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Je]}],"line-clamp":[{"line-clamp":["none",Ai,Os]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,Ho]}],"underline-offset":[{"underline-offset":["auto",Dr,Je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...be(),DT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:De()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[Dr,Je]}],"outline-w":[{outline:[Dr,Ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Dr,Ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,MT]}],"shadow-color":[{shadow:[wl]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,Je]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,Ho,Os]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const HT=kT(BT);function On(...e){return HT(dT(e))}function C_(e){const[t,n]=j.useState(!1),r=e.disabled||t;return M.jsxs("form",{className:On("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async o=>{if(o.preventDefault(),r)return;const i=o.target,l=i.message.value;l&&(n(!0),await e.onSubmit(l),n(!1),i.message.value="")},children:[M.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[M.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:M.jsx(uT,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),M.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),M.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[M.jsx(fT,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function O_(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bi=vg();function A_(e){Bi=e}const j_=/[&<>"']/,WT=new RegExp(j_.source,"g"),P_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,GT=new RegExp(P_.source,"g"),VT={"&":"&","<":"<",">":">",'"':""","'":"'"},Y0=e=>VT[e];function ir(e,t){if(t){if(j_.test(e))return e.replace(WT,Y0)}else if(P_.test(e))return e.replace(GT,Y0);return e}const qT=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KT(e){return e.replace(qT,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const QT=/(^|[^\[])\^/g;function xt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(QT,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function X0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Z0(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let c=!1,f=l;for(;--f>=0&&s[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(` +`)}class Sc{constructor(t){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=t||Bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:As(r,` +`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XT(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=As(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=As(n[0].replace(/^ *>[ \t]?/gm,""),` +`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",c="",f=!1;for(;t;){let h=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let p=n[2].split(` +`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=t.split(` +`,1)[0],y=0;this.options.pedantic?(y=2,c=p.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=p.slice(y),y+=n[1].length);let b=!1;if(!p&&/^ *$/.test(g)&&(s+=g+` +`,t=t.substring(g.length+1),h=!0),!h){const _=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),S=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` +`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),S.test(g)||k.test(g)||_.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` +`+g.slice(y);else{if(b||p.search(/[^ ]/)>=4||S.test(p)||k.test(p)||w.test(p))break;c+=` +`+g}!b&&!g.trim()&&(b=!0),s+=C+` +`,t=t.substring(C.length+1),p=g.slice(y)}}i.loose||(f?i.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let E=null,O;this.options.gfm&&(E=/^\[[ xX]\] /.exec(c),E&&(O=E[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!E,checked:O,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let h=0;hy.type==="space"),g=p.length>0&&p.some(y=>/\n.*\n/.test(y.raw));i.loose=g}if(i.loose)for(let h=0;h$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Z0(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,c;for(i=0;i({text:f,tokens:[]}));for(o=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=As(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YT(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),J0(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return J0(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,c,f=l,h=0;const p=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+l);(o=p.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){f+=c;continue}else if((o[5]||o[6])&&l%3&&!((l+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);const g=[...o[0]][0].length,y=t.slice(0,l+o.index+g+c);if(Math.min(l,c)%2){const E=y.slice(1,-1);return{type:"em",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=ir(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=ir(n[1]),o="mailto:"+r):(r=ir(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=ir(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=ir(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=ir(n[0]),{type:"text",raw:n[0],text:r}}}}const je={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};je._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;je.def=xt(je.def).replace("label",je._label).replace("title",je._title).getRegex();je.bullet=/(?:[*+-]|\d{1,9}[.)])/;je.listItemStart=xt(/^( *)(bull) */).replace("bull",je.bullet).getRegex();je.list=xt(je.list).replace(/bull/g,je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+je.def.source+")").getRegex();je._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";je._comment=/|$)/;je.html=xt(je.html,"i").replace("comment",je._comment).replace("tag",je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();je.lheading=xt(je.lheading).replace(/bull/g,je.bullet).getRegex();je.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.blockquote=xt(je.blockquote).replace("paragraph",je.paragraph).getRegex();je.normal={...je};je.gfm={...je.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};je.gfm.table=xt(je.gfm.table).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.gfm.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.pedantic={...je.normal,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(je.normal._paragraph).replace("hr",je.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";me.punctuation=xt(me.punctuation,"u").replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;me.anyPunctuation=/\\[punct]/g;me._escapes=/\\([punct])/g;me._comment=xt(je._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=xt(me.emStrong.lDelim,"u").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=xt(me.emStrong.rDelimAst,"gu").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=xt(me.emStrong.rDelimUnd,"gu").replace(/punct/g,me._punctuation).getRegex();me.anyPunctuation=xt(me.anyPunctuation,"gu").replace(/punct/g,me._punctuation).getRegex();me._escapes=xt(me._escapes,"gu").replace(/punct/g,me._punctuation).getRegex();me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=xt(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=xt(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=xt(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=xt(me.reflink).replace("label",me._label).replace("ref",je._label).getRegex();me.nolink=xt(me.nolink).replace("ref",je._label).getRegex();me.reflinkSearch=xt(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal={...me};me.pedantic={...me.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()};me.gfm={...me.normal,escape:xt(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(f.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.raw,o.text+=` +`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` +`+r.raw,o.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,c,f;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(f=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,f)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(i=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(f=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Ec{constructor(t){Ot(this,"options");this.options=t||Bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` +`,o?'
    '+(r?t:ir(t,!0))+`
    +`:"
    "+(r?t:ir(t,!0))+`
    +`}blockquote(t){return`
    +${t}
    +`}html(t,n){return t}heading(t,n,r){return`${t} +`}hr(){return`
    +`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> +`+t+" +`}listitem(t,n,r){return`
  • ${t}
  • +`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    +`}table(t,n){return n&&(n=`${n}`),` + +`+t+` +`+n+`
    +`}tablerow(t){return` +${t} +`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i='
    ",i}image(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=O+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=O+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:O+" "}):E+=O+" "}E+=this.parse(g.tokens,f),h+=this.renderer.listitem(E,b,!!y)}r+=this.renderer.list(h,s,c);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1{r=r.concat(this.walkTokens(s[c],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=l.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Ec(this.defaults);for(const l in r.renderer){const s=r.renderer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Sc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zl;for(const l in r.hooks){const s=r.hooks[l],c=l,f=i[c];zl.passThroughHooks.has(l)?i[c]=h=>{if(this.defaults.async)return Promise.resolve(s.call(i,h)).then(g=>f.call(i,g));const p=s.call(i,h);return f.call(i,p)}:i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(l.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}au=new WeakSet,eh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=ss(this,Ic,R_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(c=>t(c,l)).then(c=>l.walkTokens?Promise.all(this.walkTokens(c,l.walkTokens)).then(()=>c):c).then(c=>n(c,l)).then(c=>l.hooks?l.hooks.postprocess(c):c).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const c=t(r,l);l.walkTokens&&this.walkTokens(c,l.walkTokens);let f=n(c,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(c){return s(c)}}},Ic=new WeakSet,R_=function(t,n){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+ir(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Fi=new ZT;function _t(e,t){return Fi.parse(e,t)}_t.options=_t.setOptions=function(e){return Fi.setOptions(e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.getDefaults=vg;_t.defaults=Bi;_t.use=function(...e){return Fi.use(...e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.walkTokens=function(e,t){return Fi.walkTokens(e,t)};_t.parseInline=Fi.parseInline;_t.Parser=no;_t.parser=no.parse;_t.Renderer=Ec;_t.TextRenderer=yg;_t.Lexer=to;_t.lexer=to.lex;_t.Tokenizer=Sc;_t.Hooks=zl;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;no.parse;to.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:$_,setPrototypeOf:ey,isFrozen:JT,getPrototypeOf:eC,getOwnPropertyDescriptor:N_}=Object;let{freeze:Mn,seal:Br,create:D_}=Object,{apply:th,construct:nh}=typeof Reflect<"u"&&Reflect;Mn||(Mn=function(t){return t});Br||(Br=function(t){return t});th||(th=function(t,n,r){return t.apply(n,r)});nh||(nh=function(t,n){return new t(...n)});const js=Or(Array.prototype.forEach),ty=Or(Array.prototype.pop),_l=Or(Array.prototype.push),Ys=Or(String.prototype.toLowerCase),Wd=Or(String.prototype.toString),tC=Or(String.prototype.match),xl=Or(String.prototype.replace),nC=Or(String.prototype.indexOf),rC=Or(String.prototype.trim),rr=Or(RegExp.prototype.test),bl=oC(TypeError);function Or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ys;ey&&ey(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(JT(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ia(e){const t=D_(null);for(const[n,r]of $_(e))N_(e,n)!==void 0&&(t[n]=r);return t}function Ps(e,t){for(;e!==null;){const r=N_(e,t);if(r){if(r.get)return Or(r.get);if(typeof r.value=="function")return Or(r.value)}e=eC(e)}function n(r){return console.warn("fallback value for",r),null}return n}const ny=Mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gd=Mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vd=Mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iC=Mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qd=Mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aC=Mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ry=Mn(["#text"]),oy=Mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kd=Mn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iy=Mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=Mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lC=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=Br(/<%[\w\W]*|[\w\W]*%>/gm),sC=Br(/\${[\w\W]*}/gm),cC=Br(/^data-[\-\w.\u00B7-\uFFFF]/),fC=Br(/^aria-[\-\w]+$/),I_=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dC=Br(/^(?:\w+script|data):/i),pC=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L_=Br(/^html$/i);var ay=Object.freeze({__proto__:null,MUSTACHE_EXPR:lC,ERB_EXPR:uC,TMPLIT_EXPR:sC,DATA_ATTR:cC,ARIA_ATTR:fC,IS_ALLOWED_URI:I_,IS_SCRIPT_OR_DATA:dC,ATTR_WHITESPACE:pC,DOCTYPE_NAME:L_});const hC=function(){return typeof window>"u"?null:window},gC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function M_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hC();const t=ke=>M_(ke);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:y}=e,b=c.prototype,E=Ps(b,"cloneNode"),O=Ps(b,"nextSibling"),_=Ps(b,"childNodes"),w=Ps(b,"parentNode");if(typeof l=="function"){const ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,k="";const{implementation:C,createNodeIterator:$,createDocumentFragment:L,getElementsByTagName:U}=n,{importNode:ce}=r;let z={};t.isSupported=typeof $_=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:ge,DATA_ATTR:he,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:Be}=ay;let{IS_ALLOWED_URI:X}=ay,ne=null;const _e=et({},[...ny,...Gd,...Vd,...qd,...ry]);let N=null;const G=et({},[...oy,...Kd,...iy,...Rs]);let oe=Object.seal(D_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,ie=null,re=!0,Se=!0,Pe=!1,Fe=!0,Ke=!1,He=!1,xe=!1,Xe=!1,rt=!1,Ie=!1,Ze=!1,gt=!0,Mt=!1;const jt="user-content-";let yt=!0,kt=!1,$e={},Bt=null;const se=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const pt=et({},["audio","video","img","source","image","track"]);let Rt=null;const Yt=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Rn=pn,Xn=!1,A=null;const R=et({},[Pn,dn,pn],Wd);let I=null;const q=["application/xhtml+xml","text/html"],V="text/html";let de=null,ve=null;const Ge=n.createElement("form"),st=function(F){return F instanceof RegExp||F instanceof Function},Re=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===F)){if((!F||typeof F!="object")&&(F={}),F=ia(F),I=q.indexOf(F.PARSER_MEDIA_TYPE)===-1?I=V:I=F.PARSER_MEDIA_TYPE,de=I==="application/xhtml+xml"?Wd:Ys,ne="ALLOWED_TAGS"in F?et({},F.ALLOWED_TAGS,de):_e,N="ALLOWED_ATTR"in F?et({},F.ALLOWED_ATTR,de):G,A="ALLOWED_NAMESPACES"in F?et({},F.ALLOWED_NAMESPACES,Wd):R,Rt="ADD_URI_SAFE_ATTR"in F?et(ia(Yt),F.ADD_URI_SAFE_ATTR,de):Yt,Oe="ADD_DATA_URI_TAGS"in F?et(ia(pt),F.ADD_DATA_URI_TAGS,de):pt,Bt="FORBID_CONTENTS"in F?et({},F.FORBID_CONTENTS,de):se,Z="FORBID_TAGS"in F?et({},F.FORBID_TAGS,de):{},ie="FORBID_ATTR"in F?et({},F.FORBID_ATTR,de):{},$e="USE_PROFILES"in F?F.USE_PROFILES:!1,re=F.ALLOW_ARIA_ATTR!==!1,Se=F.ALLOW_DATA_ATTR!==!1,Pe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=F.SAFE_FOR_TEMPLATES||!1,He=F.WHOLE_DOCUMENT||!1,rt=F.RETURN_DOM||!1,Ie=F.RETURN_DOM_FRAGMENT||!1,Ze=F.RETURN_TRUSTED_TYPE||!1,Xe=F.FORCE_BODY||!1,gt=F.SANITIZE_DOM!==!1,Mt=F.SANITIZE_NAMED_PROPS||!1,yt=F.KEEP_CONTENT!==!1,kt=F.IN_PLACE||!1,X=F.ALLOWED_URI_REGEXP||I_,Rn=F.NAMESPACE||pn,oe=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ie&&(rt=!0),$e&&(ne=et({},[...ry]),N=[],$e.html===!0&&(et(ne,ny),et(N,oy)),$e.svg===!0&&(et(ne,Gd),et(N,Kd),et(N,Rs)),$e.svgFilters===!0&&(et(ne,Vd),et(N,Kd),et(N,Rs)),$e.mathMl===!0&&(et(ne,qd),et(N,iy),et(N,Rs))),F.ADD_TAGS&&(ne===_e&&(ne=ia(ne)),et(ne,F.ADD_TAGS,de)),F.ADD_ATTR&&(N===G&&(N=ia(N)),et(N,F.ADD_ATTR,de)),F.ADD_URI_SAFE_ATTR&&et(Rt,F.ADD_URI_SAFE_ATTR,de),F.FORBID_CONTENTS&&(Bt===se&&(Bt=ia(Bt)),et(Bt,F.FORBID_CONTENTS,de)),yt&&(ne["#text"]=!0),He&&et(ne,["html","head","body"]),ne.table&&(et(ne,["tbody"]),delete Z.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=F.TRUSTED_TYPES_POLICY,k=S.createHTML("")}else S===void 0&&(S=gC(y,o)),S!==null&&typeof k=="string"&&(k=S.createHTML(""));Mn&&Mn(F),ve=F}},ct=et({},["mi","mo","mn","ms","mtext"]),lt=et({},["foreignobject","desc","title","annotation-xml"]),Ft=et({},["title","style","font","a","script"]),ut=et({},Gd);et(ut,Vd),et(ut,iC);const Ht=et({},qd);et(Ht,aC);const bt=function(F){let ae=w(F);(!ae||!ae.tagName)&&(ae={namespaceURI:Rn,tagName:"template"});const ye=Ys(F.tagName),vt=Ys(ae.tagName);return A[F.namespaceURI]?F.namespaceURI===dn?ae.namespaceURI===pn?ye==="svg":ae.namespaceURI===Pn?ye==="svg"&&(vt==="annotation-xml"||ct[vt]):!!ut[ye]:F.namespaceURI===Pn?ae.namespaceURI===pn?ye==="math":ae.namespaceURI===dn?ye==="math"&<[vt]:!!Ht[ye]:F.namespaceURI===pn?ae.namespaceURI===dn&&!lt[vt]||ae.namespaceURI===Pn&&!ct[vt]?!1:!Ht[ye]&&(Ft[ye]||!ut[ye]):!!(I==="application/xhtml+xml"&&A[F.namespaceURI]):!1},Tt=function(F){_l(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},bn=function(F,ae){try{_l(t.removed,{attribute:ae.getAttributeNode(F),from:ae})}catch{_l(t.removed,{attribute:null,from:ae})}if(ae.removeAttribute(F),F==="is"&&!N[F])if(rt||Ie)try{Tt(ae)}catch{}else try{ae.setAttribute(F,"")}catch{}},Un=function(F){let ae=null,ye=null;if(Xe)F=""+F;else{const rn=tC(F,/^[\r\n\t ]+/);ye=rn&&rn[0]}I==="application/xhtml+xml"&&Rn===pn&&(F=''+F+"");const vt=S?S.createHTML(F):F;if(Rn===pn)try{ae=new g().parseFromString(vt,I)}catch{}if(!ae||!ae.documentElement){ae=C.createDocument(Rn,"template",null);try{ae.documentElement.innerHTML=Xn?k:vt}catch{}}const Qe=ae.body||ae.documentElement;return F&&ye&&Qe.insertBefore(n.createTextNode(ye),Qe.childNodes[0]||null),Rn===pn?U.call(ae,He?"html":"body")[0]:He?ae.documentElement:Qe},pr=function(F){return $.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Zn=function(F){return F instanceof p&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},vn=function(F){return typeof s=="function"&&F instanceof s},Xt=function(F,ae,ye){z[F]&&js(z[F],vt=>{vt.call(t,ae,ye,ve)})},Wr=function(F){let ae=null;if(Xt("beforeSanitizeElements",F,null),Zn(F))return Tt(F),!0;const ye=de(F.nodeName);if(Xt("uponSanitizeElement",F,{tagName:ye,allowedTags:ne}),F.hasChildNodes()&&!vn(F.firstElementChild)&&rr(/<[/\w]/g,F.innerHTML)&&rr(/<[/\w]/g,F.textContent))return Tt(F),!0;if(!ne[ye]||Z[ye]){if(!Z[ye]&&pi(ye)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye)))return!1;if(yt&&!Bt[ye]){const vt=w(F)||F.parentNode,Qe=_(F)||F.childNodes;if(Qe&&vt){const rn=Qe.length;for(let Zt=rn-1;Zt>=0;--Zt)vt.insertBefore(E(Qe[Zt],!0),O(F))}}return Tt(F),!0}return F instanceof c&&!bt(F)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&rr(/<\/no(script|embed|frames)/i,F.innerHTML)?(Tt(F),!0):(Ke&&F.nodeType===3&&(ae=F.textContent,js([K,W,ge],vt=>{ae=xl(ae,vt," ")}),F.textContent!==ae&&(_l(t.removed,{element:F.cloneNode()}),F.textContent=ae)),Xt("afterSanitizeElements",F,null),!1)},hr=function(F,ae,ye){if(gt&&(ae==="id"||ae==="name")&&(ye in n||ye in Ge))return!1;if(!(Se&&!ie[ae]&&rr(he,ae))){if(!(re&&rr(be,ae))){if(!N[ae]||ie[ae]){if(!(pi(F)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,F)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(F))&&(oe.attributeNameCheck instanceof RegExp&&rr(oe.attributeNameCheck,ae)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ae))||ae==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye))))return!1}else if(!Rt[ae]){if(!rr(X,xl(ye,Be,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&F!=="script"&&nC(ye,"data:")===0&&Oe[F])){if(!(Pe&&!rr(De,xl(ye,Be,"")))){if(ye)return!1}}}}}}return!0},pi=function(F){return F.indexOf("-")>0},ht=function(F){Xt("beforeSanitizeAttributes",F,null);const{attributes:ae}=F;if(!ae)return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};let vt=ae.length;for(;vt--;){const Qe=ae[vt],{name:rn,namespaceURI:Zt,value:Gr}=Qe,ao=de(rn);let Ct=rn==="value"?Gr:rC(Gr);if(ye.attrName=ao,ye.attrValue=Ct,ye.keepAttr=!0,ye.forceKeepAttr=void 0,Xt("uponSanitizeAttribute",F,ye),Ct=ye.attrValue,ye.forceKeepAttr||(bn(rn,F),!ye.keepAttr))continue;if(!Fe&&rr(/\/>/i,Ct)){bn(rn,F);continue}Ke&&js([K,W,ge],qa=>{Ct=xl(Ct,qa," ")});const Va=de(F.nodeName);if(hr(Va,ao,Ct)){if(Mt&&(ao==="id"||ao==="name")&&(bn(rn,F),Ct=jt+Ct),S&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Zt)switch(y.getAttributeType(Va,ao)){case"TrustedHTML":{Ct=S.createHTML(Ct);break}case"TrustedScriptURL":{Ct=S.createScriptURL(Ct);break}}try{Zt?F.setAttributeNS(Zt,rn,Ct):F.setAttribute(rn,Ct),ty(t.removed)}catch{}}}Xt("afterSanitizeAttributes",F,null)},mt=function ke(F){let ae=null;const ye=pr(F);for(Xt("beforeSanitizeShadowDOM",F,null);ae=ye.nextNode();)Xt("uponSanitizeShadowNode",ae,null),!Wr(ae)&&(ae.content instanceof i&&ke(ae.content),ht(ae));Xt("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ke){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,ye=null,vt=null,Qe=null;if(Xn=!ke,Xn&&(ke=""),typeof ke!="string"&&!vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw bl("dirty is not a string, aborting")}else throw bl("toString is not a function");if(!t.isSupported)return ke;if(xe||Re(F),t.removed=[],typeof ke=="string"&&(kt=!1),kt){if(ke.nodeName){const Gr=de(ke.nodeName);if(!ne[Gr]||Z[Gr])throw bl("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof s)ae=Un(""),ye=ae.ownerDocument.importNode(ke,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?ae=ye:ae.appendChild(ye);else{if(!rt&&!Ke&&!He&&ke.indexOf("<")===-1)return S&&Ze?S.createHTML(ke):ke;if(ae=Un(ke),!ae)return rt?null:Ze?k:""}ae&&Xe&&Tt(ae.firstChild);const rn=pr(kt?ke:ae);for(;vt=rn.nextNode();)Wr(vt)||(vt.content instanceof i&&mt(vt.content),ht(vt));if(kt)return ke;if(rt){if(Ie)for(Qe=L.call(ae.ownerDocument);ae.firstChild;)Qe.appendChild(ae.firstChild);else Qe=ae;return(N.shadowroot||N.shadowrootmode)&&(Qe=ce.call(r,Qe,!0)),Qe}let Zt=He?ae.outerHTML:ae.innerHTML;return He&&ne["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&rr(L_,ae.ownerDocument.doctype.name)&&(Zt=" +`+Zt),Ke&&js([K,W,ge],Gr=>{Zt=xl(Zt,Gr," ")}),S&&Ze?S.createHTML(Zt):Zt},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(ke),xe=!0},t.clearConfig=function(){ve=null,xe=!1},t.isValidAttribute=function(ke,F,ae){ve||Re({});const ye=de(ke),vt=de(F);return hr(ye,vt,ae)},t.addHook=function(ke,F){typeof F=="function"&&(z[ke]=z[ke]||[],_l(z[ke],F))},t.removeHook=function(ke){if(z[ke])return ty(z[ke])},t.removeHooks=function(ke){z[ke]&&(z[ke]=[])},t.removeAllHooks=function(){z={}},t}var mC=M_();function vC(e){const[t,n]=j.useState(null),r=async o=>{n({score:o,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:o}),headers:{"Content-Type":"application/json"}}),n({score:o,inflight:!1})};return M.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(W2,{className:"h-5 w-5","aria-hidden":"true"})}),M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(U2,{className:"h-5 w-5","aria-hidden":"true"})})]})}function yC(e){try{return JSON.parse(e)}catch{return{}}}function ly(e){return M.jsxs(M.Fragment,{children:[e.call&&M.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&M.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&M.jsx("span",{className:On("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:M.jsx(I2,{className:On("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&M.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:M.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:M.jsx("table",{className:"divide-y divide-gray-300",children:M.jsx("tbody",{children:Object.entries(yC(e.args)).map(([t,n],r)=>M.jsxs("tr",{children:[M.jsx("td",{className:On(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:M.jsx("div",{className:"font-medium text-gray-500",children:t})}),M.jsx("td",{className:On(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:O_(n)})]},r))})})})})]})}function wC(e){var r;const[t,n]=j.useState(!1);return M.jsxs("div",{className:"flex flex-col mb-8",children:[M.jsxs("div",{className:"leading-6 flex flex-row",children:[M.jsx("div",{className:On("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),M.jsxs("div",{className:"flex-1",children:[e.type==="function"&&M.jsx(ly,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&M.jsx(ly,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?M.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:mC.sanitize(_t(e.content)).trim()}}):M.jsx("div",{className:"text-gray-900 prose",children:O_(e.content)}):!1]})]}),e.runId&&M.jsx("div",{className:"mt-2 pl-[100px]",children:M.jsx(vC,{runId:e.runId})})]})}function _C(e){var n,r,o;const t=iT(e.chat.thread_id,e.stream);return j.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[t]),M.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((i,l)=>{var s,c;return j.createElement(wC,{...i,key:l,runId:l===t.length-1&&((s=e.stream)==null?void 0:s.status)==="done"?(c=e.stream)==null?void 0:c.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&M.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startStream,disabled:((o=e.stream)==null?void 0:o.status)==="inflight"})})]})}function xC(e){var t;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterChat(null),className:On(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Chat"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:On(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),M.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var bC=Object.defineProperty,SC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(SC(e,typeof t!="symbol"?t+"":t,n),n);let EC=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bo=new EC,Ar=(e,t)=>{bo.isServer?j.useEffect(e,t):j.useLayoutEffect(e,t)};function So(e){let t=j.useRef(e);return Ar(()=>{t.current=e},[e]),t}function Jc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Hi(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Jc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Hi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function wg(){let[e]=j.useState(Hi);return j.useEffect(()=>()=>e.dispose(),[e]),e}let Ut=function(e){let t=So(e);return ot.useCallback((...n)=>t.current(...n),[t])};function kC(){let e=typeof document>"u";return"useSyncExternalStore"in Ul?(t=>t.useSyncExternalStore)(Ul)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=kC(),[t,n]=j.useState(bo.isHandoffComplete);return t&&bo.isHandoffComplete===!1&&n(!1),j.useEffect(()=>{t!==!0&&n(!0)},[t]),j.useEffect(()=>bo.handoff(),[]),e?!1:t}var uy;let La=(uy=ot.useId)!=null?uy:function(){let e=Ia(),[t,n]=ot.useState(e?()=>bo.nextId():null);return Ar(()=>{t===null&&n(bo.nextId())},[t]),t!=null?""+t:void 0};function An(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}function F_(e){return bo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let rh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ei=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ei||{}),z_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(z_||{}),TC=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TC||{});function CC(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U_||{});function OC(e,t=0){var n;return e===((n=F_(e))==null?void 0:n.body)?!1:An(t,{0(){return e.matches(rh)},1(){let r=e;for(;r!==null;){if(r.matches(rh))return!0;r=r.parentElement}return!1}})}var AC=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(AC||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $i(e){e==null||e.focus({preventScroll:!0})}let jC=["textarea","input"].join(",");function PC(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,jC))!=null?n:!1}function RC(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?RC(e):e:CC(e);o.length>0&&l.length>1&&(l=l.filter(y=>!o.includes(y))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},h=0,p=l.length,g;do{if(h>=p||h+p<=0)return 0;let y=c+h;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}g=l[y],g==null||g.focus(f),h+=s}while(g!==i.activeElement);return t&6&&PC(g)&&g.select(),2}function $s(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B_(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function $C(e,t,n=!0){let r=j.useRef(!1);j.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let c=s(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let h of f){if(h===null)continue;let p=h instanceof HTMLElement?h:h.current;if(p!=null&&p.contains(c)||l.composed&&l.composedPath().includes(p))return}return!OC(c,U_.Loose)&&c.tabIndex!==-1&&l.preventDefault(),t(l,c)}let i=j.useRef(null);$s("pointerdown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("mousedown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("click",l=>{i.current&&(o(l,()=>i.current),i.current=null)},!0),$s("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),B_("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H_=Symbol();function NC(e,t=!0){return Object.assign(e,{[H_]:t})}function Hr(...e){let t=j.useRef(e);j.useEffect(()=>{t.current=e},[e]);let n=Ut(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H_]))?void 0:n}function kc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Tc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tc||{}),Jo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Jo||{});function jr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=W_(t,e);if(i)return Ns(s,n,r,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Ns(h,n,r,l)}if(c&1){let{unmount:f=!0,...h}=s;return An(f?0:1,{0(){return null},1(){return Ns({...h,hidden:!0,style:{display:"none"}},n,r,l)}})}return Ns(s,n,r,l)}function Ns(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=Yd(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let h={};if(t){let p=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&g.push(y);p&&(h["data-headlessui-state"]=g.join(" "))}if(o===j.Fragment&&Object.keys(sy(s)).length>0){if(!j.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(b=>` - ${b}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` +`)].join(` +`));let p=f.props,g=typeof(p==null?void 0:p.className)=="function"?(...b)=>kc(p==null?void 0:p.className(...b),s.className):kc(p==null?void 0:p.className,s.className),y=g?{className:g}:{};return j.cloneElement(f,Object.assign({},W_(f.props,sy(Yd(s,["ref"]))),h,c,DC(f.ref,c.ref),y))}return j.createElement(o,Object.assign({},Yd(s,["ref"]),o!==j.Fragment&&c,o!==j.Fragment&&h),f)}function DC(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function dr(e){var t;return Object.assign(j.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function sy(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function IC(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&LC(n)?!1:r}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let MC="div";var Cc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cc||{});function FC(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return jr({ourProps:o,theirProps:r,slot:{},defaultTag:MC,name:"Hidden"})}let oh=dr(FC),_g=j.createContext(null);_g.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function xg(){return j.useContext(_g)}function zC({value:e,children:t}){return ot.createElement(_g.Provider,{value:e},t)}var G_=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(G_||{});function bg(e,t){let n=j.useRef([]),r=Ut(e);j.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let s=r(t,o);return n.current=t,s}},[r,...t])}function UC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function du(...e){return j.useMemo(()=>F_(...e),[...e])}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function BC(){let e=j.useRef(0);return B_("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pu(){let e=j.useRef(!1);return Ar(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function V_(e,t,n,r){let o=So(n);j.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function HC(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function q_(e){let t=Ut(e),n=j.useRef(!1);j.useEffect(()=>(n.current=!1,()=>{n.current=!0,Jc(()=>{n.current&&t()})}),[t])}function K_(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let WC="div";var Q_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Q_||{});function GC(e,t){let n=j.useRef(null),r=Hr(n,t),{initialFocus:o,containers:i,features:l=30,...s}=e;Ia()||(l=1);let c=du(n);KC({ownerDocument:c},!!(l&16));let f=QC({ownerDocument:c,container:n,initialFocus:o},!!(l&2));YC({ownerDocument:c,container:n,containers:i,previousActiveElement:f},!!(l&8));let h=BC(),p=Ut(E=>{let O=n.current;O&&(_=>_())(()=>{An(h.current,{[jl.Forwards]:()=>{Xs(O,Ei.First,{skipElements:[E.relatedTarget]})},[jl.Backwards]:()=>{Xs(O,Ei.Last,{skipElements:[E.relatedTarget]})}})})}),g=wg(),y=j.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(E){let O=K_(i);n.current instanceof HTMLElement&&O.add(n.current);let _=E.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Y_(O,_)||(y.current?Xs(n.current,An(h.current,{[jl.Forwards]:()=>Ei.Next,[jl.Backwards]:()=>Ei.Previous})|Ei.WrapAround,{relativeTo:E.target}):E.target instanceof HTMLElement&&$i(E.target)))}};return ot.createElement(ot.Fragment,null,!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}),jr({ourProps:b,theirProps:s,defaultTag:WC,name:"FocusTrap"}),!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}))}let VC=dr(GC),Sl=Object.assign(VC,{features:Q_}),Yo=[];HC(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Yo[0]!==t.target&&(Yo.unshift(t.target),Yo=Yo.filter(n=>n!=null&&n.isConnected),Yo.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function qC(e=!0){let t=j.useRef(Yo.slice());return bg(([n],[r])=>{r===!0&&n===!1&&Jc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Yo.slice())},[e,Yo,t]),Ut(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function KC({ownerDocument:e},t){let n=qC(t);bg(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$i(n())},[t]),q_(()=>{t&&$i(n())})}function QC({ownerDocument:e,container:t,initialFocus:n},r){let o=j.useRef(null),i=pu();return bg(()=>{if(!r)return;let l=t.current;l&&Jc(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}n!=null&&n.current?$i(n.current):Xs(l,Ei.First)===z_.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function YC({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pu();V_(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=K_(n);t.current instanceof HTMLElement&&s.add(t.current);let c=r.current;if(!c)return;let f=l.target;f&&f instanceof HTMLElement?Y_(s,f)?(r.current=f,$i(f)):(l.preventDefault(),l.stopPropagation(),$i(c)):$i(r.current)},!0)}function Y_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X_=j.createContext(!1);function XC(){return j.useContext(X_)}function ih(e){return ot.createElement(X_.Provider,{value:e.force},e.children)}function ZC(e){let t=XC(),n=j.useContext(Z_),r=du(e),[o,i]=j.useState(()=>{if(!t&&n!==null||bo.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return j.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),j.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let JC=j.Fragment;function eO(e,t){let n=e,r=j.useRef(null),o=Hr(NC(h=>{r.current=h}),t),i=du(r),l=ZC(r),[s]=j.useState(()=>{var h;return bo.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),c=j.useContext(ah),f=Ia();return Ar(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Ar(()=>{if(s&&c)return c.register(s)},[c,s]),q_(()=>{var h;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))}),f?!l||!s?null:w_.createPortal(jr({ourProps:{ref:o},theirProps:n,defaultTag:JC,name:"Portal"}),s):null}let tO=j.Fragment,Z_=j.createContext(null);function nO(e,t){let{target:n,...r}=e,o={ref:Hr(t)};return ot.createElement(Z_.Provider,{value:n},jr({ourProps:o,theirProps:r,defaultTag:tO,name:"Popover.Group"}))}let ah=j.createContext(null);function rO(){let e=j.useContext(ah),t=j.useRef([]),n=Ut(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Ut(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=j.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,j.useMemo(()=>function({children:i}){return ot.createElement(ah.Provider,{value:o},i)},[o])]}let oO=dr(eO),iO=dr(nO),lh=Object.assign(oO,{Group:iO}),J_=j.createContext(null);function ex(){let e=j.useContext(J_);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return e}function aO(){let[e,t]=j.useState([]);return[e.length>0?e.join(" "):void 0,j.useMemo(()=>function(n){let r=Ut(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),c=s.indexOf(i);return c!==-1&&s.splice(c,1),s}))),o=j.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return ot.createElement(J_.Provider,{value:o},n.children)},[t])]}let lO="p";function uO(e,t){let n=La(),{id:r=`headlessui-description-${n}`,...o}=e,i=ex(),l=Hr(t);Ar(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return jr({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:lO,name:i.name||"Description"})}let sO=dr(uO),cO=Object.assign(sO,{}),Sg=j.createContext(()=>{});Sg.displayName="StackContext";var uh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uh||{});function fO(){return j.useContext(Sg)}function dO({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=fO(),l=Ut((...s)=>{t==null||t(...s),i(...s)});return Ar(()=>{let s=o===void 0||o===!0;return s&&l(0,n,r),()=>{s&&l(1,n,r)}},[l,n,r,o]),ot.createElement(Sg.Provider,{value:l},e)}function pO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const hO=typeof Object.is=="function"?Object.is:pO,{useState:gO,useEffect:mO,useLayoutEffect:vO,useDebugValue:yO}=Ul;function wO(e,t,n){const r=t(),[{inst:o},i]=gO({inst:{value:r,getSnapshot:t}});return vO(()=>{o.value=r,o.getSnapshot=t,Xd(o)&&i({inst:o})},[e,r,t]),mO(()=>(Xd(o)&&i({inst:o}),e(()=>{Xd(o)&&i({inst:o})})),[e]),yO(r),r}function Xd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!hO(n,r)}catch{return!0}}function _O(e,t,n){return t()}const xO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=!xO,SO=bO?_O:wO,EO="useSyncExternalStore"in Ul?(e=>e.useSyncExternalStore)(Ul):SO;function kO(e){return EO(e.subscribe,e.getSnapshot,e.getSnapshot)}function TO(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function CO(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function OO(){if(!UC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(l=>l()).some(l=>l.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=Hi();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:c}=new URL(s.href),f=t.querySelector(c);f&&!o(f)&&(i=f)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!o(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function AO(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jO(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ji=TO(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Hi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:jO(n)},o=[OO(),CO(),AO()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ji.subscribe(()=>{let e=ji.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&ji.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ji.dispatch("TEARDOWN",n)}});function PO(e,t,n){let r=kO(ji),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Ar(()=>{if(!(!e||!t))return ji.dispatch("PUSH",e,n),()=>ji.dispatch("POP",e,n)},[t,e]),i}let Zd=new Map,El=new Map;function cy(e,t=!0){Ar(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=El.get(r))!=null?l:1;if(s===1?El.delete(r):El.set(r,s-1),s!==1)return;let c=Zd.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Zd.delete(r))}let i=(n=El.get(r))!=null?n:0;return El.set(r,i+1),i!==0||(Zd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function RO({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=j.useRef((r=n==null?void 0:n.current)!=null?r:null),i=du(o),l=Ut(()=>{var s;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:Ut(s=>l().some(c=>c.contains(s))),mainTreeNodeRef:o,MainTreeNode:j.useMemo(()=>function(){return n!=null?null:ot.createElement(oh,{features:Cc.Hidden,ref:o})},[o,n])}}var $O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($O||{}),NO=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(NO||{});let DO={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Oc=j.createContext(null);Oc.displayName="DialogContext";function hu(e){let t=j.useContext(Oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hu),n}return t}function IO(e,t,n=()=>[document.body]){PO(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function LO(e,t){return An(t.type,DO,e,t)}let MO="div",FO=Tc.RenderStrategy|Tc.Static;function zO(e,t){var n;let r=La(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:s,__demoMode:c=!1,...f}=e,[h,p]=j.useState(0),g=xg();i===void 0&&g!==null&&(i=(g&ar.Open)===ar.Open);let y=j.useRef(null),b=Hr(y,t),E=du(y),O=e.hasOwnProperty("open")||g!==null,_=e.hasOwnProperty("onClose");if(!O&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let w=i?0:1,[S,k]=j.useReducer(LO,{titleId:null,descriptionId:null,panelRef:j.createRef()}),C=Ut(()=>l(!1)),$=Ut(Fe=>k({type:0,id:Fe})),L=Ia()?c?!1:w===0:!1,U=h>1,ce=j.useContext(Oc)!==null,[z,K]=rO(),{resolveContainers:W,mainTreeNodeRef:ge,MainTreeNode:he}=RO({portals:z,defaultContainers:[(n=S.panelRef.current)!=null?n:y.current]}),be=U?"parent":"leaf",De=g!==null?(g&ar.Closing)===ar.Closing:!1,Be=(()=>ce||De?!1:L)(),X=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("body > *"))!=null?Fe:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(X,Be);let ne=(()=>U?!0:L)(),_e=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("[data-headlessui-portal]"))!=null?Fe:[]).find(He=>He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(_e,ne);let N=(()=>!(!L||U))();$C(W,C,N);let G=(()=>!(U||w!==0))();V_(E==null?void 0:E.defaultView,"keydown",Fe=>{G&&(Fe.defaultPrevented||Fe.key===G_.Escape&&(Fe.preventDefault(),Fe.stopPropagation(),C()))});let oe=(()=>!(De||w!==0||ce))();IO(E,oe,W),j.useEffect(()=>{if(w!==0||!y.current)return;let Fe=new ResizeObserver(Ke=>{for(let He of Ke){let xe=He.target.getBoundingClientRect();xe.x===0&&xe.y===0&&xe.width===0&&xe.height===0&&C()}});return Fe.observe(y.current),()=>Fe.disconnect()},[w,y,C]);let[Z,ie]=aO(),re=j.useMemo(()=>[{dialogState:w,close:C,setTitleId:$},S],[w,S,C,$]),Se=j.useMemo(()=>({open:w===0}),[w]),Pe={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":Z};return ot.createElement(dO,{type:"Dialog",enabled:w===0,element:y,onUpdate:Ut((Fe,Ke)=>{Ke==="Dialog"&&An(Fe,{[uh.Add]:()=>p(He=>He+1),[uh.Remove]:()=>p(He=>He-1)})})},ot.createElement(ih,{force:!0},ot.createElement(lh,null,ot.createElement(Oc.Provider,{value:re},ot.createElement(lh.Group,{target:y},ot.createElement(ih,{force:!1},ot.createElement(ie,{slot:Se,name:"Dialog.Description"},ot.createElement(Sl,{initialFocus:s,containers:W,features:L?An(be,{parent:Sl.features.RestoreFocus,leaf:Sl.features.All&~Sl.features.FocusLock}):Sl.features.None},ot.createElement(K,null,jr({ourProps:Pe,theirProps:f,slot:Se,defaultTag:MO,features:FO,visible:w===0,name:"Dialog"}))))))))),ot.createElement(he,null))}let UO="div";function BO(e,t){let n=La(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=hu("Dialog.Overlay"),s=Hr(t),c=Ut(h=>{if(h.target===h.currentTarget){if(IC(h.currentTarget))return h.preventDefault();h.preventDefault(),h.stopPropagation(),l()}}),f=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:f,defaultTag:UO,name:"Dialog.Overlay"})}let HO="div";function WO(e,t){let n=La(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Backdrop"),s=Hr(t);j.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let c=j.useMemo(()=>({open:i===0}),[i]);return ot.createElement(ih,{force:!0},ot.createElement(lh,null,jr({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:HO,name:"Dialog.Backdrop"})))}let GO="div";function VO(e,t){let n=La(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Panel"),s=Hr(t,l.panelRef),c=j.useMemo(()=>({open:i===0}),[i]),f=Ut(h=>{h.stopPropagation()});return jr({ourProps:{ref:s,id:r,onClick:f},theirProps:o,slot:c,defaultTag:GO,name:"Dialog.Panel"})}let qO="h2";function KO(e,t){let n=La(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=hu("Dialog.Title"),s=Hr(t);j.useEffect(()=>(l(r),()=>l(null)),[r,l]);let c=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r},theirProps:o,slot:c,defaultTag:qO,name:"Dialog.Title"})}let QO=dr(zO),YO=dr(WO),XO=dr(VO),ZO=dr(BO),JO=dr(KO),fy=Object.assign(QO,{Backdrop:YO,Panel:XO,Overlay:ZO,Title:JO,Description:cO});function eA(e=0){let[t,n]=j.useState(e),r=pu(),o=j.useCallback(c=>{r.current&&n(f=>f|c)},[t,r]),i=j.useCallback(c=>!!(t&c),[t]),l=j.useCallback(c=>{r.current&&n(f=>f&~c)},[n,r]),s=j.useCallback(c=>{r.current&&n(f=>f^c)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}function tA(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function ep(e,...t){e&&t.length>0&&e.classList.remove(...t)}function nA(e,t){let n=Hi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,p)=>p-h);return f}),s=i+l;if(s!==0){n.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&f.dispose()})});let c=n.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function rA(e,t,n,r){let o=n?"enter":"leave",i=Hi(),l=r!==void 0?tA(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=An(o,{enter:()=>t.enter,leave:()=>t.leave}),c=An(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=An(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ep(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...s,...f),i.nextFrame(()=>{ep(e,...t.base,...s,...f),Jd(e,...t.base,...s,...c),nA(e,()=>(ep(e,...t.base,...s),Jd(e,...t.base,...t.entered),l()))}),i.dispose}function oA({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=pu(),s=wg(),c=So(n);Ar(()=>{e&&(c.current="enter")},[e]),Ar(()=>{let f=Hi();s.add(f.dispose);let h=t.current;if(h&&c.current!=="idle"&&l.current)return f.dispose(),o.current(c.current),f.add(rA(h,r.current,c.current==="enter",()=>{f.dispose(),i.current(c.current)})),f.dispose},[n])}function Go(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let ef=j.createContext(null);ef.displayName="TransitionContext";var iA=(e=>(e.Visible="visible",e.Hidden="hidden",e))(iA||{});function aA(){let e=j.useContext(ef);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function lA(){let e=j.useContext(tf);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let tf=j.createContext(null);tf.displayName="NestingContext";function nf(e){return"children"in e?nf(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tx(e,t){let n=So(e),r=j.useRef([]),o=pu(),i=wg(),l=Ut((y,b=Jo.Hidden)=>{let E=r.current.findIndex(({el:O})=>O===y);E!==-1&&(An(b,{[Jo.Unmount](){r.current.splice(E,1)},[Jo.Hidden](){r.current[E].state="hidden"}}),i.microTask(()=>{var O;!nf(r)&&o.current&&((O=n.current)==null||O.call(n))}))}),s=Ut(y=>{let b=r.current.find(({el:E})=>E===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>l(y,Jo.Unmount)}),c=j.useRef([]),f=j.useRef(Promise.resolve()),h=j.useRef({enter:[],leave:[],idle:[]}),p=Ut((y,b,E)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([O])=>O!==y)),t==null||t.chains.current[b].push([y,new Promise(O=>{c.current.push(O)})]),t==null||t.chains.current[b].push([y,new Promise(O=>{Promise.all(h.current[b].map(([_,w])=>w)).then(()=>O())})]),b==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>E(b)):E(b)}),g=Ut((y,b,E)=>{Promise.all(h.current[b].splice(0).map(([O,_])=>_)).then(()=>{var O;(O=c.current.shift())==null||O()}).then(()=>E(b))});return j.useMemo(()=>({children:r,register:s,unregister:l,onStart:p,onStop:g,wait:f,chains:h}),[s,l,r,p,g,h,f])}function uA(){}let sA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dy(e){var t;let n={};for(let r of sA)n[r]=(t=e[r])!=null?t:uA;return n}function cA(e){let t=j.useRef(dy(e));return j.useEffect(()=>{t.current=dy(e)},[e]),t}let fA="div",nx=Tc.RenderStrategy;function dA(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:c,enterFrom:f,enterTo:h,entered:p,leave:g,leaveFrom:y,leaveTo:b,...E}=e,O=j.useRef(null),_=Hr(O,t),w=(n=E.unmount)==null||n?Jo.Unmount:Jo.Hidden,{show:S,appear:k,initial:C}=aA(),[$,L]=j.useState(S?"visible":"hidden"),U=lA(),{register:ce,unregister:z}=U;j.useEffect(()=>ce(O),[ce,O]),j.useEffect(()=>{if(w===Jo.Hidden&&O.current){if(S&&$!=="visible"){L("visible");return}return An($,{hidden:()=>z(O),visible:()=>ce(O)})}},[$,O,ce,z,S,w]);let K=So({base:Go(E.className),enter:Go(c),enterFrom:Go(f),enterTo:Go(h),entered:Go(p),leave:Go(g),leaveFrom:Go(y),leaveTo:Go(b)}),W=cA({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),ge=Ia();j.useEffect(()=>{if(ge&&$==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,$,ge]);let he=C&&!k,be=k&&S&&C,De=(()=>!ge||he?"idle":S?"enter":"leave")(),Be=eA(0),X=Ut(oe=>An(oe,{enter:()=>{Be.addFlag(ar.Opening),W.current.beforeEnter()},leave:()=>{Be.addFlag(ar.Closing),W.current.beforeLeave()},idle:()=>{}})),ne=Ut(oe=>An(oe,{enter:()=>{Be.removeFlag(ar.Opening),W.current.afterEnter()},leave:()=>{Be.removeFlag(ar.Closing),W.current.afterLeave()},idle:()=>{}})),_e=tx(()=>{L("hidden"),z(O)},U);oA({immediate:be,container:O,classes:K,direction:De,onStart:So(oe=>{_e.onStart(O,oe,X)}),onStop:So(oe=>{_e.onStop(O,oe,ne),oe==="leave"&&!nf(_e)&&(L("hidden"),z(O))})});let N=E,G={ref:_};return be?N={...N,className:kc(E.className,...K.current.enter,...K.current.enterFrom)}:(N.className=kc(E.className,(r=O.current)==null?void 0:r.className),N.className===""&&delete N.className),ot.createElement(tf.Provider,{value:_e},ot.createElement(zC,{value:An($,{visible:ar.Open,hidden:ar.Closed})|Be.flags},jr({ourProps:G,theirProps:N,defaultTag:fA,features:nx,visible:$==="visible",name:"Transition.Child"})))}function pA(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=j.useRef(null),s=Hr(l,t);Ia();let c=xg();if(n===void 0&&c!==null&&(n=(c&ar.Open)===ar.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[f,h]=j.useState(n?"visible":"hidden"),p=tx(()=>{h("hidden")}),[g,y]=j.useState(!0),b=j.useRef([n]);Ar(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let E=j.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);j.useEffect(()=>{if(n)h("visible");else if(!nf(p))h("hidden");else{let S=l.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&h("hidden")}},[n,p]);let O={unmount:o},_=Ut(()=>{var S;g&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),w=Ut(()=>{var S;g&&y(!1),(S=e.beforeLeave)==null||S.call(e)});return ot.createElement(tf.Provider,{value:p},ot.createElement(ef.Provider,{value:E},jr({ourProps:{...O,as:j.Fragment,children:ot.createElement(rx,{ref:s,...O,...i,beforeEnter:_,beforeLeave:w})},theirProps:{},defaultTag:j.Fragment,features:nx,visible:f==="visible",name:"Transition"})))}function hA(e,t){let n=j.useContext(ef)!==null,r=xg()!==null;return ot.createElement(ot.Fragment,null,!n&&r?ot.createElement(sh,{ref:t,...e}):ot.createElement(rx,{ref:t,...e}))}let sh=dr(pA),rx=dr(dA),gA=dr(hA),Ds=Object.assign(sh,{Child:gA,Root:sh});function mA(e){return M.jsxs(M.Fragment,{children:[M.jsx(Ds.Root,{show:e.sidebarOpen,as:j.Fragment,children:M.jsxs(fy,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),M.jsx("div",{className:"fixed inset-0 flex",children:M.jsx(Ds.Child,{as:j.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:M.jsxs(fy.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[M.jsx("span",{className:"sr-only",children:"Close sidebar"}),M.jsx(oT,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})]})})})]})}),M.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})}),M.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[M.jsx("span",{className:"sr-only",children:"Open sidebar"}),M.jsx(P2,{className:"h-6 w-6","aria-hidden":"true"})]}),M.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?M.jsxs(M.Fragment,{children:["OpenGPTs: ",M.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),M.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),M.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:M.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function py(e){var t;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:On(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),M.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function vA(e){var t,n;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterConfig(null),className:On(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Bot"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var ox={exports:{}},yA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wA=yA,_A=wA;function ix(){}function ax(){}ax.resetWarningCache=ix;var xA=function(){function e(r,o,i,l,s,c){if(c!==_A){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ax,resetWarningCache:ix};return n.PropTypes=n,n};ox.exports=xA();var bA=ox.exports;const At=xh(bA);function Ma(e,t,n,r){function o(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function c(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?i(h.value):o(h.value).then(s,c)}f((r=r.apply(e,t||[])).next())})}function Fa(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){l={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function gy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function EA(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=SA.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kA=[".DS_Store","Thumbs.db"];function TA(e){return Ma(this,void 0,void 0,function(){return Fa(this,function(t){return Ac(e)&&CA(e.dataTransfer)?[2,PA(e.dataTransfer,e.type)]:OA(e)?[2,AA(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jA(e)]:[2,[]]})})}function CA(e){return Ac(e)}function OA(e){return Ac(e)&&Ac(e.target)}function Ac(e){return typeof e=="object"&&e!==null}function AA(e){return ch(e.target.files).map(function(t){return gu(t)})}function jA(e){return Ma(this,void 0,void 0,function(){var t;return Fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return gu(r)})]}})})}function PA(e,t){return Ma(this,void 0,void 0,function(){var n,r;return Fa(this,function(o){switch(o.label){case 0:return e.items?(n=ch(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RA))]):[3,2];case 1:return r=o.sent(),[2,my(lx(r))];case 2:return[2,my(ch(e.files).map(function(i){return gu(i)}))]}})})}function my(e){return e.filter(function(t){return kA.indexOf(t.name)===-1})}function ch(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,xy(n)];if(e.sizen)return[!1,xy(n)]}return[!0,null]}function ki(e){return e!=null}function KA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=fx(c,n),h=iu(f,1),p=h[0],g=dx(c,r,o),y=iu(g,1),b=y[0],E=s?s(c):null;return p&&b&&!E})}function jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Is(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sy(e){e.preventDefault()}function QA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YA(e){return e.indexOf("Edge/")!==-1}function XA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QA(e)||YA(e)}function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eg=j.forwardRef(function(e,t){var n=e.children,r=Pc(e,rj),o=vx(r),i=o.open,l=Pc(o,oj);return j.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(j.Fragment,null,n(Vt(Vt({},l),{},{open:i})))});Eg.displayName="Dropzone";var mx={disabled:!1,getFilesFromEvent:TA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Eg.defaultProps=mx;Eg.propTypes={children:At.func,accept:At.objectOf(At.arrayOf(At.string)),multiple:At.bool,preventDropOnDocument:At.bool,noClick:At.bool,noKeyboard:At.bool,noDrag:At.bool,noDragEventsBubbling:At.bool,minSize:At.number,maxSize:At.number,maxFiles:At.number,disabled:At.bool,getFilesFromEvent:At.func,onFileDialogCancel:At.func,onFileDialogOpen:At.func,useFsAccessApi:At.bool,autoFocus:At.bool,onDragEnter:At.func,onDragLeave:At.func,onDragOver:At.func,onDrop:At.func,onDropAccepted:At.func,onDropRejected:At.func,onError:At.func,validator:At.func};var hh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vt(Vt({},mx),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,s=t.multiple,c=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,g=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,E=t.onFileDialogCancel,O=t.onFileDialogOpen,_=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,C=t.noKeyboard,$=t.noDrag,L=t.noDragEventsBubbling,U=t.onError,ce=t.validator,z=j.useMemo(function(){return ej(n)},[n]),K=j.useMemo(function(){return JA(n)},[n]),W=j.useMemo(function(){return typeof O=="function"?O:ky},[O]),ge=j.useMemo(function(){return typeof E=="function"?E:ky},[E]),he=j.useRef(null),be=j.useRef(null),De=j.useReducer(gj,hh),Be=tp(De,2),X=Be[0],ne=Be[1],_e=X.isFocused,N=X.isFileDialogActive,G=j.useRef(typeof window<"u"&&window.isSecureContext&&_&&ZA()),oe=function(){!G.current&&N&&setTimeout(function(){if(be.current){var Oe=be.current.files;Oe.length||(ne({type:"closeDialog"}),ge())}},300)};j.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[be,N,ge,G]);var Z=j.useRef([]),ie=function(Oe){he.current&&he.current.contains(Oe.target)||(Oe.preventDefault(),Z.current=[])};j.useEffect(function(){return S&&(document.addEventListener("dragover",Sy,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",Sy),document.removeEventListener("drop",ie))}},[he,S]),j.useEffect(function(){return!r&&w&&he.current&&he.current.focus(),function(){}},[he,w,r]);var re=j.useCallback(function(se){U?U(se):console.error(se)},[U]),Se=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[].concat(lj(Z.current),[se.target]),Is(se)&&Promise.resolve(o(se)).then(function(Oe){if(!(jc(se)&&!L)){var pt=Oe.length,Rt=pt>0&&KA({files:Oe,accept:z,minSize:l,maxSize:i,multiple:s,maxFiles:c,validator:ce}),Yt=pt>0&&!Rt;ne({isDragAccept:Rt,isDragReject:Yt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(Oe){return re(Oe)})},[o,f,re,L,z,l,i,s,c,ce]),Pe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Is(se);if(Oe&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return Oe&&p&&p(se),!1},[p,L]),Fe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Z.current.filter(function(Rt){return he.current&&he.current.contains(Rt)}),pt=Oe.indexOf(se.target);pt!==-1&&Oe.splice(pt,1),Z.current=Oe,!(Oe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Is(se)&&h&&h(se))},[he,h,L]),Ke=j.useCallback(function(se,Oe){var pt=[],Rt=[];se.forEach(function(Yt){var Pn=fx(Yt,z),dn=tp(Pn,2),pn=dn[0],Rn=dn[1],Xn=dx(Yt,l,i),A=tp(Xn,2),R=A[0],I=A[1],q=ce?ce(Yt):null;if(pn&&R&&!q)pt.push(Yt);else{var V=[Rn,I];q&&(V=V.concat(q)),Rt.push({file:Yt,errors:V.filter(function(de){return de})})}}),(!s&&pt.length>1||s&&c>=1&&pt.length>c)&&(pt.forEach(function(Yt){Rt.push({file:Yt,errors:[qA]})}),pt.splice(0)),ne({acceptedFiles:pt,fileRejections:Rt,type:"setFiles"}),g&&g(pt,Rt,Oe),Rt.length>0&&b&&b(Rt,Oe),pt.length>0&&y&&y(pt,Oe)},[ne,s,z,l,i,c,g,y,b,ce]),He=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[],Is(se)&&Promise.resolve(o(se)).then(function(Oe){jc(se)&&!L||Ke(Oe,se)}).catch(function(Oe){return re(Oe)}),ne({type:"reset"})},[o,Ke,re,L]),xe=j.useCallback(function(){if(G.current){ne({type:"openDialog"}),W();var se={multiple:s,types:K};window.showOpenFilePicker(se).then(function(Oe){return o(Oe)}).then(function(Oe){Ke(Oe,null),ne({type:"closeDialog"})}).catch(function(Oe){tj(Oe)?(ge(Oe),ne({type:"closeDialog"})):nj(Oe)?(G.current=!1,be.current?(be.current.value=null,be.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):re(Oe)});return}be.current&&(ne({type:"openDialog"}),W(),be.current.value=null,be.current.click())},[ne,W,ge,_,Ke,re,K,s]),Xe=j.useCallback(function(se){!he.current||!he.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),xe())},[he,xe]),rt=j.useCallback(function(){ne({type:"focus"})},[]),Ie=j.useCallback(function(){ne({type:"blur"})},[]),Ze=j.useCallback(function(){k||(XA()?setTimeout(xe,0):xe())},[k,xe]),gt=function(Oe){return r?null:Oe},Mt=function(Oe){return C?null:gt(Oe)},jt=function(Oe){return $?null:gt(Oe)},yt=function(Oe){L&&Oe.stopPropagation()},kt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.role,Yt=se.onKeyDown,Pn=se.onFocus,dn=se.onBlur,pn=se.onClick,Rn=se.onDragEnter,Xn=se.onDragOver,A=se.onDragLeave,R=se.onDrop,I=Pc(se,ij);return Vt(Vt(ph({onKeyDown:Mt(Zr(Yt,Xe)),onFocus:Mt(Zr(Pn,rt)),onBlur:Mt(Zr(dn,Ie)),onClick:gt(Zr(pn,Ze)),onDragEnter:jt(Zr(Rn,Se)),onDragOver:jt(Zr(Xn,Pe)),onDragLeave:jt(Zr(A,Fe)),onDrop:jt(Zr(R,He)),role:typeof Rt=="string"&&Rt!==""?Rt:"presentation"},pt,he),!r&&!C?{tabIndex:0}:{}),I)}},[he,Xe,rt,Ie,Ze,Se,Pe,Fe,He,C,$,r]),$e=j.useCallback(function(se){se.stopPropagation()},[]),Bt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.onChange,Yt=se.onClick,Pn=Pc(se,aj),dn=ph({accept:z,multiple:s,type:"file",style:{display:"none"},onChange:gt(Zr(Rt,He)),onClick:gt(Zr(Yt,$e)),tabIndex:-1},pt,be);return Vt(Vt({},dn),Pn)}},[be,n,s,He,r]);return Vt(Vt({},X),{},{isFocused:_e&&!r,getRootProps:kt,getInputProps:Bt,rootRef:he,inputRef:be,open:gt(xe)})}function gj(e,t){switch(t.type){case"focus":return Vt(Vt({},e),{},{isFocused:!0});case"blur":return Vt(Vt({},e),{},{isFocused:!1});case"openDialog":return Vt(Vt({},hh),{},{isFileDialogActive:!0});case"closeDialog":return Vt(Vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vt(Vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vt(Vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vt({},hh);default:return e}}function ky(){}const mj={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},vj={borderColor:"#2196f3"},yj={borderColor:"#00e676"},wj={borderColor:"#ff1744"};function _j(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function xj(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,o=e.files.map((l,s)=>M.jsxs("li",{children:[l.name," - ",l.size," bytes",M.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(c=>c.filter(f=>f!==l)),children:M.jsx(tT,{className:"h-4 w-4"})})]},s)),i=j.useMemo(()=>({...mj,...e.state.isFocused?vj:{},...e.state.isDragAccept?yj:{},...e.state.isDragReject?wj:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return M.jsxs("section",{className:"",children:[M.jsxs("aside",{children:[M.jsx(_j,{id:"files",title:"Files"}),M.jsx("div",{className:"prose",children:M.jsx("ul",{children:o})})]}),M.jsxs("div",{...t({style:i}),children:[M.jsx("input",{...n()}),M.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",M.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",M.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:M.jsx("ul",{children:r.map((l,s)=>M.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},s))})})]})]})}function kg(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function bj(e){return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Ty(e){var t;return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsxs("fieldset",{children:[M.jsx("legend",{className:"sr-only",children:e.field.title}),M.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>M.jsxs("div",{className:"flex items-center",children:[M.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),M.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const Sj={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function Ej(e){var t,n,r;return M.jsxs("fieldset",{children:[M.jsx(kg,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),M.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>{var i;return M.jsxs("div",{className:"relative flex items-start",children:[M.jsx("div",{className:"flex h-6 items-center",children:M.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(s=>s!==o))}})}),M.jsxs("div",{className:"ml-3 text-sm leading-6",children:[M.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o}),((i=e.descriptions)==null?void 0:i[o])&&M.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:_t(e.descriptions[o])}})]})]},o)})})]})}function kj(e){const t=window.location.href+"?shared_id="+e.assistantId;return M.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[M.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[M.jsx(Z2,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),M.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function Tj(e){var p,g,y,b,E,O;const[t,n]=j.useState(((p=e.config)==null?void 0:p.config)??e.configDefaults),[r,o]=j.useState([]),i=vx({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,s]=j.useState(((g=e.config)==null?void 0:g.public)??!1);j.useEffect(()=>{var _;n(((_=e.config)==null?void 0:_.config)??e.configDefaults)},[e.config,e.configDefaults]),j.useEffect(()=>{i.acceptedFiles.length>0&&(n(_=>{var w;return{configurable:{..._==null?void 0:_.configurable,tools:[...(((w=_==null?void 0:_.configurable)==null?void 0:w.tools)??[]).filter(S=>S!=="Retrieval"),"Retrieval"]}}}),o(_=>[..._.filter(w=>!i.acceptedFiles.includes(w)),...i.acceptedFiles]))},[i.acceptedFiles]);const[c,f]=j.useState(!1),h=!!e.config&&!c;return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:M.jsxs("span",{children:["Bot: ",((y=e.config)==null?void 0:y.name)??"New Bot"," ",M.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((b=e.config)==null?void 0:b.public)&&M.jsx(kj,{assistantId:(E=e.config)==null?void 0:E.assistant_id}),M.jsxs("form",{className:On("flex flex-col gap-8"),onSubmit:async _=>{_.preventDefault(),_.stopPropagation();const S=_.target.key.value;S&&(f(!0),await e.saveConfig(S,t,i.acceptedFiles,l),f(!1))},children:[M.jsxs("div",{className:On("flex flex-col gap-8",h&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((O=e.configSchema)==null?void 0:O.properties.configurable.properties)??{}).map(([_,w])=>{var k,C,$,L;const S=w.title;if(((k=w.allOf)==null?void 0:k.length)===1&&(w=w.allOf[0]),_==="agent_type")return M.jsx(Ty,{id:_,field:w,title:S,value:(C=t==null?void 0:t.configurable)==null?void 0:C[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="system_message")return M.jsx(bj,{id:_,field:w,title:S,value:($=t==null?void 0:t.configurable)==null?void 0:$[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="tools")return M.jsx(Ej,{id:_,field:w,title:S,value:(L=t==null?void 0:t.configurable)==null?void 0:L[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h,descriptions:Sj},_)}),!e.config&&M.jsx(xj,{state:i,files:r,setFiles:o}),M.jsx(Ty,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:_=>s(_==="Yes"),readonly:h})]}),!e.config&&M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:M.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),M.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:c?"Saving...":"Save"})]})]})]})}function Cj(e){var t;return M.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[M.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[M.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:M.jsx(vA,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),M.jsx("main",{className:"flex-1",children:M.jsx("div",{className:"px-4",children:M.jsx(Tj,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startChat})})]})}function Oj(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var CP=TP,OP=lf;function AP(e,t){var n=this.__data__,r=OP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var jP=AP,PP=pP,RP=xP,$P=EP,NP=CP,DP=jP;function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,y=n&E$?new _$:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=jN}var Rg=PN,RN=mu,$N=Rg,NN=vu,DN="[object Arguments]",IN="[object Array]",LN="[object Boolean]",MN="[object Date]",FN="[object Error]",zN="[object Function]",UN="[object Map]",BN="[object Number]",HN="[object Object]",WN="[object RegExp]",GN="[object Set]",VN="[object String]",qN="[object WeakMap]",KN="[object ArrayBuffer]",QN="[object DataView]",YN="[object Float32Array]",XN="[object Float64Array]",ZN="[object Int8Array]",JN="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",n4="[object Uint8ClampedArray]",r4="[object Uint16Array]",o4="[object Uint32Array]",It={};It[YN]=It[XN]=It[ZN]=It[JN]=It[e4]=It[t4]=It[n4]=It[r4]=It[o4]=!0;It[DN]=It[IN]=It[KN]=It[LN]=It[QN]=It[MN]=It[FN]=It[zN]=It[UN]=It[BN]=It[HN]=It[WN]=It[GN]=It[VN]=It[qN]=!1;function i4(e){return NN(e)&&$N(e.length)&&!!It[RN(e)]}var a4=i4;function l4(e){return function(t){return e(t)}}var $x=l4,Nc={exports:{}};Nc.exports;(function(e,t){var n=wx,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,l=i&&n.process,s=function(){try{var c=o&&o.require&&o.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nc,Nc.exports);var u4=Nc.exports,s4=a4,c4=$x,Uy=u4,By=Uy&&Uy.isTypedArray,f4=By?c4(By):s4,Nx=f4,d4=gN,p4=jx,h4=io,g4=Px,m4=Rx,v4=Nx,y4=Object.prototype,w4=y4.hasOwnProperty;function _4(e,t){var n=h4(e),r=!n&&p4(e),o=!n&&!r&&g4(e),i=!n&&!r&&!o&&v4(e),l=n||r||o||i,s=l?d4(e.length,String):[],c=s.length;for(var f in e)(t||w4.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m4(f,c)))&&s.push(f);return s}var x4=_4,b4=Object.prototype;function S4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b4;return e===n}var E4=S4;function k4(e,t){return function(n){return e(t(n))}}var T4=k4,C4=T4,O4=C4(Object.keys,Object),A4=O4,j4=E4,P4=A4,R4=Object.prototype,$4=R4.hasOwnProperty;function N4(e){if(!j4(e))return P4(e);var t=[];for(var n in Object(e))$4.call(e,n)&&n!="constructor"&&t.push(n);return t}var D4=N4,I4=xx,L4=Rg;function M4(e){return e!=null&&L4(e.length)&&!I4(e)}var $g=M4,F4=x4,z4=D4,U4=$g;function B4(e){return U4(e)?F4(e):z4(e)}var Ng=B4,H4=rN,W4=pN,G4=Ng;function V4(e){return H4(e,G4,W4)}var q4=V4,Hy=q4,K4=1,Q4=Object.prototype,Y4=Q4.hasOwnProperty;function X4(e,t,n,r,o,i){var l=n&K4,s=Hy(e),c=s.length,f=Hy(t),h=f.length;if(c!=h&&!l)return!1;for(var p=c;p--;){var g=s[p];if(!(l?g in t:Y4.call(t,g)))return!1}var y=i.get(e),b=i.get(t);if(y&&b)return y==t&&b==e;var E=!0;i.set(e,t),i.set(t,e);for(var O=l;++pt||i&&l&&c&&!s&&!f||r&&l&&c||!n&&c||!o)return 1;if(!r&&!i&&!f&&e=s)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var hL=pL,ip=yx,gL=Pg,mL=UI,vL=lL,yL=sL,wL=$x,_L=hL,xL=zx,bL=io;function SL(e,t,n){t.length?t=ip(t,function(i){return bL(i)?function(l){return gL(l,i.length===1?i[0]:i)}:i}):t=[xL];var r=-1;t=ip(t,wL(mL));var o=vL(e,function(i,l,s){var c=ip(t,function(f){return f(i)});return{criteria:c,index:++r,value:i}});return yL(o,function(i,l){return _L(i,l,n)})}var EL=SL,kL=EL,r1=io;function TL(e,t,n,r){return e==null?[]:(r1(t)||(t=t==null?[]:[t]),n=r?void 0:n,r1(n)||(n=n==null?[]:[n]),kL(e,t,n))}var CL=TL;const Ux=xh(CL);function OL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return Ux(t,"updated_at","desc")}function AL(){const[e,t]=j.useReducer(OL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const s=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(c=>c.json());t(s)}l()},[]);const o=j.useCallback(async(l,s,c=crypto.randomUUID())=>{const f=await fetch(`/threads/${c}`,{method:"PUT",body:JSON.stringify({assistant_id:s,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(h=>h.json());return t(f),r(f.thread_id),f},[]),i=j.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:o,enterChat:i}}const jL=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)n.d(i,l,(function(s){return r[s]}).bind(null,l));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}var o=n(47),i=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(i,l){var s=o(i,l);return r(s)?s:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(l){return i(l)?r(l):o(l)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(i){return i!=null&&o(i.length)&&!r(i)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),l=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":l&&l in Object(s)?o(s):i(s)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),l=n(61),s=n(134),c=n(8),f=n(48),h=f(r),p=f(o),g=f(i),y=f(l),b=f(s),E=c;(r&&E(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&E(new o)!="[object Map]"||i&&E(i.resolve())!="[object Promise]"||l&&E(new l)!="[object Set]"||s&&E(new s)!="[object WeakMap]")&&(E=function(O){var _=c(O),w=_=="[object Object]"?O.constructor:void 0,S=w?f(w):"";if(S)switch(S){case h:return"[object DataView]";case p:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return _}),e.exports=E},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(p)}var i=n(2),l=n(121),s=o(t)=="object"&&t&&!t.nodeType&&t,c=s&&o(r)=="object"&&r&&!r.nodeType&&r,f=c&&c.exports===s?i.Buffer:void 0,h=(f?f.isBuffer:void 0)||l;r.exports=h}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(O){if(n===setTimeout)return setTimeout(O,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:i}catch{n=i}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,f=[],h=!1,p=-1;function g(){h&&c&&(h=!1,c.length?f=c.concat(f):p=-1,f.length&&y())}function y(){if(!h){var O=s(g);h=!0;for(var _=f.length;_;){for(c=f,f=[];++p<_;)c&&c[p].run();p=-1,_=f.length}c=null,h=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(O)}}function b(O,_){this.fun=O,this.array=_}function E(){}o.nextTick=function(O){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;wO){var _=E;E=O,O=_}return E+""+O+""+(o.isUndefined(b)?"\0":b)}function f(p,g,y,b){var E=""+g,O=""+y;if(!p&&E>O){var _=E;E=O,O=_}var w={v:E,w:O};return b&&(w.name=b),w}function h(p,g){return c(p,g.v,g.w,g.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(p){return this._label=p,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultNodeLabelFn=p,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._in[g])})},i.prototype.sinks=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._out[g])})},i.prototype.setNodes=function(p,g){var y=arguments,b=this;return o.each(p,function(E){y.length>1?b.setNode(E,g):b.setNode(E)}),this},i.prototype.setNode=function(p,g){return o.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=g),this):(this._nodes[p]=arguments.length>1?g:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]="\0",this._children[p]={},this._children["\0"][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},i.prototype.node=function(p){return this._nodes[p]},i.prototype.hasNode=function(p){return o.has(this._nodes,p)},i.prototype.removeNode=function(p){var g=this;if(o.has(this._nodes,p)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],o.each(this.children(p),function(b){g.setParent(b)}),delete this._children[p]),o.each(o.keys(this._in[p]),y),delete this._in[p],delete this._preds[p],o.each(o.keys(this._out[p]),y),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},i.prototype.setParent=function(p,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===p)throw new Error("Setting "+g+" as parent of "+p+" would create a cycle");this.setNode(g)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=g,this._children[g][p]=!0,this},i.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},i.prototype.parent=function(p){if(this._isCompound){var g=this._parent[p];if(g!=="\0")return g}},i.prototype.children=function(p){if(o.isUndefined(p)&&(p="\0"),this._isCompound){var g=this._children[p];if(g)return o.keys(g)}else{if(p==="\0")return this.nodes();if(this.hasNode(p))return[]}},i.prototype.predecessors=function(p){var g=this._preds[p];if(g)return o.keys(g)},i.prototype.successors=function(p){var g=this._sucs[p];if(g)return o.keys(g)},i.prototype.neighbors=function(p){var g=this.predecessors(p);if(g)return o.union(g,this.successors(p))},i.prototype.isLeaf=function(p){return(this.isDirected()?this.successors(p):this.neighbors(p)).length===0},i.prototype.filterNodes=function(p){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(E,O){p(O)&&g.setNode(O,E)}),o.each(this._edgeObjs,function(E){g.hasNode(E.v)&&g.hasNode(E.w)&&g.setEdge(E,y.edge(E))});var b={};return this._isCompound&&o.each(g.nodes(),function(E){g.setParent(E,function O(_){var w=y.parent(_);return w===void 0||g.hasNode(w)?(b[_]=w,w):w in b?b[w]:O(w)}(E))}),g},i.prototype.setDefaultEdgeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultEdgeLabelFn=p,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(p,g){var y=this,b=arguments;return o.reduce(p,function(E,O){return b.length>1?y.setEdge(E,O,g):y.setEdge(E,O),O}),this},i.prototype.setEdge=function(){var p,g,y,b,E=!1,O=arguments[0];r(O)==="object"&&O!==null&&"v"in O?(p=O.v,g=O.w,y=O.name,arguments.length===2&&(b=arguments[1],E=!0)):(p=O,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],E=!0)),p=""+p,g=""+g,o.isUndefined(y)||(y=""+y);var _=c(this._isDirected,p,g,y);if(o.has(this._edgeLabels,_))return E&&(this._edgeLabels[_]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(g),this._edgeLabels[_]=E?b:this._defaultEdgeLabelFn(p,g,y);var w=f(this._isDirected,p,g,y);return p=w.v,g=w.w,Object.freeze(w),this._edgeObjs[_]=w,l(this._preds[g],p),l(this._sucs[p],g),this._in[g][_]=w,this._out[p][_]=w,this._edgeCount++,this},i.prototype.edge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return this._edgeLabels[b]},i.prototype.hasEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return o.has(this._edgeLabels,b)},i.prototype.removeEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y),E=this._edgeObjs[b];return E&&(p=E.v,g=E.w,delete this._edgeLabels[b],delete this._edgeObjs[b],s(this._preds[g],p),s(this._sucs[p],g),delete this._in[g][b],delete this._out[p][b],this._edgeCount--),this},i.prototype.inEdges=function(p,g){var y=this._in[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.v===g}):b}},i.prototype.outEdges=function(p,g){var y=this._out[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.w===g}):b}},i.prototype.nodeEdges=function(p,g){var y=this.inEdges(p,g);if(y)return y.concat(this.outEdges(p,g))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),l=n(97),s=n(98),c=n(99);function f(h){var p=this.__data__=new r(h);this.size=p.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=l,f.prototype.has=s,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),l=n(116),s=n(117);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}var i=n(47),l=o(t)=="object"&&t&&!t.nodeType&&t,s=l&&o(r)=="object"&&r&&!r.nodeType&&r,c=s&&s.exports===l&&i.process,f=function(){try{var h=s&&s.require&&s.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();r.exports=f}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return o(l);var s=[];for(var c in Object(l))i.call(l,c)&&c!="constructor"&&s.push(c);return s}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,s=l?function(c){return c==null?[]:(c=Object(c),r(l(c),function(f){return i.call(c,f)}))}:o;e.exports=s},function(e,t){e.exports=function(n,r){for(var o=-1,i=r.length,l=n.length;++o-1&&o%1==0&&oy))return!1;var E=p.get(l);if(E&&p.get(s))return E==s;var O=-1,_=!0,w=2&c?new r:void 0;for(p.set(l,s),p.set(s,l);++O0&&(b=_.removeMin(),(E=O[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return O}(l,String(s),c||i,f||function(h){return l.outEdges(h)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(i){return i.key})},o.prototype.has=function(i){return r.has(this._keyIndices,i)},o.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(i,l){var s=this._keyIndices;if(i=String(i),!r.has(s,i)){var c=this._arr,f=c.length;return s[i]=f,c.push({key:i,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},o.prototype.decrease=function(i,l){var s=this._keyIndices[i];if(l>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[s].priority+" New: "+l);this._arr[s].priority=l,this._decrease(s)},o.prototype._heapify=function(i){var l=this._arr,s=2*i,c=s+1,f=i;s>1].priority0&&E(_,W))}catch(ge){k.call(new $(W),ge)}}}function k(z){var K=this;K.triggered||(K.triggered=!0,K.def&&(K=K.def),K.msg=z,K.state=2,K.chain.length>0&&E(_,K))}function C(z,K,W,ge){for(var he=0;he-1?Z=ie:(oe=o.isUndefined(N)?void 0:z(N),o.isUndefined(oe)?Z=ie:((Z=oe).path=f(l.join(oe.path,ie.path)),Z.query=function(re,Se){var Pe={};function Fe(Ke){o.forOwn(Ke,function(He,xe){Pe[xe]=He})}return Fe(c.parse(re||"")),Fe(c.parse(Se||"")),Object.keys(Pe).length===0?void 0:c.stringify(Pe)}(oe.query,ie.query))),Z.fragment=void 0,(b.indexOf(Z.reference)===-1&&Z.path.indexOf("../")===0?"../":"")+h.serialize(Z)}function _(N){return y.indexOf(C(N))>-1}function w(N){return o.isUndefined(N.error)&&N.type!=="invalid"}function S(N,G){var oe=N;return G.forEach(function(Z){if(!(Z in oe))throw Error("JSON Pointer points to missing location: "+ne(G));oe=oe[Z]}),oe}function k(N){return Object.keys(N).filter(function(G){return G!=="$ref"})}function C(N){var G;switch(N.uriDetails.reference){case"absolute":case"uri":G="remote";break;case"same-document":G="local";break;default:G=N.uriDetails.reference}return G}function $(N,G){var oe=g[N],Z=Promise.resolve(),ie=o.cloneDeep(G.loaderOptions||{});return o.isUndefined(oe)?(o.isUndefined(ie.processContent)&&(ie.processContent=function(re,Se){Se(void 0,JSON.parse(re.text))}),Z=(Z=s.load(decodeURI(N),ie)).then(function(re){return g[N]={value:re},re}).catch(function(re){throw g[N]={error:re},re})):Z=Z.then(function(){if(o.isError(oe.error))throw oe.error;return oe.value}),Z=Z.then(function(re){return o.cloneDeep(re)})}function L(N,G){var oe=!0;try{if(!o.isPlainObject(N))throw new Error("obj is not an Object");if(!o.isString(N.$ref))throw new Error("obj.$ref is not a String")}catch(Z){if(G)throw Z;oe=!1}return oe}function U(N){return N.indexOf("://")!==-1||l.isAbsolute(N)?N:l.resolve(r.cwd(),N)}function ce(N,G){N.error=G.message,N.missing=!0}function z(N){return h.parse(N)}function K(N,G,oe){S(N,G.slice(0,G.length-1))[G[G.length-1]]=oe}function W(N,G){var oe,Z;if(N=o.isUndefined(N)?{}:o.cloneDeep(N),!o.isObject(N))throw new TypeError("options must be an Object");if(!o.isUndefined(N.resolveCirculars)&&!o.isBoolean(N.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(N.filter)||o.isArray(N.filter)||o.isFunction(N.filter)||o.isString(N.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(N.includeInvalid)&&!o.isBoolean(N.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(N.location)&&!o.isString(N.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(N.refPreProcessor)&&!o.isFunction(N.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(N.refPostProcessor)&&!o.isFunction(N.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(N.subDocPath)&&!o.isArray(N.subDocPath)&&!Be(N.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(N.resolveCirculars)&&(N.resolveCirculars=!1),N.filter=function(ie){var re,Se;return o.isArray(ie.filter)||o.isString(ie.filter)?(Se=o.isString(ie.filter)?[ie.filter]:ie.filter,re=function(Pe){return Se.indexOf(Pe.type)>-1||Se.indexOf(C(Pe))>-1}):o.isFunction(ie.filter)?re=ie.filter:o.isUndefined(ie.filter)&&(re=function(){return!0}),function(Pe,Fe){return(Pe.type!=="invalid"||ie.includeInvalid===!0)&&re(Pe,Fe)}}(N),o.isUndefined(N.location)&&(N.location=U("./root.json")),(oe=N.location.split("#")).length>1&&(N.subDocPath="#"+oe[1]),Z=decodeURI(N.location)===N.location,N.location=O(N.location,void 0),Z&&(N.location=decodeURI(N.location)),N.subDocPath=function(ie){var re;return o.isArray(ie.subDocPath)?re=ie.subDocPath:o.isString(ie.subDocPath)?re=X(ie.subDocPath):o.isUndefined(ie.subDocPath)&&(re=[]),re}(N),!o.isUndefined(G))try{S(G,N.subDocPath)}catch(ie){throw ie.message=ie.message.replace("JSON Pointer","options.subDocPath"),ie}return N}function ge(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~1/g,"/").replace(/~0/g,"~")})}function he(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~/g,"~0").replace(/\//g,"~1")})}function be(N,G){var oe={};if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");return function Z(ie,re,Se,Pe){var Fe=!0;function Ke(He,xe){Se.push(xe),Z(ie,He,Se,Pe),Se.pop()}o.isFunction(Pe)&&(Fe=Pe(ie,re,Se)),ie.indexOf(re)===-1&&(ie.push(re),Fe!==!1&&(o.isArray(re)?re.forEach(function(He,xe){Ke(He,xe.toString())}):o.isObject(re)&&o.forOwn(re,function(He,xe){Ke(He,xe)})),ie.pop())}(function(Z,ie){var re,Se=[];return ie.length>0&&(re=Z,ie.slice(0,ie.length-1).forEach(function(Pe){Pe in re&&(re=re[Pe],Se.push(re))})),Se}(N,(G=W(G,N)).subDocPath),S(N,G.subDocPath),o.cloneDeep(G.subDocPath),function(Z,ie,re){var Se,Pe,Fe=!0;return L(ie)&&(o.isUndefined(G.refPreProcessor)||(ie=G.refPreProcessor(o.cloneDeep(ie),re)),Se=De(ie),o.isUndefined(G.refPostProcessor)||(Se=G.refPostProcessor(Se,re)),G.filter(Se,re)&&(Pe=ne(re),oe[Pe]=Se),k(ie).length>0&&(Fe=!1)),Fe}),oe}function De(N){var G,oe,Z,ie={def:N};try{if(L(N,!0),G=N.$ref,Z=E[G],o.isUndefined(Z)&&(Z=E[G]=z(G)),ie.uri=G,ie.uriDetails=Z,o.isUndefined(Z.error)){ie.type=C(ie);try{["#","/"].indexOf(G[0])>-1?Be(G,!0):G.indexOf("#")>-1&&Be(Z.fragment,!0)}catch(re){ie.error=re.message,ie.type="invalid"}}else ie.error=ie.uriDetails.error,ie.type="invalid";(oe=k(N)).length>0&&(ie.warning="Extra JSON Reference properties will be ignored: "+oe.join(", "))}catch(re){ie.error=re.message,ie.type="invalid"}return ie}function Be(N,G){var oe,Z=!0;try{if(!o.isString(N))throw new Error("ptr is not a String");if(N!==""){if(oe=N.charAt(0),["#","/"].indexOf(oe)===-1)throw new Error("ptr must start with a / or #/");if(oe==="#"&&N!=="#"&&N.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(N.match(p))throw new Error("ptr has invalid token(s)")}}catch(ie){if(G===!0)throw ie;Z=!1}return Z}function X(N){try{Be(N,!0)}catch(oe){throw new Error("ptr must be a JSON Pointer: "+oe.message)}var G=N.split("/");return G.shift(),ge(G)}function ne(N,G){if(!o.isArray(N))throw new Error("path must be an Array");return(G!==!1?"#":"")+(N.length>0?"/":"")+he(N).join("/")}function _e(N,G){var oe=Promise.resolve();return oe=oe.then(function(){if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");G=W(G,N),N=o.cloneDeep(N)}).then(function(){var Z={deps:{},docs:{},refs:{}};return function ie(re,Se,Pe){var Fe,Ke,He=Promise.resolve(),xe=ne(Se.subDocPath),Xe=U(Se.location),rt=l.dirname(Se.location),Ie=Xe+xe;return o.isUndefined(Pe.docs[Xe])&&(Pe.docs[Xe]=re),o.isUndefined(Pe.deps[Ie])&&(Pe.deps[Ie]={},Fe=be(re,Se),o.forOwn(Fe,function(Ze,gt){var Mt,jt,yt=U(Se.location)+gt,kt=Ze.refdId=decodeURI(U(_(Ze)?O(rt,Ze.uri):Se.location)+"#"+(Ze.uri.indexOf("#")>-1?Ze.uri.split("#")[1]:""));Pe.refs[yt]=Ze,w(Ze)&&(Ze.fqURI=kt,Pe.deps[Ie][gt===xe?"#":gt.replace(xe+"/","#/")]=kt,yt.indexOf(kt+"/")!==0&&yt!==kt?((Ke=o.cloneDeep(Se)).subDocPath=o.isUndefined(Ze.uriDetails.fragment)?[]:X(decodeURI(Ze.uriDetails.fragment)),_(Ze)?(delete Ke.filter,Ke.location=kt.split("#")[0],He=He.then((Mt=Pe,jt=Ke,function(){var $e=U(jt.location),Bt=Mt.docs[$e];return o.isUndefined(Bt)?$($e,jt).catch(function(se){return Mt.docs[$e]=se,se}):Promise.resolve().then(function(){return Bt})}))):He=He.then(function(){return re}),He=He.then(function($e,Bt,se){return function(Oe){if(o.isError(Oe))ce(se,Oe);else try{return ie(Oe,Bt,$e).catch(function(pt){ce(se,pt)})}catch(pt){ce(se,pt)}}}(Pe,Ke,Ze))):Ze.circular=!0)})),He}(N,G,Z).then(function(){return Z})}).then(function(Z){var ie={},re=[],Se=[],Pe=new i.Graph,Fe=U(G.location),Ke=Fe+ne(G.subDocPath),He=l.dirname(Fe);return Object.keys(Z.deps).forEach(function(xe){Pe.setNode(xe)}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt){Pe.setEdge(Xe,rt)})}),(re=i.alg.findCycles(Pe)).forEach(function(xe){xe.forEach(function(Xe){Se.indexOf(Xe)===-1&&Se.push(Xe)})}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt,Ie){var Ze,gt=!1,Mt=Xe+Ie.slice(1),jt=Z.refs[Xe+Ie.slice(1)],yt=_(jt);Se.indexOf(rt)>-1&&re.forEach(function(kt){gt||(Ze=kt.indexOf(rt))>-1&&kt.forEach(function($e){gt||Mt.indexOf($e+"/")===0&&(yt&&Ze!==kt.length-1&&rt[rt.length-1]==="#"||(gt=!0))})}),gt&&(jt.circular=!0)})}),o.forOwn(Object.keys(Z.deps).reverse(),function(xe){var Xe=Z.deps[xe],rt=xe.split("#"),Ie=Z.docs[rt[0]],Ze=X(rt[1]);o.forOwn(Xe,function(gt,Mt){var jt=gt.split("#"),yt=Z.docs[jt[0]],kt=Ze.concat(X(Mt)),$e=Z.refs[rt[0]+ne(kt)];if(o.isUndefined($e.error)&&o.isUndefined($e.missing))if(!G.resolveCirculars&&$e.circular)$e.value=o.cloneDeep($e.def);else{try{$e.value=S(yt,X(jt[1]))}catch(Bt){return void ce($e,Bt)}rt[1]===""&&Mt==="#"?Z.docs[rt[0]]=$e.value:K(Ie,kt,$e.value)}})}),Object.keys(Z.refs).forEach(function(xe){var Xe,rt,Ie=Z.refs[xe];Ie.type!=="invalid"&&(Ie.fqURI[Ie.fqURI.length-1]==="#"&&Ie.uri[Ie.uri.length-1]!=="#"&&(Ie.fqURI=Ie.fqURI.substr(0,Ie.fqURI.length-1)),Xe=Ie.fqURI.split("/"),rt=Ie.uri.split("/"),o.times(rt.length-1,function(Ze){var gt=rt[rt.length-Ze-1],Mt=rt[rt.length-Ze],jt=Xe.length-Ze-1;gt!=="."&>!==".."&&Mt!==".."&&(Xe[jt]=gt)}),Ie.fqURI=Xe.join("/"),Ie.fqURI.indexOf(Fe)===0?Ie.fqURI=Ie.fqURI.replace(Fe,""):Ie.fqURI.indexOf(He)===0&&(Ie.fqURI=Ie.fqURI.replace(He,"")),Ie.fqURI[0]==="/"&&(Ie.fqURI="."+Ie.fqURI)),xe.indexOf(Ke)===0&&function Ze(gt,Mt,jt){var yt,kt=Mt.split("#"),$e=Z.refs[Mt];ie[kt[0]===G.location?"#"+kt[1]:ne(G.subDocPath.concat(jt))]=$e,!$e.circular&&w($e)?(yt=Z.deps[$e.refdId],$e.refdId.indexOf(gt)!==0&&Object.keys(yt).forEach(function(Bt){Ze($e.refdId,$e.refdId+Bt.substr(1),jt.concat(X(Bt)))})):!$e.circular&&$e.error&&($e.error=$e.error.replace("options.subDocPath","JSON Pointer"),$e.error.indexOf("#")>-1&&($e.error=$e.error.replace($e.uri.substr($e.uri.indexOf("#")),$e.uri)),$e.error.indexOf("ENOENT:")!==0&&$e.error.indexOf("Not Found")!==0||($e.error="JSON Pointer points to missing location: "+$e.uri))}(Ke,xe,X(xe.substr(Ke.length)))}),o.forOwn(ie,function(xe,Xe){delete xe.refdId,xe.circular&&xe.type==="local"&&(xe.value.$ref=xe.fqURI,K(Z.docs[Fe],X(Xe),xe.value)),xe.missing&&(xe.error=xe.error.split(": ")[0]+": "+xe.def.$ref)}),{refs:ie,resolved:Z.docs[Fe]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(N){return ge(N)},e.exports.encodePath=function(N){return he(N)},e.exports.findRefs=function(N,G){return be(N,G)},e.exports.findRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){var Se=o.cloneDeep(g[Z.location]),Pe=o.cloneDeep(Z);return o.isUndefined(Se.refs)&&(delete Pe.filter,delete Pe.subDocPath,Pe.includeInvalid=!0,g[Z.location].refs=be(re,Pe)),o.isUndefined(Z.filter)||(Pe.filter=Z.filter),{refs:be(re,Pe),value:re}})}(N,G)},e.exports.getRefDetails=function(N){return De(N)},e.exports.isPtr=function(N,G){return Be(N,G)},e.exports.isRef=function(N,G){return function(oe,Z){return L(oe,Z)&&De(oe).type!=="invalid"}(N,G)},e.exports.pathFromPtr=function(N){return X(N)},e.exports.pathToPtr=function(N,G){return ne(N,G)},e.exports.resolveRefs=function(N,G){return _e(N,G)},e.exports.resolveRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){return _e(re,Z).then(function(Se){return{refs:Se.refs,resolved:Se.resolved,value:re}})})}(N,G)}}).call(this,n(13))},function(e,t,n){(function(r,o){var i;function l(s){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(){var s="Expected a function",c="__lodash_placeholder__",f=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",O="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object RegExp]",C="[object Set]",$="[object String]",L="[object Symbol]",U="[object WeakMap]",ce="[object ArrayBuffer]",z="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",be="[object Int32Array]",De="[object Uint8Array]",Be="[object Uint16Array]",X="[object Uint32Array]",ne=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,oe=/[&<>"']/g,Z=RegExp(G.source),ie=RegExp(oe.source),re=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xe=/[\\^$.*+?()[\]{}|]/g,Xe=RegExp(xe.source),rt=/^\s+|\s+$/g,Ie=/^\s+/,Ze=/\s+$/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kt=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Rn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="[\\ud800-\\udfff]",R="["+Xn+"]",I="["+Rn+"]",q="\\d+",V="[\\u2700-\\u27bf]",de="[a-z\\xdf-\\xf6\\xf8-\\xff]",ve="[^\\ud800-\\udfff"+Xn+q+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ge="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ft="(?:"+de+"|"+ve+")",ut="(?:"+lt+"|"+ve+")",Ht="(?:"+I+"|"+Ge+")?",bt="[\\ufe0e\\ufe0f]?"+Ht+("(?:\\u200d(?:"+[st,Re,ct].join("|")+")[\\ufe0e\\ufe0f]?"+Ht+")*"),Tt="(?:"+[V,Re,ct].join("|")+")"+bt,bn="(?:"+[st+I+"?",I,Re,ct,A].join("|")+")",Un=RegExp("['’]","g"),pr=RegExp(I,"g"),Zn=RegExp(Ge+"(?="+Ge+")|"+bn+bt,"g"),vn=RegExp([lt+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[R,lt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[R,lt+Ft,"$"].join("|")+")",lt+"?"+Ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,Tt].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+Rn+"\\ufe0e\\ufe0f]"),Wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pi=-1,ht={};ht[K]=ht[W]=ht[ge]=ht[he]=ht[be]=ht[De]=ht["[object Uint8ClampedArray]"]=ht[Be]=ht[X]=!0,ht[h]=ht[p]=ht[ce]=ht[g]=ht[z]=ht[y]=ht[b]=ht[E]=ht[_]=ht[w]=ht[S]=ht[k]=ht[C]=ht[$]=ht[U]=!1;var mt={};mt[h]=mt[p]=mt[ce]=mt[z]=mt[g]=mt[y]=mt[K]=mt[W]=mt[ge]=mt[he]=mt[be]=mt[_]=mt[w]=mt[S]=mt[k]=mt[C]=mt[$]=mt[L]=mt[De]=mt["[object Uint8ClampedArray]"]=mt[Be]=mt[X]=!0,mt[b]=mt[E]=mt[U]=!1;var ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},F=parseFloat,ae=parseInt,ye=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,vt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,Qe=ye||vt||Function("return this")(),rn=l(t)=="object"&&t&&!t.nodeType&&t,Zt=rn&&l(o)=="object"&&o&&!o.nodeType&&o,Gr=Zt&&Zt.exports===rn,ao=Gr&&ye.process,Ct=function(){try{var H=Zt&&Zt.require&&Zt.require("util").types;return H||ao&&ao.binding&&ao.binding("util")}catch{}}(),Va=Ct&&Ct.isArrayBuffer,qa=Ct&&Ct.isDate,Ig=Ct&&Ct.isMap,Lg=Ct&&Ct.isRegExp,Mg=Ct&&Ct.isSet,Fg=Ct&&Ct.isTypedArray;function Jn(H,ee,J){switch(J.length){case 0:return H.call(ee);case 1:return H.call(ee,J[0]);case 2:return H.call(ee,J[0],J[1]);case 3:return H.call(ee,J[0],J[1],J[2])}return H.apply(ee,J)}function Hx(H,ee,J,pe){for(var Ve=-1,ft=H==null?0:H.length;++Ve-1}function df(H,ee,J){for(var pe=-1,Ve=H==null?0:H.length;++pe-1;);return J}function Vg(H,ee){for(var J=H.length;J--&&Wi(ee,H[J],0)>-1;);return J}function Kx(H,ee){for(var J=H.length,pe=0;J--;)H[J]===ee&&++pe;return pe}var Qx=mf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yx=mf({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xx(H){return"\\"+ke[H]}function Gi(H){return Xt.test(H)}function _f(H){var ee=-1,J=Array(H.size);return H.forEach(function(pe,Ve){J[++ee]=[Ve,pe]}),J}function qg(H,ee){return function(J){return H(ee(J))}}function Ro(H,ee){for(var J=-1,pe=H.length,Ve=0,ft=[];++J",""":'"',"'":"'"}),$o=function H(ee){var J,pe=(ee=ee==null?Qe:$o.defaults(Qe.Object(),ee,$o.pick(Qe,hr))).Array,Ve=ee.Date,ft=ee.Error,an=ee.Function,Vr=ee.Math,$t=ee.Object,xf=ee.RegExp,eb=ee.String,mr=ee.TypeError,xu=pe.prototype,tb=an.prototype,qi=$t.prototype,bu=ee["__core-js_shared__"],Su=tb.toString,St=qi.hasOwnProperty,nb=0,Kg=(J=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Eu=qi.toString,rb=Su.call($t),ob=Qe._,ib=xf("^"+Su.call(St).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Gr?ee.Buffer:void 0,No=ee.Symbol,Tu=ee.Uint8Array,Qg=ku?ku.allocUnsafe:void 0,Cu=qg($t.getPrototypeOf,$t),Yg=$t.create,Xg=qi.propertyIsEnumerable,Ou=xu.splice,Zg=No?No.isConcatSpreadable:void 0,Qa=No?No.iterator:void 0,hi=No?No.toStringTag:void 0,Au=function(){try{var a=yi($t,"defineProperty");return a({},"",{}),a}catch{}}(),ab=ee.clearTimeout!==Qe.clearTimeout&&ee.clearTimeout,lb=Ve&&Ve.now!==Qe.Date.now&&Ve.now,ub=ee.setTimeout!==Qe.setTimeout&&ee.setTimeout,ju=Vr.ceil,Pu=Vr.floor,bf=$t.getOwnPropertySymbols,sb=ku?ku.isBuffer:void 0,Jg=ee.isFinite,cb=xu.join,fb=qg($t.keys,$t),ln=Vr.max,Sn=Vr.min,db=Ve.now,pb=ee.parseInt,em=Vr.random,hb=xu.reverse,Sf=yi(ee,"DataView"),Ya=yi(ee,"Map"),Ef=yi(ee,"Promise"),Ki=yi(ee,"Set"),Xa=yi(ee,"WeakMap"),Za=yi($t,"create"),Ru=Xa&&new Xa,Qi={},gb=wi(Sf),mb=wi(Ya),vb=wi(Ef),yb=wi(Ki),wb=wi(Xa),$u=No?No.prototype:void 0,Ja=$u?$u.valueOf:void 0,tm=$u?$u.toString:void 0;function x(a){if(Jt(a)&&!qe(a)&&!(a instanceof it)){if(a instanceof vr)return a;if(St.call(a,"__wrapped__"))return nv(a)}return new vr(a)}var Yi=function(){function a(){}return function(u){if(!Gt(u))return{};if(Yg)return Yg(u);a.prototype=u;var d=new a;return a.prototype=void 0,d}}();function Nu(){}function vr(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}function it(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function gi(a){var u=-1,d=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function yr(a,u,d,m,v,T){var P,D=1&u,B=2&u,Y=4&u;if(d&&(P=v?d(a,m,v,T):d(a)),P!==void 0)return P;if(!Gt(a))return a;var Q=qe(a);if(Q){if(P=function(te){var fe=te.length,ze=new te.constructor(fe);return fe&&typeof te[0]=="string"&&St.call(te,"index")&&(ze.index=te.index,ze.input=te.input),ze}(a),!D)return Bn(a,P)}else{var le=En(a),Te=le==E||le==O;if(Fo(a))return Om(a,D);if(le==S||le==h||Te&&!v){if(P=B||Te?{}:qm(a),!D)return B?function(te,fe){return Kr(te,Gm(te),fe)}(a,function(te,fe){return te&&Kr(fe,Wn(fe),te)}(P,a)):function(te,fe){return Kr(te,Qf(te),fe)}(a,om(P,a))}else{if(!mt[le])return v?a:{};P=function(te,fe,ze){var Ee=te.constructor;switch(fe){case ce:return Bf(te);case g:case y:return new Ee(+te);case z:return function(We,nt){var Ae=nt?Bf(We.buffer):We.buffer;return new We.constructor(Ae,We.byteOffset,We.byteLength)}(te,ze);case K:case W:case ge:case he:case be:case De:case"[object Uint8ClampedArray]":case Be:case X:return Am(te,ze);case _:return new Ee;case w:case $:return new Ee(te);case k:return function(We){var nt=new We.constructor(We.source,Bt.exec(We));return nt.lastIndex=We.lastIndex,nt}(te);case C:return new Ee;case L:return Ue=te,Ja?$t(Ja.call(Ue)):{}}var Ue}(a,le,D)}}T||(T=new Rr);var Ce=T.get(a);if(Ce)return Ce;T.set(a,P),_v(a)?a.forEach(function(te){P.add(yr(te,u,d,te,a,T))}):yv(a)&&a.forEach(function(te,fe){P.set(fe,yr(te,u,d,fe,a,T))});var Le=Q?void 0:(Y?B?Vf:Gf:B?Wn:hn)(a);return gr(Le||a,function(te,fe){Le&&(te=a[fe=te]),el(P,fe,yr(te,u,d,fe,a,T))}),P}function im(a,u,d){var m=d.length;if(a==null)return!m;for(a=$t(a);m--;){var v=d[m],T=u[v],P=a[v];if(P===void 0&&!(v in a)||!T(P))return!1}return!0}function am(a,u,d){if(typeof a!="function")throw new mr(s);return ll(function(){a.apply(void 0,d)},u)}function tl(a,u,d,m){var v=-1,T=yu,P=!0,D=a.length,B=[],Y=u.length;if(!D)return B;d&&(u=Wt(u,er(d))),m?(T=df,P=!1):u.length>=200&&(T=Ka,P=!1,u=new mi(u));e:for(;++v-1},lo.prototype.set=function(a,u){var d=this.__data__,m=Du(d,a);return m<0?(++this.size,d.push([a,u])):d[m][1]=u,this},uo.prototype.clear=function(){this.size=0,this.__data__={hash:new gi,map:new(Ya||lo),string:new gi}},uo.prototype.delete=function(a){var u=qu(this,a).delete(a);return this.size-=u?1:0,u},uo.prototype.get=function(a){return qu(this,a).get(a)},uo.prototype.has=function(a){return qu(this,a).has(a)},uo.prototype.set=function(a,u){var d=qu(this,a),m=d.size;return d.set(a,u),this.size+=d.size==m?0:1,this},mi.prototype.add=mi.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},mi.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.clear=function(){this.__data__=new lo,this.size=0},Rr.prototype.delete=function(a){var u=this.__data__,d=u.delete(a);return this.size=u.size,d},Rr.prototype.get=function(a){return this.__data__.get(a)},Rr.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.set=function(a,u){var d=this.__data__;if(d instanceof lo){var m=d.__data__;if(!Ya||m.length<199)return m.push([a,u]),this.size=++d.size,this;d=this.__data__=new uo(m)}return d.set(a,u),this.size=d.size,this};var Do=$m(qr),lm=$m(Of,!0);function Sb(a,u){var d=!0;return Do(a,function(m,v,T){return d=!!u(m,v,T)}),d}function Iu(a,u,d){for(var m=-1,v=a.length;++m0&&d(D)?u>1?yn(D,u-1,d,m,v):Po(v,D):m||(v[v.length]=D)}return v}var Cf=Nm(),sm=Nm(!0);function qr(a,u){return a&&Cf(a,u,hn)}function Of(a,u){return a&&sm(a,u,hn)}function Lu(a,u){return jo(u,function(d){return ho(a[d])})}function Xi(a,u){for(var d=0,m=(u=Lo(u,a)).length;a!=null&&du}function Eb(a,u){return a!=null&&St.call(a,u)}function kb(a,u){return a!=null&&u in $t(a)}function jf(a,u,d){for(var m=d?df:yu,v=a[0].length,T=a.length,P=T,D=pe(T),B=1/0,Y=[];P--;){var Q=a[P];P&&u&&(Q=Wt(Q,er(u))),B=Sn(Q.length,B),D[P]=!d&&(u||v>=120&&Q.length>=120)?new mi(P&&Q):void 0}Q=a[0];var le=-1,Te=D[0];e:for(;++le=Ce)return Le;var te=B[Y];return Le*(te=="desc"?-1:1)}}return P.index-D.index}(v,T,d)})}function wm(a,u,d){for(var m=-1,v=u.length,T={};++m-1;)D!==a&&Ou.call(D,B,1),Ou.call(a,B,1);return a}function _m(a,u){for(var d=a?u.length:0,m=d-1;d--;){var v=u[d];if(d==m||v!==T){var T=v;po(v)?Ou.call(a,v,1):Mf(a,v)}}return a}function Df(a,u){return a+Pu(em()*(u-a+1))}function If(a,u){var d="";if(!a||u<1||u>9007199254740991)return d;do u%2&&(d+=a),(u=Pu(u/2))&&(a+=a);while(u);return d}function tt(a,u){return Jf(Ym(a,u,Gn),a+"")}function Cb(a){return rm(na(a))}function Ob(a,u){var d=na(a);return Ku(d,vi(u,0,d.length))}function ol(a,u,d,m){if(!Gt(a))return a;for(var v=-1,T=(u=Lo(u,a)).length,P=T-1,D=a;D!=null&&++vv?0:v+u),(d=d>v?v:d)<0&&(d+=v),v=u>d?0:d-u>>>0,u>>>=0;for(var T=pe(v);++m>>1,P=a[T];P!==null&&!nr(P)&&(d?P<=u:P=200){var Y=u?null:$b(a);if(Y)return _u(Y);P=!1,v=Ka,B=new mi}else B=u?[]:D;e:for(;++m=m?a:wr(a,u,d)}var Cm=ab||function(a){return Qe.clearTimeout(a)};function Om(a,u){if(u)return a.slice();var d=a.length,m=Qg?Qg(d):new a.constructor(d);return a.copy(m),m}function Bf(a){var u=new a.constructor(a.byteLength);return new Tu(u).set(new Tu(a)),u}function Am(a,u){var d=u?Bf(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function jm(a,u){if(a!==u){var d=a!==void 0,m=a===null,v=a==a,T=nr(a),P=u!==void 0,D=u===null,B=u==u,Y=nr(u);if(!D&&!Y&&!T&&a>u||T&&P&&B&&!D&&!Y||m&&P&&B||!d&&B||!v)return 1;if(!m&&!T&&!Y&&a1?d[v-1]:void 0,P=v>2?d[2]:void 0;for(T=a.length>3&&typeof T=="function"?(v--,T):void 0,P&&Nn(d[0],d[1],P)&&(T=v<3?void 0:T,v=1),u=$t(u);++m-1?v[T?u[P]:P]:void 0}}function Lm(a){return fo(function(u){var d=u.length,m=d,v=vr.prototype.thru;for(a&&u.reverse();m--;){var T=u[m];if(typeof T!="function")throw new mr(s);if(v&&!P&&Vu(T)=="wrapper")var P=new vr([],!0)}for(m=P?m:d;++m1&&Ee.reverse(),Q&&BD))return!1;var Y=T.get(a);if(Y&&T.get(u))return Y==u;var Q=-1,le=!0,Te=2&d?new mi:void 0;for(T.set(a,u),T.set(u,a);++Q-1&&a%1==0&&a1?"& ":"")+T[D],T=T.join(P>2?", ":" "),v.replace(gt,`{ +/* [wrapped with `+T+`] */ +`)}(m,function(v,T){return gr(f,function(P){var D="_."+P[0];T&P[1]&&!yu(v,D)&&v.push(D)}),v.sort()}(function(v){var T=v.match(Mt);return T?T[1].split(jt):[]}(m),d)))}function ev(a){var u=0,d=0;return function(){var m=db(),v=16-(m-d);if(d=m,v>0){if(++u>=800)return arguments[0]}else u=0;return a.apply(void 0,arguments)}}function Ku(a,u){var d=-1,m=a.length,v=m-1;for(u=u===void 0?m:u;++d1?a[u-1]:void 0;return d=typeof d=="function"?(a.pop(),d):void 0,uv(a,d)});function sv(a){var u=x(a);return u.__chain__=!0,u}function Qu(a,u){return u(a)}var tS=fo(function(a){var u=a.length,d=u?a[0]:0,m=this.__wrapped__,v=function(T){return Tf(T,a)};return!(u>1||this.__actions__.length)&&m instanceof it&&po(d)?((m=m.slice(d,+d+(u?1:0))).__actions__.push({func:Qu,args:[v],thisArg:void 0}),new vr(m,this.__chain__).thru(function(T){return u&&!T.length&&T.push(void 0),T})):this.thru(v)}),nS=Uu(function(a,u,d){St.call(a,d)?++a[d]:so(a,d,1)}),rS=Im(rv),oS=Im(ov);function cv(a,u){return(qe(a)?gr:Do)(a,Ne(u,3))}function fv(a,u){return(qe(a)?Wx:lm)(a,Ne(u,3))}var iS=Uu(function(a,u,d){St.call(a,d)?a[d].push(u):so(a,d,[u])}),aS=tt(function(a,u,d){var m=-1,v=typeof u=="function",T=Hn(a)?pe(a.length):[];return Do(a,function(P){T[++m]=v?Jn(u,P,d):nl(P,u,d)}),T}),lS=Uu(function(a,u,d){so(a,d,u)});function Yu(a,u){return(qe(a)?Wt:hm)(a,Ne(u,3))}var uS=Uu(function(a,u,d){a[d?0:1].push(u)},function(){return[[],[]]}),sS=tt(function(a,u){if(a==null)return[];var d=u.length;return d>1&&Nn(a,u[0],u[1])?u=[]:d>2&&Nn(u[0],u[1],u[2])&&(u=[u[0]]),ym(a,yn(u,1),[])}),Xu=lb||function(){return Qe.Date.now()};function dv(a,u,d){return u=d?void 0:u,co(a,128,void 0,void 0,void 0,void 0,u=a&&u==null?a.length:u)}function pv(a,u){var d;if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){return--a>0&&(d=u.apply(this,arguments)),a<=1&&(u=void 0),d}}var nd=tt(function(a,u,d){var m=1;if(d.length){var v=Ro(d,ea(nd));m|=32}return co(a,m,u,d,v)}),hv=tt(function(a,u,d){var m=3;if(d.length){var v=Ro(d,ea(hv));m|=32}return co(u,m,a,d,v)});function gv(a,u,d){var m,v,T,P,D,B,Y=0,Q=!1,le=!1,Te=!0;if(typeof a!="function")throw new mr(s);function Ce(Ue){var We=m,nt=v;return m=v=void 0,Y=Ue,P=a.apply(nt,We)}function Le(Ue){return Y=Ue,D=ll(fe,u),Q?Ce(Ue):P}function te(Ue){var We=Ue-B;return B===void 0||We>=u||We<0||le&&Ue-Y>=T}function fe(){var Ue=Xu();if(te(Ue))return ze(Ue);D=ll(fe,function(We){var nt=u-(We-B);return le?Sn(nt,T-(We-Y)):nt}(Ue))}function ze(Ue){return D=void 0,Te&&m?Ce(Ue):(m=v=void 0,P)}function Ee(){var Ue=Xu(),We=te(Ue);if(m=arguments,v=this,B=Ue,We){if(D===void 0)return Le(B);if(le)return Cm(D),D=ll(fe,u),Ce(B)}return D===void 0&&(D=ll(fe,u)),P}return u=xr(u)||0,Gt(d)&&(Q=!!d.leading,T=(le="maxWait"in d)?ln(xr(d.maxWait)||0,u):T,Te="trailing"in d?!!d.trailing:Te),Ee.cancel=function(){D!==void 0&&Cm(D),Y=0,m=B=v=D=void 0},Ee.flush=function(){return D===void 0?P:ze(Xu())},Ee}var cS=tt(function(a,u){return am(a,1,u)}),fS=tt(function(a,u,d){return am(a,xr(u)||0,d)});function Zu(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new mr(s);var d=function m(){var v=arguments,T=u?u.apply(this,v):v[0],P=m.cache;if(P.has(T))return P.get(T);var D=a.apply(this,v);return m.cache=P.set(T,D)||P,D};return d.cache=new(Zu.Cache||uo),d}function Ju(a){if(typeof a!="function")throw new mr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}Zu.Cache=uo;var dS=Rb(function(a,u){var d=(u=u.length==1&&qe(u[0])?Wt(u[0],er(Ne())):Wt(yn(u,1),er(Ne()))).length;return tt(function(m){for(var v=-1,T=Sn(m.length,d);++v=u}),_i=fm(function(){return arguments}())?fm:function(a){return Jt(a)&&St.call(a,"callee")&&!Xg.call(a,"callee")},qe=pe.isArray,mS=Va?er(Va):function(a){return Jt(a)&&$n(a)==ce};function Hn(a){return a!=null&&es(a.length)&&!ho(a)}function tn(a){return Jt(a)&&Hn(a)}var Fo=sb||hd,vS=qa?er(qa):function(a){return Jt(a)&&$n(a)==y};function od(a){if(!Jt(a))return!1;var u=$n(a);return u==b||u=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!ul(a)}function ho(a){if(!Gt(a))return!1;var u=$n(a);return u==E||u==O||u=="[object AsyncFunction]"||u=="[object Proxy]"}function vv(a){return typeof a=="number"&&a==Ye(a)}function es(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function Gt(a){var u=l(a);return a!=null&&(u=="object"||u=="function")}function Jt(a){return a!=null&&l(a)=="object"}var yv=Ig?er(Ig):function(a){return Jt(a)&&En(a)==_};function wv(a){return typeof a=="number"||Jt(a)&&$n(a)==w}function ul(a){if(!Jt(a)||$n(a)!=S)return!1;var u=Cu(a);if(u===null)return!0;var d=St.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&Su.call(d)==rb}var id=Lg?er(Lg):function(a){return Jt(a)&&$n(a)==k},_v=Mg?er(Mg):function(a){return Jt(a)&&En(a)==C};function ts(a){return typeof a=="string"||!qe(a)&&Jt(a)&&$n(a)==$}function nr(a){return l(a)=="symbol"||Jt(a)&&$n(a)==L}var ta=Fg?er(Fg):function(a){return Jt(a)&&es(a.length)&&!!ht[$n(a)]},yS=Gu($f),wS=Gu(function(a,u){return a<=u});function xv(a){if(!a)return[];if(Hn(a))return ts(a)?Pr(a):Bn(a);if(Qa&&a[Qa])return function(d){for(var m,v=[];!(m=d.next()).done;)v.push(m.value);return v}(a[Qa]());var u=En(a);return(u==_?_f:u==C?_u:na)(a)}function go(a){return a?(a=xr(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ye(a){var u=go(a),d=u%1;return u==u?d?u-d:u:0}function bv(a){return a?vi(Ye(a),0,4294967295):0}function xr(a){if(typeof a=="number")return a;if(nr(a))return NaN;if(Gt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Gt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=a.replace(rt,"");var d=Oe.test(a);return d||Rt.test(a)?ae(a.slice(2),d?2:8):se.test(a)?NaN:+a}function Sv(a){return Kr(a,Wn(a))}function wt(a){return a==null?"":tr(a)}var _S=Zi(function(a,u){if(al(u)||Hn(u))Kr(u,hn(u),a);else for(var d in u)St.call(u,d)&&el(a,d,u[d])}),Ev=Zi(function(a,u){Kr(u,Wn(u),a)}),ns=Zi(function(a,u,d,m){Kr(u,Wn(u),a,m)}),xS=Zi(function(a,u,d,m){Kr(u,hn(u),a,m)}),bS=fo(Tf),SS=tt(function(a,u){a=$t(a);var d=-1,m=u.length,v=m>2?u[2]:void 0;for(v&&Nn(u[0],u[1],v)&&(m=1);++d1),T}),Kr(a,Vf(a),d),m&&(d=yr(d,7,Nb));for(var v=u.length;v--;)Mf(d,u[v]);return d}),jS=fo(function(a,u){return a==null?{}:function(d,m){return wm(d,m,function(v,T){return ld(d,T)})}(a,u)});function Tv(a,u){if(a==null)return{};var d=Wt(Vf(a),function(m){return[m]});return u=Ne(u),wm(a,d,function(m,v){return u(m,v[0])})}var Cv=Um(hn),Ov=Um(Wn);function na(a){return a==null?[]:wf(a,hn(a))}var PS=Ji(function(a,u,d){return u=u.toLowerCase(),a+(d?Av(u):u)});function Av(a){return ud(wt(a).toLowerCase())}function jv(a){return(a=wt(a))&&a.replace(Pn,Qx).replace(pr,"")}var RS=Ji(function(a,u,d){return a+(d?"-":"")+u.toLowerCase()}),$S=Ji(function(a,u,d){return a+(d?" ":"")+u.toLowerCase()}),NS=Dm("toLowerCase"),DS=Ji(function(a,u,d){return a+(d?"_":"")+u.toLowerCase()}),IS=Ji(function(a,u,d){return a+(d?" ":"")+ud(u)}),LS=Ji(function(a,u,d){return a+(d?" ":"")+u.toUpperCase()}),ud=Dm("toUpperCase");function Pv(a,u,d){return a=wt(a),(u=d?void 0:u)===void 0?function(m){return Wr.test(m)}(a)?function(m){return m.match(vn)||[]}(a):function(m){return m.match(yt)||[]}(a):a.match(u)||[]}var Rv=tt(function(a,u){try{return Jn(a,void 0,u)}catch(d){return od(d)?d:new ft(d)}}),MS=fo(function(a,u){return gr(u,function(d){d=Qr(d),so(a,d,nd(a[d],a))}),a});function sd(a){return function(){return a}}var FS=Lm(),zS=Lm(!0);function Gn(a){return a}function cd(a){return pm(typeof a=="function"?a:yr(a,1))}var US=tt(function(a,u){return function(d){return nl(d,a,u)}}),BS=tt(function(a,u){return function(d){return nl(a,d,u)}});function fd(a,u,d){var m=hn(u),v=Lu(u,m);d!=null||Gt(u)&&(v.length||!m.length)||(d=u,u=a,a=this,v=Lu(u,hn(u)));var T=!(Gt(d)&&"chain"in d&&!d.chain),P=ho(a);return gr(v,function(D){var B=u[D];a[D]=B,P&&(a.prototype[D]=function(){var Y=this.__chain__;if(T||Y){var Q=a(this.__wrapped__),le=Q.__actions__=Bn(this.__actions__);return le.push({func:B,args:arguments,thisArg:a}),Q.__chain__=Y,Q}return B.apply(a,Po([this.value()],arguments))})}),a}function dd(){}var HS=Hf(Wt),WS=Hf(zg),GS=Hf(hf);function $v(a){return Yf(a)?gf(Qr(a)):function(u){return function(d){return Xi(d,u)}}(a)}var VS=Fm(),qS=Fm(!0);function pd(){return[]}function hd(){return!1}var KS=Hu(function(a,u){return a+u},0),QS=Wf("ceil"),YS=Hu(function(a,u){return a/u},1),XS=Wf("floor"),gd,ZS=Hu(function(a,u){return a*u},1),JS=Wf("round"),eE=Hu(function(a,u){return a-u},0);return x.after=function(a,u){if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){if(--a<1)return u.apply(this,arguments)}},x.ary=dv,x.assign=_S,x.assignIn=Ev,x.assignInWith=ns,x.assignWith=xS,x.at=bS,x.before=pv,x.bind=nd,x.bindAll=MS,x.bindKey=hv,x.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return qe(a)?a:[a]},x.chain=sv,x.chunk=function(a,u,d){u=(d?Nn(a,u,d):u===void 0)?1:ln(Ye(u),0);var m=a==null?0:a.length;if(!m||u<1)return[];for(var v=0,T=0,P=pe(ju(m/u));vY?0:Y+D),(B=B===void 0||B>Y?Y:Ye(B))<0&&(B+=Y),B=D>B?0:bv(B);D>>0)?(a=wt(a))&&(typeof u=="string"||u!=null&&!id(u))&&!(u=tr(u))&&Gi(a)?Mo(Pr(a),0,d):a.split(u,d):[]},x.spread=function(a,u){if(typeof a!="function")throw new mr(s);return u=u==null?0:ln(Ye(u),0),tt(function(d){var m=d[u],v=Mo(d,0,u);return m&&Po(v,m),Jn(a,this,v)})},x.tail=function(a){var u=a==null?0:a.length;return u?wr(a,1,u):[]},x.take=function(a,u,d){return a&&a.length?wr(a,0,(u=d||u===void 0?1:Ye(u))<0?0:u):[]},x.takeRight=function(a,u,d){var m=a==null?0:a.length;return m?wr(a,(u=m-(u=d||u===void 0?1:Ye(u)))<0?0:u,m):[]},x.takeRightWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3),!1,!0):[]},x.takeWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3)):[]},x.tap=function(a,u){return u(a),a},x.throttle=function(a,u,d){var m=!0,v=!0;if(typeof a!="function")throw new mr(s);return Gt(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),gv(a,u,{leading:m,maxWait:u,trailing:v})},x.thru=Qu,x.toArray=xv,x.toPairs=Cv,x.toPairsIn=Ov,x.toPath=function(a){return qe(a)?Wt(a,Qr):nr(a)?[a]:Bn(tv(wt(a)))},x.toPlainObject=Sv,x.transform=function(a,u,d){var m=qe(a),v=m||Fo(a)||ta(a);if(u=Ne(u,4),d==null){var T=a&&a.constructor;d=v?m?new T:[]:Gt(a)&&ho(T)?Yi(Cu(a)):{}}return(v?gr:qr)(a,function(P,D,B){return u(d,P,D,B)}),d},x.unary=function(a){return dv(a,1)},x.union=Vb,x.unionBy=qb,x.unionWith=Kb,x.uniq=function(a){return a&&a.length?Io(a):[]},x.uniqBy=function(a,u){return a&&a.length?Io(a,Ne(u,2)):[]},x.uniqWith=function(a,u){return u=typeof u=="function"?u:void 0,a&&a.length?Io(a,void 0,u):[]},x.unset=function(a,u){return a==null||Mf(a,u)},x.unzip=td,x.unzipWith=uv,x.update=function(a,u,d){return a==null?a:Em(a,u,Uf(d))},x.updateWith=function(a,u,d,m){return m=typeof m=="function"?m:void 0,a==null?a:Em(a,u,Uf(d),m)},x.values=na,x.valuesIn=function(a){return a==null?[]:wf(a,Wn(a))},x.without=Qb,x.words=Pv,x.wrap=function(a,u){return rd(Uf(u),a)},x.xor=Yb,x.xorBy=Xb,x.xorWith=Zb,x.zip=Jb,x.zipObject=function(a,u){return Tm(a||[],u||[],el)},x.zipObjectDeep=function(a,u){return Tm(a||[],u||[],ol)},x.zipWith=eS,x.entries=Cv,x.entriesIn=Ov,x.extend=Ev,x.extendWith=ns,fd(x,x),x.add=KS,x.attempt=Rv,x.camelCase=PS,x.capitalize=Av,x.ceil=QS,x.clamp=function(a,u,d){return d===void 0&&(d=u,u=void 0),d!==void 0&&(d=(d=xr(d))==d?d:0),u!==void 0&&(u=(u=xr(u))==u?u:0),vi(xr(a),u,d)},x.clone=function(a){return yr(a,4)},x.cloneDeep=function(a){return yr(a,5)},x.cloneDeepWith=function(a,u){return yr(a,5,u=typeof u=="function"?u:void 0)},x.cloneWith=function(a,u){return yr(a,4,u=typeof u=="function"?u:void 0)},x.conformsTo=function(a,u){return u==null||im(a,u,hn(u))},x.deburr=jv,x.defaultTo=function(a,u){return a==null||a!=a?u:a},x.divide=YS,x.endsWith=function(a,u,d){a=wt(a),u=tr(u);var m=a.length,v=d=d===void 0?m:vi(Ye(d),0,m);return(d-=u.length)>=0&&a.slice(d,v)==u},x.eq=$r,x.escape=function(a){return(a=wt(a))&&ie.test(a)?a.replace(oe,Yx):a},x.escapeRegExp=function(a){return(a=wt(a))&&Xe.test(a)?a.replace(xe,"\\$&"):a},x.every=function(a,u,d){var m=qe(a)?zg:Sb;return d&&Nn(a,u,d)&&(u=void 0),m(a,Ne(u,3))},x.find=rS,x.findIndex=rv,x.findKey=function(a,u){return Ug(a,Ne(u,3),qr)},x.findLast=oS,x.findLastIndex=ov,x.findLastKey=function(a,u){return Ug(a,Ne(u,3),Of)},x.floor=XS,x.forEach=cv,x.forEachRight=fv,x.forIn=function(a,u){return a==null?a:Cf(a,Ne(u,3),Wn)},x.forInRight=function(a,u){return a==null?a:sm(a,Ne(u,3),Wn)},x.forOwn=function(a,u){return a&&qr(a,Ne(u,3))},x.forOwnRight=function(a,u){return a&&Of(a,Ne(u,3))},x.get=ad,x.gt=hS,x.gte=gS,x.has=function(a,u){return a!=null&&Vm(a,u,Eb)},x.hasIn=ld,x.head=av,x.identity=Gn,x.includes=function(a,u,d,m){a=Hn(a)?a:na(a),d=d&&!m?Ye(d):0;var v=a.length;return d<0&&(d=ln(v+d,0)),ts(a)?d<=v&&a.indexOf(u,d)>-1:!!v&&Wi(a,u,d)>-1},x.indexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=d==null?0:Ye(d);return v<0&&(v=ln(m+v,0)),Wi(a,u,v)},x.inRange=function(a,u,d){return u=go(u),d===void 0?(d=u,u=0):d=go(d),function(m,v,T){return m>=Sn(v,T)&&m=-9007199254740991&&a<=9007199254740991},x.isSet=_v,x.isString=ts,x.isSymbol=nr,x.isTypedArray=ta,x.isUndefined=function(a){return a===void 0},x.isWeakMap=function(a){return Jt(a)&&En(a)==U},x.isWeakSet=function(a){return Jt(a)&&$n(a)=="[object WeakSet]"},x.join=function(a,u){return a==null?"":cb.call(a,u)},x.kebabCase=RS,x.last=_r,x.lastIndexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=m;return d!==void 0&&(v=(v=Ye(d))<0?ln(m+v,0):Sn(v,m-1)),u==u?function(T,P,D){for(var B=D+1;B--;)if(T[B]===P)return B;return B}(a,u,v):wu(a,Bg,v,!0)},x.lowerCase=$S,x.lowerFirst=NS,x.lt=yS,x.lte=wS,x.max=function(a){return a&&a.length?Iu(a,Gn,Af):void 0},x.maxBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),Af):void 0},x.mean=function(a){return Hg(a,Gn)},x.meanBy=function(a,u){return Hg(a,Ne(u,2))},x.min=function(a){return a&&a.length?Iu(a,Gn,$f):void 0},x.minBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),$f):void 0},x.stubArray=pd,x.stubFalse=hd,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=ZS,x.nth=function(a,u){return a&&a.length?vm(a,Ye(u)):void 0},x.noConflict=function(){return Qe._===this&&(Qe._=ob),this},x.noop=dd,x.now=Xu,x.pad=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;if(!u||m>=u)return a;var v=(u-m)/2;return Wu(Pu(v),d)+a+Wu(ju(v),d)},x.padEnd=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;return u&&mu){var m=a;a=u,u=m}if(d||a%1||u%1){var v=em();return Sn(a+v*(u-a+F("1e-"+((v+"").length-1))),u)}return Df(a,u)},x.reduce=function(a,u,d){var m=qe(a)?pf:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,Do)},x.reduceRight=function(a,u,d){var m=qe(a)?Gx:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,lm)},x.repeat=function(a,u,d){return u=(d?Nn(a,u,d):u===void 0)?1:Ye(u),If(wt(a),u)},x.replace=function(){var a=arguments,u=wt(a[0]);return a.length<3?u:u.replace(a[1],a[2])},x.result=function(a,u,d){var m=-1,v=(u=Lo(u,a)).length;for(v||(v=1,a=void 0);++m9007199254740991)return[];var d=4294967295,m=Sn(a,4294967295);a-=4294967295;for(var v=yf(m,u=Ne(u));++d=T)return a;var D=d-Vi(m);if(D<1)return m;var B=P?Mo(P,0,D).join(""):a.slice(0,D);if(v===void 0)return B+m;if(P&&(D+=B.length-D),id(v)){if(a.slice(D).search(v)){var Y,Q=B;for(v.global||(v=xf(v.source,wt(Bt.exec(v))+"g")),v.lastIndex=0;Y=v.exec(Q);)var le=Y.index;B=B.slice(0,le===void 0?D:le)}}else if(a.indexOf(tr(v),D)!=D){var Te=B.lastIndexOf(v);Te>-1&&(B=B.slice(0,Te))}return B+m},x.unescape=function(a){return(a=wt(a))&&Z.test(a)?a.replace(G,Jx):a},x.uniqueId=function(a){var u=++nb;return wt(a)+u},x.upperCase=LS,x.upperFirst=ud,x.each=cv,x.eachRight=fv,x.first=av,fd(x,(gd={},qr(x,function(a,u){St.call(x.prototype,u)||(gd[u]=a)}),gd),{chain:!1}),x.VERSION="4.17.15",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){x[a].placeholder=x}),gr(["drop","take"],function(a,u){it.prototype[a]=function(d){d=d===void 0?1:ln(Ye(d),0);var m=this.__filtered__&&!u?new it(this):this.clone();return m.__filtered__?m.__takeCount__=Sn(d,m.__takeCount__):m.__views__.push({size:Sn(d,4294967295),type:a+(m.__dir__<0?"Right":"")}),m},it.prototype[a+"Right"]=function(d){return this.reverse()[a](d).reverse()}}),gr(["filter","map","takeWhile"],function(a,u){var d=u+1,m=d==1||d==3;it.prototype[a]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ne(v,3),type:d}),T.__filtered__=T.__filtered__||m,T}}),gr(["head","last"],function(a,u){var d="take"+(u?"Right":"");it.prototype[a]=function(){return this[d](1).value()[0]}}),gr(["initial","tail"],function(a,u){var d="drop"+(u?"":"Right");it.prototype[a]=function(){return this.__filtered__?new it(this):this[d](1)}}),it.prototype.compact=function(){return this.filter(Gn)},it.prototype.find=function(a){return this.filter(a).head()},it.prototype.findLast=function(a){return this.reverse().find(a)},it.prototype.invokeMap=tt(function(a,u){return typeof a=="function"?new it(this):this.map(function(d){return nl(d,a,u)})}),it.prototype.reject=function(a){return this.filter(Ju(Ne(a)))},it.prototype.slice=function(a,u){a=Ye(a);var d=this;return d.__filtered__&&(a>0||u<0)?new it(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),u!==void 0&&(d=(u=Ye(u))<0?d.dropRight(-u):d.take(u-a)),d)},it.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},it.prototype.toArray=function(){return this.take(4294967295)},qr(it.prototype,function(a,u){var d=/^(?:filter|find|map|reject)|While$/.test(u),m=/^(?:head|last)$/.test(u),v=x[m?"take"+(u=="last"?"Right":""):u],T=m||/^find/.test(u);v&&(x.prototype[u]=function(){var P=this.__wrapped__,D=m?[1]:arguments,B=P instanceof it,Y=D[0],Q=B||qe(P),le=function(ze){var Ee=v.apply(x,Po([ze],D));return m&&Te?Ee[0]:Ee};Q&&d&&typeof Y=="function"&&Y.length!=1&&(B=Q=!1);var Te=this.__chain__,Ce=!!this.__actions__.length,Le=T&&!Te,te=B&&!Ce;if(!T&&Q){P=te?P:new it(this);var fe=a.apply(P,D);return fe.__actions__.push({func:Qu,args:[le],thisArg:void 0}),new vr(fe,Te)}return Le&&te?a.apply(this,D):(fe=this.thru(le),Le?m?fe.value()[0]:fe.value():fe)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var u=xu[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);x.prototype[a]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return u.apply(qe(T)?T:[],v)}return this[d](function(P){return u.apply(qe(P)?P:[],v)})}}),qr(it.prototype,function(a,u){var d=x[u];if(d){var m=d.name+"";St.call(Qi,m)||(Qi[m]=[]),Qi[m].push({name:u,func:d})}}),Qi[Bu(void 0,2).name]=[{name:"wrapper",func:void 0}],it.prototype.clone=function(){var a=new it(this.__wrapped__);return a.__actions__=Bn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Bn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Bn(this.__views__),a},it.prototype.reverse=function(){if(this.__filtered__){var a=new it(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},it.prototype.value=function(){var a=this.__wrapped__.value(),u=this.__dir__,d=qe(a),m=u<0,v=d?a.length:0,T=function(nt,Ae,Me){for(var un=-1,Dn=Me.length;++un=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},x.prototype.plant=function(a){for(var u,d=this;d instanceof Nu;){var m=nv(d);m.__index__=0,m.__values__=void 0,u?v.__wrapped__=m:u=m;var v=m;d=d.__wrapped__}return v.__wrapped__=a,u},x.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof it){var u=a;return this.__actions__.length&&(u=new it(this)),(u=u.reverse()).__actions__.push({func:Qu,args:[ed],thisArg:void 0}),new vr(u,this.__chain__)}return this.thru(ed)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return km(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Qa&&(x.prototype[Qa]=function(){return this}),x}();l(n(46))=="object"&&n(46)?(Qe._=$o,(i=(function(){return $o}).call(t,n,t,o))===void 0||(o.exports=i)):Zt?((Zt.exports=$o)._=$o,rn._=$o):Qe._=$o}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),l=n(118),s=n(124),c=n(127),f=n(128),h=n(129),p=n(130),g=n(59),y=n(131),b=n(10),E=n(135),O=n(136),_=n(141),w=n(0),S=n(12),k=n(142),C=n(5),$=n(144),L=n(6),U={};U["[object Arguments]"]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U["[object Object]"]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U["[object Function]"]=U["[object WeakMap]"]=!1,e.exports=function ce(z,K,W,ge,he,be){var De,Be=1&K,X=2&K,ne=4&K;if(W&&(De=he?W(z,ge,he,be):W(z)),De!==void 0)return De;if(!C(z))return z;var _e=w(z);if(_e){if(De=E(z),!Be)return f(z,De)}else{var N=b(z),G=N=="[object Function]"||N=="[object GeneratorFunction]";if(S(z))return c(z,Be);if(N=="[object Object]"||N=="[object Arguments]"||G&&!he){if(De=X||G?{}:_(z),!Be)return X?p(z,s(De,z)):h(z,l(De,z))}else{if(!U[N])return he?z:{};De=O(z,N,Be)}}be||(be=new r);var oe=be.get(z);if(oe)return oe;be.set(z,De),$(z)?z.forEach(function(re){De.add(ce(re,K,W,re,z,be))}):k(z)&&z.forEach(function(re,Se){De.set(Se,ce(re,K,W,Se,z,be))});var Z=ne?X?y:g:X?keysIn:L,ie=_e?void 0:Z(z);return o(ie||z,function(re,Se){ie&&(re=z[Se=re]),i(De,Se,ce(re,K,W,Se,z,be))}),De}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(i){var l=this.__data__,s=r(l,i);return!(s<0)&&(s==l.length-1?l.pop():o.call(l,s,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var i=this.__data__,l=r(i,o);return l<0?void 0:i[l][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,i){var l=this.__data__,s=r(l,o);return s<0?(++this.size,l.push([o,i])):l[s][1]=i,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(l,s){var c=this.__data__;if(c instanceof r){var f=c.__data__;if(!o||f.length<199)return f.push([l,s]),this.size=++c.size,this;c=this.__data__=new i(f)}return c.set(l,s),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),l=n(48),s=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!i(y)||o(y))&&(r(y)?g:s).test(l(y))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=function(c){var f=i.call(c,s),h=c[s];try{c[s]=void 0;var p=!0}catch{}var g=l.call(c);return p&&(f?c[s]=h:delete c[s]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!i&&i in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),l=n(111),s=n(112);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h0&&c(y)?s>1?i(y,s-1,c,f,h):r(h,y):f||(h[h.length]=y)}return h}},function(e,t,n){var r=n(9),o=n(21),i=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(s){return i(s)||o(s)||!!(l&&s&&s[l])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(l,s){return i(o(l,s,r),l+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(i,l,s){return l=o(l===void 0?i.length-1:l,0),function(){for(var c=arguments,f=-1,h=o(c.length-l,0),p=Array(h);++f0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),l=n(69),s=n(207),c=n(42);e.exports=function(f,h,p){var g=-1,y=o,b=f.length,E=!0,O=[],_=O;if(p)E=!1,y=i;else if(b>=200){var w=h?null:s(f);if(w)return c(w);E=!1,y=l,_=new r}else _=h?[]:O;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(l,s,c){return s==s?i(l,s,c):r(l,o,c)}},function(e,t){e.exports=function(n,r,o,i){for(var l=n.length,s=o+(i?1:-1);i?s--:++s1||l.length===1&&i.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(i,l,s){return function(c,f,h){var p={},g=c.nodes();return g.forEach(function(y){p[y]={},p[y][y]={distance:0},g.forEach(function(b){y!==b&&(p[y][b]={distance:Number.POSITIVE_INFINITY})}),h(y).forEach(function(b){var E=b.v===y?b.w:b.v,O=f(b);p[y][E]={distance:O,predecessor:y}})}),g.forEach(function(y){var b=p[y];g.forEach(function(E){var O=p[E];g.forEach(function(_){var w=O[y],S=b[_],k=O[_],C=w.distance+S.distance;C0;){if(c=p.removeMin(),r.has(h,c))f.setEdge(c,h[c]);else{if(y)throw new Error("Input graph is not connected: "+l);y=!0}l.nodeEdges(c).forEach(g)}return f}},function(e,t,n){(function(r){function o(s,c){for(var f=0,h=s.length-1;h>=0;h--){var p=s[h];p==="."?s.splice(h,1):p===".."?(s.splice(h,1),f++):f&&(s.splice(h,1),f--)}if(c)for(;f--;f)s.unshift("..");return s}function i(s,c){if(s.filter)return s.filter(c);for(var f=[],h=0;h=-1&&!c;f--){var h=f>=0?arguments[f]:r.cwd();if(typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");h&&(s=h+"/"+s,c=h.charAt(0)==="/")}return(c?"/":"")+(s=o(i(s.split("/"),function(p){return!!p}),!c).join("/"))||"."},t.normalize=function(s){var c=t.isAbsolute(s),f=l(s,-1)==="/";return(s=o(i(s.split("/"),function(h){return!!h}),!c).join("/"))||c||(s="."),s&&f&&(s+="/"),(c?"/":"")+s},t.isAbsolute=function(s){return s.charAt(0)==="/"},t.join=function(){var s=Array.prototype.slice.call(arguments,0);return t.normalize(i(s,function(c,f){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(s,c){function f(O){for(var _=0;_=0&&O[w]==="";w--);return _>w?[]:O.slice(_,w-_+1)}s=t.resolve(s).substr(1),c=t.resolve(c).substr(1);for(var h=f(s.split("/")),p=f(c.split("/")),g=Math.min(h.length,p.length),y=g,b=0;b=1;--g)if((c=s.charCodeAt(g))===47){if(!p){h=g;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"/":s.slice(0,h)},t.basename=function(s,c){var f=function(h){typeof h!="string"&&(h+="");var p,g=0,y=-1,b=!0;for(p=h.length-1;p>=0;--p)if(h.charCodeAt(p)===47){if(!b){g=p+1;break}}else y===-1&&(b=!1,y=p+1);return y===-1?"":h.slice(g,y)}(s);return c&&f.substr(-1*c.length)===c&&(f=f.substr(0,f.length-c.length)),f},t.extname=function(s){typeof s!="string"&&(s+="");for(var c=-1,f=0,h=-1,p=!0,g=0,y=s.length-1;y>=0;--y){var b=s.charCodeAt(y);if(b!==47)h===-1&&(p=!1,h=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){f=y+1;break}}return c===-1||h===-1||g===0||g===1&&c===h-1&&c===f+1?"":s.slice(c,h)};var l="ab".substr(-1)==="b"?function(s,c,f){return s.substr(c,f)}:function(s,c,f){return c<0&&(c=s.length+c),s.substr(c,f)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var o={file:n(225),http:n(81),https:n(81)},i=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,s){var c=Promise.resolve();return s===void 0&&(s={}),c=(c=c.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(s!==void 0){if(r(s)!=="object")throw new TypeError("options must be an object");if(s.processContent!==void 0&&typeof s.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(f,h){(function(p){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(p),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=i}return y})(l).load(l,s||{},function(p,g){p?h(p):f(g)})})}).then(function(f){return s.processContent?new Promise(function(h,p){r(f)!=="object"&&(f={text:f}),f.location=l,s.processContent(f,function(g,y){g?p(g):h(y)})}):r(f)==="object"?f.text:f})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(k){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),l=n(228),s=n(82),c=n(229),f=n(231);function h(){}var p=t=e.exports=function(k,C){return typeof C=="function"?new t.Request("GET",k).end(C):arguments.length==1?new t.Request("GET",k):new t.Request(k,C)};t.Request=w,p.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(k){return k.trim()}:function(k){return k.replace(/(^\s*|\s*$)/g,"")};function y(k){if(!s(k))return k;var C=[];for(var $ in k)b(C,$,k[$]);return C.join("&")}function b(k,C,$){if($!=null)if(Array.isArray($))$.forEach(function(U){b(k,C,U)});else if(s($))for(var L in $)b(k,C+"["+L+"]",$[L]);else k.push(encodeURIComponent(C)+"="+encodeURIComponent($));else $===null&&k.push(encodeURIComponent(C))}function E(k){for(var C,$,L={},U=k.split("&"),ce=0,z=U.length;ce=2&&k._responseTimeoutTimer&&clearTimeout(k._responseTimeoutTimer),K==4){var W;try{W=C.status}catch{W=0}if(!W)return k.timedout||k._aborted?void 0:k.crossDomainError();k.emit("end")}};var L=function(K,W){W.total>0&&(W.percent=W.loaded/W.total*100),W.direction=K,k.emit("progress",W)};if(this.hasListeners("progress"))try{C.onprogress=L.bind(null,"download"),C.upload&&(C.upload.onprogress=L.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(K){return this.callback(K)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof $!="string"&&!this._isHost($)){var U=this._header["content-type"],ce=this._serializer||p.serialize[U?U.split(";")[0]:""];!ce&&O(U)&&(ce=p.serialize["application/json"]),ce&&($=ce($))}for(var z in this.header)this.header[z]!=null&&this.header.hasOwnProperty(z)&&C.setRequestHeader(z,this.header[z]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send($!==void 0?$:null),this},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(k){f.prototype[k.toLowerCase()]=function(C,$){var L=new p.Request(k,C);return this._setDefaults(L),$&&L.end($),L}}),f.prototype.del=f.prototype.delete,p.get=function(k,C,$){var L=p("GET",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.head=function(k,C,$){var L=p("HEAD",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.options=function(k,C,$){var L=p("OPTIONS",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.del=S,p.delete=S,p.patch=function(k,C,$){var L=p("PATCH",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.post=function(k,C,$){var L=p("POST",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.put=function(k,C,$){var L=p("PUT",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L}},function(e,t,n){function r(o){if(o)return function(i){for(var l in r.prototype)i[l]=r.prototype[l];return i}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(i),this},r.prototype.once=function(o,i){function l(){this.off(o,l),i.apply(this,arguments)}return l.fn=i,this.on(o,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,s=this._callbacks["$"+o];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var f=this._retryCallback(s,c);if(f===!0)return!0;if(f===!1)return!1}catch(h){console.error(h)}return!!(c&&c.status&&c.status>=500&&c.status!=501||s&&(s.code&&~l.indexOf(s.code)||s.timeout&&s.code=="ECONNABORTED"||s.crossDomain))},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(s,c){if(!this._fullfilledPromise){var f=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(h,p){f.end(function(g,y){g?p(g):h(y)})})}return this._fullfilledPromise.then(s,c)},i.prototype.catch=function(s){return this.then(void 0,s)},i.prototype.use=function(s){return s(this),this},i.prototype.ok=function(s){if(typeof s!="function")throw Error("Callback required");return this._okCallback=s,this},i.prototype._isResponseOK=function(s){return!!s&&(this._okCallback?this._okCallback(s):s.status>=200&&s.status<300)},i.prototype.get=function(s){return this._header[s.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(s,c){if(o(s)){for(var f in s)this.set(f,s[f]);return this}return this._header[s.toLowerCase()]=c,this.header[s]=c,this},i.prototype.unset=function(s){return delete this._header[s.toLowerCase()],delete this.header[s],this},i.prototype.field=function(s,c){if(s==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(s)){for(var f in s)this.field(f,s[f]);return this}if(Array.isArray(c)){for(var h in c)this.field(s,c[h]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(s,c),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(s,c,f,h){switch(f.type){case"basic":this.set("Authorization","Basic "+h(s+":"+c));break;case"auto":this.username=s,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+s)}return this},i.prototype.withCredentials=function(s){return s==null&&(s=!0),this._withCredentials=s,this},i.prototype.redirects=function(s){return this._maxRedirects=s,this},i.prototype.maxResponseSize=function(s){if(typeof s!="number")throw TypeError("Invalid argument");return this._maxResponseSize=s,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(s){var c=o(s),f=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(s)?this._data=[]:this._isHost(s)||(this._data={});else if(s&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var h in s)this._data[h]=s[h];else typeof s=="string"?(f||this.type("form"),f=this._header["content-type"],this._data=f=="application/x-www-form-urlencoded"?this._data?this._data+"&"+s:s:(this._data||"")+s):this._data=s;return!c||this._isHost(s)||f||this.type("json"),this},i.prototype.sortQuery=function(s){return this._sort=s===void 0||s,this},i.prototype._finalizeQueryString=function(){var s=this._query.join("&");if(s&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+s),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var f=this.url.substring(c+1).split("&");typeof this._sort=="function"?f.sort(this._sort):f.sort(),this.url=this.url.substring(0,c)+"?"+f.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(s,c,f){if(!this._aborted){var h=new Error(s+c+"ms exceeded");h.timeout=c,h.code="ECONNABORTED",h.errno=f,this.timedout=!0,this.abort(),this.callback(h)}},i.prototype._setTimeouts=function(){var s=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){s._timeoutError("Timeout of ",s._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){s._timeoutError("Response timeout of ",s._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(i){if(i)return function(l){for(var s in o.prototype)l[s]=o.prototype[s];return l}(i)}e.exports=o,o.prototype.get=function(i){return this.header[i.toLowerCase()]},o.prototype._setHeaderProperties=function(i){var l=i["content-type"]||"";this.type=r.type(l);var s=r.params(l);for(var c in s)this[c]=s[c];this.links={};try{i.link&&(this.links=r.parseLinks(i.link))}catch{}},o.prototype._setStatusProperties=function(i){var l=i/100|0;this.status=this.statusCode=i,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=i==201,this.accepted=i==202,this.noContent=i==204,this.badRequest=i==400,this.unauthorized=i==401,this.notAcceptable=i==406,this.forbidden=i==403,this.notFound=i==404,this.unprocessableEntity=i==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,i){var l=i.split(/ *= */),s=l.shift(),c=l.shift();return s&&c&&(o[s]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,i){var l=i.split(/ *; */),s=l[0].slice(1,-1);return o[l[1].split(/ *= */)[1].slice(1,-1)]=s,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,i=Function.prototype.apply;function l(s,c){this._id=s,this._clearFn=c}t.setTimeout=function(){return new l(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new l(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(s){s&&s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(s,c){clearTimeout(s._idleTimeoutId),s._idleTimeout=c},t.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},t._unrefActive=t.active=function(s){clearTimeout(s._idleTimeoutId);var c=s._idleTimeout;c>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(i,l){if(!i.setImmediate){var s,c,f,h,p,g=1,y={},b=!1,E=i.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(i);O=O&&O.setTimeout?O:i,{}.toString.call(i.process)==="[object process]"?s=function(S){o.nextTick(function(){w(S)})}:function(){if(i.postMessage&&!i.importScripts){var S=!0,k=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=k,S}}()?(h="setImmediate$"+Math.random()+"$",p=function(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&w(+S.data.slice(h.length))},i.addEventListener?i.addEventListener("message",p,!1):i.attachEvent("onmessage",p),s=function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},s=function(S){f.port2.postMessage(S)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,s=function(S){var k=E.createElement("script");k.onreadystatechange=function(){w(S),k.onreadystatechange=null,c.removeChild(k),k=null},c.appendChild(k)}):s=function(S){setTimeout(w,0,S)},O.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(i,l){return Object.prototype.hasOwnProperty.call(i,l)}e.exports=function(i,l,s,c){l=l||"&",s=s||"=";var f={};if(typeof i!="string"||i.length===0)return f;var h=/\+/g;i=i.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var g=i.length;p>0&&g>p&&(g=p);for(var y=0;y=0?(b=w.substr(0,S),E=w.substr(S+1)):(b=w,E=""),O=decodeURIComponent(b),_=decodeURIComponent(E),r(f,O)?o(f[O])?f[O].push(_):f[O]=[f[O],_]:f[O]=_}return f};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,f,h,p){return f=f||"&",h=h||"=",c===null&&(c=void 0),r(c)==="object"?l(s(c),function(g){var y=encodeURIComponent(o(g))+h;return i(c[g])?l(c[g],function(b){return y+encodeURIComponent(o(b))}).join(f):y+encodeURIComponent(o(c[g]))}).join(f):p?encodeURIComponent(o(p))+h+encodeURIComponent(o(c)):""};var i=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function l(c,f){if(c.map)return c.map(f);for(var h=[],p=0;p1){R[0]=R[0].slice(0,-1);for(var q=R.length-1,V=1;V= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,L=String.fromCharCode;function U(A){throw new RangeError(C[A])}function ce(A,R){var I=A.split("@"),q="";I.length>1&&(q=I[0]+"@",A=I[1]);var V=function(de,ve){for(var Ge=[],st=de.length;st--;)Ge[st]=ve(de[st]);return Ge}((A=A.replace(k,".")).split("."),R).join(".");return q+V}function z(A){for(var R=[],I=0,q=A.length;I=55296&&V<=56319&&I>1,A+=$(A/R);A>455;q+=36)A=$(A/35);return $(q+36*A/(A+38))},ge=function(A){var R,I=[],q=A.length,V=0,de=128,ve=72,Ge=A.lastIndexOf("-");Ge<0&&(Ge=0);for(var st=0;st=128&&U("not-basic"),I.push(A.charCodeAt(st));for(var Re=Ge>0?Ge+1:0;Re=q&&U("invalid-input");var ut=(R=A.charCodeAt(Re++))-48<10?R-22:R-65<26?R-65:R-97<26?R-97:36;(ut>=36||ut>$((_-V)/lt))&&U("overflow"),V+=ut*lt;var Ht=Ft<=ve?1:Ft>=ve+26?26:Ft-ve;if(ut$(_/bt)&&U("overflow"),lt*=bt}var Tt=I.length+1;ve=W(V-ct,Tt,ct==0),$(V/Tt)>_-de&&U("overflow"),de+=$(V/Tt),V%=Tt,I.splice(V++,0,de)}return String.fromCodePoint.apply(String,I)},he=function(A){var R=[],I=(A=z(A)).length,q=128,V=0,de=72,ve=!0,Ge=!1,st=void 0;try{for(var Re,ct=A[Symbol.iterator]();!(ve=(Re=ct.next()).done);ve=!0){var lt=Re.value;lt<128&&R.push(L(lt))}}catch(Qe){Ge=!0,st=Qe}finally{try{!ve&&ct.return&&ct.return()}finally{if(Ge)throw st}}var Ft=R.length,ut=Ft;for(Ft&&R.push("-");ut=q&&Zn$((_-V)/vn)&&U("overflow"),V+=(Ht-q)*vn,q=Ht;var Xt=!0,Wr=!1,hr=void 0;try{for(var pi,ht=A[Symbol.iterator]();!(Xt=(pi=ht.next()).done);Xt=!0){var mt=pi.value;if(mt_&&U("overflow"),mt==q){for(var ke=V,F=36;;F+=36){var ae=F<=de?1:F>=de+26?26:F-de;if(ke>6|192).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase():"%"+(R>>12|224).toString(16).toUpperCase()+"%"+(R>>6&63|128).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase()}function ne(A){for(var R="",I=0,q=A.length;I=194&&V<224){if(q-I>=6){var de=parseInt(A.substr(I+4,2),16);R+=String.fromCharCode((31&V)<<6|63&de)}else R+=A.substr(I,6);I+=6}else if(V>=224){if(q-I>=9){var ve=parseInt(A.substr(I+4,2),16),Ge=parseInt(A.substr(I+7,2),16);R+=String.fromCharCode((15&V)<<12|(63&ve)<<6|63&Ge)}else R+=A.substr(I,9);I+=9}else R+=A.substr(I,3),I+=3}return R}function _e(A,R){function I(q){var V=ne(q);return V.match(R.UNRESERVED)?V:q}return A.scheme&&(A.scheme=String(A.scheme).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(R.PCT_ENCODED,I).replace(R.NOT_USERINFO,X).replace(R.PCT_ENCODED,g)),A.host!==void 0&&(A.host=String(A.host).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_HOST,X).replace(R.PCT_ENCODED,g)),A.path!==void 0&&(A.path=String(A.path).replace(R.PCT_ENCODED,I).replace(A.scheme?R.NOT_PATH:R.NOT_PATH_NOSCHEME,X).replace(R.PCT_ENCODED,g)),A.query!==void 0&&(A.query=String(A.query).replace(R.PCT_ENCODED,I).replace(R.NOT_QUERY,X).replace(R.PCT_ENCODED,g)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(R.PCT_ENCODED,I).replace(R.NOT_FRAGMENT,X).replace(R.PCT_ENCODED,g)),A}function N(A){return A.replace(/^0*(.*)/,"$1")||"0"}function G(A,R){var I=A.match(R.IPV4ADDRESS)||[],q=O(I,2)[1];return q?q.split(".").map(N).join("."):A}function oe(A,R){var I=A.match(R.IPV6ADDRESS)||[],q=O(I,3),V=q[1],de=q[2];if(V){for(var ve=V.toLowerCase().split("::").reverse(),Ge=O(ve,2),st=Ge[0],Re=Ge[1],ct=Re?Re.split(":").map(N):[],lt=st.split(":").map(N),Ft=R.IPV4ADDRESS.test(lt[lt.length-1]),ut=Ft?7:8,Ht=lt.length-ut,bt=Array(ut),Tt=0;Tt1){var pr=bt.slice(0,bn.index),Zn=bt.slice(bn.index+bn.length);Un=pr.join(":")+"::"+Zn.join(":")}else Un=bt.join(":");return de&&(Un+="%"+de),Un}return A}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie="".match(/(){0}/)[1]===void 0;function re(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},q=R.iri!==!1?E:b;R.reference==="suffix"&&(A=(R.scheme?R.scheme+":":"")+"//"+A);var V=A.match(Z);if(V){ie?(I.scheme=V[1],I.userinfo=V[3],I.host=V[4],I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=V[7],I.fragment=V[8],isNaN(I.port)&&(I.port=V[5])):(I.scheme=V[1]||void 0,I.userinfo=A.indexOf("@")!==-1?V[3]:void 0,I.host=A.indexOf("//")!==-1?V[4]:void 0,I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=A.indexOf("?")!==-1?V[7]:void 0,I.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(I.port)&&(I.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),I.host&&(I.host=oe(G(I.host,q),q)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",R.reference&&R.reference!=="suffix"&&R.reference!==I.reference&&(I.error=I.error||"URI is not a "+R.reference+" reference.");var de=Be[(R.scheme||I.scheme||"").toLowerCase()];if(R.unicodeSupport||de&&de.unicodeSupport)_e(I,q);else{if(I.host&&(R.domainHost||de&&de.domainHost))try{I.host=be(I.host.replace(q.PCT_ENCODED,ne).toLowerCase())}catch(ve){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}_e(I,b)}de&&de.parse&&de.parse(I,R)}else I.error=I.error||"URI can not be parsed.";return I}function Se(A,R){var I=R.iri!==!1?E:b,q=[];return A.userinfo!==void 0&&(q.push(A.userinfo),q.push("@")),A.host!==void 0&&q.push(oe(G(String(A.host),I),I).replace(I.IPV6ADDRESS,function(V,de,ve){return"["+de+(ve?"%25"+ve:"")+"]"})),typeof A.port=="number"&&(q.push(":"),q.push(A.port.toString(10))),q.length?q.join(""):void 0}var Pe=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Ke=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function xe(A){for(var R=[];A.length;)if(A.match(Pe))A=A.replace(Pe,"");else if(A.match(Fe))A=A.replace(Fe,"/");else if(A.match(Ke))A=A.replace(Ke,"/"),R.pop();else if(A==="."||A==="..")A="";else{var I=A.match(He);if(!I)throw new Error("Unexpected dot segment condition");var q=I[0];A=A.slice(q.length),R.push(q)}return R.join("")}function Xe(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=R.iri?E:b,q=[],V=Be[(R.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,R),A.host&&!I.IPV6ADDRESS.test(A.host)){if(R.domainHost||V&&V.domainHost)try{A.host=R.iri?De(A.host):be(A.host.replace(I.PCT_ENCODED,ne).toLowerCase())}catch(Ge){A.error=A.error||"Host's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+Ge}}_e(A,I),R.reference!=="suffix"&&A.scheme&&(q.push(A.scheme),q.push(":"));var de=Se(A,R);if(de!==void 0&&(R.reference!=="suffix"&&q.push("//"),q.push(de),A.path&&A.path.charAt(0)!=="/"&&q.push("/")),A.path!==void 0){var ve=A.path;R.absolutePath||V&&V.absolutePath||(ve=xe(ve)),de===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),q.push(ve)}return A.query!==void 0&&(q.push("?"),q.push(A.query)),A.fragment!==void 0&&(q.push("#"),q.push(A.fragment)),q.join("")}function rt(A,R){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],V={};return q||(A=re(Xe(A,I),I),R=re(Xe(R,I),I)),!(I=I||{}).tolerant&&R.scheme?(V.scheme=R.scheme,V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.path?(R.path.charAt(0)==="/"?V.path=xe(R.path):(A.userinfo===void 0&&A.host===void 0&&A.port===void 0||A.path?A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+R.path:V.path=R.path:V.path="/"+R.path,V.path=xe(V.path)),V.query=R.query):(V.path=A.path,R.query!==void 0?V.query=R.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=R.fragment,V}function Ie(A,R){return A&&A.toString().replace(R&&R.iri?E.PCT_ENCODED:b.PCT_ENCODED,ne)}var Ze={scheme:"http",domainHost:!0,parse:function(A,R){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,R){return A.port!==(String(A.scheme).toLowerCase()!=="https"?80:443)&&A.port!==""||(A.port=void 0),A.path||(A.path="/"),A}},gt={scheme:"https",domainHost:Ze.domainHost,parse:Ze.parse,serialize:Ze.serialize},Mt={},jt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",yt="[0-9A-Fa-f]",kt=h(h("%[EFef][0-9A-Fa-f]%"+yt+yt+"%"+yt+yt)+"|"+h("%[89A-Fa-f][0-9A-Fa-f]%"+yt+yt)+"|"+h("%"+yt+yt)),$e=f("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Bt=new RegExp(jt,"g"),se=new RegExp(kt,"g"),Oe=new RegExp(f("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',$e),"g"),pt=new RegExp(f("[^]",jt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Rt=pt;function Yt(A){var R=ne(A);return R.match(Bt)?R:A}var Pn={scheme:"mailto",parse:function(A,R){var I=A,q=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var V=!1,de={},ve=I.query.split("&"),Ge=0,st=ve.length;Get.resolved)}const Dc=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),ff=e=>JSON.parse(JSON.stringify(e)),Dg=(e,t)=>{e=ff(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];Dc(r)&&Dc(o)?e[n]=Dg(o,r):e[n]=r}return e},Bx=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(i,l){const s=i.shift();return s?l[s]?i.length?r(i,l[s]):l[s]:{}:{}},o=r(n,t);return Dc(o)?ff(o):o},RL=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=RL(e.allOf,t);return aa(n,t)}else if(typeof e.$ref<"u"){const n=Bx(e.$ref,t);return aa(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=aa(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(i=>aa(i,t));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>n&&o.pop();return o.every(i=>typeof i>"u")?void 0:o}const r=aa(e.items,t);if(typeof r>"u")return[];{const o=[];for(let i=0;i"u"?t=e.definitions||{}:Dc(e.definitions)&&(t=Dg(t,e.definitions)),aa(ff(e),t)}function NL(){const[e,t]=j.useState({configSchema:null,configDefaults:null});return j.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(o=>o.json()).then(PL);t({configSchema:r,configDefaults:$L(r)})}n()},[]),e}async function DL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function IL(e){let t,n,r,o=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=ML(t,l);const s=t.length;let c=0;for(;n0){const c=o.decode(l.subarray(0,s)),f=s+(l[s+1]===32?2:1),h=o.decode(l.subarray(f));switch(c){case"data":r.data=r.data?r.data+` +`+h:h;break;case"event":r.event=h;break;case"id":e(r.id=h);break;case"retry":const p=parseInt(h,10);isNaN(p)||t(r.retry=p);break}}}}function ML(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o1(){return{data:"",event:"",id:"",retry:void 0}}var FL=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=_h);let b;function E(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",E);let O=zL,_=0;function w(){document.removeEventListener("visibilitychange",E),window.clearTimeout(_),b.abort()}n==null||n.addEventListener("abort",()=>{w(),p()});const S=f??window.fetch,k=o??BL;async function C(){var $;b=new AbortController;try{const L=await S(e,Object.assign(Object.assign({},h),{headers:y,signal:b.signal}));await k(L),await DL(L.body,IL(LL(U=>{U?y[i1]=U:delete y[i1]},U=>{O=U},i))),l==null||l(),w(),p()}catch(L){if(!b.signal.aborted)try{const U=($=s==null?void 0:s(L))!==null&&$!==void 0?$:O;window.clearTimeout(_),_=window.setTimeout(C,U)}catch(U){w(),g(U)}}}C()})}function BL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(_h)))throw new Error(`Expected content-type to be ${_h}, Actual: ${t}`)}function HL(){const[e,t]=j.useState(null),[n,r]=j.useState(null),o=j.useCallback(async(l,s,c)=>{const f=new AbortController;r(f),t({status:"inflight",messages:l.messages,merge:!0}),await UL("/runs",{signal:f.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:s,thread_id:c,stream:!0}),onmessage(h){if(h.event==="data"){const{messages:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:p,run_id:g==null?void 0:g.run_id}))}else if(h.event==="metadata"){const{run_id:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:g==null?void 0:g.messages,run_id:p}))}else h.event==="error"&&t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id}))},onclose(){t(h=>({status:(h==null?void 0:h.status)==="error"?h.status:"done",messages:h==null?void 0:h.messages,run_id:h==null?void 0:h.run_id,merge:h==null?void 0:h.merge})),r(null)},onerror(h){throw t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id,merge:p==null?void 0:p.merge})),r(null),h}})},[]),i=j.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:o,stopStream:i,stream:e}}function WL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return Ux(t,"updated_at","desc")}function GL(){const[e,t]=j.useReducer(WL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const c=new URLSearchParams(window.location.search).get("shared_id"),[f,h]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(p=>p.json()).then(p=>p.map(g=>({...g,mine:!0}))),fetch("/assistants/public/"+(c?`?shared_id=${c}`:""),{headers:{Accept:"application/json"}}).then(p=>p.json())]);t(f.concat(h)),h.find(p=>p.assistant_id===c)&&r(c)}l()},[]);const o=j.useCallback(async(l,s,c,f,h=crypto.randomUUID())=>{const p=c.reduce((y,b)=>(y.append("files",b),y),new FormData);p.append("config",JSON.stringify({configurable:{assistant_id:h}}));const[g]=await Promise.all([fetch(`/assistants/${h}`,{method:"PUT",body:JSON.stringify({name:l,config:s,public:f}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(y=>y.json()),c.length?fetch("/ingest",{method:"POST",body:p}):Promise.resolve()]);t({...g,mine:!0}),r(g.assistant_id)},[]),i=j.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:o,enterConfig:i}}function VL(){const[e,t]=j.useState(!1),{configSchema:n,configDefaults:r}=NL(),{chats:o,currentChat:i,createChat:l,enterChat:s}=AL(),{configs:c,currentConfig:f,saveConfig:h,enterConfig:p}=GL(),{startStream:g,stopStream:y,stream:b}=HL(),E=j.useCallback(async(k,C=i)=>{var L;!C||!((L=c==null?void 0:c.find(U=>U.assistant_id===C.assistant_id))!=null&&L.config)||await g({messages:[{content:k,additional_kwargs:{},type:"human",example:!1}]},C.assistant_id,C.thread_id)},[i,g,c]),O=j.useCallback(async k=>{if(!f)return;const C=await l(k,f.assistant_id);return E(k,C)},[l,E,f]),_=j.useCallback(async k=>{i&&(y==null||y(!0)),s(k),e&&t(!1)},[s,y,e,i]),w=i?M.jsx(_C,{chat:i,startStream:E,stopStream:y,stream:b}):M.jsx(Cj,{startChat:O,configSchema:n,configDefaults:r,configs:c,currentConfig:f,saveConfig:h,enterConfig:p}),S=c==null?void 0:c.find(k=>k.assistant_id===(i==null?void 0:i.assistant_id));return M.jsx(mA,{subtitle:S?M.jsxs("span",{className:"inline-flex gap-1 items-center",children:[S.name,M.jsx(q2,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{s(null),p(S.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:M.jsx(xC,{chats:j.useMemo(()=>c===null||o===null?null:o.filter(k=>c.some(C=>C.assistant_id===k.assistant_id)),[o,c]),currentChat:i,enterChat:_}),children:n?w:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);ap.createRoot(document.getElementById("root")).render(M.jsx(VL,{})); diff --git a/backend/ui/index.html b/backend/ui/index.html index a973704c..5c3a4bc7 100644 --- a/backend/ui/index.html +++ b/backend/ui/index.html @@ -6,8 +6,8 @@ OpenGPTs - - + +
    diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f9a14d19..06e3edf9 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -25,21 +25,17 @@ function App() { if (!config) return; await startStream( { - input: { - content: message, - additional_kwargs: {}, - type: "human", - example: false, - }, + messages: [ + { + content: message, + additional_kwargs: {}, + type: "human", + example: false, + }, + ], }, - { - ...config, - configurable: { - ...config.configurable, - thread_id: chat.thread_id, - assistant_id: chat.assistant_id, - }, - } + chat.assistant_id, + chat.thread_id ); }, [currentChat, startStream, configs] diff --git a/frontend/src/components/Chat.tsx b/frontend/src/components/Chat.tsx index 4739b5de..7fc7e896 100644 --- a/frontend/src/components/Chat.tsx +++ b/frontend/src/components/Chat.tsx @@ -24,7 +24,11 @@ export function Chat(props: ChatProps) { ))} {(props.stream?.status === "inflight" || messages === null) && ( diff --git a/frontend/src/components/LangSmithActions.tsx b/frontend/src/components/LangSmithActions.tsx index 5d231fd6..500ac0a8 100644 --- a/frontend/src/components/LangSmithActions.tsx +++ b/frontend/src/components/LangSmithActions.tsx @@ -13,7 +13,7 @@ export function LangSmithActions(props: { runId: string }) { } | null>(null); const sendFeedback = async (score: number) => { setState({ score, inflight: true }); - await fetch(`/feedback`, { + await fetch(`/runs/feedback`, { method: "POST", body: JSON.stringify({ run_id: props.runId, diff --git a/frontend/src/components/Message.tsx b/frontend/src/components/Message.tsx index 86e58f75..02d4bb84 100644 --- a/frontend/src/components/Message.tsx +++ b/frontend/src/components/Message.tsx @@ -7,6 +7,14 @@ import DOMPurify from "dompurify"; import { ChevronDownIcon } from "@heroicons/react/24/outline"; import { LangSmithActions } from "./LangSmithActions"; +function tryJsonParse(value: string) { + try { + return JSON.parse(value); + } catch (e) { + return {}; + } +} + function Function(props: { call: boolean; name?: string; @@ -48,7 +56,7 @@ function Function(props: {
    - {Object.entries(JSON.parse(props.args)).map( + {Object.entries(tryJsonParse(props.args)).map( ([key, value], i) => (
    (); - async function getMessages(threadId: string) { const { messages } = await fetch(`/threads/${threadId}/messages`, { headers: { @@ -47,13 +45,7 @@ export function useChatMessages( // eslint-disable-next-line react-hooks/exhaustive-deps }, [stream?.status]); - return useMemo(() => { - // TODO replace this with less hacky logic - const ignoreStream = - !stream || - JSON.stringify(stream.messages) === - JSON.stringify(messages?.slice(-stream.messages?.length)); - - return ignoreStream ? messages : [...(messages ?? []), ...stream.messages]; - }, [messages, stream]); + return stream?.merge + ? [...(messages ?? []), ...(stream.messages ?? [])] + : stream?.messages ?? messages; } diff --git a/frontend/src/hooks/useSchemas.ts b/frontend/src/hooks/useSchemas.ts index c9591d34..dbe8ecdb 100644 --- a/frontend/src/hooks/useSchemas.ts +++ b/frontend/src/hooks/useSchemas.ts @@ -22,39 +22,27 @@ export interface Schemas { }; }; }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - inputSchema: null | any; configDefaults: null | { configurable?: { [key: string]: unknown; }; }; - inputDefaults: null | Record; } export function useSchemas() { const [schemas, setSchemas] = useState({ configSchema: null, - inputSchema: null, configDefaults: null, - inputDefaults: null, }); useEffect(() => { async function save() { - const [configSchema, inputSchema] = await Promise.all([ - fetch("/config_schema") - .then((r) => r.json()) - .then(simplifySchema), - fetch("/input_schema") - .then((r) => r.json()) - .then(simplifySchema), - ]); + const configSchema = await fetch("/runs/config_schema") + .then((r) => r.json()) + .then(simplifySchema); setSchemas({ configSchema, - inputSchema, configDefaults: getDefaults(configSchema) as Record, - inputDefaults: getDefaults(inputSchema) as Record, }); } diff --git a/frontend/src/hooks/useStreamState.tsx b/frontend/src/hooks/useStreamState.tsx index 694dd0c7..cd859244 100644 --- a/frontend/src/hooks/useStreamState.tsx +++ b/frontend/src/hooks/useStreamState.tsx @@ -4,13 +4,18 @@ import { Message } from "./useChatList"; export interface StreamState { status: "inflight" | "error" | "done"; - messages: Message[]; + messages?: Message[]; run_id?: string; + merge?: boolean; } export interface StreamStateProps { stream: StreamState | null; - startStream: (input: { input: Message }, config: unknown) => Promise; + startStream: ( + input: { messages: Message[] }, + assistant_id: string, + thread_id: string + ) => Promise; stopStream?: (clear?: boolean) => void; } @@ -19,35 +24,39 @@ export function useStreamState(): StreamStateProps { const [controller, setController] = useState(null); const startStream = useCallback( - async (input: { input: Message }, config: unknown) => { + async ( + input: { messages: Message[] }, + assistant_id: string, + thread_id: string + ) => { const controller = new AbortController(); setController(controller); - setCurrent({ status: "inflight", messages: [input.input] }); + setCurrent({ status: "inflight", messages: input.messages, merge: true }); - await fetchEventSource("/stream", { + await fetchEventSource("/runs/stream", { signal: controller.signal, method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ input, config }), + body: JSON.stringify({ input, assistant_id, thread_id }), onmessage(msg) { if (msg.event === "data") { const { messages } = JSON.parse(msg.data); setCurrent((current) => ({ status: "inflight", - messages: [...(current?.messages ?? []), ...messages], + messages, run_id: current?.run_id, })); } else if (msg.event === "metadata") { const { run_id } = JSON.parse(msg.data); setCurrent((current) => ({ status: "inflight", - messages: current?.messages ?? [], + messages: current?.messages, run_id: run_id, })); } else if (msg.event === "error") { setCurrent((current) => ({ status: "error", - messages: current?.messages ?? [], + messages: current?.messages, run_id: current?.run_id, })); } @@ -55,16 +64,18 @@ export function useStreamState(): StreamStateProps { onclose() { setCurrent((current) => ({ status: current?.status === "error" ? current.status : "done", - messages: current?.messages ?? [], + messages: current?.messages, run_id: current?.run_id, + merge: current?.merge, })); setController(null); }, onerror(error) { setCurrent((current) => ({ status: "error", - messages: current?.messages ?? [], + messages: current?.messages, run_id: current?.run_id, + merge: current?.merge, })); setController(null); throw error; diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index cd3b84f1..9702f992 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,12 +6,11 @@ export default defineConfig({ plugins: [react()], server: { proxy: { - "^/(config_schema|input_schema|stream|assistants|threads|ingest|feedback)": - { - target: "http://127.0.0.1:8100", - changeOrigin: true, - rewrite: (path) => path.replace("/____LANGSERVE_BASE_URL", ""), - }, + "^/(assistants|threads|ingest|runs)": { + target: "http://127.0.0.1:8100", + changeOrigin: true, + rewrite: (path) => path.replace("/____LANGSERVE_BASE_URL", ""), + }, }, }, });