From 702e8ffea5d5c21184a7ba48fddcb96c7dd6fdfe Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sat, 16 Nov 2024 18:37:52 +0800 Subject: [PATCH 01/34] Add components --- custom_components/sandboxcomponent/.gitignore | 12 + custom_components/sandboxcomponent/README.md | 253 ++++++++++++++++++ .../gradio_sandboxcomponent/__init__.py | 4 + .../sandboxcomponent.py | 107 ++++++++ .../sandboxcomponent/demo/__init__.py | 0 .../sandboxcomponent/demo/app.py | 21 ++ .../sandboxcomponent/demo/css.css | 157 +++++++++++ .../sandboxcomponent/demo/requirements.txt | 1 + .../sandboxcomponent/demo/space.py | 143 ++++++++++ .../sandboxcomponent/frontend/Example.svelte | 20 ++ .../sandboxcomponent/frontend/Index.svelte | 131 +++++++++ .../frontend/gradio.config.js | 9 + .../frontend/shared/IFrameContainer.svelte | 66 +++++ .../sandboxcomponent/pyproject.toml | 51 ++++ 14 files changed, 975 insertions(+) create mode 100644 custom_components/sandboxcomponent/.gitignore create mode 100644 custom_components/sandboxcomponent/README.md create mode 100644 custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/__init__.py create mode 100644 custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/sandboxcomponent.py create mode 100644 custom_components/sandboxcomponent/demo/__init__.py create mode 100644 custom_components/sandboxcomponent/demo/app.py create mode 100644 custom_components/sandboxcomponent/demo/css.css create mode 100644 custom_components/sandboxcomponent/demo/requirements.txt create mode 100644 custom_components/sandboxcomponent/demo/space.py create mode 100644 custom_components/sandboxcomponent/frontend/Example.svelte create mode 100644 custom_components/sandboxcomponent/frontend/Index.svelte create mode 100644 custom_components/sandboxcomponent/frontend/gradio.config.js create mode 100644 custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte create mode 100644 custom_components/sandboxcomponent/pyproject.toml diff --git a/custom_components/sandboxcomponent/.gitignore b/custom_components/sandboxcomponent/.gitignore new file mode 100644 index 000000000..5dd75ecdb --- /dev/null +++ b/custom_components/sandboxcomponent/.gitignore @@ -0,0 +1,12 @@ +.eggs/ +dist/ +*.pyc +__pycache__/ +*.py[cod] +*$py.class +__tmp/* +*.pyi +.mypycache +.ruff_cache +node_modules +backend/**/templates/ \ No newline at end of file diff --git a/custom_components/sandboxcomponent/README.md b/custom_components/sandboxcomponent/README.md new file mode 100644 index 000000000..d5e1ad4c8 --- /dev/null +++ b/custom_components/sandboxcomponent/README.md @@ -0,0 +1,253 @@ + +# `gradio_sandboxcomponent` +Static Badge + +Python library for easily interacting with trained machine learning models + +## Installation + +```bash +pip install gradio_sandboxcomponent +``` + +## Usage + +```python + +import gradio as gr +from gradio_sandboxcomponent import SandboxComponent + + +example = SandboxComponent().example_value() + + +with gr.Blocks() as demo: + with gr.Tab("My iFrame"): + with gr.Row(): + gr.Markdown("## Baidu iFrame") + with gr.Row(): + SandboxComponent( + label="iFrame Example", + value=("https://www.baidu.com/", "Hello World"), + show_label=True) + + +if __name__ == "__main__": + demo.launch() + +``` + +## `SandboxComponent` + +### Initialization + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
nametypedefaultdescription
value + +```python +tuple[str, str] | Callable | None +``` + +Nonedefault text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.
label + +```python +str | None +``` + +Nonethe label for this component, displayed above the component if `show_label` is `True` and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component corresponds to.
every + +```python +Timer | float | None +``` + +NoneContinously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.
inputs + +```python +Component | Sequence[Component] | set[Component] | None +``` + +NoneComponents that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.
show_label + +```python +bool | None +``` + +Noneif True, will display label.
scale + +```python +int | None +``` + +Nonerelative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.
min_width + +```python +int +``` + +160minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive + +```python +bool | None +``` + +Noneif True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible + +```python +bool +``` + +TrueIf False, component will be hidden.
elem_id + +```python +str | None +``` + +NoneNone
elem_classes + +```python +list[str] | str | None +``` + +NoneAn optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
render + +```python +bool +``` + +TrueIf False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
key + +```python +int | str | None +``` + +Noneif assigned, will be used to assume identity across a re-render. Components that have the same key across a re-render will have their value preserved.
+ + +### Events + +| name | description | +|:-----|:------------| +| `change` | Triggered when the value of the SandboxComponent changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input. | +| `input` | This listener is triggered when the user changes the value of the SandboxComponent. | +| `submit` | This listener is triggered when the user presses the Enter key while the SandboxComponent is focused. | + + + +### User function + +The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both). + +- When used as an Input, the component only impacts the input signature of the user function. +- When used as an output, the component only impacts the return signature of the user function. + +The code snippet below is accurate in cases where the component is used as both an input and an output. + +- **As output:** Is passed, passes text value as a {str} into the function. +- **As input:** Should return, expects a {str} returned from function and sets textarea value to it. + + ```python + def predict( + value: str | None + ) -> str | None: + return value + ``` + diff --git a/custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/__init__.py b/custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/__init__.py new file mode 100644 index 000000000..c845f110e --- /dev/null +++ b/custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/__init__.py @@ -0,0 +1,4 @@ + +from .sandboxcomponent import SandboxComponent + +__all__ = ['SandboxComponent'] diff --git a/custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/sandboxcomponent.py b/custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/sandboxcomponent.py new file mode 100644 index 000000000..1928ae9f4 --- /dev/null +++ b/custom_components/sandboxcomponent/backend/gradio_sandboxcomponent/sandboxcomponent.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Callable, Sequence +import json +from typing import TYPE_CHECKING, Any + +from gradio.components.base import Component, FormComponent +from gradio.events import Events + +if TYPE_CHECKING: + from gradio.components import Timer + + +class SandboxComponent(FormComponent): + """ + Creates a very simple textbox for user to enter string input or display string output. + """ + + EVENTS = [ + Events.change, + Events.input, + Events.submit, + ] + + def __init__( + self, + value: tuple[str, str] | Callable | None = None, + *, + label: str | None = None, + every: Timer | float | None = None, + inputs: Component | Sequence[Component] | set[Component] | None = None, + show_label: bool | None = None, + scale: int | None = None, + min_width: int = 160, + interactive: bool | None = None, + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + render: bool = True, + key: int | str | None = None, + ): + """ + Parameters: + value: default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component. + placeholder: placeholder hint to provide behind textbox. + label: the label for this component, displayed above the component if `show_label` is `True` and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component corresponds to. + every: Continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer. + inputs: Components that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change. + show_label: if True, will display label. + scale: relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True. + min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first. + interactive: if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output. + visible: If False, component will be hidden. + elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles. + render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later. + key: if assigned, will be used to assume identity across a re-render. Components that have the same key across a re-render will have their value preserved. + """ + + super().__init__( + label=label, + every=every, + inputs=inputs, + show_label=show_label, + scale=scale, + min_width=min_width, + interactive=interactive, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + value=value, + render=render, + key=key, + ) + + def api_info(self) -> dict[str, Any]: + """Provides info about this component's API. Used by Gradio's JS client. + + Returns: + dict: A dictionary containing API documentation + """ + return { + "type": "string" + } + + def preprocess(self, payload: str | None) -> str | None: + """ + Parameters: + payload: the text entered in the textarea. + Returns: + Passes text value as a {str} into the function. + """ + return None if payload is None else str(payload) + + def postprocess(self, value: str | None) -> str | None: + """ + Parameters: + value: Expects a {str} returned from function and sets textarea value to it. + Returns: + The value to display in the textarea. + """ + return None if value is None else json.dumps(value) + + def example_payload(self) -> Any: + return ("https://www.google.com", "print('Hello, world!')") + + def example_value(self) -> Any: + return ("https://www.google.com", "print('Hello, world!')") diff --git a/custom_components/sandboxcomponent/demo/__init__.py b/custom_components/sandboxcomponent/demo/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/custom_components/sandboxcomponent/demo/app.py b/custom_components/sandboxcomponent/demo/app.py new file mode 100644 index 000000000..33802e4e5 --- /dev/null +++ b/custom_components/sandboxcomponent/demo/app.py @@ -0,0 +1,21 @@ + +import gradio as gr +from gradio_sandboxcomponent import SandboxComponent + + +example = SandboxComponent().example_value() + + +with gr.Blocks() as demo: + with gr.Tab("My iFrame"): + with gr.Row(): + gr.Markdown("## Baidu iFrame") + with gr.Row(): + SandboxComponent( + label="iFrame Example", + value=("https://www.baidu.com/", "Hello World"), + show_label=True) + + +if __name__ == "__main__": + demo.launch() diff --git a/custom_components/sandboxcomponent/demo/css.css b/custom_components/sandboxcomponent/demo/css.css new file mode 100644 index 000000000..f7256be42 --- /dev/null +++ b/custom_components/sandboxcomponent/demo/css.css @@ -0,0 +1,157 @@ +html { + font-family: Inter; + font-size: 16px; + font-weight: 400; + line-height: 1.5; + -webkit-text-size-adjust: 100%; + background: #fff; + color: #323232; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; +} + +:root { + --space: 1; + --vspace: calc(var(--space) * 1rem); + --vspace-0: calc(3 * var(--space) * 1rem); + --vspace-1: calc(2 * var(--space) * 1rem); + --vspace-2: calc(1.5 * var(--space) * 1rem); + --vspace-3: calc(0.5 * var(--space) * 1rem); +} + +.app { + max-width: 748px !important; +} + +.prose p { + margin: var(--vspace) 0; + line-height: var(--vspace * 2); + font-size: 1rem; +} + +code { + font-family: "Inconsolata", sans-serif; + font-size: 16px; +} + +h1, +h1 code { + font-weight: 400; + line-height: calc(2.5 / var(--space) * var(--vspace)); +} + +h1 code { + background: none; + border: none; + letter-spacing: 0.05em; + padding-bottom: 5px; + position: relative; + padding: 0; +} + +h2 { + margin: var(--vspace-1) 0 var(--vspace-2) 0; + line-height: 1em; +} + +h3, +h3 code { + margin: var(--vspace-1) 0 var(--vspace-2) 0; + line-height: 1em; +} + +h4, +h5, +h6 { + margin: var(--vspace-3) 0 var(--vspace-3) 0; + line-height: var(--vspace); +} + +.bigtitle, +h1, +h1 code { + font-size: calc(8px * 4.5); + word-break: break-word; +} + +.title, +h2, +h2 code { + font-size: calc(8px * 3.375); + font-weight: lighter; + word-break: break-word; + border: none; + background: none; +} + +.subheading1, +h3, +h3 code { + font-size: calc(8px * 1.8); + font-weight: 600; + border: none; + background: none; + letter-spacing: 0.1em; + text-transform: uppercase; +} + +h2 code { + padding: 0; + position: relative; + letter-spacing: 0.05em; +} + +blockquote { + font-size: calc(8px * 1.1667); + font-style: italic; + line-height: calc(1.1667 * var(--vspace)); + margin: var(--vspace-2) var(--vspace-2); +} + +.subheading2, +h4 { + font-size: calc(8px * 1.4292); + text-transform: uppercase; + font-weight: 600; +} + +.subheading3, +h5 { + font-size: calc(8px * 1.2917); + line-height: calc(1.2917 * var(--vspace)); + + font-weight: lighter; + text-transform: uppercase; + letter-spacing: 0.15em; +} + +h6 { + font-size: calc(8px * 1.1667); + font-size: 1.1667em; + font-weight: normal; + font-style: italic; + font-family: "le-monde-livre-classic-byol", serif !important; + letter-spacing: 0px !important; +} + +#start .md > *:first-child { + margin-top: 0; +} + +h2 + h3 { + margin-top: 0; +} + +.md hr { + border: none; + border-top: 1px solid var(--block-border-color); + margin: var(--vspace-2) 0 var(--vspace-2) 0; +} +.prose ul { + margin: var(--vspace-2) 0 var(--vspace-1) 0; +} + +.gap { + gap: 0; +} diff --git a/custom_components/sandboxcomponent/demo/requirements.txt b/custom_components/sandboxcomponent/demo/requirements.txt new file mode 100644 index 000000000..5c25bf415 --- /dev/null +++ b/custom_components/sandboxcomponent/demo/requirements.txt @@ -0,0 +1 @@ +gradio_sandboxcomponent \ No newline at end of file diff --git a/custom_components/sandboxcomponent/demo/space.py b/custom_components/sandboxcomponent/demo/space.py new file mode 100644 index 000000000..1ff5a07d4 --- /dev/null +++ b/custom_components/sandboxcomponent/demo/space.py @@ -0,0 +1,143 @@ + +import gradio as gr +from app import demo as app +import os + +_docs = {'SandboxComponent': {'description': 'Creates a very simple textbox for user to enter string input or display string output.', 'members': {'__init__': {'value': {'type': 'tuple[str, str] | Callable | None', 'default': 'None', 'description': 'default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'the label for this component, displayed above the component if `show_label` is `True` and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component corresponds to.'}, 'every': {'type': 'Timer | float | None', 'default': 'None', 'description': 'Continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.'}, 'inputs': {'type': 'Component | Sequence[Component] | set[Component] | None', 'default': 'None', 'description': 'Components that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.'}, 'show_label': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will display label.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, component will be hidden.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': None}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'render': {'type': 'bool', 'default': 'True', 'description': 'If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.'}, 'key': {'type': 'int | str | None', 'default': 'None', 'description': 'if assigned, will be used to assume identity across a re-render. Components that have the same key across a re-render will have their value preserved.'}}, 'postprocess': {'value': {'type': 'str | None', 'description': 'Expects a {str} returned from function and sets textarea value to it.'}}, 'preprocess': {'return': {'type': 'str | None', 'description': 'Passes text value as a {str} into the function.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the SandboxComponent changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the SandboxComponent.'}, 'submit': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses the Enter key while the SandboxComponent is focused.'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'SandboxComponent': []}}} + +abs_path = os.path.join(os.path.dirname(__file__), "css.css") + +with gr.Blocks( + css=abs_path, + theme=gr.themes.Default( + font_mono=[ + gr.themes.GoogleFont("Inconsolata"), + "monospace", + ], + ), +) as demo: + gr.Markdown( +""" +# `gradio_sandboxcomponent` + +
+Static Badge +
+ +Python library for easily interacting with trained machine learning models +""", elem_classes=["md-custom"], header_links=True) + app.render() + gr.Markdown( +""" +## Installation + +```bash +pip install gradio_sandboxcomponent +``` + +## Usage + +```python + +import gradio as gr +from gradio_sandboxcomponent import SandboxComponent + + +example = SandboxComponent().example_value() + + +with gr.Blocks() as demo: + with gr.Tab("My iFrame"): + with gr.Row(): + gr.Markdown("## Baidu iFrame") + with gr.Row(): + SandboxComponent( + label="iFrame Example", + value=("https://www.baidu.com/", "Hello World"), + show_label=True) + + +if __name__ == "__main__": + demo.launch() + +``` +""", elem_classes=["md-custom"], header_links=True) + + + gr.Markdown(""" +## `SandboxComponent` + +### Initialization +""", elem_classes=["md-custom"], header_links=True) + + gr.ParamViewer(value=_docs["SandboxComponent"]["members"]["__init__"], linkify=[]) + + + gr.Markdown("### Events") + gr.ParamViewer(value=_docs["SandboxComponent"]["events"], linkify=['Event']) + + + + + gr.Markdown(""" + +### User function + +The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both). + +- When used as an Input, the component only impacts the input signature of the user function. +- When used as an output, the component only impacts the return signature of the user function. + +The code snippet below is accurate in cases where the component is used as both an input and an output. + +- **As input:** Is passed, passes text value as a {str} into the function. +- **As output:** Should return, expects a {str} returned from function and sets textarea value to it. + + ```python +def predict( + value: str | None +) -> str | None: + return value +``` +""", elem_classes=["md-custom", "SandboxComponent-user-fn"], header_links=True) + + + + + demo.load(None, js=r"""function() { + const refs = {}; + const user_fn_refs = { + SandboxComponent: [], }; + requestAnimationFrame(() => { + + Object.entries(user_fn_refs).forEach(([key, refs]) => { + if (refs.length > 0) { + const el = document.querySelector(`.${key}-user-fn`); + if (!el) return; + refs.forEach(ref => { + el.innerHTML = el.innerHTML.replace( + new RegExp("\\b"+ref+"\\b", "g"), + `${ref}` + ); + }) + } + }) + + Object.entries(refs).forEach(([key, refs]) => { + if (refs.length > 0) { + const el = document.querySelector(`.${key}`); + if (!el) return; + refs.forEach(ref => { + el.innerHTML = el.innerHTML.replace( + new RegExp("\\b"+ref+"\\b", "g"), + `${ref}` + ); + }) + } + }) + }) +} + +""") + +demo.launch() diff --git a/custom_components/sandboxcomponent/frontend/Example.svelte b/custom_components/sandboxcomponent/frontend/Example.svelte new file mode 100644 index 000000000..ae432dbd3 --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/Example.svelte @@ -0,0 +1,20 @@ + + +
+ +
+ + diff --git a/custom_components/sandboxcomponent/frontend/Index.svelte b/custom_components/sandboxcomponent/frontend/Index.svelte new file mode 100644 index 000000000..ee07c4f4e --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/Index.svelte @@ -0,0 +1,131 @@ + + + + +
+ URL: {sandboxUrl} + +
+ + + + + + + + +
+ + gradio.dispatch("change")} + /> + + +
+
+ diff --git a/custom_components/sandboxcomponent/frontend/gradio.config.js b/custom_components/sandboxcomponent/frontend/gradio.config.js new file mode 100644 index 000000000..19f8f3258 --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/gradio.config.js @@ -0,0 +1,9 @@ +export default { + plugins: [], + svelte: { + preprocess: [], + }, + build: { + target: "modules", + }, +}; \ No newline at end of file diff --git a/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte b/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte new file mode 100644 index 000000000..d425b883c --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte @@ -0,0 +1,66 @@ + + +
+ +
+ + diff --git a/custom_components/sandboxcomponent/pyproject.toml b/custom_components/sandboxcomponent/pyproject.toml new file mode 100644 index 000000000..3b103b9f1 --- /dev/null +++ b/custom_components/sandboxcomponent/pyproject.toml @@ -0,0 +1,51 @@ +[build-system] +requires = [ + "hatchling", + "hatch-requirements-txt", + "hatch-fancy-pypi-readme>=22.5.0", +] +build-backend = "hatchling.build" + +[project] +name = "gradio_sandboxcomponent" +version = "0.0.9" +description = "Python library for easily interacting with trained machine learning models" +readme = "README.md" +license = "apache-2.0" +requires-python = ">=3.10" +authors = [{ name = "YOUR NAME", email = "YOUREMAIL@domain.com" }] +keywords = ["gradio-custom-component", "gradio-template-SimpleTextbox"] +# Add dependencies here +dependencies = ["gradio>=4.0,<6.0"] +classifiers = [ + 'Development Status :: 3 - Alpha', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Topic :: Scientific/Engineering', + 'Topic :: Scientific/Engineering :: Artificial Intelligence', + 'Topic :: Scientific/Engineering :: Visualization', +] + +# The repository and space URLs are optional, but recommended. +# Adding a repository URL will create a badge in the auto-generated README that links to the repository. +# Adding a space URL will create a badge in the auto-generated README that links to the space. +# This will make it easy for people to find your deployed demo or source code when they +# encounter your project in the wild. + +# [project.urls] +# repository = "your github repository" +# space = "your space url" + +[project.optional-dependencies] +dev = ["build", "twine"] + +[tool.hatch.build] +artifacts = ["/backend/gradio_sandboxcomponent/templates", "*.pyi", "/Users/liugary/Develop/sources/FastChat/.venv/lib/python3.12/site-packages/gradio_sandboxcomponent/templates", "/Users/liugary/Develop/sources/GradioSandboxComponent/sandboxcomponent/backend/gradio_sandboxcomponent/templates"] + +[tool.hatch.build.targets.wheel] +packages = ["/backend/gradio_sandboxcomponent"] From b6d3c6c07d3729d06cd0c98249a5ac1b8124140b Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sat, 16 Nov 2024 18:38:06 +0800 Subject: [PATCH 02/34] Modify fastchat code --- fastchat/serve/gradio_block_arena_named.py | 95 +++++++- fastchat/serve/gradio_web_server.py | 37 ++- fastchat/serve/sandbox/code_runner.py | 249 +++++++++++++++++++++ 3 files changed, 372 insertions(+), 9 deletions(-) create mode 100644 fastchat/serve/sandbox/code_runner.py diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index 2f7b39adb..a8799cc56 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -7,6 +7,7 @@ import time import gradio as gr +from gradio_sandboxcomponent import SandboxComponent import numpy as np from fastchat.constants import ( @@ -30,6 +31,7 @@ get_model_description_md, ) from fastchat.serve.remote_logger import get_remote_logger +from fastchat.serve.sandbox.code_runner import DEFAULT_SANDBOX_INSTRUCTION, create_chatbot_sandbox_state, on_click_run_code, update_sandbox_config from fastchat.utils import ( build_logger, moderation_filter, @@ -152,7 +154,10 @@ def share_click(state0, state1, model_selector0, model_selector1, request: gr.Re def add_text( - state0, state1, model_selector0, model_selector1, text, request: gr.Request + state0, state1, + model_selector0, model_selector1, + sandbox_state0, sandbox_state1, + text, request: gr.Request ): ip = get_ip(request) logger.info(f"add_text (named). ip: {ip}. len: {len(text)}") @@ -204,6 +209,10 @@ def add_text( * 6 ) + # add snadbox instructions if enabled + if sandbox_state0['enable_sandbox']: + text = f"> {sandbox_state0['sandbox_instruction']}\n\n" + text + text = text[:INPUT_CHAR_LEN_LIMIT] # Hard cut-off for i in range(num_sides): states[i].conv.append_message(states[i].conv.roles[0], text) @@ -227,6 +236,8 @@ def bot_response_multi( temperature, top_p, max_new_tokens, + sandbox_state0, + sandbox_state1, request: gr.Request, ): logger.info(f"bot_response_multi (named). ip: {get_ip(request)}") @@ -251,6 +262,7 @@ def bot_response_multi( top_p, max_new_tokens, request, + sandbox_state=sandbox_state0, ) ) @@ -327,7 +339,7 @@ def build_side_by_side_ui_named(models): states = [gr.State() for _ in range(num_sides)] model_selectors = [None] * num_sides - chatbots = [None] * num_sides + chatbots: list[gr.Chatbot | None] = [None] * num_sides notice = gr.Markdown(notice_markdown, elem_id="notice_markdown") @@ -366,6 +378,38 @@ def build_side_by_side_ui_named(models): ], ) + # sandbox states and components + sandbox_states: list[gr.State | None] = [None for _ in range(num_sides)] + sandboxes_components: list[tuple[ + gr.Markdown, # sandbox_output + SandboxComponent, # sandbox_ui + gr.Code, # sandbox_code + ] | None] = [None for _ in range(num_sides)] + + with gr.Group(): + with gr.Row(): + for chatbotIdx in range(num_sides): + with gr.Column(scale=1): + sandbox_state = gr.State(create_chatbot_sandbox_state()) + # Add containers for the sandbox output + sandbox_title = gr.Markdown(value=f"### Model {chatbotIdx + 1} Sandbox", visible=True) + with gr.Tab(label="Output"): + sandbox_output = gr.Markdown(value="", visible=False) + sandbox_ui = SandboxComponent( + value=("", ""), + show_label=True, + visible=False, + ) + with gr.Tab(label="Code"): + sandbox_code = gr.Code(value="", interactive=False, visible=False) + + sandbox_states[chatbotIdx] = sandbox_state + sandboxes_components[chatbotIdx] = ( + sandbox_output, + sandbox_ui, + sandbox_code, + ) + with gr.Row(): leftvote_btn = gr.Button( value="👈 A is better", visible=False, interactive=False @@ -378,6 +422,30 @@ def build_side_by_side_ui_named(models): value="👎 Both are bad", visible=False, interactive=False ) + + # chatbox sandbox global config + with gr.Group(): + with gr.Row(): + enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) + sandbox_env_choice = gr.Dropdown(choices=["React", "Auto"], label="Sandbox Environment", interactive=True) + with gr.Group(): + with gr.Accordion("Sandbox Instructions", open=False): + sandbox_instruction_textarea = gr.TextArea( + value=DEFAULT_SANDBOX_INSTRUCTION + ) + + # update sandbox global config + enable_sandbox_checkbox.change( + fn=update_sandbox_config, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + *sandbox_states + ], + outputs=[*sandbox_states] + ) + with gr.Row(): textbox = gr.Textbox( show_label=False, @@ -452,7 +520,7 @@ def build_side_by_side_ui_named(models): regenerate, states, states + chatbots + [textbox] + btn_list ).then( bot_response_multi, - states + [temperature, top_p, max_output_tokens], + states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list @@ -488,25 +556,38 @@ def build_side_by_side_ui_named(models): textbox.submit( add_text, - states + model_selectors + [textbox], + states + model_selectors + sandbox_states + [textbox], states + chatbots + [textbox] + btn_list, ).then( bot_response_multi, - states + [temperature, top_p, max_output_tokens], + states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list ) send_btn.click( add_text, - states + model_selectors + [textbox], + states + model_selectors + sandbox_states + [textbox], states + chatbots + [textbox] + btn_list, ).then( bot_response_multi, - states + [temperature, top_p, max_output_tokens], + states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list ) + for chatbotIdx in range(num_sides): + chatbot = chatbots[chatbotIdx] + state = states[chatbotIdx] + sandbox_state = sandbox_states[chatbotIdx] + sandbox_components = sandboxes_components[chatbotIdx] + + # trigger sandbox run + chatbot.select( + fn=on_click_run_code, + inputs=[state, sandbox_state, *sandbox_components], + outputs=[*sandbox_components], + ) + return states + model_selectors diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index 4f0521da0..efe59a12e 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -12,6 +12,7 @@ import time import uuid from typing import List +from gradio_sandboxcomponent import SandboxComponent import gradio as gr import requests @@ -29,6 +30,7 @@ SESSION_EXPIRATION_TIME, SURVEY_LINK, ) +from fastchat.conversation import Conversation from fastchat.model.model_adapter import ( get_conversation_template, ) @@ -36,6 +38,7 @@ from fastchat.serve.api_provider import get_api_provider_stream_iter from fastchat.serve.gradio_global_state import Context from fastchat.serve.remote_logger import get_remote_logger +from fastchat.serve.sandbox.code_runner import RUN_CODE_BUTTON_HTML, ChatbotSandboxState from fastchat.utils import ( build_logger, get_window_url_params_js, @@ -427,7 +430,11 @@ def bot_response( request: gr.Request, apply_rate_limit=True, use_recommended_config=False, + sandbox_state: ChatbotSandboxState | None = None, ): + ''' + The main function for generating responses from the model. + ''' ip = get_ip(request) logger.info(f"bot_response. ip: {ip}") start_tstamp = time.time() @@ -450,7 +457,9 @@ def bot_response( yield (state, state.to_gradio_chatbot()) + (no_change_btn,) * 5 return - conv, model_name = state.conv, state.model_name + conv: Conversation = state.conv + model_name: str = state.model_name + model_api_dict = ( api_endpoint_info[model_name] if model_name in api_endpoint_info else None ) @@ -550,6 +559,14 @@ def bot_response( return output = data["text"].strip() conv.update_last_message(output) + + # Add a "Run in Sandbox" button to the last message if code is detected + if sandbox_state is not None and sandbox_state["enable_sandbox"]: + last_message = conv.messages[-1] + if "```" in last_message[1]: + if not last_message[1].endswith(RUN_CODE_BUTTON_HTML): + last_message[1] += "\n\n" + RUN_CODE_BUTTON_HTML + yield (state, state.to_gradio_chatbot()) + (enable_btn,) * 5 except requests.exceptions.RequestException as e: conv.update_last_message( @@ -880,6 +897,17 @@ def build_single_model_ui(models, add_promotion_links=False): {"left": r"\[", "right": r"\]", "display": True}, ], ) + + # Add containers for the sandbox output and JavaScript + # with gr.Column(): + # sandbox_output = gr.Markdown(value="", visible=False) + # sandbox = SandboxComponent( + # label="Sandbox", + # value=("", ""), + # show_label=True, + # visible=False, + # ) + with gr.Row(): textbox = gr.Textbox( show_label=False, @@ -969,10 +997,15 @@ def build_single_model_ui(models, add_promotion_links=False): [state, chatbot] + btn_list, ) + # trigger sandbox run + # chatbot.select(on_click_run_code, + # inputs=[state, sandbox_output, sandbox], + # outputs=[sandbox_output, sandbox]) + return [state, model_selector] -def build_demo(models): +def build_demo(models) -> gr.Blocks: with gr.Blocks( title="Chatbot Arena (formerly LMSYS): Free AI Chat to Compare & Test Best AI Chatbots", theme=gr.themes.Default(), diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py new file mode 100644 index 000000000..b84250d4a --- /dev/null +++ b/fastchat/serve/sandbox/code_runner.py @@ -0,0 +1,249 @@ +''' +Run generated code in a sandbox environment. +''' + +from typing import Generator, TypedDict +import gradio as gr +import re +import os +import base64 +from e2b import Sandbox +from e2b_code_interpreter import Sandbox as CodeSandbox +from gradio_sandboxcomponent import SandboxComponent + +E2B_API_KEY = os.environ.get("E2B_API_KEY") +''' +API key for the e2b API. +''' + + +VALID_GRADIO_CODE_LANGUAGES = ['python', 'c', 'cpp', 'markdown', 'json', 'html', 'css', 'javascript', 'jinja2', 'typescript', 'yaml', 'dockerfile', 'shell', 'r', 'sql', + 'sql-msSQL', 'sql-mySQL', 'sql-mariaDB', 'sql-sqlite', 'sql-cassandra', 'sql-plSQL', 'sql-hive', 'sql-pgSQL', 'sql-gql', 'sql-gpSQL', 'sql-sparkSQL', 'sql-esper'] +''' +Languages that gradio code component can render. +''' + +RUN_CODE_BUTTON_HTML = "" +''' +Button in the chat to run the code in the sandbox. +''' + +DEFAULT_SANDBOX_INSTRUCTION = "Generate typescript for a single-file react component tsx file. Do not use external libs or import external files. Surround code with ``` in markdown." +''' +Default sandbox prompt instruction. +''' + + +class ChatbotSandboxState(TypedDict): + ''' + Chatbot sandbox state in gr.state. + ''' + enable_sandbox: bool + sandbox_environment: str | None + sandbox_instruction: str | None + + +def create_chatbot_sandbox_state() -> ChatbotSandboxState: + ''' + Create a new chatbot sandbox state. + ''' + return { + "enable_sandbox": False, + "sandbox_environment": None, + "sandbox_instruction": None, + } + + +def update_sandbox_config( + enable_sandbox: bool, + sandbox_environment: str, + sandbox_instruction: str, + *states: ChatbotSandboxState +) -> list[ChatbotSandboxState]: + ''' + Fn to update sandbox config. + ''' + for state in states: + state["enable_sandbox"] = enable_sandbox + state["sandbox_environment"] = sandbox_environment + state["sandbox_instruction"] = sandbox_instruction + return list(states) + + +def extract_code_from_markdown(message: str) -> tuple[str, str, bool] | None: + ''' + Extracts code from a markdown message. + + Returns: + tuple[str, str, bool]: A tuple containing the code, code language, and a boolean indicating whether the code is a webpage. + ''' + # Regular expression to match code blocks with optional language + code_block_regex = r'```(\w+)?\n(.*?)```' + matches = re.findall(code_block_regex, message, re.DOTALL) + + if matches: + # Extract code language and code + code_lang = matches[0][0] or '' + code = matches[0][1].strip() + else: + # if no code block is found, return None + return None + + # Determine if the code is related to a webpage + if any(word in message.lower() for word in ['typescript', 'javascript', 'react']): + is_webpage = True + else: + is_webpage = False + + return code, code_lang, is_webpage + + +def render_result(result): + if result.png: + if isinstance(result.png, str): + img_str = result.png + else: + img_str = base64.b64encode(result.png).decode() + return f"" + elif result.jpeg: + if isinstance(result.jpeg, str): + img_str = result.jpeg + else: + img_str = base64.b64encode(result.jpeg).decode() + return f"" + elif result.svg: + return result.svg + elif result.html: + return result.html + elif result.markdown: + return f"```markdown\n{result.markdown}\n```" + elif result.latex: + return f"```latex\n{result.latex}\n```" + elif result.json: + return f"```json\n{result.json}\n```" + elif result.javascript: + return result.javascript # Return raw JavaScript + else: + return str(result) + + +def run_code_interpreter(code: str, code_language: str | None) -> tuple[str, str, str]: + """ + Executes the provided code within a sandboxed environment and returns the output. + + Args: + code (str): The code to be executed. + + Returns: + tuple[str, str, str]: A tuple containing the standard output, rendered results, and JavaScript code. + """ + with CodeSandbox() as sandbox: + execution = sandbox.run_code( + code=code, + language=code_language + ) + + # collect stdout, stderr from sandbox + stdout = "\n".join(execution.logs.stdout) + stderr = "\n".join(execution.logs.stderr) + output = "" + if stdout: + output += f"### Stdout:\n```\n{stdout}\n```\n\n" + if stderr: + output += f"### Stderr:\n```\n{stderr}\n```\n\n" + + results = [] + js_code = "" + for result in execution.results: + rendered_result = render_result(result) + if result.javascript: + js_code += rendered_result + "\n" + else: + results.append(rendered_result) + return output, "\n".join(results), js_code + + + +def run_react_sandbox(code: str) -> str: + """ + Executes the provided code within a sandboxed environment and returns the output. + + Args: + code (str): The code to be executed. + + Returns: + url for remote sandbox + """ + sandbox = Sandbox( + template="nextjs-developer", + metadata={ + "template": "nextjs-developer" + }, + api_key=E2B_API_KEY, + ) + + # set up the sandbox + sandbox.files.make_dir('pages') + file_path = "~/pages/index.tsx" + sandbox.files.write(path=file_path, data=code, request_timeout=60) + + # get the sandbox url + sandbox_url = 'https://' + sandbox.get_host(3000) + return sandbox_url + +def on_click_run_code( + state, + sandbox_state: ChatbotSandboxState, + sandbox_output: gr.Markdown, + sandbox_ui: SandboxComponent, + sandbox_code: gr.Code, + evt: gr.SelectData + ): + ''' + gradio fn when run code is clicked. Update Sandbox components. + ''' + if sandbox_state['enable_sandbox'] is not True or not evt.value.endswith(RUN_CODE_BUTTON_HTML): + return None, None, None + + message = evt.value.replace(RUN_CODE_BUTTON_HTML, "").strip() + + extract_result = extract_code_from_markdown(message) + if extract_result is None: + return gr.skip(), gr.skip(), gr.skip() + + # validate e2b api key + if not E2B_API_KEY: + raise ValueError("E2B_API_KEY is not set in env vars.") + + code, code_language, is_web_page = extract_result + if code_language == 'tsx': + code_language = 'typescript' + code_language = code_language.lower() if code_language and code_language.lower() in VALID_GRADIO_CODE_LANGUAGES else None # ensure gradio supports the code language + + # show loading + yield ( + gr.Markdown(value="### Running Sandbox (Loading)", visible=True), + gr.skip(), + gr.Code(value=code, language=code_language, visible=True), + ) + + if is_web_page: + url = run_react_sandbox(code) + yield ( + gr.Markdown(value="### Running Sandbox", visible=True), + SandboxComponent( + value=(url, code), + label="Example", + visible=True, + key="newsandbox", + ), + gr.skip(), + ) + else: + output, results, js_code = run_code_interpreter( + code=code, code_language=code_language) + yield ( + gr.Markdown(value=output, visible=True), + None, + gr.skip() + ) \ No newline at end of file From 6a6fc7a9317f788be486946d2ef41a7c217854e3 Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sat, 16 Nov 2024 23:00:02 +0800 Subject: [PATCH 03/34] Update readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 6510b8ab7..c127f3eaa 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,15 @@ FastChat's core features include: - [Fine-tuning](#fine-tuning) - [Citation](#citation) +---- + +For Software Areana, please follow the following extra steps: +1. Set your E2B API Key: `export E2B_API_KEY=` +2. Custom Component Build: Follow https://www.gradio.app/guides/custom-components-in-five-minutes to set up environment. Go into `custom_components/sandboxcomponent` and run `gradio cc build`. +3. Use `pip install custom_components/sandboxcomponent/dist/gradio_sandboxcomponent-xxx-py3-none-any.whl` to install the custom components. + +---- + ## Install ### Method 1: With pip From 54f21ac3bc48aaed09d487af8920343299d4c7af Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sun, 17 Nov 2024 16:59:01 +0800 Subject: [PATCH 04/34] Fix --- README.md | 2 +- .../frontend/package-lock.json | 3662 +++++++++++++++++ .../sandboxcomponent/frontend/package.json | 44 + 3 files changed, 3707 insertions(+), 1 deletion(-) create mode 100644 custom_components/sandboxcomponent/frontend/package-lock.json create mode 100644 custom_components/sandboxcomponent/frontend/package.json diff --git a/README.md b/README.md index c127f3eaa..2b5332bd8 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ FastChat's core features include: For Software Areana, please follow the following extra steps: 1. Set your E2B API Key: `export E2B_API_KEY=` -2. Custom Component Build: Follow https://www.gradio.app/guides/custom-components-in-five-minutes to set up environment. Go into `custom_components/sandboxcomponent` and run `gradio cc build`. +2. Custom Component Build: Follow https://www.gradio.app/guides/custom-components-in-five-minutes to set up environment. Go into `custom_components/sandboxcomponent` and run `gradio cc install`, `gradio cc build`. 3. Use `pip install custom_components/sandboxcomponent/dist/gradio_sandboxcomponent-xxx-py3-none-any.whl` to install the custom components. ---- diff --git a/custom_components/sandboxcomponent/frontend/package-lock.json b/custom_components/sandboxcomponent/frontend/package-lock.json new file mode 100644 index 000000000..ec0077732 --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/package-lock.json @@ -0,0 +1,3662 @@ +{ + "name": "gradio_sandboxcomponent", + "version": "0.3.6", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "gradio_sandboxcomponent", + "version": "0.3.6", + "license": "ISC", + "dependencies": { + "@gradio/atoms": "0.11.0", + "@gradio/icons": "0.8.1", + "@gradio/statustracker": "0.9.4", + "@gradio/utils": "0.7.0", + "dequal": "^2.0.3" + }, + "devDependencies": { + "@gradio/preview": "0.13.0", + "@tsconfig/svelte": "^5.0.4", + "svelte-preprocess": "^6.0.3", + "typescript": "^5.6.3" + }, + "peerDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/@adobe/css-tools": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", + "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@formatjs/ecma402-abstract": { + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz", + "integrity": "sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==", + "license": "MIT", + "dependencies": { + "@formatjs/intl-localematcher": "0.2.25", + "tslib": "^2.1.0" + } + }, + "node_modules/@formatjs/fast-memoize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz", + "integrity": "sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@formatjs/icu-messageformat-parser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz", + "integrity": "sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw==", + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "1.11.4", + "@formatjs/icu-skeleton-parser": "1.3.6", + "tslib": "^2.1.0" + } + }, + "node_modules/@formatjs/icu-skeleton-parser": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz", + "integrity": "sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg==", + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "1.11.4", + "tslib": "^2.1.0" + } + }, + "node_modules/@formatjs/intl-localematcher": { + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz", + "integrity": "sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@gradio/atoms": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.11.0.tgz", + "integrity": "sha512-JBIgWt/JfvrRICVOX9txiVA037vZ+sin3rRsObJckUeYXxG0YPSF43CXqL5ueu64R6B0ZHa0dNnxR5SO2iWBUw==", + "license": "ISC", + "dependencies": { + "@gradio/icons": "^0.8.1", + "@gradio/markdown-code": "^0.2.1", + "@gradio/utils": "^0.7.0" + }, + "peerDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/@gradio/icons": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.8.1.tgz", + "integrity": "sha512-oIseRgYivjxaAgXQvM2eB4KTlo/Q+V/p5qAVbbieRyCvjTJSD+ObgX/t5Wh4h4nnoNvneoqHsCRxKJAZ5VxSOg==", + "license": "ISC", + "peerDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/@gradio/markdown-code": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@gradio/markdown-code/-/markdown-code-0.2.1.tgz", + "integrity": "sha512-VLzivcYW2g5G7PnRuGRxl9CxGh6S9ryLVTfbousg7tfTsJe1iOaWjXpOfI5z2xd+FK6j5cU6/7hqaBKHaZRTOQ==", + "license": "ISC", + "dependencies": { + "@gradio/sanitize": "^0.1.3", + "@types/dompurify": "^3.0.2", + "@types/katex": "^0.16.0", + "@types/prismjs": "1.26.4", + "github-slugger": "^2.0.0", + "isomorphic-dompurify": "^2.14.0", + "katex": "^0.16.7", + "marked": "^12.0.0", + "marked-gfm-heading-id": "^3.1.2", + "marked-highlight": "^2.0.1", + "prismjs": "1.29.0" + }, + "peerDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/@gradio/preview": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@gradio/preview/-/preview-0.13.0.tgz", + "integrity": "sha512-MuZw7cpBCrcSfbQ4iRAhA++6eUP7h3q5h7E03R43byT211Y7/7fQKZqN3fmZy0+VSzp1XSbdlW09/bXmARdR/Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "@originjs/vite-plugin-commonjs": "^1.0.3", + "@rollup/plugin-sucrase": "^5.0.1", + "@sveltejs/vite-plugin-svelte": "^3.1.0", + "@types/which": "^3.0.0", + "coffeescript": "^2.7.0", + "lightningcss": "^1.21.7", + "pug": "^3.0.2", + "sass": "^1.66.1", + "stylus": "^0.63.0", + "sucrase": "^3.34.0", + "sugarss": "^4.0.1", + "svelte-hmr": "^0.16.0", + "svelte-preprocess": "^6.0.3", + "typescript": "^5.0.0", + "vite": "^5.2.9", + "which": "4.0.0", + "yootils": "^0.3.1" + }, + "optionalDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/@gradio/sanitize": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@gradio/sanitize/-/sanitize-0.1.3.tgz", + "integrity": "sha512-IQXf1/dqOaUSrJMO9hh9jH03lK+MA2UH977guQIvSXts7rXqorD+ChCVn7WUrAQ9Mf0DYPhRH9NMIp0s1xPZmg==", + "license": "ISC", + "dependencies": { + "amuchina": "^1.0.12", + "sanitize-html": "^2.13.0" + } + }, + "node_modules/@gradio/statustracker": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.9.4.tgz", + "integrity": "sha512-29H8tx9D5K3qyjsG9C09x8tRizbz6lQmlvV8liuXR5cQBXZ5XPM1SZb7kYyDtwfu1PSg+qVEkCBXZDZrowO3iw==", + "license": "ISC", + "dependencies": { + "@gradio/atoms": "^0.11.0", + "@gradio/icons": "^0.8.1", + "@gradio/utils": "^0.7.0", + "@types/dompurify": "^3.0.2", + "dompurify": "^3.0.3" + }, + "peerDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/@gradio/theme": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.3.0.tgz", + "integrity": "sha512-PNguiOQFZO4Vim9446b2VRa0wO0ulkz9MUkDJXIdk7Cdx6HZQaqc5hErp/mlDV1scFKQbwTsG+9IzcClTnLXTg==", + "license": "ISC", + "peerDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/@gradio/utils": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.7.0.tgz", + "integrity": "sha512-cPVt/oz+tdEQ3ya1XoDe7VBX+q4Z1KDI68FxmindW5BWHIfOEVNWZ+6KQTIZhrgl+k4kSHqpZjnahGyFpes9+w==", + "license": "ISC", + "dependencies": { + "@gradio/theme": "^0.3.0", + "svelte-i18n": "^3.6.0" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@originjs/vite-plugin-commonjs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@originjs/vite-plugin-commonjs/-/vite-plugin-commonjs-1.0.3.tgz", + "integrity": "sha512-KuEXeGPptM2lyxdIEJ4R11+5ztipHoE7hy8ClZt3PYaOVQ/pyngd2alaSrPnwyFeOW1UagRBaQ752aA1dTMdOQ==", + "dev": true, + "license": "MulanPSL2", + "dependencies": { + "esbuild": "^0.14.14" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.0.tgz", + "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.0", + "@parcel/watcher-darwin-arm64": "2.5.0", + "@parcel/watcher-darwin-x64": "2.5.0", + "@parcel/watcher-freebsd-x64": "2.5.0", + "@parcel/watcher-linux-arm-glibc": "2.5.0", + "@parcel/watcher-linux-arm-musl": "2.5.0", + "@parcel/watcher-linux-arm64-glibc": "2.5.0", + "@parcel/watcher-linux-arm64-musl": "2.5.0", + "@parcel/watcher-linux-x64-glibc": "2.5.0", + "@parcel/watcher-linux-x64-musl": "2.5.0", + "@parcel/watcher-win32-arm64": "2.5.0", + "@parcel/watcher-win32-ia32": "2.5.0", + "@parcel/watcher-win32-x64": "2.5.0" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.0.tgz", + "integrity": "sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/plugin-sucrase": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-sucrase/-/plugin-sucrase-5.0.2.tgz", + "integrity": "sha512-4MhIVH9Dy2Hwose1/x5QMs0XF7yn9jDd/yozHqzdIrMWIolgFpGnrnVhQkqTaK1RALY/fpyrEKmwH/04vr1THA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "sucrase": "^3.27.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.53.1||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.27.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.2.tgz", + "integrity": "sha512-KnXU4m9MywuZFedL35Z3PuwiTSn/yqRIhrEA9j+7OSkji39NzVkgxuxTYg5F8ryGysq4iFADaU5osSizMXhU2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@sveltejs/vite-plugin-svelte": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.1.2.tgz", + "integrity": "sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sveltejs/vite-plugin-svelte-inspector": "^2.1.0", + "debug": "^4.3.4", + "deepmerge": "^4.3.1", + "kleur": "^4.1.5", + "magic-string": "^0.30.10", + "svelte-hmr": "^0.16.0", + "vitefu": "^0.2.5" + }, + "engines": { + "node": "^18.0.0 || >=20" + }, + "peerDependencies": { + "svelte": "^4.0.0 || ^5.0.0-next.0", + "vite": "^5.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte-inspector": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.1.0.tgz", + "integrity": "sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.0.0 || >=20" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.0", + "vite": "^5.0.0" + } + }, + "node_modules/@tsconfig/svelte": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-5.0.4.tgz", + "integrity": "sha512-BV9NplVgLmSi4mwKzD8BD/NQ8erOY/nUE/GpgWe2ckx+wIQF5RyRirn/QsSSCPeulVpc3RA/iJt6DpfTIZps0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/dompurify": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz", + "integrity": "sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==", + "license": "MIT", + "dependencies": { + "@types/trusted-types": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" + }, + "node_modules/@types/katex": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz", + "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==", + "license": "MIT" + }, + "node_modules/@types/prismjs": { + "version": "1.26.4", + "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.4.tgz", + "integrity": "sha512-rlAnzkW2sZOjbqZ743IHUhFcvzaGbqijwOu8QZnZCjfQzBqFE3s4lOTJEsxikImav9uzz/42I+O7YUs1mWgMlg==", + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT" + }, + "node_modules/@types/which": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/which/-/which-3.0.4.tgz", + "integrity": "sha512-liyfuo/106JdlgSchJzXEQCVArk0CvevqPote8F8HgWgJ3dRCcTHgJIsLDuee0kxk/mhbInzIZk3QWSZJ8R+2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/amuchina": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/amuchina/-/amuchina-1.0.12.tgz", + "integrity": "sha512-Itv2NEwpiV53+bkpviJIC12+8SOlCSLR1HgQCv6wD7ldNFNesm4JSk7XjvTFkeVfLYzqKEZcEBZO1X/V2MYg4A==" + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "license": "MIT" + }, + "node_modules/assert-never": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.3.0.tgz", + "integrity": "sha512-9Z3vxQ+berkL/JJo0dK+EY3Lp0s3NtSnP3VCLsh5HDcZPrh0M+KQRK5sWhUeyPPH+/RCxZqOxLMR+YC6vlviEQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/babel-walk": { + "version": "3.0.0-canary-5", + "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", + "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.9.6" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/character-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", + "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-regex": "^1.0.3" + } + }, + "node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/cli-color": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", + "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", + "license": "ISC", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.64", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/code-red": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", + "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1", + "acorn": "^8.10.0", + "estree-walker": "^3.0.3", + "periscopic": "^3.1.0" + } + }, + "node_modules/code-red/node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/code-red/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/coffeescript": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz", + "integrity": "sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==", + "dev": true, + "license": "MIT", + "bin": { + "cake": "bin/cake", + "coffee": "bin/coffee" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/constantinople": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", + "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.6.0", + "@babel/types": "^7.6.1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "license": "MIT", + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/cssstyle": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz", + "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==", + "license": "MIT", + "dependencies": { + "rrweb-cssom": "^0.7.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "license": "ISC", + "dependencies": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/doctypes": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", + "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/dompurify": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.0.tgz", + "integrity": "sha512-AMdOzK44oFWqHEi0wpOqix/fUNY707OmoeFDnbi3Q5I8uOpy21ufUA5cDJPr0bosxrflOVD/H2DMSvuGKJGfmQ==", + "license": "(MPL-2.0 OR Apache-2.0)" + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "hasInstallScript": true, + "license": "ISC", + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "license": "MIT", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", + "license": "ISC", + "dependencies": { + "d": "^1.0.2", + "ext": "^1.7.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "license": "ISC", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/esbuild": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", + "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/linux-loong64": "0.14.54", + "esbuild-android-64": "0.14.54", + "esbuild-android-arm64": "0.14.54", + "esbuild-darwin-64": "0.14.54", + "esbuild-darwin-arm64": "0.14.54", + "esbuild-freebsd-64": "0.14.54", + "esbuild-freebsd-arm64": "0.14.54", + "esbuild-linux-32": "0.14.54", + "esbuild-linux-64": "0.14.54", + "esbuild-linux-arm": "0.14.54", + "esbuild-linux-arm64": "0.14.54", + "esbuild-linux-mips64le": "0.14.54", + "esbuild-linux-ppc64le": "0.14.54", + "esbuild-linux-riscv64": "0.14.54", + "esbuild-linux-s390x": "0.14.54", + "esbuild-netbsd-64": "0.14.54", + "esbuild-openbsd-64": "0.14.54", + "esbuild-sunos-64": "0.14.54", + "esbuild-windows-32": "0.14.54", + "esbuild-windows-64": "0.14.54", + "esbuild-windows-arm64": "0.14.54" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", + "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "license": "ISC", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "license": "MIT", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "license": "ISC", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/github-slugger": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", + "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==", + "license": "ISC" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "license": "MIT" + }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "license": "MIT" + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/immutable": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", + "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/intl-messageformat": { + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz", + "integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==", + "license": "BSD-3-Clause", + "dependencies": { + "@formatjs/ecma402-abstract": "1.11.4", + "@formatjs/fast-memoize": "1.2.1", + "@formatjs/icu-messageformat-parser": "2.1.0", + "tslib": "^2.1.0" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-expression": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz", + "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^7.1.1", + "object-assign": "^4.1.1" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "license": "MIT" + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "license": "MIT" + }, + "node_modules/is-reference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/isomorphic-dompurify": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/isomorphic-dompurify/-/isomorphic-dompurify-2.16.0.tgz", + "integrity": "sha512-cXhX2owp8rPxafCr0ywqy2CGI/4ceLNgWkWBEvUz64KTbtg3oRL2ZRqq/zW0pzt4YtDjkHLbwcp/lozpKzAQjg==", + "license": "MIT", + "dependencies": { + "@types/dompurify": "^3.0.5", + "dompurify": "^3.1.7", + "jsdom": "^25.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", + "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsdom": { + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.1.tgz", + "integrity": "sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==", + "license": "MIT", + "dependencies": { + "cssstyle": "^4.1.0", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.12", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.7.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^5.0.0", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^2.11.2" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jstransformer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", + "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-promise": "^2.0.0", + "promise": "^7.0.1" + } + }, + "node_modules/katex": { + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", + "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.28.1.tgz", + "integrity": "sha512-KRDkHlLlNj3DWh79CDt93fPlRJh2W1AuHV0ZSZAMMuN7lqlsZTV5842idfS1urWG8q9tc17velp1gCXhY7sLnQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.28.1", + "lightningcss-darwin-x64": "1.28.1", + "lightningcss-freebsd-x64": "1.28.1", + "lightningcss-linux-arm-gnueabihf": "1.28.1", + "lightningcss-linux-arm64-gnu": "1.28.1", + "lightningcss-linux-arm64-musl": "1.28.1", + "lightningcss-linux-x64-gnu": "1.28.1", + "lightningcss-linux-x64-musl": "1.28.1", + "lightningcss-win32-arm64-msvc": "1.28.1", + "lightningcss-win32-x64-msvc": "1.28.1" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.28.1.tgz", + "integrity": "sha512-VG3vvzM0m/rguCdm76DdobNeNJnHK+jWcdkNLFWHLh9YCotRvbRIt45JxwcHlIF8TDqWStVLTdghq5NaigVCBQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "license": "MIT", + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/marked": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-12.0.2.tgz", + "integrity": "sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/marked-gfm-heading-id": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/marked-gfm-heading-id/-/marked-gfm-heading-id-3.2.0.tgz", + "integrity": "sha512-Xfxpr5lXLDLY10XqzSCA9l2dDaiabQUgtYM9hw8yunyVsB/xYBRpiic6BOiY/EAJw1ik1eWr1ET1HKOAPZBhXg==", + "license": "MIT", + "dependencies": { + "github-slugger": "^2.0.0" + }, + "peerDependencies": { + "marked": ">=4 <13" + } + }, + "node_modules/marked-highlight": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/marked-highlight/-/marked-highlight-2.2.1.tgz", + "integrity": "sha512-SiCIeEiQbs9TxGwle9/OwbOejHCZsohQRaNTY2u8euEXYt2rYUFoiImUirThU3Gd/o6Q1gHGtH9qloHlbJpNIA==", + "license": "MIT", + "peerDependencies": { + "marked": ">=4 <16" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "license": "CC0-1.0" + }, + "node_modules/memoizee": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz", + "integrity": "sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==", + "license": "ISC", + "dependencies": { + "d": "^1.0.2", + "es5-ext": "^0.10.64", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "license": "ISC" + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/nwsapi": { + "version": "2.2.13", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.13.tgz", + "integrity": "sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==", + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parse-srcset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz", + "integrity": "sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==", + "license": "MIT" + }, + "node_modules/parse5": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", + "license": "MIT", + "dependencies": { + "entities": "^4.5.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } + }, + "node_modules/periscopic/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "asap": "~2.0.3" + } + }, + "node_modules/pug": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz", + "integrity": "sha512-uBi6kmc9f3SZ3PXxqcHiUZLmIXgfgWooKWXcwSGwQd2Zi5Rb0bT14+8CJjJgI8AB+nndLaNgHGrcc6bPIB665g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pug-code-gen": "^3.0.3", + "pug-filters": "^4.0.0", + "pug-lexer": "^5.0.1", + "pug-linker": "^4.0.0", + "pug-load": "^3.0.0", + "pug-parser": "^6.0.0", + "pug-runtime": "^3.0.1", + "pug-strip-comments": "^2.0.0" + } + }, + "node_modules/pug-attrs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz", + "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "constantinople": "^4.0.1", + "js-stringify": "^1.0.2", + "pug-runtime": "^3.0.0" + } + }, + "node_modules/pug-code-gen": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.3.tgz", + "integrity": "sha512-cYQg0JW0w32Ux+XTeZnBEeuWrAY7/HNE6TWnhiHGnnRYlCgyAUPoyh9KzCMa9WhcJlJ1AtQqpEYHc+vbCzA+Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "constantinople": "^4.0.1", + "doctypes": "^1.1.0", + "js-stringify": "^1.0.2", + "pug-attrs": "^3.0.0", + "pug-error": "^2.1.0", + "pug-runtime": "^3.0.1", + "void-elements": "^3.1.0", + "with": "^7.0.0" + } + }, + "node_modules/pug-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.1.0.tgz", + "integrity": "sha512-lv7sU9e5Jk8IeUheHata6/UThZ7RK2jnaaNztxfPYUY+VxZyk/ePVaNZ/vwmH8WqGvDz3LrNYt/+gA55NDg6Pg==", + "dev": true, + "license": "MIT" + }, + "node_modules/pug-filters": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz", + "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "constantinople": "^4.0.1", + "jstransformer": "1.0.0", + "pug-error": "^2.0.0", + "pug-walk": "^2.0.0", + "resolve": "^1.15.1" + } + }, + "node_modules/pug-lexer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz", + "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-parser": "^2.2.0", + "is-expression": "^4.0.0", + "pug-error": "^2.0.0" + } + }, + "node_modules/pug-linker": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz", + "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pug-error": "^2.0.0", + "pug-walk": "^2.0.0" + } + }, + "node_modules/pug-load": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz", + "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4.1.1", + "pug-walk": "^2.0.0" + } + }, + "node_modules/pug-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz", + "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pug-error": "^2.0.0", + "token-stream": "1.0.0" + } + }, + "node_modules/pug-runtime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz", + "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==", + "dev": true, + "license": "MIT" + }, + "node_modules/pug-strip-comments": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz", + "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "pug-error": "^2.0.0" + } + }, + "node_modules/pug-walk": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz", + "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "4.27.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.2.tgz", + "integrity": "sha512-KreA+PzWmk2yaFmZVwe6GB2uBD86nXl86OsDkt1bJS9p3vqWuEQ6HnJJ+j/mZi/q0920P99/MVRlB4L3crpF5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.27.2", + "@rollup/rollup-android-arm64": "4.27.2", + "@rollup/rollup-darwin-arm64": "4.27.2", + "@rollup/rollup-darwin-x64": "4.27.2", + "@rollup/rollup-freebsd-arm64": "4.27.2", + "@rollup/rollup-freebsd-x64": "4.27.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.27.2", + "@rollup/rollup-linux-arm-musleabihf": "4.27.2", + "@rollup/rollup-linux-arm64-gnu": "4.27.2", + "@rollup/rollup-linux-arm64-musl": "4.27.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.27.2", + "@rollup/rollup-linux-riscv64-gnu": "4.27.2", + "@rollup/rollup-linux-s390x-gnu": "4.27.2", + "@rollup/rollup-linux-x64-gnu": "4.27.2", + "@rollup/rollup-linux-x64-musl": "4.27.2", + "@rollup/rollup-win32-arm64-msvc": "4.27.2", + "@rollup/rollup-win32-ia32-msvc": "4.27.2", + "@rollup/rollup-win32-x64-msvc": "4.27.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rrweb-cssom": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", + "license": "MIT" + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "license": "MIT", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/sanitize-html": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.13.1.tgz", + "integrity": "sha512-ZXtKq89oue4RP7abL9wp/9URJcqQNABB5GGJ2acW1sdO8JTVl92f4ygD7Yc9Ze09VAZhnt2zegeU0tbNsdcLYg==", + "license": "MIT", + "dependencies": { + "deepmerge": "^4.2.2", + "escape-string-regexp": "^4.0.0", + "htmlparser2": "^8.0.0", + "is-plain-object": "^5.0.0", + "parse-srcset": "^1.0.2", + "postcss": "^8.3.11" + } + }, + "node_modules/sass": { + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", + "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "dev": true, + "license": "ISC" + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/stylus": { + "version": "0.63.0", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.63.0.tgz", + "integrity": "sha512-OMlgrTCPzE/ibtRMoeLVhOY0RcNuNWh0rhAVqeKnk/QwcuUKQbnqhZ1kg2vzD8VU/6h3FoPTq4RJPHgLBvX6Bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "~4.3.3", + "debug": "^4.3.2", + "glob": "^7.1.6", + "sax": "~1.3.0", + "source-map": "^0.7.3" + }, + "bin": { + "stylus": "bin/stylus" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://opencollective.com/stylus" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sugarss": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz", + "integrity": "sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svelte": { + "version": "4.2.19", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz", + "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==", + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/estree": "^1.0.1", + "acorn": "^8.9.0", + "aria-query": "^5.3.0", + "axobject-query": "^4.0.0", + "code-red": "^1.0.3", + "css-tree": "^2.3.1", + "estree-walker": "^3.0.3", + "is-reference": "^3.0.1", + "locate-character": "^3.0.0", + "magic-string": "^0.30.4", + "periscopic": "^3.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/svelte-hmr": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.16.0.tgz", + "integrity": "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^12.20 || ^14.13.1 || >= 16" + }, + "peerDependencies": { + "svelte": "^3.19.0 || ^4.0.0" + } + }, + "node_modules/svelte-i18n": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.7.4.tgz", + "integrity": "sha512-yGRCNo+eBT4cPuU7IVsYTYjxB7I2V8qgUZPlHnNctJj5IgbJgV78flsRzpjZ/8iUYZrS49oCt7uxlU3AZv/N5Q==", + "license": "MIT", + "dependencies": { + "cli-color": "^2.0.3", + "deepmerge": "^4.2.2", + "esbuild": "^0.19.2", + "estree-walker": "^2", + "intl-messageformat": "^9.13.0", + "sade": "^1.8.1", + "tiny-glob": "^0.2.9" + }, + "bin": { + "svelte-i18n": "dist/cli.js" + }, + "engines": { + "node": ">= 16" + }, + "peerDependencies": { + "svelte": "^3 || ^4" + } + }, + "node_modules/svelte-i18n/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/svelte-preprocess": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-6.0.3.tgz", + "integrity": "sha512-PLG2k05qHdhmRG7zR/dyo5qKvakhm8IJ+hD2eFRQmMLHp7X3eJnjeupUtvuRpbNiF31RjVw45W+abDwHEmP5OA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.10.2", + "coffeescript": "^2.5.1", + "less": "^3.11.3 || ^4.0.0", + "postcss": "^7 || ^8", + "postcss-load-config": ">=3", + "pug": "^3.0.0", + "sass": "^1.26.8", + "stylus": ">=0.55", + "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.100 || ^5.0.0", + "typescript": "^5.0.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "coffeescript": { + "optional": true + }, + "less": { + "optional": true + }, + "postcss": { + "optional": true + }, + "postcss-load-config": { + "optional": true + }, + "pug": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/svelte/node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/svelte/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "license": "MIT" + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/timers-ext": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.8.tgz", + "integrity": "sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==", + "license": "ISC", + "dependencies": { + "es5-ext": "^0.10.64", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "license": "MIT", + "dependencies": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, + "node_modules/tldts": { + "version": "6.1.61", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.61.tgz", + "integrity": "sha512-rv8LUyez4Ygkopqn+M6OLItAOT9FF3REpPQDkdMx5ix8w4qkuE7Vo2o/vw1nxKQYmJDV8JpAMJQr1b+lTKf0FA==", + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.61" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.61", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.61.tgz", + "integrity": "sha512-In7VffkDWUPgwa+c9picLUxvb0RltVwTkSgMNFgvlGSWveCzGBemBqTsgJCL4EDFWZ6WH0fKTsot6yNhzy3ZzQ==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/token-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz", + "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tough-cookie": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", + "license": "ISC" + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/vitefu": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", + "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/void-elements": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", + "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-url": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "license": "MIT", + "dependencies": { + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/with": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", + "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", + "assert-never": "^1.2.1", + "babel-walk": "3.0.0-canary-5" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "license": "MIT" + }, + "node_modules/yootils": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.3.1.tgz", + "integrity": "sha512-A7AMeJfGefk317I/3tBoUYRcDcNavKEkpiPN/nQsBz/viI2GvT7BtrqdPD6rGqBFN8Ax7v4obf+Cl32JF9DDVw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/custom_components/sandboxcomponent/frontend/package.json b/custom_components/sandboxcomponent/frontend/package.json new file mode 100644 index 000000000..51e17d944 --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/package.json @@ -0,0 +1,44 @@ +{ + "name": "gradio_sandboxcomponent", + "version": "0.3.6", + "description": "Gradio UI packages", + "type": "module", + "author": "", + "license": "ISC", + "private": false, + "main_changeset": true, + "exports": { + ".": { + "gradio": "./Index.svelte", + "svelte": "./dist/Index.svelte", + "types": "./dist/Index.svelte.d.ts" + }, + "./example": { + "gradio": "./Example.svelte", + "svelte": "./dist/Example.svelte", + "types": "./dist/Example.svelte.d.ts" + }, + "./package.json": "./package.json" + }, + "dependencies": { + "@gradio/atoms": "0.11.0", + "@gradio/icons": "0.8.1", + "@gradio/statustracker": "0.9.4", + "@gradio/utils": "0.7.0", + "dequal": "^2.0.3" + }, + "devDependencies": { + "@gradio/preview": "0.13.0", + "@tsconfig/svelte": "^5.0.4", + "svelte-preprocess": "^6.0.3", + "typescript": "^5.6.3" + }, + "peerDependencies": { + "svelte": "^4.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gradio-app/gradio.git", + "directory": "js/simpletextbox" + } +} From 10b9b007c0f0ae50ed6fba7d8d21f572b215f98f Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Tue, 19 Nov 2024 01:04:10 +0800 Subject: [PATCH 05/34] Support PyGame Sandbox --- fastchat/serve/gradio_block_arena_named.py | 32 +++++- fastchat/serve/sandbox/code_runner.py | 110 ++++++++++++++++++++- 2 files changed, 134 insertions(+), 8 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index a8799cc56..f57e1c332 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -31,7 +31,7 @@ get_model_description_md, ) from fastchat.serve.remote_logger import get_remote_logger -from fastchat.serve.sandbox.code_runner import DEFAULT_SANDBOX_INSTRUCTION, create_chatbot_sandbox_state, on_click_run_code, update_sandbox_config +from fastchat.serve.sandbox.code_runner import DEFAULT_SANDBOX_INSTRUCTIONS, SUPPORTED_SANDBOX_ENVIRONMENTS, create_chatbot_sandbox_state, on_click_run_code, update_sandbox_config from fastchat.utils import ( build_logger, moderation_filter, @@ -427,13 +427,39 @@ def build_side_by_side_ui_named(models): with gr.Group(): with gr.Row(): enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) - sandbox_env_choice = gr.Dropdown(choices=["React", "Auto"], label="Sandbox Environment", interactive=True) + sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True) with gr.Group(): with gr.Accordion("Sandbox Instructions", open=False): sandbox_instruction_textarea = gr.TextArea( - value=DEFAULT_SANDBOX_INSTRUCTION + value='' ) + sandbox_env_choice.change( + fn=lambda env: DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[sandbox_env_choice], + outputs=[sandbox_instruction_textarea] + ).then( + fn=update_sandbox_config, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + *sandbox_states + ], + outputs=[*sandbox_states] + ) + + sandbox_instruction_textarea.change( + fn=update_sandbox_config, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + *sandbox_states + ], + outputs=[*sandbox_states] + ) + # update sandbox global config enable_sandbox_checkbox.change( fn=update_sandbox_config, diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index b84250d4a..a894796a1 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -16,6 +16,7 @@ API key for the e2b API. ''' +SUPPORTED_SANDBOX_ENVIRONMENTS = ['React', 'PyGame', 'Auto'] VALID_GRADIO_CODE_LANGUAGES = ['python', 'c', 'cpp', 'markdown', 'json', 'html', 'css', 'javascript', 'jinja2', 'typescript', 'yaml', 'dockerfile', 'shell', 'r', 'sql', 'sql-msSQL', 'sql-mySQL', 'sql-mariaDB', 'sql-sqlite', 'sql-cassandra', 'sql-plSQL', 'sql-hive', 'sql-pgSQL', 'sql-gql', 'sql-gpSQL', 'sql-sparkSQL', 'sql-esper'] @@ -28,11 +29,62 @@ Button in the chat to run the code in the sandbox. ''' -DEFAULT_SANDBOX_INSTRUCTION = "Generate typescript for a single-file react component tsx file. Do not use external libs or import external files. Surround code with ``` in markdown." +DEFAULT_REACT_SANDBOX_INSTRUCTION = "Generate typescript for a single-file react component tsx file. Do not use external libs or import external files. Surround code with ``` in markdown." ''' Default sandbox prompt instruction. ''' +DEFAULT_PYGAME_SANDBOX_INSTRUCTION = ( +''' +Generate a pygame code snippet for a single file. Surround code with ``` in markdown. +Write pygame main method in a sync function like: +```python +import asyncio +import pygame + +pygame.init() + +def menu(events): + # draw + # check events + # change state + pass + + +def play(events): + # draw + # check events + # change state + pass + +game_state = menu + +async def main(): + global game_state + + # You can initialise pygame here as well + + while game_state: + game_state(pygame.event.get()) + pygame.display.update() + await asyncio.sleep(0) # do not forget that one, it must be called on every frame + + # Closing the game (not strictly required) + pygame.quit() + sys.exit() + +if __name__ == "__main__": + asyncio.run(main()) +``` +''' +) + +DEFAULT_SANDBOX_INSTRUCTIONS = { + "Auto": "Auto-detect the code language and run in the appropriate sandbox.", + "React": DEFAULT_REACT_SANDBOX_INSTRUCTION, + "PyGame": DEFAULT_PYGAME_SANDBOX_INSTRUCTION, +} + class ChatbotSandboxState(TypedDict): ''' @@ -65,8 +117,8 @@ def update_sandbox_config( ''' for state in states: state["enable_sandbox"] = enable_sandbox - state["sandbox_environment"] = sandbox_environment state["sandbox_instruction"] = sandbox_instruction + state["sandbox_environment"] = sandbox_environment return list(states) @@ -162,8 +214,6 @@ def run_code_interpreter(code: str, code_language: str | None) -> tuple[str, str results.append(rendered_result) return output, "\n".join(results), js_code - - def run_react_sandbox(code: str) -> str: """ Executes the provided code within a sandboxed environment and returns the output. @@ -191,6 +241,44 @@ def run_react_sandbox(code: str) -> str: sandbox_url = 'https://' + sandbox.get_host(3000) return sandbox_url +def run_pygame_sandbox(code: str) -> str: + """ + Executes the provided code within a sandboxed environment and returns the output. + + Args: + code (str): The code to be executed. + + Returns: + url for remote sandbox + """ + sandbox = Sandbox( + api_key=E2B_API_KEY, + ) + + sandbox.files.make_dir('mygame') + file_path = "~/mygame/main.py" + sandbox.files.write(path=file_path, data=code, request_timeout=60) + + sandbox.commands.run("pip install pygame pygbag black", + timeout=60 * 3, + # on_stdout=lambda message: print(message), + on_stderr=lambda message: print(message),) + + # build the pygame code + sandbox.commands.run( + "pygbag --build ~/mygame", # build game + timeout=60 * 5, + # on_stdout=lambda message: print(message), + # on_stderr=lambda message: print(message), + ) + + process = sandbox.commands.run("python -m http.server 3000", background=True) # start http server + + # get game server url + host = sandbox.get_host(3000) + url = f"https://{host}" + return url + '/mygame/build/web/' + def on_click_run_code( state, sandbox_state: ChatbotSandboxState, @@ -227,7 +315,7 @@ def on_click_run_code( gr.Code(value=code, language=code_language, visible=True), ) - if is_web_page: + if sandbox_state['sandbox_environment'] == 'React': url = run_react_sandbox(code) yield ( gr.Markdown(value="### Running Sandbox", visible=True), @@ -239,6 +327,18 @@ def on_click_run_code( ), gr.skip(), ) + elif sandbox_state['sandbox_environment'] == 'PyGame': + url = run_pygame_sandbox(code) + yield ( + gr.Markdown(value="### Running Sandbox", visible=True), + SandboxComponent( + value=(url, code), + label="Example", + visible=True, + key="newsandbox", + ), + gr.skip(), + ) else: output, results, js_code = run_code_interpreter( code=code, code_language=code_language) From b63ecb87a8265840d6f7438535ade953fd3d5f6d Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Thu, 21 Nov 2024 02:32:39 +0800 Subject: [PATCH 06/34] Add sandbox for anony tab --- fastchat/serve/gradio_block_arena_anony.py | 130 +++++++++++++++++++-- 1 file changed, 122 insertions(+), 8 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index 625c69c44..78f8ecb32 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -8,6 +8,7 @@ import re import gradio as gr +from gradio_sandboxcomponent import SandboxComponent import numpy as np from fastchat.constants import ( @@ -35,6 +36,7 @@ get_model_description_md, ) from fastchat.serve.remote_logger import get_remote_logger +from fastchat.serve.sandbox.code_runner import DEFAULT_SANDBOX_INSTRUCTIONS, SUPPORTED_SANDBOX_ENVIRONMENTS, create_chatbot_sandbox_state, on_click_run_code, update_sandbox_config from fastchat.utils import ( build_logger, moderation_filter, @@ -175,7 +177,7 @@ def share_click(state0, state1, model_selector0, model_selector1, request: gr.Re ) -SAMPLING_WEIGHTS = {} +SAMPLING_WEIGHTS = {'gpt-3.5-turbo':0.5,'gpt-4o-mini':0.5} # target model sampling weights will be boosted. BATTLE_TARGETS = {} @@ -222,6 +224,10 @@ def get_battle_pair( ) model_weights.append(weight) total_weight = np.sum(model_weights) + if np.isnan(total_weight) or total_weight == 0: + logger.error(f"total weight: {total_weight}") + logger.error("Invalid total_weight in get_battle_pair.") + raise ValueError("Invalid total_weight: must be greater than zero and not NaN.") model_weights = model_weights / total_weight # print(models) # print(model_weights) @@ -267,7 +273,11 @@ def get_battle_pair( def add_text( - state0, state1, model_selector0, model_selector1, text, request: gr.Request + #state0, state1, model_selector0, model_selector1, text, request: gr.Request + state0, state1, + model_selector0, model_selector1, + sandbox_state0, sandbox_state1, + text, request: gr.Request ): ip = get_ip(request) logger.info(f"add_text (anony). ip: {ip}. len: {len(text)}") @@ -332,6 +342,9 @@ def add_text( * 6 + [""] ) + # add snadbox instructions if enabled + if sandbox_state0['enable_sandbox']: + text = f"> {sandbox_state0['sandbox_instruction']}\n\n" + text text = text[:BLIND_MODE_INPUT_CHAR_LEN_LIMIT] # Hard cut-off for i in range(num_sides): @@ -361,6 +374,8 @@ def bot_response_multi( temperature, top_p, max_new_tokens, + sandbox_state0, + sandbox_state1, request: gr.Request, ): logger.info(f"bot_response_multi (anony). ip: {get_ip(request)}") @@ -387,6 +402,7 @@ def bot_response_multi( request, apply_rate_limit=False, use_recommended_config=True, + sandbox_state=sandbox_state0, ) ) @@ -460,8 +476,12 @@ def build_side_by_side_ui_anony(models): """ states = [gr.State() for _ in range(num_sides)] + logger.debug(f"Initialized states in UI: {states}") + logger.info(f"num_sides: {num_sides}") + logger.info(f"models: {models}") + logger.info(f"states: {states}") model_selectors = [None] * num_sides - chatbots = [None] * num_sides + chatbots: list[gr.Chatbot | None] = [None] * num_sides gr.Markdown(notice_markdown, elem_id="notice_markdown") @@ -497,6 +517,36 @@ def build_side_by_side_ui_anony(models): with gr.Row(): slow_warning = gr.Markdown("") + # sandbox states and components + sandbox_states: list[gr.State | None] = [None for _ in range(num_sides)] + sandboxes_components: list[tuple[ + gr.Markdown, # sandbox_output + SandboxComponent, # sandbox_ui + gr.Code, # sandbox_code + ] | None] = [None for _ in range(num_sides)] + with gr.Group(): + with gr.Row(): + for chatbotIdx in range(num_sides): + with gr.Column(scale=1): + sandbox_state = gr.State(create_chatbot_sandbox_state()) + # Add containers for the sandbox output + sandbox_title = gr.Markdown(value=f"### Model {chatbotIdx + 1} Sandbox", visible=True) + with gr.Tab(label="Output"): + sandbox_output = gr.Markdown(value="", visible=False) + sandbox_ui = SandboxComponent( + value=("", ""), + show_label=True, + visible=False, + ) + with gr.Tab(label="Code"): + sandbox_code = gr.Code(value="", interactive=False, visible=False) + sandbox_states[chatbotIdx] = sandbox_state + sandboxes_components[chatbotIdx] = ( + sandbox_output, + sandbox_ui, + sandbox_code, + ) + with gr.Row(): leftvote_btn = gr.Button( value="👈 A is better", visible=False, interactive=False @@ -508,6 +558,56 @@ def build_side_by_side_ui_anony(models): bothbad_btn = gr.Button( value="👎 Both are bad", visible=False, interactive=False ) + + # chatbox sandbox global config + with gr.Group(): + with gr.Row(): + enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) + sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True) + with gr.Group(): + with gr.Accordion("Sandbox Instructions", open=False): + sandbox_instruction_textarea = gr.TextArea( + value='' + ) + + sandbox_env_choice.change( + fn=lambda env: DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[sandbox_env_choice], + outputs=[sandbox_instruction_textarea] + ).then( + fn=update_sandbox_config, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + *sandbox_states + ], + outputs=[*sandbox_states] + ) + + sandbox_instruction_textarea.change( + fn=update_sandbox_config, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + *sandbox_states + ], + outputs=[*sandbox_states] + ) + + # update sandbox global config + enable_sandbox_checkbox.change( + fn=update_sandbox_config, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + *sandbox_states + ], + outputs=[*sandbox_states] + ) + with gr.Row(): textbox = gr.Textbox( @@ -587,7 +687,7 @@ def build_side_by_side_ui_anony(models): regenerate, states, states + chatbots + [textbox] + btn_list ).then( bot_response_multi, - states + [temperature, top_p, max_output_tokens], + states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list @@ -628,28 +728,42 @@ def build_side_by_side_ui_anony(models): textbox.submit( add_text, - states + model_selectors + [textbox], + states + model_selectors + sandbox_states + [textbox], states + chatbots + [textbox] + btn_list + [slow_warning], ).then( bot_response_multi, - states + [temperature, top_p, max_output_tokens], + states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list, ) + logger.debug(f"Textbox submit binding: states={states}") send_btn.click( add_text, - states + model_selectors + [textbox], + states + model_selectors + sandbox_states + [textbox], states + chatbots + [textbox] + btn_list, ).then( bot_response_multi, - states + [temperature, top_p, max_output_tokens], + states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list ) + logger.debug(f"Textbox submit binding: states={states}") + + for chatbotIdx in range(num_sides): + chatbot = chatbots[chatbotIdx] + state = states[chatbotIdx] + sandbox_state = sandbox_states[chatbotIdx] + sandbox_components = sandboxes_components[chatbotIdx] + # trigger sandbox run + chatbot.select( + fn=on_click_run_code, + inputs=[state, sandbox_state, *sandbox_components], + outputs=[*sandbox_components], + ) return states + model_selectors From f19b9c7151f363b6b37a507da0c1553953c3c472 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Fri, 22 Nov 2024 18:56:47 +0800 Subject: [PATCH 07/34] Remove extra comments --- fastchat/serve/gradio_block_arena_anony.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index 78f8ecb32..132f396c1 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -224,10 +224,7 @@ def get_battle_pair( ) model_weights.append(weight) total_weight = np.sum(model_weights) - if np.isnan(total_weight) or total_weight == 0: - logger.error(f"total weight: {total_weight}") - logger.error("Invalid total_weight in get_battle_pair.") - raise ValueError("Invalid total_weight: must be greater than zero and not NaN.") + model_weights = model_weights / total_weight # print(models) # print(model_weights) @@ -476,10 +473,6 @@ def build_side_by_side_ui_anony(models): """ states = [gr.State() for _ in range(num_sides)] - logger.debug(f"Initialized states in UI: {states}") - logger.info(f"num_sides: {num_sides}") - logger.info(f"models: {models}") - logger.info(f"states: {states}") model_selectors = [None] * num_sides chatbots: list[gr.Chatbot | None] = [None] * num_sides @@ -739,7 +732,6 @@ def build_side_by_side_ui_anony(models): [], btn_list, ) - logger.debug(f"Textbox submit binding: states={states}") send_btn.click( add_text, @@ -752,7 +744,6 @@ def build_side_by_side_ui_anony(models): ).then( flash_buttons, [], btn_list ) - logger.debug(f"Textbox submit binding: states={states}") for chatbotIdx in range(num_sides): chatbot = chatbots[chatbotIdx] From 06281933752246b8e98e9eceabfa41b6b21c32da Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Sun, 24 Nov 2024 19:46:07 +0800 Subject: [PATCH 08/34] Attempt to add sandbox to direct chat (but ' on_click_run_code' not triggered) --- fastchat/serve/gradio_web_server.py | 111 +++++++++++++++++++++++--- fastchat/serve/sandbox/code_runner.py | 14 ++++ 2 files changed, 115 insertions(+), 10 deletions(-) diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index efe59a12e..ee12c436f 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -38,7 +38,7 @@ from fastchat.serve.api_provider import get_api_provider_stream_iter from fastchat.serve.gradio_global_state import Context from fastchat.serve.remote_logger import get_remote_logger -from fastchat.serve.sandbox.code_runner import RUN_CODE_BUTTON_HTML, ChatbotSandboxState +from fastchat.serve.sandbox.code_runner import RUN_CODE_BUTTON_HTML, ChatbotSandboxState, DEFAULT_SANDBOX_INSTRUCTIONS, SUPPORTED_SANDBOX_ENVIRONMENTS, create_chatbot_sandbox_state, on_click_run_code, update_sandbox_config_single_model from fastchat.utils import ( build_logger, get_window_url_params_js, @@ -333,10 +333,12 @@ def get_ip(request: gr.Request): return ip -def add_text(state, model_selector, text, request: gr.Request): +def add_text(state, model_selector, sandbox_state, text, request: gr.Request): ip = get_ip(request) logger.info(f"add_text. ip: {ip}. len: {len(text)}") + print("sandbox_state:", sandbox_state) + if state is None: state = State(model_selector) @@ -360,6 +362,12 @@ def add_text(state, model_selector, text, request: gr.Request): no_change_btn, ) * 5 + # add sandbox instructions if enabled + try: + if sandbox_state['enable_sandbox']: + text = f"> {sandbox_state['sandbox_instruction']}\n\n" + text + except (TypeError, KeyError) as e: + print("Error accessing sandbox_state:", e) text = text[:INPUT_CHAR_LEN_LIMIT] # Hard cut-off state.conv.append_message(state.conv.roles[0], text) state.conv.append_message(state.conv.roles[1], None) @@ -898,6 +906,38 @@ def build_single_model_ui(models, add_promotion_links=False): ], ) + + # Sandbox state and components + sandbox_states: list[gr.State | None] = [] + sandboxes_components: list[tuple[ + gr.Markdown, # sandbox_output + SandboxComponent, # sandbox_ui + gr.Code, # sandbox_code + ] | None] = [] + with gr.Group(): + with gr.Row(): + with gr.Column(scale=1): + sandbox_state = gr.State(create_chatbot_sandbox_state()) + # Add containers for the sandbox output + sandbox_title = gr.Markdown(value=f"### Model Sandbox", visible=True) + with gr.Tab(label="Output"): + sandbox_output = gr.Markdown(value="", visible=False) + sandbox_ui = SandboxComponent( + value=("", ""), + show_label=True, + visible=False, + ) + with gr.Tab(label="Code"): + sandbox_code = gr.Code(value="", interactive=False, visible=False) + + sandbox_states.append(sandbox_state) + sandboxes_components.append(( + sandbox_output, + sandbox_ui, + sandbox_code, + )) + + # Add containers for the sandbox output and JavaScript # with gr.Column(): # sandbox_output = gr.Markdown(value="", visible=False) @@ -907,6 +947,56 @@ def build_single_model_ui(models, add_promotion_links=False): # show_label=True, # visible=False, # ) + + + # chatbox sandbox global config + sandbox_state = sandbox_states[0] + + with gr.Group(): + with gr.Row(): + enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) + sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True) + with gr.Group(): + with gr.Accordion("Sandbox Instructions", open=False): + sandbox_instruction_textarea = gr.TextArea( + value='' + ) + sandbox_env_choice.change( + fn=lambda env: DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[sandbox_env_choice], + outputs=[sandbox_instruction_textarea] + ).then( + fn=update_sandbox_config_single_model, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + sandbox_state + ], + outputs= [sandbox_state] + ) + sandbox_instruction_textarea.change( + fn=update_sandbox_config_single_model, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + sandbox_state + ], + outputs=[sandbox_state] + ) + # update sandbox global config + enable_sandbox_checkbox.change( + fn=update_sandbox_config_single_model, + inputs=[ + enable_sandbox_checkbox, + sandbox_env_choice, + sandbox_instruction_textarea, + sandbox_state + ], + outputs=[sandbox_state] + ) + with gr.Row(): textbox = gr.Textbox( @@ -971,7 +1061,7 @@ def build_single_model_ui(models, add_promotion_links=False): ) regenerate_btn.click(regenerate, state, [state, chatbot, textbox] + btn_list).then( bot_response, - [state, temperature, top_p, max_output_tokens], + [state, temperature, top_p, max_output_tokens, sandbox_state], [state, chatbot] + btn_list, ) clear_btn.click(clear_history, None, [state, chatbot, textbox] + btn_list) @@ -980,27 +1070,28 @@ def build_single_model_ui(models, add_promotion_links=False): textbox.submit( add_text, - [state, model_selector, textbox], + [state, model_selector, sandbox_state, textbox], [state, chatbot, textbox] + btn_list, ).then( bot_response, - [state, temperature, top_p, max_output_tokens], + [state, temperature, top_p, max_output_tokens, sandbox_state], [state, chatbot] + btn_list, ) send_btn.click( add_text, - [state, model_selector, textbox], + [state, model_selector, sandbox_state, textbox], [state, chatbot, textbox] + btn_list, ).then( bot_response, - [state, temperature, top_p, max_output_tokens], + [state, temperature, top_p, max_output_tokens, sandbox_state], [state, chatbot] + btn_list, ) + sandbox_components = sandboxes_components[0] # trigger sandbox run - # chatbot.select(on_click_run_code, - # inputs=[state, sandbox_output, sandbox], - # outputs=[sandbox_output, sandbox]) + chatbot.select(fn=on_click_run_code, + inputs=[state, sandbox_state, sandbox_output, sandbox_ui, sandbox_code], + outputs=[*sandbox_components]) return [state, model_selector] diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index a894796a1..6089bf1be 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -121,6 +121,20 @@ def update_sandbox_config( state["sandbox_environment"] = sandbox_environment return list(states) +def update_sandbox_config_single_model( + enable_sandbox: bool, + sandbox_environment: str, + sandbox_instruction: str, + state: ChatbotSandboxState +) -> ChatbotSandboxState: + ''' + Fn to update sandbox config for single model. + ''' + state["enable_sandbox"] = enable_sandbox + state["sandbox_instruction"] = sandbox_instruction + state["sandbox_environment"] = sandbox_environment + + return state def extract_code_from_markdown(message: str) -> tuple[str, str, bool] | None: ''' From eb491a835b53971dae5c45eac8b1f686f998d4e2 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Mon, 25 Nov 2024 19:54:09 +0800 Subject: [PATCH 09/34] fix --- .gradio/certificate.pem | 31 +++++++++++++++++++++++++++++ fastchat/serve/gradio_web_server.py | 8 +++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 .gradio/certificate.pem diff --git a/.gradio/certificate.pem b/.gradio/certificate.pem new file mode 100644 index 000000000..b85c8037f --- /dev/null +++ b/.gradio/certificate.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw +TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh +cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4 +WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu +ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY +MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc +h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+ +0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U +A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW +T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH +B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC +B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv +KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn +OlFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTn +jh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbw +qHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI +rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq +hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL +ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ +3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK +NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5 +ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur +TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC +jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc +oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq +4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA +mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d +emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc= +-----END CERTIFICATE----- diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index ee12c436f..e82ed0fdb 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -435,16 +435,18 @@ def bot_response( temperature, top_p, max_new_tokens, + sandbox_state:ChatbotSandboxState, request: gr.Request, apply_rate_limit=True, use_recommended_config=False, - sandbox_state: ChatbotSandboxState | None = None, ): ''' The main function for generating responses from the model. ''' - ip = get_ip(request) - logger.info(f"bot_response. ip: {ip}") + if request: + ip = get_ip(request) + logger.info(f"bot_response. ip: {ip}") + start_tstamp = time.time() temperature = float(temperature) top_p = float(top_p) From 5e89ec1752c6afcba94219e2e0e447e08d1c9155 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Mon, 25 Nov 2024 22:27:59 +0800 Subject: [PATCH 10/34] stop tracking cert --- .gitignore | 1 + .gradio/certificate.pem | 31 ------------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 .gradio/certificate.pem diff --git a/.gitignore b/.gitignore index 4ae098374..7c0c2c4df 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ dist wandb output checkpoints_flant5_3b +.gradio/certificate.pem # Data *.pkl diff --git a/.gradio/certificate.pem b/.gradio/certificate.pem deleted file mode 100644 index b85c8037f..000000000 --- a/.gradio/certificate.pem +++ /dev/null @@ -1,31 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw -TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh -cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4 -WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu -ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY -MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc -h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+ -0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U -A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW -T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH -B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC -B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv -KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn -OlFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTn -jh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbw -qHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI -rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV -HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq -hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL -ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ -3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK -NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5 -ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur -TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC -jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc -oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq -4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA -mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d -emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc= ------END CERTIFICATE----- From 051eefaefa796bfae506f442104647ca14489fe4 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Wed, 27 Nov 2024 20:28:09 +0800 Subject: [PATCH 11/34] Support Vue Sandbox --- fastchat/serve/gradio_block_arena_anony.py | 6 +-- fastchat/serve/gradio_block_arena_named.py | 4 +- fastchat/serve/sandbox/code_runner.py | 51 ++++++++++++++++++++-- 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index 132f396c1..abaabdc6c 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -396,10 +396,8 @@ def bot_response_multi( temperature, top_p, max_new_tokens, - request, - apply_rate_limit=False, - use_recommended_config=True, - sandbox_state=sandbox_state0, + sandbox_state0, + request ) ) diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index f57e1c332..bc8885e54 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -261,8 +261,8 @@ def bot_response_multi( temperature, top_p, max_new_tokens, - request, - sandbox_state=sandbox_state0, + sandbox_state0, + request ) ) diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index 6089bf1be..7ae262c3f 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -16,7 +16,7 @@ API key for the e2b API. ''' -SUPPORTED_SANDBOX_ENVIRONMENTS = ['React', 'PyGame', 'Auto'] +SUPPORTED_SANDBOX_ENVIRONMENTS = ['React','Vue','PyGame', 'Auto'] VALID_GRADIO_CODE_LANGUAGES = ['python', 'c', 'cpp', 'markdown', 'json', 'html', 'css', 'javascript', 'jinja2', 'typescript', 'yaml', 'dockerfile', 'shell', 'r', 'sql', 'sql-msSQL', 'sql-mySQL', 'sql-mariaDB', 'sql-sqlite', 'sql-cassandra', 'sql-plSQL', 'sql-hive', 'sql-pgSQL', 'sql-gql', 'sql-gpSQL', 'sql-sparkSQL', 'sql-esper'] @@ -34,6 +34,11 @@ Default sandbox prompt instruction. ''' +DEFAULT_VUE_SANDBOX_INSTRUCTION = " Generate TypeScript for a single-file Vue component (SFC) in .vue format. The component should be a simple custom page in a styled `
` element. Do not include or reference any external components.Do not use external libraries or import external files.Surround the code with ``` in markdown." +''' +Default sandbox prompt instruction for vue. +''' + DEFAULT_PYGAME_SANDBOX_INSTRUCTION = ( ''' Generate a pygame code snippet for a single file. Surround code with ``` in markdown. @@ -82,6 +87,7 @@ async def main(): DEFAULT_SANDBOX_INSTRUCTIONS = { "Auto": "Auto-detect the code language and run in the appropriate sandbox.", "React": DEFAULT_REACT_SANDBOX_INSTRUCTION, + "Vue": DEFAULT_VUE_SANDBOX_INSTRUCTION, "PyGame": DEFAULT_PYGAME_SANDBOX_INSTRUCTION, } @@ -156,7 +162,7 @@ def extract_code_from_markdown(message: str) -> tuple[str, str, bool] | None: return None # Determine if the code is related to a webpage - if any(word in message.lower() for word in ['typescript', 'javascript', 'react']): + if any(word in message.lower() for word in ['typescript', 'javascript', 'react','vue']): is_webpage = True else: is_webpage = False @@ -255,6 +261,33 @@ def run_react_sandbox(code: str) -> str: sandbox_url = 'https://' + sandbox.get_host(3000) return sandbox_url +def run_vue_sandbox(code: str) -> str: + """ + Executes the provided Vue code within a sandboxed environment and returns the output. + + Args: + code (str): The Vue code to be executed. + + Returns: + url for remote sandbox + """ + sandbox = Sandbox( + template="vue-developer", + metadata={ + "template": "vue-developer" + }, + api_key=E2B_API_KEY, + ) + + # Set up the sandbox + sandbox.files.make_dir('src') + file_path = "~/src/Index.vue" + sandbox.files.write(path=file_path, data=code, request_timeout=60) + + # Get the sandbox URL + sandbox_url = 'https://' + sandbox.get_host(3000) + return sandbox_url + def run_pygame_sandbox(code: str) -> str: """ Executes the provided code within a sandboxed environment and returns the output. @@ -292,7 +325,7 @@ def run_pygame_sandbox(code: str) -> str: host = sandbox.get_host(3000) url = f"https://{host}" return url + '/mygame/build/web/' - + def on_click_run_code( state, sandbox_state: ChatbotSandboxState, @@ -341,6 +374,18 @@ def on_click_run_code( ), gr.skip(), ) + elif sandbox_state['sandbox_environment'] == 'Vue': + url = run_vue_sandbox(code) + yield ( + gr.Markdown(value="### Running Sandbox", visible=True), + SandboxComponent( + value=(url, code), + label="Example", + visible=True, + key="newsandbox", + ), + gr.skip(), + ) elif sandbox_state['sandbox_environment'] == 'PyGame': url = run_pygame_sandbox(code) yield ( From c3ca94b8e13abd65100b28ec4d6128ecba8e27ea Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Wed, 27 Nov 2024 21:54:50 +0800 Subject: [PATCH 12/34] Fix --- fastchat/serve/sandbox/code_runner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index 7ae262c3f..8ef43a935 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -29,12 +29,12 @@ Button in the chat to run the code in the sandbox. ''' -DEFAULT_REACT_SANDBOX_INSTRUCTION = "Generate typescript for a single-file react component tsx file. Do not use external libs or import external files. Surround code with ``` in markdown." +DEFAULT_REACT_SANDBOX_INSTRUCTION = """ Generate typescript for a single-file Next.js 13+ React component tsx file. Surround code with ``` in markdown. Do not use external libs or import external files. Allowed libs: ["nextjs@14.2.5", "typescript", "@types/node", "@types/react", "@types/react-dom", "postcss", "tailwindcss", "shadcn"] """ ''' Default sandbox prompt instruction. ''' -DEFAULT_VUE_SANDBOX_INSTRUCTION = " Generate TypeScript for a single-file Vue component (SFC) in .vue format. The component should be a simple custom page in a styled `
` element. Do not include or reference any external components.Do not use external libraries or import external files.Surround the code with ``` in markdown." +DEFAULT_VUE_SANDBOX_INSTRUCTION = """ Generate TypeScript for a single-file Vue.js 3+ component (SFC) in .vue format. The component should be a simple custom page in a styled `
` element. Do not include or reference any external components. Surround the code with ``` in markdown. Do not use external libraries or import external files. Allowed libs: ["nextjs@14.2.5", "typescript", "@types/node", "@types/react", "@types/react-dom", "postcss", "tailwindcss", "shadcn"], """ ''' Default sandbox prompt instruction for vue. ''' @@ -281,7 +281,7 @@ def run_vue_sandbox(code: str) -> str: # Set up the sandbox sandbox.files.make_dir('src') - file_path = "~/src/Index.vue" + file_path = "~/app.vue" sandbox.files.write(path=file_path, data=code, request_timeout=60) # Get the sandbox URL From a52dcda38c163c1177ed1d8ba95979ed55ad4538 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Thu, 28 Nov 2024 16:40:54 +0800 Subject: [PATCH 13/34] Support streamlit and gradio sandbox --- fastchat/serve/sandbox/code_runner.py | 99 +++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 4 deletions(-) diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index 8ef43a935..4cbecc97d 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -16,7 +16,7 @@ API key for the e2b API. ''' -SUPPORTED_SANDBOX_ENVIRONMENTS = ['React','Vue','PyGame', 'Auto'] +SUPPORTED_SANDBOX_ENVIRONMENTS = ['React','Vue','PyGame', 'Streamlit','Gradio','Auto'] VALID_GRADIO_CODE_LANGUAGES = ['python', 'c', 'cpp', 'markdown', 'json', 'html', 'css', 'javascript', 'jinja2', 'typescript', 'yaml', 'dockerfile', 'shell', 'r', 'sql', 'sql-msSQL', 'sql-mySQL', 'sql-mariaDB', 'sql-sqlite', 'sql-cassandra', 'sql-plSQL', 'sql-hive', 'sql-pgSQL', 'sql-gql', 'sql-gpSQL', 'sql-sparkSQL', 'sql-esper'] @@ -84,11 +84,27 @@ async def main(): ''' ) +DEFAULT_STREAMLIT_SANDBOX_INSTRUCTION = """ +Generate Python code for a single-file Streamlit application using the Streamlit library. +Surround code with ``` in markdown. +Do not use external libraries or import external files outside of the allowed list. +Allowed libraries: ["streamlit", "pandas", "numpy", "matplotlib", "requests", "seaborn", "plotly"] +""" + +DEFAULT_GRADIO_SANDBOX_INSTRUCTION = """ +Generate Python code for a single-file Gradio application using the Gradio library. +Surround code with ``` in markdown. +Do not use external libraries or import external files outside of the allowed list. +Allowed libraries: ["gradio", "pandas", "numpy", "matplotlib", "requests", "seaborn", "plotly"] +""" + DEFAULT_SANDBOX_INSTRUCTIONS = { "Auto": "Auto-detect the code language and run in the appropriate sandbox.", "React": DEFAULT_REACT_SANDBOX_INSTRUCTION, "Vue": DEFAULT_VUE_SANDBOX_INSTRUCTION, "PyGame": DEFAULT_PYGAME_SANDBOX_INSTRUCTION, + "Streamlit": DEFAULT_STREAMLIT_SANDBOX_INSTRUCTION, + "Gradio": DEFAULT_GRADIO_SANDBOX_INSTRUCTION } @@ -162,7 +178,7 @@ def extract_code_from_markdown(message: str) -> tuple[str, str, bool] | None: return None # Determine if the code is related to a webpage - if any(word in message.lower() for word in ['typescript', 'javascript', 'react','vue']): + if any(word in message.lower() for word in ['typescript', 'javascript', 'react','vue','streamlit','gradio']): is_webpage = True else: is_webpage = False @@ -280,7 +296,6 @@ def run_vue_sandbox(code: str) -> str: ) # Set up the sandbox - sandbox.files.make_dir('src') file_path = "~/app.vue" sandbox.files.write(path=file_path, data=code, request_timeout=60) @@ -325,7 +340,59 @@ def run_pygame_sandbox(code: str) -> str: host = sandbox.get_host(3000) url = f"https://{host}" return url + '/mygame/build/web/' - + +def run_streamlit_sandbox(code: str) -> str: + """ + Executes the provided code within a sandboxed environment and returns the output. + + Args: + code (str): The code to be executed. + + Returns: + url for remote sandbox + """ + sandbox = Sandbox( + template="streamlit-developer", + metadata={ + "template": "streamlit-developer" + }, + api_key=E2B_API_KEY, + ) + + # set up the sandbox + file_path = "~/app.py" + sandbox.files.write(path=file_path, data=code, request_timeout=60) + + # get the sandbox url + sandbox_url = 'https://' + sandbox.get_host(8501) + return sandbox_url + +def run_gradio_sandbox(code: str) -> str: + """ + Executes the provided code within a sandboxed environment and returns the output. + + Args: + code (str): The code to be executed. + + Returns: + url for remote sandbox + """ + sandbox = Sandbox( + template="gradio-developer", + metadata={ + "template": "gradio-developer" + }, + api_key=E2B_API_KEY, + ) + + # set up the sandbox + file_path = "~/app.py" + sandbox.files.write(path=file_path, data=code, request_timeout=60) + + # get the sandbox url + sandbox_url = 'https://' + sandbox.get_host(7860) + return sandbox_url + def on_click_run_code( state, sandbox_state: ChatbotSandboxState, @@ -398,6 +465,30 @@ def on_click_run_code( ), gr.skip(), ) + elif sandbox_state['sandbox_environment'] == 'Streamlit': + url = run_streamlit_sandbox(code) + yield ( + gr.Markdown(value="### Running Sandbox", visible=True), + SandboxComponent( + value=(url, code), + label="Example", + visible=True, + key="newsandbox", + ), + gr.skip(), + ) + elif sandbox_state['sandbox_environment'] == 'Gradio': + url = run_gradio_sandbox(code) + yield ( + gr.Markdown(value="### Running Sandbox", visible=True), + SandboxComponent( + value=(url, code), + label="Example", + visible=True, + key="newsandbox", + ), + gr.skip(), + ) else: output, results, js_code = run_code_interpreter( code=code, code_language=code_language) From 7e6add875568cf328e7ff7be744dfe827aaa4126 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Thu, 28 Nov 2024 22:41:22 +0800 Subject: [PATCH 14/34] Remove streamlit related code --- fastchat/serve/sandbox/code_runner.py | 50 ++------------------------- 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index 4cbecc97d..97206a7f7 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -16,7 +16,7 @@ API key for the e2b API. ''' -SUPPORTED_SANDBOX_ENVIRONMENTS = ['React','Vue','PyGame', 'Streamlit','Gradio','Auto'] +SUPPORTED_SANDBOX_ENVIRONMENTS = ['React','Vue','PyGame','Gradio','Auto'] VALID_GRADIO_CODE_LANGUAGES = ['python', 'c', 'cpp', 'markdown', 'json', 'html', 'css', 'javascript', 'jinja2', 'typescript', 'yaml', 'dockerfile', 'shell', 'r', 'sql', 'sql-msSQL', 'sql-mySQL', 'sql-mariaDB', 'sql-sqlite', 'sql-cassandra', 'sql-plSQL', 'sql-hive', 'sql-pgSQL', 'sql-gql', 'sql-gpSQL', 'sql-sparkSQL', 'sql-esper'] @@ -84,13 +84,6 @@ async def main(): ''' ) -DEFAULT_STREAMLIT_SANDBOX_INSTRUCTION = """ -Generate Python code for a single-file Streamlit application using the Streamlit library. -Surround code with ``` in markdown. -Do not use external libraries or import external files outside of the allowed list. -Allowed libraries: ["streamlit", "pandas", "numpy", "matplotlib", "requests", "seaborn", "plotly"] -""" - DEFAULT_GRADIO_SANDBOX_INSTRUCTION = """ Generate Python code for a single-file Gradio application using the Gradio library. Surround code with ``` in markdown. @@ -103,11 +96,9 @@ async def main(): "React": DEFAULT_REACT_SANDBOX_INSTRUCTION, "Vue": DEFAULT_VUE_SANDBOX_INSTRUCTION, "PyGame": DEFAULT_PYGAME_SANDBOX_INSTRUCTION, - "Streamlit": DEFAULT_STREAMLIT_SANDBOX_INSTRUCTION, "Gradio": DEFAULT_GRADIO_SANDBOX_INSTRUCTION } - class ChatbotSandboxState(TypedDict): ''' Chatbot sandbox state in gr.state. @@ -178,7 +169,7 @@ def extract_code_from_markdown(message: str) -> tuple[str, str, bool] | None: return None # Determine if the code is related to a webpage - if any(word in message.lower() for word in ['typescript', 'javascript', 'react','vue','streamlit','gradio']): + if any(word in message.lower() for word in ['typescript', 'javascript', 'react','vue','gradio']): is_webpage = True else: is_webpage = False @@ -341,31 +332,6 @@ def run_pygame_sandbox(code: str) -> str: url = f"https://{host}" return url + '/mygame/build/web/' -def run_streamlit_sandbox(code: str) -> str: - """ - Executes the provided code within a sandboxed environment and returns the output. - - Args: - code (str): The code to be executed. - - Returns: - url for remote sandbox - """ - sandbox = Sandbox( - template="streamlit-developer", - metadata={ - "template": "streamlit-developer" - }, - api_key=E2B_API_KEY, - ) - - # set up the sandbox - file_path = "~/app.py" - sandbox.files.write(path=file_path, data=code, request_timeout=60) - - # get the sandbox url - sandbox_url = 'https://' + sandbox.get_host(8501) - return sandbox_url def run_gradio_sandbox(code: str) -> str: """ @@ -465,18 +431,6 @@ def on_click_run_code( ), gr.skip(), ) - elif sandbox_state['sandbox_environment'] == 'Streamlit': - url = run_streamlit_sandbox(code) - yield ( - gr.Markdown(value="### Running Sandbox", visible=True), - SandboxComponent( - value=(url, code), - label="Example", - visible=True, - key="newsandbox", - ), - gr.skip(), - ) elif sandbox_state['sandbox_environment'] == 'Gradio': url = run_gradio_sandbox(code) yield ( From 418730ac9088980123c30ac42adeb30bfc92dffe Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Mon, 2 Dec 2024 16:36:10 +0800 Subject: [PATCH 15/34] Fix checkbox in web_server --- fastchat/serve/gradio_web_server.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index e82ed0fdb..5aa5d286a 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -964,8 +964,8 @@ def build_single_model_ui(models, add_promotion_links=False): value='' ) sandbox_env_choice.change( - fn=lambda env: DEFAULT_SANDBOX_INSTRUCTIONS[env], - inputs=[sandbox_env_choice], + fn=lambda env, enable: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[sandbox_env_choice, enable_sandbox_checkbox], outputs=[sandbox_instruction_textarea] ).then( fn=update_sandbox_config_single_model, @@ -989,6 +989,10 @@ def build_single_model_ui(models, add_promotion_links=False): ) # update sandbox global config enable_sandbox_checkbox.change( + fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[enable_sandbox_checkbox, sandbox_env_choice], + outputs=[sandbox_instruction_textarea] + ).then( fn=update_sandbox_config_single_model, inputs=[ enable_sandbox_checkbox, @@ -999,7 +1003,6 @@ def build_single_model_ui(models, add_promotion_links=False): outputs=[sandbox_state] ) - with gr.Row(): textbox = gr.Textbox( show_label=False, From b459b4d86cb9057e87b97de649a367d92e452740 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Mon, 2 Dec 2024 23:05:49 +0800 Subject: [PATCH 16/34] Fix sandbox prompt and ui in direct chat --- fastchat/serve/gradio_web_server.py | 59 ++++++++++++++++----------- fastchat/serve/sandbox/code_runner.py | 6 +++ 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index 5aa5d286a..4a5e9ea46 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -364,8 +364,9 @@ def add_text(state, model_selector, sandbox_state, text, request: gr.Request): # add sandbox instructions if enabled try: - if sandbox_state['enable_sandbox']: + if sandbox_state['enable_sandbox'] and sandbox_state['enabled_round']==0: text = f"> {sandbox_state['sandbox_instruction']}\n\n" + text + sandbox_state['enabled_round'] += 1 except (TypeError, KeyError) as e: print("Error accessing sandbox_state:", e) text = text[:INPUT_CHAR_LEN_LIMIT] # Hard cut-off @@ -917,27 +918,29 @@ def build_single_model_ui(models, add_promotion_links=False): gr.Code, # sandbox_code ] | None] = [] with gr.Group(): - with gr.Row(): - with gr.Column(scale=1): - sandbox_state = gr.State(create_chatbot_sandbox_state()) - # Add containers for the sandbox output - sandbox_title = gr.Markdown(value=f"### Model Sandbox", visible=True) - with gr.Tab(label="Output"): - sandbox_output = gr.Markdown(value="", visible=False) - sandbox_ui = SandboxComponent( - value=("", ""), - show_label=True, - visible=False, - ) - with gr.Tab(label="Code"): - sandbox_code = gr.Code(value="", interactive=False, visible=False) - - sandbox_states.append(sandbox_state) - sandboxes_components.append(( - sandbox_output, - sandbox_ui, - sandbox_code, - )) + sandbox_column = gr.Column(visible=False,scale=1) + with sandbox_column: + sandbox_state = gr.State(create_chatbot_sandbox_state()) + # Add containers for the sandbox output + sandbox_title = gr.Markdown(value=f"### Model Sandbox", visible=False) + sandbox_output_tab = gr.Tab(label="Output", visible=False) + sandbox_code_tab = gr.Tab(label="Code", visible=False) + with sandbox_output_tab: + sandbox_output = gr.Markdown(value="", visible=False) + sandbox_ui = SandboxComponent( + value=("", ""), + show_label=True, + visible=False, + ) + with sandbox_code_tab: + sandbox_code = gr.Code(value="", interactive=False, visible=False) + + sandbox_states.append(sandbox_state) + sandboxes_components.append(( + sandbox_output, + sandbox_ui, + sandbox_code, + )) # Add containers for the sandbox output and JavaScript @@ -1001,6 +1004,16 @@ def build_single_model_ui(models, add_promotion_links=False): sandbox_state ], outputs=[sandbox_state] + ).then( + fn=lambda enable: ( + gr.update(visible=enable), + gr.update(visible=enable), + gr.update(visible=enable), + gr.update(visible=enable), + gr.update(visible=enable) + ), + inputs=[enable_sandbox_checkbox], + outputs=[ sandbox_column,sandbox_title,sandbox_code_tab,sandbox_output_tab] ) with gr.Row(): @@ -1076,7 +1089,7 @@ def build_single_model_ui(models, add_promotion_links=False): textbox.submit( add_text, [state, model_selector, sandbox_state, textbox], - [state, chatbot, textbox] + btn_list, + [state, chatbot, textbox, sandbox_state] + btn_list, ).then( bot_response, [state, temperature, top_p, max_output_tokens, sandbox_state], diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index 97206a7f7..28359f528 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -106,6 +106,7 @@ class ChatbotSandboxState(TypedDict): enable_sandbox: bool sandbox_environment: str | None sandbox_instruction: str | None + enabled_round: int def create_chatbot_sandbox_state() -> ChatbotSandboxState: @@ -116,6 +117,7 @@ def create_chatbot_sandbox_state() -> ChatbotSandboxState: "enable_sandbox": False, "sandbox_environment": None, "sandbox_instruction": None, + "enabled_round": 0 } @@ -147,6 +149,10 @@ def update_sandbox_config_single_model( state["sandbox_instruction"] = sandbox_instruction state["sandbox_environment"] = sandbox_environment + # if enable_sandbox and state["enabled_round"] == 0: + # state["sandbox_instruction"] = DEFAULT_SANDBOX_INSTRUCTIONS.get(sandbox_environment, "") + # state["enabled_round"] += 1 + return state def extract_code_from_markdown(message: str) -> tuple[str, str, bool] | None: From 2e5bf30f73cd14d301b946dffcb7533b756a4fd0 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Wed, 4 Dec 2024 04:17:20 +0800 Subject: [PATCH 17/34] Ban change env chocie after sandbox enabled in one round of conversation. --- fastchat/serve/gradio_web_server.py | 45 ++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index 4a5e9ea46..127e27283 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -314,11 +314,17 @@ def regenerate(state, request: gr.Request): return (state, state.to_gradio_chatbot(), "") + (disable_btn,) * 5 -def clear_history(request: gr.Request): - ip = get_ip(request) - logger.info(f"clear_history. ip: {ip}") +def clear_history(sandbox_state,request: gr.Request): + # ip = get_ip(request) + # logger.info(f"clear_history. ip: {ip}") + if request: + print("Request headers dictionary:", request.headers) + print("IP address:", request.client.host) + print("Query parameters:", dict(request.query_params)) + state = None - return (state, [], "") + (disable_btn,) * 5 + sandbox_state['enabled_round'] = 0 + return (state, [], "") + (disable_btn,) * 5 + (sandbox_state,) def get_ip(request: gr.Request): @@ -1009,11 +1015,10 @@ def build_single_model_ui(models, add_promotion_links=False): gr.update(visible=enable), gr.update(visible=enable), gr.update(visible=enable), - gr.update(visible=enable), gr.update(visible=enable) ), inputs=[enable_sandbox_checkbox], - outputs=[ sandbox_column,sandbox_title,sandbox_code_tab,sandbox_output_tab] + outputs=[sandbox_column,sandbox_title,sandbox_code_tab,sandbox_output_tab] ) with gr.Row(): @@ -1082,9 +1087,25 @@ def build_single_model_ui(models, add_promotion_links=False): [state, temperature, top_p, max_output_tokens, sandbox_state], [state, chatbot] + btn_list, ) - clear_btn.click(clear_history, None, [state, chatbot, textbox] + btn_list) + clear_btn.click( + clear_history, + [sandbox_state], + [state, chatbot, textbox] + btn_list + [sandbox_state] + ).then( + lambda: gr.update(interactive=True), + outputs=[sandbox_env_choice] + ) + + + model_selector.change( + clear_history, + [sandbox_state], + [state, chatbot, textbox] + btn_list + [sandbox_state] + ).then( + lambda: gr.update(interactive=True), + outputs=[sandbox_env_choice] + ) - model_selector.change(clear_history, None, [state, chatbot, textbox] + btn_list) textbox.submit( add_text, @@ -1094,6 +1115,10 @@ def build_single_model_ui(models, add_promotion_links=False): bot_response, [state, temperature, top_p, max_output_tokens, sandbox_state], [state, chatbot] + btn_list, + ).then( + lambda sandbox_state: gr.update(interactive=sandbox_state['enabled_round'] == 0), + inputs=[sandbox_state], + outputs=[sandbox_env_choice] ) send_btn.click( add_text, @@ -1103,6 +1128,10 @@ def build_single_model_ui(models, add_promotion_links=False): bot_response, [state, temperature, top_p, max_output_tokens, sandbox_state], [state, chatbot] + btn_list, + ).then( + lambda sandbox_state: gr.update(interactive=sandbox_state['enabled_round'] == 0), + inputs=[sandbox_state], + outputs=[sandbox_env_choice] ) sandbox_components = sandboxes_components[0] From cab811f64b367c519014b66733bbf44733645029 Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Wed, 4 Dec 2024 20:23:19 +0800 Subject: [PATCH 18/34] Fix minor issues in the sandbox component --- custom_components/sandboxcomponent/README.md | 13 +- .../sandboxcomponent/demo/app.py | 9 +- .../sandboxcomponent/demo/space.py | 13 +- .../sandboxcomponent/frontend/Index.svelte | 268 ++++++---- .../frontend/gradio.config.js | 5 +- .../frontend/package-lock.json | 470 ++++++++++++++---- .../sandboxcomponent/frontend/package.json | 4 +- .../frontend/shared/IFrameContainer.svelte | 55 +- .../sandboxcomponent/frontend/style.css | 1 + .../sandboxcomponent/pyproject.toml | 4 +- 10 files changed, 594 insertions(+), 248 deletions(-) create mode 100644 custom_components/sandboxcomponent/frontend/style.css diff --git a/custom_components/sandboxcomponent/README.md b/custom_components/sandboxcomponent/README.md index d5e1ad4c8..9aece1ec8 100644 --- a/custom_components/sandboxcomponent/README.md +++ b/custom_components/sandboxcomponent/README.md @@ -1,8 +1,8 @@ # `gradio_sandboxcomponent` -Static Badge +PyPI - Version -Python library for easily interacting with trained machine learning models +Gradio library for easily interacting with remote sandbox. ## Installation @@ -17,18 +17,17 @@ pip install gradio_sandboxcomponent import gradio as gr from gradio_sandboxcomponent import SandboxComponent - example = SandboxComponent().example_value() with gr.Blocks() as demo: - with gr.Tab("My iFrame"): + with gr.Tab("Sandbox Demo"): with gr.Row(): - gr.Markdown("## Baidu iFrame") + gr.Markdown("## Sandbox") with gr.Row(): SandboxComponent( - label="iFrame Example", - value=("https://www.baidu.com/", "Hello World"), + label="Sandbox Example", + value=("https://www.gradio.app/", "Hello World"), show_label=True) diff --git a/custom_components/sandboxcomponent/demo/app.py b/custom_components/sandboxcomponent/demo/app.py index 33802e4e5..8c61a371d 100644 --- a/custom_components/sandboxcomponent/demo/app.py +++ b/custom_components/sandboxcomponent/demo/app.py @@ -2,18 +2,17 @@ import gradio as gr from gradio_sandboxcomponent import SandboxComponent - example = SandboxComponent().example_value() with gr.Blocks() as demo: - with gr.Tab("My iFrame"): + with gr.Tab("Sandbox Demo"): with gr.Row(): - gr.Markdown("## Baidu iFrame") + gr.Markdown("## Sandbox") with gr.Row(): SandboxComponent( - label="iFrame Example", - value=("https://www.baidu.com/", "Hello World"), + label="Sandbox Example", + value=("https://www.gradio.app/", "Hello World"), show_label=True) diff --git a/custom_components/sandboxcomponent/demo/space.py b/custom_components/sandboxcomponent/demo/space.py index 1ff5a07d4..bab0c8c88 100644 --- a/custom_components/sandboxcomponent/demo/space.py +++ b/custom_components/sandboxcomponent/demo/space.py @@ -21,10 +21,10 @@ # `gradio_sandboxcomponent`
-Static Badge +PyPI - Version
-Python library for easily interacting with trained machine learning models +Gradio library for easily interacting with remote sandbox. """, elem_classes=["md-custom"], header_links=True) app.render() gr.Markdown( @@ -42,18 +42,17 @@ import gradio as gr from gradio_sandboxcomponent import SandboxComponent - example = SandboxComponent().example_value() with gr.Blocks() as demo: - with gr.Tab("My iFrame"): + with gr.Tab("Sandbox Demo"): with gr.Row(): - gr.Markdown("## Baidu iFrame") + gr.Markdown("## Sandbox") with gr.Row(): SandboxComponent( - label="iFrame Example", - value=("https://www.baidu.com/", "Hello World"), + label="Sandbox Example", + value=("https://www.gradio.app/", "Hello World"), show_label=True) diff --git a/custom_components/sandboxcomponent/frontend/Index.svelte b/custom_components/sandboxcomponent/frontend/Index.svelte index ee07c4f4e..6a4595d9f 100644 --- a/custom_components/sandboxcomponent/frontend/Index.svelte +++ b/custom_components/sandboxcomponent/frontend/Index.svelte @@ -1,18 +1,26 @@ - -
- URL: {sandboxUrl} - -
+ {#if loading_status} + + {/if} +
+
+
+ URL: {sandboxUrl} +
+
+ + + + + + +
+
- - - - - - -
- - gradio.dispatch("change")} - /> - -
+ class:pending={loading_status?.status === "pending"} + class="relative w-full" + style={isFullScreen ? `height: 100%; width: 100%` : `height: ${height}px; width: ${width}px;`} + > + {#key iframeKey} +
+ gradio.dispatch("change")} + /> +
+ {/key} + +
+ + diff --git a/custom_components/sandboxcomponent/frontend/gradio.config.js b/custom_components/sandboxcomponent/frontend/gradio.config.js index 19f8f3258..3e79cf51e 100644 --- a/custom_components/sandboxcomponent/frontend/gradio.config.js +++ b/custom_components/sandboxcomponent/frontend/gradio.config.js @@ -1,5 +1,8 @@ +import tailwindcss from "@tailwindcss/vite"; export default { - plugins: [], + plugins: [ + tailwindcss(), + ], svelte: { preprocess: [], }, diff --git a/custom_components/sandboxcomponent/frontend/package-lock.json b/custom_components/sandboxcomponent/frontend/package-lock.json index ec0077732..39bfee2a2 100644 --- a/custom_components/sandboxcomponent/frontend/package-lock.json +++ b/custom_components/sandboxcomponent/frontend/package-lock.json @@ -13,7 +13,9 @@ "@gradio/icons": "0.8.1", "@gradio/statustracker": "0.9.4", "@gradio/utils": "0.7.0", - "dequal": "^2.0.3" + "@tailwindcss/vite": "^4.0.0-beta.4", + "dequal": "^2.0.3", + "tailwindcss": "^4.0.0-beta.4" }, "devDependencies": { "@gradio/preview": "0.13.0", @@ -29,7 +31,7 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@ampproject/remapping": { @@ -49,7 +51,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -59,7 +61,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -69,7 +71,7 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/types": "^7.26.0" @@ -85,7 +87,7 @@ "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.25.9", @@ -359,7 +361,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.0.tgz", "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -399,7 +400,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -476,7 +476,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -524,6 +523,231 @@ "vite": "^5.0.0" } }, + "node_modules/@tailwindcss/node": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.0.0-beta.4.tgz", + "integrity": "sha512-NAPhQ6BcjXUqI+QFtzYHTcoqX4ACGNZl69NfMIDCCTvmPZ761sdvX8cy3LyeJEZDyfyoBT5vzjzfWeNZR7Y+KA==", + "license": "MIT", + "dependencies": { + "enhanced-resolve": "^5.17.1", + "jiti": "^2.4.0", + "tailwindcss": "4.0.0-beta.4" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.0.0-beta.4.tgz", + "integrity": "sha512-yYZ069LXAEOrQt3SwYV+PhwsGBM0qo7ofsOF5BDrju9Nsz+X0z9NCF9fvc6zJ11wX1bSVuiyLbwIS4P9rVT8hg==", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.0.0-beta.4", + "@tailwindcss/oxide-darwin-arm64": "4.0.0-beta.4", + "@tailwindcss/oxide-darwin-x64": "4.0.0-beta.4", + "@tailwindcss/oxide-freebsd-x64": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-arm64-gnu": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-arm64-musl": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-x64-gnu": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-x64-musl": "4.0.0-beta.4", + "@tailwindcss/oxide-win32-arm64-msvc": "4.0.0-beta.4", + "@tailwindcss/oxide-win32-x64-msvc": "4.0.0-beta.4" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.0-beta.4.tgz", + "integrity": "sha512-r/MBScgeBZXE1xkZ+mw8/QybAlTOEzSJ6Jo9W9YCaqy+6S0Iaeo6CmwOPBrtX4/nlHm/v3hcmQWnaeJDQJMkTg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.0-beta.4.tgz", + "integrity": "sha512-snm+1FmjU59X/2kCgryBlbGYEwJ945cC48XkN78pZIxYn/V7LNukGvDlIKgVJ6GxU4iiac7pk149ZyFZ7Ukj4Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.0-beta.4.tgz", + "integrity": "sha512-BRbp+1WSExBCHnBK3EmTmmweM04UhpegOjjQbWDADrklhNU7juYNiu/4RN7A74ndweeopKuYB8gvMrdGlAEeuA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.0-beta.4.tgz", + "integrity": "sha512-HO6cclVvp1JueqleUfYpLFK41lnI/5/oqwkftZQ5LNF0fwp8sQm2cEh7GTCj2hwTIUnHbxmSmrg1MZL1/yoVgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.0-beta.4.tgz", + "integrity": "sha512-Z6xUcakkJZGySTce0QqfbNdLRK4cUNmilvDd69q+8Ep+Vxqy+x5bkCweAf7b+lJsUe6mjclT2EP1ouMvqegnQQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.0-beta.4.tgz", + "integrity": "sha512-hr9AbxrsAXWjZp8iIcQes7eIfMnSgUS6qA/SbcxFfvmte/BHUSuSxa21OZpFRVYFcQ/BIqLA1hU27fvfZZq4JQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.0-beta.4.tgz", + "integrity": "sha512-b//iI94Eo29LqzAOBfFt1m3bM1CF9NU3K59o3ikAwM6kdxmPQoc7TBpcrEh3lKomJ1Ejj0M95022YqksY7O8gQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.0-beta.4.tgz", + "integrity": "sha512-xqK6amSCZpEpWbuN0WYDlaOir7n2NjD2jtnVZ5eWpnw4kkjzu0kmVqN9PaWdejZUKVfvEy7Ldbmcos9MpQhi4g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.0-beta.4.tgz", + "integrity": "sha512-9V3CtBJ+oBxeppvBUvfZ2NbsrgKkLDIVrF4jUcpj3Md4rdpW6mIRWxqzEY1uT9JZlFr4YmVx6Auax+32BUtD2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.0-beta.4.tgz", + "integrity": "sha512-MYfGNg1nikym/F2aCx0ni5ZWKsChVwWTsjgmDo9ZOiqhWE/7yeX0Ej+lugEh4gPHyUpcMbeTZySZx0OJ8o+X1Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.0-beta.4.tgz", + "integrity": "sha512-hCMihksJD5odhAm+SLFNk75etPRK+QjyMIPMryUI7na6kvB8OaTH4gRBIO27GvRk2q1Zm2sqn4JoYy2auuoAAA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.0.0-beta.4.tgz", + "integrity": "sha512-VpexhM1fzmhT3KfviF3BAOeJ5p0Pc0wW6QkTUI+aiRlIHtaPI9QxNrOvLgkLSqGxucb78ERA0eI2hrcAN6gjWA==", + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.0.0-beta.4", + "@tailwindcss/oxide": "4.0.0-beta.4", + "lightningcss": "^1.26.0", + "svelte-preprocess": "^6.0.2", + "tailwindcss": "4.0.0-beta.4" + }, + "peerDependencies": { + "vite": "^5.2.0" + } + }, "node_modules/@tsconfig/svelte": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-5.0.4.tgz", @@ -575,7 +799,7 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -647,14 +871,14 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/assert-never": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.3.0.tgz", "integrity": "sha512-9Z3vxQ+berkL/JJo0dK+EY3Lp0s3NtSnP3VCLsh5HDcZPrh0M+KQRK5sWhUeyPPH+/RCxZqOxLMR+YC6vlviEQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/asynckit": { @@ -676,7 +900,7 @@ "version": "3.0.0-canary-5", "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/types": "^7.9.6" @@ -689,14 +913,23 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, + "devOptional": true, "license": "MIT" }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -707,7 +940,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -721,7 +953,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -741,7 +973,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-regex": "^1.0.3" @@ -751,7 +983,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "readdirp": "^4.0.1" @@ -817,7 +1049,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz", "integrity": "sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "cake": "bin/cake", @@ -872,14 +1104,14 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/constantinople": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.6.0", @@ -924,6 +1156,15 @@ "node": ">= 8" } }, + "node_modules/css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "license": "MIT", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", @@ -1011,7 +1252,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -1047,7 +1288,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, "license": "Apache-2.0", "bin": { "detect-libc": "bin/detect-libc.js" @@ -1060,7 +1300,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/dom-serializer": { @@ -1138,6 +1378,19 @@ "dev": true, "license": "MIT" }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -1154,7 +1407,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" @@ -1167,7 +1420,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1335,7 +1588,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1380,14 +1632,14 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, + "devOptional": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1397,7 +1649,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1424,7 +1676,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -1457,7 +1709,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" @@ -1466,11 +1718,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" @@ -1483,7 +1741,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1496,7 +1754,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1509,7 +1767,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -1525,7 +1783,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -1607,7 +1865,7 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/inflight": { @@ -1615,7 +1873,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -1626,7 +1884,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/intl-messageformat": { @@ -1645,7 +1903,7 @@ "version": "2.15.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "hasown": "^2.0.2" @@ -1661,7 +1919,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz", "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "acorn": "^7.1.1", @@ -1672,7 +1930,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -1693,7 +1950,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1707,7 +1963,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -1748,7 +2003,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -1801,11 +2056,20 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jiti": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.1.tgz", + "integrity": "sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/js-stringify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/jsdom": { @@ -1852,7 +2116,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-promise": "^2.0.0", @@ -1889,7 +2153,6 @@ "version": "1.28.1", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.28.1.tgz", "integrity": "sha512-KRDkHlLlNj3DWh79CDt93fPlRJh2W1AuHV0ZSZAMMuN7lqlsZTV5842idfS1urWG8q9tc17velp1gCXhY7sLnQ==", - "dev": true, "license": "MPL-2.0", "dependencies": { "detect-libc": "^1.0.3" @@ -1921,7 +2184,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2035,7 +2297,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -2050,7 +2311,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -2085,7 +2345,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -2159,7 +2419,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, "license": "MIT", "optional": true }, @@ -2173,7 +2432,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2183,7 +2442,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -2218,7 +2477,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2238,7 +2497,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/path-scurry": { @@ -2348,7 +2607,7 @@ "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "asap": "~2.0.3" @@ -2358,7 +2617,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz", "integrity": "sha512-uBi6kmc9f3SZ3PXxqcHiUZLmIXgfgWooKWXcwSGwQd2Zi5Rb0bT14+8CJjJgI8AB+nndLaNgHGrcc6bPIB665g==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-code-gen": "^3.0.3", @@ -2375,7 +2634,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz", "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "constantinople": "^4.0.1", @@ -2387,7 +2646,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.3.tgz", "integrity": "sha512-cYQg0JW0w32Ux+XTeZnBEeuWrAY7/HNE6TWnhiHGnnRYlCgyAUPoyh9KzCMa9WhcJlJ1AtQqpEYHc+vbCzA+Aw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "constantinople": "^4.0.1", @@ -2404,14 +2663,14 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.1.0.tgz", "integrity": "sha512-lv7sU9e5Jk8IeUheHata6/UThZ7RK2jnaaNztxfPYUY+VxZyk/ePVaNZ/vwmH8WqGvDz3LrNYt/+gA55NDg6Pg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/pug-filters": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz", "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "constantinople": "^4.0.1", @@ -2425,7 +2684,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz", "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "character-parser": "^2.2.0", @@ -2437,7 +2696,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz", "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-error": "^2.0.0", @@ -2448,7 +2707,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz", "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "object-assign": "^4.1.1", @@ -2459,7 +2718,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz", "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-error": "^2.0.0", @@ -2470,14 +2729,14 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz", "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/pug-strip-comments": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz", "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-error": "^2.0.0" @@ -2487,7 +2746,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz", "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/punycode": { @@ -2503,7 +2762,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 14.16.0" @@ -2517,7 +2776,7 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", @@ -2535,7 +2794,6 @@ "version": "4.27.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.2.tgz", "integrity": "sha512-KreA+PzWmk2yaFmZVwe6GB2uBD86nXl86OsDkt1bJS9p3vqWuEQ6HnJJ+j/mZi/q0920P99/MVRlB4L3crpF5w==", - "dev": true, "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -2611,7 +2869,7 @@ "version": "1.81.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "chokidar": "^4.0.0", @@ -2632,7 +2890,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/saxes": { @@ -2651,7 +2909,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -2705,7 +2963,7 @@ "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">= 8" @@ -2828,7 +3086,7 @@ "version": "0.63.0", "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.63.0.tgz", "integrity": "sha512-OMlgrTCPzE/ibtRMoeLVhOY0RcNuNWh0rhAVqeKnk/QwcuUKQbnqhZ1kg2vzD8VU/6h3FoPTq4RJPHgLBvX6Bw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@adobe/css-tools": "~4.3.3", @@ -2931,7 +3189,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz", "integrity": "sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=12.0" @@ -2948,7 +3206,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3061,7 +3319,6 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-6.0.3.tgz", "integrity": "sha512-PLG2k05qHdhmRG7zR/dyo5qKvakhm8IJ+hD2eFRQmMLHp7X3eJnjeupUtvuRpbNiF31RjVw45W+abDwHEmP5OA==", - "dev": true, "hasInstallScript": true, "license": "MIT", "engines": { @@ -3140,6 +3397,30 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "license": "MIT" }, + "node_modules/tailwindcss": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.0-beta.4.tgz", + "integrity": "sha512-mkjpwMyaHCa3L5HmRjYyY8w8D+7brxwbM7YQxH8QeEFtCURd5fvdHIC9TEpIaL1X49vhl8cuOFY6Nhi6sCsI5w==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "license": "MIT", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -3208,7 +3489,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -3222,7 +3502,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz", "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/tough-cookie": { @@ -3272,7 +3552,7 @@ "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -3282,11 +3562,19 @@ "node": ">=14.17" } }, + "node_modules/utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "license": "MIT", + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, "node_modules/vite": { "version": "5.4.11", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", - "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", @@ -3349,7 +3637,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3363,7 +3650,6 @@ "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -3417,7 +3703,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3498,7 +3784,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.9.6", @@ -3612,7 +3898,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/ws": { diff --git a/custom_components/sandboxcomponent/frontend/package.json b/custom_components/sandboxcomponent/frontend/package.json index 51e17d944..46b1ae55b 100644 --- a/custom_components/sandboxcomponent/frontend/package.json +++ b/custom_components/sandboxcomponent/frontend/package.json @@ -25,7 +25,9 @@ "@gradio/icons": "0.8.1", "@gradio/statustracker": "0.9.4", "@gradio/utils": "0.7.0", - "dequal": "^2.0.3" + "@tailwindcss/vite": "^4.0.0-beta.4", + "dequal": "^2.0.3", + "tailwindcss": "^4.0.0-beta.4" }, "devDependencies": { "@gradio/preview": "0.13.0", diff --git a/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte b/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte index d425b883c..996da839e 100644 --- a/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte +++ b/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte @@ -1,66 +1,25 @@
+ class="w-full h-full" + />
- - diff --git a/custom_components/sandboxcomponent/frontend/style.css b/custom_components/sandboxcomponent/frontend/style.css new file mode 100644 index 000000000..a461c505f --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/style.css @@ -0,0 +1 @@ +@import "tailwindcss"; \ No newline at end of file diff --git a/custom_components/sandboxcomponent/pyproject.toml b/custom_components/sandboxcomponent/pyproject.toml index 3b103b9f1..1d6e76071 100644 --- a/custom_components/sandboxcomponent/pyproject.toml +++ b/custom_components/sandboxcomponent/pyproject.toml @@ -8,8 +8,8 @@ build-backend = "hatchling.build" [project] name = "gradio_sandboxcomponent" -version = "0.0.9" -description = "Python library for easily interacting with trained machine learning models" +version = "0.0.10" +description = "Gradio library for easily interacting with remote sandbox." readme = "README.md" license = "apache-2.0" requires-python = ">=3.10" From 0fbcff3f6ef32fff99b91d34bb1a1c47f6854379 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Wed, 4 Dec 2024 21:37:52 +0800 Subject: [PATCH 19/34] Hide prompt and env choice when checkbox not ticked. --- fastchat/serve/gradio_web_server.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index 127e27283..d9262659b 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -923,7 +923,9 @@ def build_single_model_ui(models, add_promotion_links=False): SandboxComponent, # sandbox_ui gr.Code, # sandbox_code ] | None] = [] - with gr.Group(): + + sandbox_ui_code_group = gr.Group(visible=False) + with sandbox_ui_code_group: sandbox_column = gr.Column(visible=False,scale=1) with sandbox_column: sandbox_state = gr.State(create_chatbot_sandbox_state()) @@ -966,11 +968,13 @@ def build_single_model_ui(models, add_promotion_links=False): with gr.Group(): with gr.Row(): enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) - sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True) + sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True, visible=False) with gr.Group(): - with gr.Accordion("Sandbox Instructions", open=False): + sandbox_instruction_accordion = gr.Accordion("Sandbox Instructions", open=False, visible=False) + with sandbox_instruction_accordion: sandbox_instruction_textarea = gr.TextArea( - value='' + value='', + visible=False ) sandbox_env_choice.change( fn=lambda env, enable: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], @@ -1015,10 +1019,14 @@ def build_single_model_ui(models, add_promotion_links=False): gr.update(visible=enable), gr.update(visible=enable), gr.update(visible=enable), - gr.update(visible=enable) + gr.update(visible=enable), + gr.update(visible=enable), + gr.update(visible=enable), + gr.update(visible=enable), + gr.update(visible=enable), ), inputs=[enable_sandbox_checkbox], - outputs=[sandbox_column,sandbox_title,sandbox_code_tab,sandbox_output_tab] + outputs=[sandbox_ui_code_group,sandbox_column,sandbox_title,sandbox_code_tab,sandbox_output_tab,sandbox_env_choice,sandbox_instruction_accordion,sandbox_instruction_textarea] ) with gr.Row(): From 92d9084620686b9a656019d10c31ef217e5a741b Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Fri, 6 Dec 2024 22:57:28 +0800 Subject: [PATCH 20/34] Fix anony and named sandbox. --- fastchat/serve/gradio_block_arena_anony.py | 74 ++++++++++++++++------ fastchat/serve/gradio_block_arena_named.py | 72 +++++++++++++++------ fastchat/serve/sandbox/code_runner.py | 4 -- 3 files changed, 108 insertions(+), 42 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index abaabdc6c..a7912967c 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -155,10 +155,14 @@ def regenerate(state0, state1, request: gr.Request): return states + [x.to_gradio_chatbot() for x in states] + [""] + [no_change_btn] * 6 -def clear_history(request: gr.Request): +def clear_history(sandbox_state0, sandbox_state1, request: gr.Request): logger.info(f"clear_history (anony). ip: {get_ip(request)}") + sandbox_states = [sandbox_state0, sandbox_state1] + sandbox_state0["enabled_round"] = 0 + sandbox_state1["enabled_round"] = 0 return ( - [None] * num_sides + sandbox_states + + [None] * num_sides + [None] * num_sides + anony_names + [enable_text] @@ -279,6 +283,7 @@ def add_text( ip = get_ip(request) logger.info(f"add_text (anony). ip: {ip}. len: {len(text)}") states = [state0, state1] + sandbox_states = [sandbox_state0, sandbox_state1] model_selectors = [model_selector0, model_selector1] # Init states if necessary @@ -303,6 +308,7 @@ def add_text( return ( states + [x.to_gradio_chatbot() for x in states] + + sandbox_states + ["", None] + [ no_change_btn, @@ -332,6 +338,7 @@ def add_text( return ( states + [x.to_gradio_chatbot() for x in states] + + sandbox_states + [CONVERSATION_LIMIT_MSG] + [ no_change_btn, @@ -340,8 +347,10 @@ def add_text( + [""] ) # add snadbox instructions if enabled - if sandbox_state0['enable_sandbox']: + if sandbox_state0['enable_sandbox'] and sandbox_state0['enabled_round'] == 0: text = f"> {sandbox_state0['sandbox_instruction']}\n\n" + text + sandbox_state0['enabled_round'] += 1 + sandbox_state1['enabled_round'] += 1 text = text[:BLIND_MODE_INPUT_CHAR_LEN_LIMIT] # Hard cut-off for i in range(num_sides): @@ -356,6 +365,7 @@ def add_text( return ( states + [x.to_gradio_chatbot() for x in states] + + sandbox_states + [""] + [ disable_btn, @@ -515,21 +525,26 @@ def build_side_by_side_ui_anony(models): SandboxComponent, # sandbox_ui gr.Code, # sandbox_code ] | None] = [None for _ in range(num_sides)] - with gr.Group(): - with gr.Row(): + + hidden_components = [] + + with gr.Group(visible=False) as sandbox_group: + hidden_components.append(sandbox_group) + with gr.Row(visible=False) as sandbox_row: + hidden_components.append(sandbox_row) for chatbotIdx in range(num_sides): - with gr.Column(scale=1): + with gr.Column(scale=1, visible=False) as column: sandbox_state = gr.State(create_chatbot_sandbox_state()) # Add containers for the sandbox output - sandbox_title = gr.Markdown(value=f"### Model {chatbotIdx + 1} Sandbox", visible=True) - with gr.Tab(label="Output"): + sandbox_title = gr.Markdown(value=f"### Model {chatbotIdx + 1} Sandbox", visible=False) + with gr.Tab(label="Output", visible=False) as sandbox_output_tab: sandbox_output = gr.Markdown(value="", visible=False) sandbox_ui = SandboxComponent( value=("", ""), show_label=True, visible=False, ) - with gr.Tab(label="Code"): + with gr.Tab(label="Code", visible=False) as sandbox_code_tab: sandbox_code = gr.Code(value="", interactive=False, visible=False) sandbox_states[chatbotIdx] = sandbox_state sandboxes_components[chatbotIdx] = ( @@ -537,7 +552,7 @@ def build_side_by_side_ui_anony(models): sandbox_ui, sandbox_code, ) - + hidden_components.extend([column, sandbox_title, sandbox_output_tab, sandbox_code_tab]) with gr.Row(): leftvote_btn = gr.Button( value="👈 A is better", visible=False, interactive=False @@ -554,16 +569,17 @@ def build_side_by_side_ui_anony(models): with gr.Group(): with gr.Row(): enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) - sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True) + sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True, visible=False) with gr.Group(): - with gr.Accordion("Sandbox Instructions", open=False): + with gr.Accordion("Sandbox Instructions", open=False, visible=False) as sandbox_instruction_accordion: sandbox_instruction_textarea = gr.TextArea( - value='' + value='',visible=False ) + hidden_components.extend([sandbox_env_choice, sandbox_instruction_accordion, sandbox_instruction_textarea]) sandbox_env_choice.change( - fn=lambda env: DEFAULT_SANDBOX_INSTRUCTIONS[env], - inputs=[sandbox_env_choice], + fn=lambda env, enable: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[sandbox_env_choice, enable_sandbox_checkbox], outputs=[sandbox_instruction_textarea] ).then( fn=update_sandbox_config, @@ -589,6 +605,10 @@ def build_side_by_side_ui_anony(models): # update sandbox global config enable_sandbox_checkbox.change( + fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[enable_sandbox_checkbox, sandbox_env_choice], + outputs=[sandbox_instruction_textarea] + ).then( fn=update_sandbox_config, inputs=[ enable_sandbox_checkbox, @@ -597,6 +617,10 @@ def build_side_by_side_ui_anony(models): *sandbox_states ], outputs=[*sandbox_states] + ).then( + fn=lambda enable: [gr.update(visible=enable) for _ in hidden_components], + inputs=[enable_sandbox_checkbox], + outputs=hidden_components ) @@ -685,14 +709,18 @@ def build_side_by_side_ui_anony(models): ) clear_btn.click( clear_history, - None, - states + sandbox_states, + sandbox_states + + states + chatbots + model_selectors + [textbox] + btn_list + [slow_warning] + [send_btn], + ).then( + lambda: gr.update(interactive=True), + outputs=[sandbox_env_choice] ) share_js = """ @@ -720,7 +748,7 @@ def build_side_by_side_ui_anony(models): textbox.submit( add_text, states + model_selectors + sandbox_states + [textbox], - states + chatbots + [textbox] + btn_list + [slow_warning], + states + chatbots + sandbox_states + [textbox] + btn_list + [slow_warning], ).then( bot_response_multi, states + [temperature, top_p, max_output_tokens] + sandbox_states, @@ -729,18 +757,26 @@ def build_side_by_side_ui_anony(models): flash_buttons, [], btn_list, + ).then( + lambda sandbox_state: gr.update(interactive=sandbox_state['enabled_round'] == 0), + inputs=[sandbox_states[0]], + outputs=[sandbox_env_choice] ) send_btn.click( add_text, states + model_selectors + sandbox_states + [textbox], - states + chatbots + [textbox] + btn_list, + states + chatbots + sandbox_states + [textbox] + btn_list, ).then( bot_response_multi, states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list + ).then( + lambda sandbox_state: gr.update(interactive=sandbox_state['enabled_round'] == 0), + inputs=[sandbox_states[0]], + outputs=[sandbox_env_choice] ) for chatbotIdx in range(num_sides): diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index bc8885e54..c9b11dc5d 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -134,10 +134,14 @@ def regenerate(state0, state1, request: gr.Request): return states + [x.to_gradio_chatbot() for x in states] + [""] + [no_change_btn] * 6 -def clear_history(request: gr.Request): +def clear_history(sandbox_state0, sandbox_state1, request: gr.Request): logger.info(f"clear_history (named). ip: {get_ip(request)}") + sandbox_states = [sandbox_state0, sandbox_state1] + sandbox_state0["enabled_round"] = 0 + sandbox_state1["enabled_round"] = 0 return ( - [None] * num_sides + sandbox_states + + [None] * num_sides + [None] * num_sides + [""] + [invisible_btn] * 4 @@ -163,6 +167,7 @@ def add_text( logger.info(f"add_text (named). ip: {ip}. len: {len(text)}") states = [state0, state1] model_selectors = [model_selector0, model_selector1] + sandbox_states = [sandbox_state0, sandbox_state1] # Init states if necessary for i in range(num_sides): @@ -175,6 +180,7 @@ def add_text( return ( states + [x.to_gradio_chatbot() for x in states] + + sandbox_states + ["", None] + [ no_change_btn, @@ -202,6 +208,7 @@ def add_text( return ( states + [x.to_gradio_chatbot() for x in states] + + sandbox_states + [CONVERSATION_LIMIT_MSG] + [ no_change_btn, @@ -210,8 +217,10 @@ def add_text( ) # add snadbox instructions if enabled - if sandbox_state0['enable_sandbox']: + if sandbox_state0['enable_sandbox'] and sandbox_state0['enabled_round'] == 0: text = f"> {sandbox_state0['sandbox_instruction']}\n\n" + text + sandbox_state0['enabled_round'] += 1 + sandbox_state1['enabled_round'] += 1 text = text[:INPUT_CHAR_LEN_LIMIT] # Hard cut-off for i in range(num_sides): @@ -222,6 +231,7 @@ def add_text( return ( states + [x.to_gradio_chatbot() for x in states] + + sandbox_states + [""] + [ disable_btn, @@ -386,29 +396,33 @@ def build_side_by_side_ui_named(models): gr.Code, # sandbox_code ] | None] = [None for _ in range(num_sides)] - with gr.Group(): - with gr.Row(): + hidden_components = [] + + with gr.Group(visible=False) as sandbox_group: + hidden_components.append(sandbox_group) + with gr.Row(visible=False) as sandbox_row: + hidden_components.append(sandbox_row) for chatbotIdx in range(num_sides): - with gr.Column(scale=1): + with gr.Column(scale=1, visible=False) as column: sandbox_state = gr.State(create_chatbot_sandbox_state()) # Add containers for the sandbox output - sandbox_title = gr.Markdown(value=f"### Model {chatbotIdx + 1} Sandbox", visible=True) - with gr.Tab(label="Output"): + sandbox_title = gr.Markdown(value=f"### Model {chatbotIdx + 1} Sandbox", visible=False) + with gr.Tab(label="Output", visible=False) as sandbox_output_tab: sandbox_output = gr.Markdown(value="", visible=False) sandbox_ui = SandboxComponent( value=("", ""), show_label=True, visible=False, ) - with gr.Tab(label="Code"): + with gr.Tab(label="Code", visible=False) as sandbox_code_tab: sandbox_code = gr.Code(value="", interactive=False, visible=False) - sandbox_states[chatbotIdx] = sandbox_state sandboxes_components[chatbotIdx] = ( sandbox_output, sandbox_ui, sandbox_code, ) + hidden_components.extend([column, sandbox_title, sandbox_output_tab, sandbox_code_tab]) with gr.Row(): leftvote_btn = gr.Button( @@ -423,20 +437,20 @@ def build_side_by_side_ui_named(models): ) - # chatbox sandbox global config with gr.Group(): with gr.Row(): enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) - sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True) + sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True, visible=False) with gr.Group(): - with gr.Accordion("Sandbox Instructions", open=False): + with gr.Accordion("Sandbox Instructions", open=False, visible=False) as sandbox_instruction_accordion: sandbox_instruction_textarea = gr.TextArea( - value='' + value='',visible=False ) + hidden_components.extend([sandbox_env_choice, sandbox_instruction_accordion, sandbox_instruction_textarea]) sandbox_env_choice.change( - fn=lambda env: DEFAULT_SANDBOX_INSTRUCTIONS[env], - inputs=[sandbox_env_choice], + fn=lambda env, enable: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[sandbox_env_choice, enable_sandbox_checkbox], outputs=[sandbox_instruction_textarea] ).then( fn=update_sandbox_config, @@ -462,6 +476,10 @@ def build_side_by_side_ui_named(models): # update sandbox global config enable_sandbox_checkbox.change( + fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + inputs=[enable_sandbox_checkbox, sandbox_env_choice], + outputs=[sandbox_instruction_textarea] + ).then( fn=update_sandbox_config, inputs=[ enable_sandbox_checkbox, @@ -470,6 +488,10 @@ def build_side_by_side_ui_named(models): *sandbox_states ], outputs=[*sandbox_states] + ).then( + fn=lambda enable: [gr.update(visible=enable) for _ in hidden_components], + inputs=[enable_sandbox_checkbox], + outputs=hidden_components ) with gr.Row(): @@ -551,7 +573,11 @@ def build_side_by_side_ui_named(models): ).then( flash_buttons, [], btn_list ) - clear_btn.click(clear_history, None, states + chatbots + [textbox] + btn_list) + clear_btn.click(clear_history, sandbox_states, sandbox_states + states + chatbots + [textbox] + btn_list + ).then( + lambda: gr.update(interactive=True), + outputs=[sandbox_env_choice] + ) share_js = """ function (a, b, c, d) { @@ -583,24 +609,32 @@ def build_side_by_side_ui_named(models): textbox.submit( add_text, states + model_selectors + sandbox_states + [textbox], - states + chatbots + [textbox] + btn_list, + states + chatbots + sandbox_states + [textbox] + btn_list, ).then( bot_response_multi, states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list + ).then( + lambda sandbox_state: gr.update(interactive=sandbox_state['enabled_round'] == 0), + inputs=[sandbox_states[0]], + outputs=[sandbox_env_choice] ) send_btn.click( add_text, states + model_selectors + sandbox_states + [textbox], - states + chatbots + [textbox] + btn_list, + states + chatbots + sandbox_states + [textbox] + btn_list, ).then( bot_response_multi, states + [temperature, top_p, max_output_tokens] + sandbox_states, states + chatbots + btn_list, ).then( flash_buttons, [], btn_list + ).then( + lambda sandbox_state: gr.update(interactive=sandbox_state['enabled_round'] == 0), + inputs=[sandbox_states[0]], + outputs=[sandbox_env_choice] ) for chatbotIdx in range(num_sides): diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index 28359f528..55ff061f2 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -149,10 +149,6 @@ def update_sandbox_config_single_model( state["sandbox_instruction"] = sandbox_instruction state["sandbox_environment"] = sandbox_environment - # if enable_sandbox and state["enabled_round"] == 0: - # state["sandbox_instruction"] = DEFAULT_SANDBOX_INSTRUCTIONS.get(sandbox_environment, "") - # state["enabled_round"] += 1 - return state def extract_code_from_markdown(message: str) -> tuple[str, str, bool] | None: From a26d2167e78d3cf96e3a06268bb1e6664d6550f9 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Sat, 7 Dec 2024 16:06:23 +0800 Subject: [PATCH 21/34] Fix --- fastchat/serve/gradio_block_arena_named.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index c9b11dc5d..cb5ed50bb 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -573,7 +573,10 @@ def build_side_by_side_ui_named(models): ).then( flash_buttons, [], btn_list ) - clear_btn.click(clear_history, sandbox_states, sandbox_states + states + chatbots + [textbox] + btn_list + clear_btn.click( + clear_history, + sandbox_states, + sandbox_states + states + chatbots + [textbox] + btn_list ).then( lambda: gr.update(interactive=True), outputs=[sandbox_env_choice] @@ -603,7 +606,7 @@ def build_side_by_side_ui_named(models): for i in range(num_sides): model_selectors[i].change( - clear_history, None, states + chatbots + [textbox] + btn_list + clear_history, sandbox_states, states + chatbots + [textbox] + btn_list ) textbox.submit( From 45bc7876cf94a5261736c58e9b02684dd900815b Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Wed, 4 Dec 2024 20:23:19 +0800 Subject: [PATCH 22/34] Fix minor issues in the sandbox component --- custom_components/sandboxcomponent/README.md | 13 +- .../sandboxcomponent/demo/app.py | 9 +- .../sandboxcomponent/demo/space.py | 13 +- .../sandboxcomponent/frontend/Index.svelte | 268 ++++++---- .../frontend/gradio.config.js | 5 +- .../frontend/package-lock.json | 470 ++++++++++++++---- .../sandboxcomponent/frontend/package.json | 4 +- .../frontend/shared/IFrameContainer.svelte | 55 +- .../sandboxcomponent/frontend/style.css | 1 + .../sandboxcomponent/pyproject.toml | 4 +- 10 files changed, 594 insertions(+), 248 deletions(-) create mode 100644 custom_components/sandboxcomponent/frontend/style.css diff --git a/custom_components/sandboxcomponent/README.md b/custom_components/sandboxcomponent/README.md index d5e1ad4c8..9aece1ec8 100644 --- a/custom_components/sandboxcomponent/README.md +++ b/custom_components/sandboxcomponent/README.md @@ -1,8 +1,8 @@ # `gradio_sandboxcomponent` -Static Badge +PyPI - Version -Python library for easily interacting with trained machine learning models +Gradio library for easily interacting with remote sandbox. ## Installation @@ -17,18 +17,17 @@ pip install gradio_sandboxcomponent import gradio as gr from gradio_sandboxcomponent import SandboxComponent - example = SandboxComponent().example_value() with gr.Blocks() as demo: - with gr.Tab("My iFrame"): + with gr.Tab("Sandbox Demo"): with gr.Row(): - gr.Markdown("## Baidu iFrame") + gr.Markdown("## Sandbox") with gr.Row(): SandboxComponent( - label="iFrame Example", - value=("https://www.baidu.com/", "Hello World"), + label="Sandbox Example", + value=("https://www.gradio.app/", "Hello World"), show_label=True) diff --git a/custom_components/sandboxcomponent/demo/app.py b/custom_components/sandboxcomponent/demo/app.py index 33802e4e5..8c61a371d 100644 --- a/custom_components/sandboxcomponent/demo/app.py +++ b/custom_components/sandboxcomponent/demo/app.py @@ -2,18 +2,17 @@ import gradio as gr from gradio_sandboxcomponent import SandboxComponent - example = SandboxComponent().example_value() with gr.Blocks() as demo: - with gr.Tab("My iFrame"): + with gr.Tab("Sandbox Demo"): with gr.Row(): - gr.Markdown("## Baidu iFrame") + gr.Markdown("## Sandbox") with gr.Row(): SandboxComponent( - label="iFrame Example", - value=("https://www.baidu.com/", "Hello World"), + label="Sandbox Example", + value=("https://www.gradio.app/", "Hello World"), show_label=True) diff --git a/custom_components/sandboxcomponent/demo/space.py b/custom_components/sandboxcomponent/demo/space.py index 1ff5a07d4..bab0c8c88 100644 --- a/custom_components/sandboxcomponent/demo/space.py +++ b/custom_components/sandboxcomponent/demo/space.py @@ -21,10 +21,10 @@ # `gradio_sandboxcomponent`
-Static Badge +PyPI - Version
-Python library for easily interacting with trained machine learning models +Gradio library for easily interacting with remote sandbox. """, elem_classes=["md-custom"], header_links=True) app.render() gr.Markdown( @@ -42,18 +42,17 @@ import gradio as gr from gradio_sandboxcomponent import SandboxComponent - example = SandboxComponent().example_value() with gr.Blocks() as demo: - with gr.Tab("My iFrame"): + with gr.Tab("Sandbox Demo"): with gr.Row(): - gr.Markdown("## Baidu iFrame") + gr.Markdown("## Sandbox") with gr.Row(): SandboxComponent( - label="iFrame Example", - value=("https://www.baidu.com/", "Hello World"), + label="Sandbox Example", + value=("https://www.gradio.app/", "Hello World"), show_label=True) diff --git a/custom_components/sandboxcomponent/frontend/Index.svelte b/custom_components/sandboxcomponent/frontend/Index.svelte index ee07c4f4e..6a4595d9f 100644 --- a/custom_components/sandboxcomponent/frontend/Index.svelte +++ b/custom_components/sandboxcomponent/frontend/Index.svelte @@ -1,18 +1,26 @@ - -
- URL: {sandboxUrl} - -
+ {#if loading_status} + + {/if} +
+
+
+ URL: {sandboxUrl} +
+
+ + + + + + +
+
- - - - - - -
- - gradio.dispatch("change")} - /> - -
+ class:pending={loading_status?.status === "pending"} + class="relative w-full" + style={isFullScreen ? `height: 100%; width: 100%` : `height: ${height}px; width: ${width}px;`} + > + {#key iframeKey} +
+ gradio.dispatch("change")} + /> +
+ {/key} + +
+ + diff --git a/custom_components/sandboxcomponent/frontend/gradio.config.js b/custom_components/sandboxcomponent/frontend/gradio.config.js index 19f8f3258..3e79cf51e 100644 --- a/custom_components/sandboxcomponent/frontend/gradio.config.js +++ b/custom_components/sandboxcomponent/frontend/gradio.config.js @@ -1,5 +1,8 @@ +import tailwindcss from "@tailwindcss/vite"; export default { - plugins: [], + plugins: [ + tailwindcss(), + ], svelte: { preprocess: [], }, diff --git a/custom_components/sandboxcomponent/frontend/package-lock.json b/custom_components/sandboxcomponent/frontend/package-lock.json index ec0077732..39bfee2a2 100644 --- a/custom_components/sandboxcomponent/frontend/package-lock.json +++ b/custom_components/sandboxcomponent/frontend/package-lock.json @@ -13,7 +13,9 @@ "@gradio/icons": "0.8.1", "@gradio/statustracker": "0.9.4", "@gradio/utils": "0.7.0", - "dequal": "^2.0.3" + "@tailwindcss/vite": "^4.0.0-beta.4", + "dequal": "^2.0.3", + "tailwindcss": "^4.0.0-beta.4" }, "devDependencies": { "@gradio/preview": "0.13.0", @@ -29,7 +31,7 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@ampproject/remapping": { @@ -49,7 +51,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -59,7 +61,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -69,7 +71,7 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/types": "^7.26.0" @@ -85,7 +87,7 @@ "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.25.9", @@ -359,7 +361,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.0.tgz", "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -399,7 +400,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -476,7 +476,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -524,6 +523,231 @@ "vite": "^5.0.0" } }, + "node_modules/@tailwindcss/node": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.0.0-beta.4.tgz", + "integrity": "sha512-NAPhQ6BcjXUqI+QFtzYHTcoqX4ACGNZl69NfMIDCCTvmPZ761sdvX8cy3LyeJEZDyfyoBT5vzjzfWeNZR7Y+KA==", + "license": "MIT", + "dependencies": { + "enhanced-resolve": "^5.17.1", + "jiti": "^2.4.0", + "tailwindcss": "4.0.0-beta.4" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.0.0-beta.4.tgz", + "integrity": "sha512-yYZ069LXAEOrQt3SwYV+PhwsGBM0qo7ofsOF5BDrju9Nsz+X0z9NCF9fvc6zJ11wX1bSVuiyLbwIS4P9rVT8hg==", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.0.0-beta.4", + "@tailwindcss/oxide-darwin-arm64": "4.0.0-beta.4", + "@tailwindcss/oxide-darwin-x64": "4.0.0-beta.4", + "@tailwindcss/oxide-freebsd-x64": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-arm64-gnu": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-arm64-musl": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-x64-gnu": "4.0.0-beta.4", + "@tailwindcss/oxide-linux-x64-musl": "4.0.0-beta.4", + "@tailwindcss/oxide-win32-arm64-msvc": "4.0.0-beta.4", + "@tailwindcss/oxide-win32-x64-msvc": "4.0.0-beta.4" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.0-beta.4.tgz", + "integrity": "sha512-r/MBScgeBZXE1xkZ+mw8/QybAlTOEzSJ6Jo9W9YCaqy+6S0Iaeo6CmwOPBrtX4/nlHm/v3hcmQWnaeJDQJMkTg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.0-beta.4.tgz", + "integrity": "sha512-snm+1FmjU59X/2kCgryBlbGYEwJ945cC48XkN78pZIxYn/V7LNukGvDlIKgVJ6GxU4iiac7pk149ZyFZ7Ukj4Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.0-beta.4.tgz", + "integrity": "sha512-BRbp+1WSExBCHnBK3EmTmmweM04UhpegOjjQbWDADrklhNU7juYNiu/4RN7A74ndweeopKuYB8gvMrdGlAEeuA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.0-beta.4.tgz", + "integrity": "sha512-HO6cclVvp1JueqleUfYpLFK41lnI/5/oqwkftZQ5LNF0fwp8sQm2cEh7GTCj2hwTIUnHbxmSmrg1MZL1/yoVgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.0-beta.4.tgz", + "integrity": "sha512-Z6xUcakkJZGySTce0QqfbNdLRK4cUNmilvDd69q+8Ep+Vxqy+x5bkCweAf7b+lJsUe6mjclT2EP1ouMvqegnQQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.0-beta.4.tgz", + "integrity": "sha512-hr9AbxrsAXWjZp8iIcQes7eIfMnSgUS6qA/SbcxFfvmte/BHUSuSxa21OZpFRVYFcQ/BIqLA1hU27fvfZZq4JQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.0-beta.4.tgz", + "integrity": "sha512-b//iI94Eo29LqzAOBfFt1m3bM1CF9NU3K59o3ikAwM6kdxmPQoc7TBpcrEh3lKomJ1Ejj0M95022YqksY7O8gQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.0-beta.4.tgz", + "integrity": "sha512-xqK6amSCZpEpWbuN0WYDlaOir7n2NjD2jtnVZ5eWpnw4kkjzu0kmVqN9PaWdejZUKVfvEy7Ldbmcos9MpQhi4g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.0-beta.4.tgz", + "integrity": "sha512-9V3CtBJ+oBxeppvBUvfZ2NbsrgKkLDIVrF4jUcpj3Md4rdpW6mIRWxqzEY1uT9JZlFr4YmVx6Auax+32BUtD2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.0-beta.4.tgz", + "integrity": "sha512-MYfGNg1nikym/F2aCx0ni5ZWKsChVwWTsjgmDo9ZOiqhWE/7yeX0Ej+lugEh4gPHyUpcMbeTZySZx0OJ8o+X1Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.0-beta.4.tgz", + "integrity": "sha512-hCMihksJD5odhAm+SLFNk75etPRK+QjyMIPMryUI7na6kvB8OaTH4gRBIO27GvRk2q1Zm2sqn4JoYy2auuoAAA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.0.0-beta.4.tgz", + "integrity": "sha512-VpexhM1fzmhT3KfviF3BAOeJ5p0Pc0wW6QkTUI+aiRlIHtaPI9QxNrOvLgkLSqGxucb78ERA0eI2hrcAN6gjWA==", + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.0.0-beta.4", + "@tailwindcss/oxide": "4.0.0-beta.4", + "lightningcss": "^1.26.0", + "svelte-preprocess": "^6.0.2", + "tailwindcss": "4.0.0-beta.4" + }, + "peerDependencies": { + "vite": "^5.2.0" + } + }, "node_modules/@tsconfig/svelte": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-5.0.4.tgz", @@ -575,7 +799,7 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -647,14 +871,14 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/assert-never": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.3.0.tgz", "integrity": "sha512-9Z3vxQ+berkL/JJo0dK+EY3Lp0s3NtSnP3VCLsh5HDcZPrh0M+KQRK5sWhUeyPPH+/RCxZqOxLMR+YC6vlviEQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/asynckit": { @@ -676,7 +900,7 @@ "version": "3.0.0-canary-5", "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/types": "^7.9.6" @@ -689,14 +913,23 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, + "devOptional": true, "license": "MIT" }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -707,7 +940,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -721,7 +953,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -741,7 +973,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-regex": "^1.0.3" @@ -751,7 +983,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "readdirp": "^4.0.1" @@ -817,7 +1049,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz", "integrity": "sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "cake": "bin/cake", @@ -872,14 +1104,14 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/constantinople": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.6.0", @@ -924,6 +1156,15 @@ "node": ">= 8" } }, + "node_modules/css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "license": "MIT", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", @@ -1011,7 +1252,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -1047,7 +1288,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, "license": "Apache-2.0", "bin": { "detect-libc": "bin/detect-libc.js" @@ -1060,7 +1300,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/dom-serializer": { @@ -1138,6 +1378,19 @@ "dev": true, "license": "MIT" }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -1154,7 +1407,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" @@ -1167,7 +1420,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1335,7 +1588,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1380,14 +1632,14 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, + "devOptional": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1397,7 +1649,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1424,7 +1676,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -1457,7 +1709,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" @@ -1466,11 +1718,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" @@ -1483,7 +1741,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1496,7 +1754,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1509,7 +1767,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -1525,7 +1783,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -1607,7 +1865,7 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/inflight": { @@ -1615,7 +1873,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -1626,7 +1884,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/intl-messageformat": { @@ -1645,7 +1903,7 @@ "version": "2.15.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "hasown": "^2.0.2" @@ -1661,7 +1919,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz", "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "acorn": "^7.1.1", @@ -1672,7 +1930,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -1693,7 +1950,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1707,7 +1963,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -1748,7 +2003,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -1801,11 +2056,20 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jiti": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.1.tgz", + "integrity": "sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/js-stringify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/jsdom": { @@ -1852,7 +2116,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-promise": "^2.0.0", @@ -1889,7 +2153,6 @@ "version": "1.28.1", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.28.1.tgz", "integrity": "sha512-KRDkHlLlNj3DWh79CDt93fPlRJh2W1AuHV0ZSZAMMuN7lqlsZTV5842idfS1urWG8q9tc17velp1gCXhY7sLnQ==", - "dev": true, "license": "MPL-2.0", "dependencies": { "detect-libc": "^1.0.3" @@ -1921,7 +2184,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2035,7 +2297,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -2050,7 +2311,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -2085,7 +2345,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -2159,7 +2419,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, "license": "MIT", "optional": true }, @@ -2173,7 +2432,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2183,7 +2442,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -2218,7 +2477,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2238,7 +2497,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/path-scurry": { @@ -2348,7 +2607,7 @@ "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "asap": "~2.0.3" @@ -2358,7 +2617,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz", "integrity": "sha512-uBi6kmc9f3SZ3PXxqcHiUZLmIXgfgWooKWXcwSGwQd2Zi5Rb0bT14+8CJjJgI8AB+nndLaNgHGrcc6bPIB665g==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-code-gen": "^3.0.3", @@ -2375,7 +2634,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz", "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "constantinople": "^4.0.1", @@ -2387,7 +2646,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.3.tgz", "integrity": "sha512-cYQg0JW0w32Ux+XTeZnBEeuWrAY7/HNE6TWnhiHGnnRYlCgyAUPoyh9KzCMa9WhcJlJ1AtQqpEYHc+vbCzA+Aw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "constantinople": "^4.0.1", @@ -2404,14 +2663,14 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.1.0.tgz", "integrity": "sha512-lv7sU9e5Jk8IeUheHata6/UThZ7RK2jnaaNztxfPYUY+VxZyk/ePVaNZ/vwmH8WqGvDz3LrNYt/+gA55NDg6Pg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/pug-filters": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz", "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "constantinople": "^4.0.1", @@ -2425,7 +2684,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz", "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "character-parser": "^2.2.0", @@ -2437,7 +2696,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz", "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-error": "^2.0.0", @@ -2448,7 +2707,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz", "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "object-assign": "^4.1.1", @@ -2459,7 +2718,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz", "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-error": "^2.0.0", @@ -2470,14 +2729,14 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz", "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/pug-strip-comments": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz", "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "pug-error": "^2.0.0" @@ -2487,7 +2746,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz", "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/punycode": { @@ -2503,7 +2762,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 14.16.0" @@ -2517,7 +2776,7 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", @@ -2535,7 +2794,6 @@ "version": "4.27.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.2.tgz", "integrity": "sha512-KreA+PzWmk2yaFmZVwe6GB2uBD86nXl86OsDkt1bJS9p3vqWuEQ6HnJJ+j/mZi/q0920P99/MVRlB4L3crpF5w==", - "dev": true, "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -2611,7 +2869,7 @@ "version": "1.81.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "chokidar": "^4.0.0", @@ -2632,7 +2890,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/saxes": { @@ -2651,7 +2909,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -2705,7 +2963,7 @@ "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">= 8" @@ -2828,7 +3086,7 @@ "version": "0.63.0", "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.63.0.tgz", "integrity": "sha512-OMlgrTCPzE/ibtRMoeLVhOY0RcNuNWh0rhAVqeKnk/QwcuUKQbnqhZ1kg2vzD8VU/6h3FoPTq4RJPHgLBvX6Bw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@adobe/css-tools": "~4.3.3", @@ -2931,7 +3189,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz", "integrity": "sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=12.0" @@ -2948,7 +3206,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3061,7 +3319,6 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-6.0.3.tgz", "integrity": "sha512-PLG2k05qHdhmRG7zR/dyo5qKvakhm8IJ+hD2eFRQmMLHp7X3eJnjeupUtvuRpbNiF31RjVw45W+abDwHEmP5OA==", - "dev": true, "hasInstallScript": true, "license": "MIT", "engines": { @@ -3140,6 +3397,30 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "license": "MIT" }, + "node_modules/tailwindcss": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.0-beta.4.tgz", + "integrity": "sha512-mkjpwMyaHCa3L5HmRjYyY8w8D+7brxwbM7YQxH8QeEFtCURd5fvdHIC9TEpIaL1X49vhl8cuOFY6Nhi6sCsI5w==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "license": "MIT", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -3208,7 +3489,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -3222,7 +3502,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz", "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/tough-cookie": { @@ -3272,7 +3552,7 @@ "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -3282,11 +3562,19 @@ "node": ">=14.17" } }, + "node_modules/utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "license": "MIT", + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, "node_modules/vite": { "version": "5.4.11", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", - "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", @@ -3349,7 +3637,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3363,7 +3650,6 @@ "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -3417,7 +3703,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3498,7 +3784,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.9.6", @@ -3612,7 +3898,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/ws": { diff --git a/custom_components/sandboxcomponent/frontend/package.json b/custom_components/sandboxcomponent/frontend/package.json index 51e17d944..46b1ae55b 100644 --- a/custom_components/sandboxcomponent/frontend/package.json +++ b/custom_components/sandboxcomponent/frontend/package.json @@ -25,7 +25,9 @@ "@gradio/icons": "0.8.1", "@gradio/statustracker": "0.9.4", "@gradio/utils": "0.7.0", - "dequal": "^2.0.3" + "@tailwindcss/vite": "^4.0.0-beta.4", + "dequal": "^2.0.3", + "tailwindcss": "^4.0.0-beta.4" }, "devDependencies": { "@gradio/preview": "0.13.0", diff --git a/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte b/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte index d425b883c..996da839e 100644 --- a/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte +++ b/custom_components/sandboxcomponent/frontend/shared/IFrameContainer.svelte @@ -1,66 +1,25 @@
+ class="w-full h-full" + />
- - diff --git a/custom_components/sandboxcomponent/frontend/style.css b/custom_components/sandboxcomponent/frontend/style.css new file mode 100644 index 000000000..a461c505f --- /dev/null +++ b/custom_components/sandboxcomponent/frontend/style.css @@ -0,0 +1 @@ +@import "tailwindcss"; \ No newline at end of file diff --git a/custom_components/sandboxcomponent/pyproject.toml b/custom_components/sandboxcomponent/pyproject.toml index 3b103b9f1..1d6e76071 100644 --- a/custom_components/sandboxcomponent/pyproject.toml +++ b/custom_components/sandboxcomponent/pyproject.toml @@ -8,8 +8,8 @@ build-backend = "hatchling.build" [project] name = "gradio_sandboxcomponent" -version = "0.0.9" -description = "Python library for easily interacting with trained machine learning models" +version = "0.0.10" +description = "Gradio library for easily interacting with remote sandbox." readme = "README.md" license = "apache-2.0" requires-python = ">=3.10" From abaae0ab1920e7d98e0a33bbfe65aa00c6ecb194 Mon Sep 17 00:00:00 2001 From: Zoeyyhc Date: Sat, 7 Dec 2024 17:50:22 +0800 Subject: [PATCH 23/34] Clear sandbox components when clear btn or model selector clicked. --- fastchat/serve/gradio_block_arena_anony.py | 13 +++++++++++-- fastchat/serve/gradio_block_arena_named.py | 20 +++++++++++++++++++- fastchat/serve/gradio_web_server.py | 13 +++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index a7912967c..28434e0da 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -172,6 +172,11 @@ def clear_history(sandbox_state0, sandbox_state1, request: gr.Request): + [enable_btn] ) +def clear_sandbox_components(*components): + updates = [] + for component in components: + updates.append(gr.update(value="", visible=False)) + return updates def share_click(state0, state1, model_selector0, model_selector1, request: gr.Request): logger.info(f"share (anony). ip: {get_ip(request)}") @@ -708,8 +713,8 @@ def build_side_by_side_ui_anony(models): flash_buttons, [], btn_list ) clear_btn.click( - clear_history, - sandbox_states, + clear_history, + sandbox_states, sandbox_states + states + chatbots @@ -718,6 +723,10 @@ def build_side_by_side_ui_anony(models): + btn_list + [slow_warning] + [send_btn], + ).then( + clear_sandbox_components, + inputs=[component for components in sandboxes_components for component in components], + outputs=[component for components in sandboxes_components for component in components] ).then( lambda: gr.update(interactive=True), outputs=[sandbox_env_choice] diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index cb5ed50bb..ee39defcd 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -148,6 +148,11 @@ def clear_history(sandbox_state0, sandbox_state1, request: gr.Request): + [disable_btn] * 2 ) +def clear_sandbox_components(*components): + updates = [] + for component in components: + updates.append(gr.update(value="", visible=False)) + return updates def share_click(state0, state1, model_selector0, model_selector1, request: gr.Request): logger.info(f"share (named). ip: {get_ip(request)}") @@ -577,6 +582,10 @@ def build_side_by_side_ui_named(models): clear_history, sandbox_states, sandbox_states + states + chatbots + [textbox] + btn_list + ).then( + clear_sandbox_components, + inputs=[component for components in sandboxes_components for component in components], + outputs=[component for components in sandboxes_components for component in components] ).then( lambda: gr.update(interactive=True), outputs=[sandbox_env_choice] @@ -606,7 +615,16 @@ def build_side_by_side_ui_named(models): for i in range(num_sides): model_selectors[i].change( - clear_history, sandbox_states, states + chatbots + [textbox] + btn_list + clear_history, + sandbox_states, + sandbox_states + states + chatbots + [textbox] + btn_list + ).then( + clear_sandbox_components, + inputs=[component for components in sandboxes_components for component in components], + outputs=[component for components in sandboxes_components for component in components] + ).then( + lambda: gr.update(interactive=True), + outputs=[sandbox_env_choice] ) textbox.submit( diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index d9262659b..2d2e8d455 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -326,6 +326,11 @@ def clear_history(sandbox_state,request: gr.Request): sandbox_state['enabled_round'] = 0 return (state, [], "") + (disable_btn,) * 5 + (sandbox_state,) +def clear_sandbox_components(*components): + updates = [] + for component in components: + updates.append(gr.update(value="", visible=False)) + return updates def get_ip(request: gr.Request): if "cf-connecting-ip" in request.headers: @@ -1102,6 +1107,10 @@ def build_single_model_ui(models, add_promotion_links=False): ).then( lambda: gr.update(interactive=True), outputs=[sandbox_env_choice] + ).then( + clear_sandbox_components, + inputs=[sandbox_output, sandbox_ui, sandbox_code], + outputs=[sandbox_output, sandbox_ui, sandbox_code] ) @@ -1112,6 +1121,10 @@ def build_single_model_ui(models, add_promotion_links=False): ).then( lambda: gr.update(interactive=True), outputs=[sandbox_env_choice] + ).then( + clear_sandbox_components, + inputs=[sandbox_output, sandbox_ui, sandbox_code], + outputs=[sandbox_output, sandbox_ui, sandbox_code] ) From 4968fd565e43d461acee05a3072b523b6cb61efb Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sat, 7 Dec 2024 21:11:06 +0800 Subject: [PATCH 24/34] Avoid None key error --- fastchat/serve/gradio_block_arena_anony.py | 2 +- fastchat/serve/gradio_block_arena_named.py | 2 +- fastchat/serve/gradio_web_server.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index 28434e0da..45c382551 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -610,7 +610,7 @@ def build_side_by_side_ui_anony(models): # update sandbox global config enable_sandbox_checkbox.change( - fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS.get(env, ""), inputs=[enable_sandbox_checkbox, sandbox_env_choice], outputs=[sandbox_instruction_textarea] ).then( diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index ee39defcd..c9035df6c 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -481,7 +481,7 @@ def build_side_by_side_ui_named(models): # update sandbox global config enable_sandbox_checkbox.change( - fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS.get(env, ""), inputs=[enable_sandbox_checkbox, sandbox_env_choice], outputs=[sandbox_instruction_textarea] ).then( diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index 2d2e8d455..0a070c505 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -1007,7 +1007,7 @@ def build_single_model_ui(models, add_promotion_links=False): ) # update sandbox global config enable_sandbox_checkbox.change( - fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS[env], + fn=lambda enable, env: "" if not enable else DEFAULT_SANDBOX_INSTRUCTIONS.get(env, ""), inputs=[enable_sandbox_checkbox, sandbox_env_choice], outputs=[sandbox_instruction_textarea] ).then( From 7029627dd425ce8d035dae265a094840b30171bb Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sun, 8 Dec 2024 18:14:24 +0800 Subject: [PATCH 25/34] Improve comments --- fastchat/serve/gradio_web_server.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index 0a070c505..bd0f21c45 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -348,8 +348,6 @@ def add_text(state, model_selector, sandbox_state, text, request: gr.Request): ip = get_ip(request) logger.info(f"add_text. ip: {ip}. len: {len(text)}") - print("sandbox_state:", sandbox_state) - if state is None: state = State(model_selector) @@ -373,13 +371,15 @@ def add_text(state, model_selector, sandbox_state, text, request: gr.Request): no_change_btn, ) * 5 - # add sandbox instructions if enabled + # [CODE SANDBOX] add sandbox instructions if enabled try: - if sandbox_state['enable_sandbox'] and sandbox_state['enabled_round']==0: - text = f"> {sandbox_state['sandbox_instruction']}\n\n" + text - sandbox_state['enabled_round'] += 1 + # only add sandbox instructions if enabled for the first round + if sandbox_state['enable_sandbox'] and sandbox_state['enabled_round'] == 0: + text = f"> {sandbox_state['sandbox_instruction'].strip()}\n\n" + text + sandbox_state['enabled_round'] += 1 except (TypeError, KeyError) as e: print("Error accessing sandbox_state:", e) + text = text[:INPUT_CHAR_LEN_LIMIT] # Hard cut-off state.conv.append_message(state.conv.roles[0], text) state.conv.append_message(state.conv.roles[1], None) @@ -582,7 +582,7 @@ def bot_response( output = data["text"].strip() conv.update_last_message(output) - # Add a "Run in Sandbox" button to the last message if code is detected + # [CODE SANDBOX] Add a "Run in Sandbox" button to the last message if code is detected if sandbox_state is not None and sandbox_state["enable_sandbox"]: last_message = conv.messages[-1] if "```" in last_message[1]: From 2d70b52ed57987a3b880193042df9330814dc1f1 Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sun, 8 Dec 2024 18:22:32 +0800 Subject: [PATCH 26/34] Remove Auto Env which is not supported yet --- fastchat/serve/sandbox/code_runner.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fastchat/serve/sandbox/code_runner.py b/fastchat/serve/sandbox/code_runner.py index 55ff061f2..58f64b4f1 100644 --- a/fastchat/serve/sandbox/code_runner.py +++ b/fastchat/serve/sandbox/code_runner.py @@ -16,7 +16,13 @@ API key for the e2b API. ''' -SUPPORTED_SANDBOX_ENVIRONMENTS = ['React','Vue','PyGame','Gradio','Auto'] +SUPPORTED_SANDBOX_ENVIRONMENTS = [ + 'React', + 'Vue', + 'PyGame', + 'Gradio', + # 'Auto' # TODO: Implement auto-detection of sandbox environment +] VALID_GRADIO_CODE_LANGUAGES = ['python', 'c', 'cpp', 'markdown', 'json', 'html', 'css', 'javascript', 'jinja2', 'typescript', 'yaml', 'dockerfile', 'shell', 'r', 'sql', 'sql-msSQL', 'sql-mySQL', 'sql-mariaDB', 'sql-sqlite', 'sql-cassandra', 'sql-plSQL', 'sql-hive', 'sql-pgSQL', 'sql-gql', 'sql-gpSQL', 'sql-sparkSQL', 'sql-esper'] @@ -92,7 +98,7 @@ async def main(): """ DEFAULT_SANDBOX_INSTRUCTIONS = { - "Auto": "Auto-detect the code language and run in the appropriate sandbox.", + # "Auto": "Auto-detect the code language and run in the appropriate sandbox.", "React": DEFAULT_REACT_SANDBOX_INSTRUCTION, "Vue": DEFAULT_VUE_SANDBOX_INSTRUCTION, "PyGame": DEFAULT_PYGAME_SANDBOX_INSTRUCTION, From 36ba5682134509f3a959e769f8bcd9133d5cc28e Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Sun, 8 Dec 2024 18:29:37 +0800 Subject: [PATCH 27/34] Add Label for sandbox button --- fastchat/serve/gradio_block_arena_anony.py | 7 ++++++- fastchat/serve/gradio_block_arena_named.py | 7 ++++++- fastchat/serve/gradio_web_server.py | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index 45c382551..9b49db16d 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -573,7 +573,12 @@ def build_side_by_side_ui_anony(models): # chatbox sandbox global config with gr.Group(): with gr.Row(): - enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) + enable_sandbox_checkbox = gr.Checkbox( + value=False, + label="Enable Sandbox", + info="Run generated code in a remote sandbox", + interactive=True, + ) sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True, visible=False) with gr.Group(): with gr.Accordion("Sandbox Instructions", open=False, visible=False) as sandbox_instruction_accordion: diff --git a/fastchat/serve/gradio_block_arena_named.py b/fastchat/serve/gradio_block_arena_named.py index c9035df6c..813924578 100644 --- a/fastchat/serve/gradio_block_arena_named.py +++ b/fastchat/serve/gradio_block_arena_named.py @@ -444,7 +444,12 @@ def build_side_by_side_ui_named(models): with gr.Group(): with gr.Row(): - enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) + enable_sandbox_checkbox = gr.Checkbox( + value=False, + label="Enable Sandbox", + info="Run generated code in a remote sandbox", + interactive=True, + ) sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True, visible=False) with gr.Group(): with gr.Accordion("Sandbox Instructions", open=False, visible=False) as sandbox_instruction_accordion: diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index bd0f21c45..82b7d7daa 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -972,7 +972,12 @@ def build_single_model_ui(models, add_promotion_links=False): with gr.Group(): with gr.Row(): - enable_sandbox_checkbox = gr.Checkbox(value=False, label="Enable Sandbox", interactive=True) + enable_sandbox_checkbox = gr.Checkbox( + value=False, + label="Enable Sandbox", + info="Run generated code in a remote sandbox", + interactive=True, + ) sandbox_env_choice = gr.Dropdown(choices=SUPPORTED_SANDBOX_ENVIRONMENTS, label="Sandbox Environment", interactive=True, visible=False) with gr.Group(): sandbox_instruction_accordion = gr.Accordion("Sandbox Instructions", open=False, visible=False) From 515e10ecc17343fe838bd25e4540fb6adace963d Mon Sep 17 00:00:00 2001 From: digitsisyph Date: Mon, 9 Dec 2024 02:38:29 +0800 Subject: [PATCH 28/34] Tweak custom components UI --- custom_components/sandboxcomponent/frontend/Index.svelte | 4 ++-- .../sandboxcomponent/frontend/shared/IFrameContainer.svelte | 6 ++++-- custom_components/sandboxcomponent/pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/custom_components/sandboxcomponent/frontend/Index.svelte b/custom_components/sandboxcomponent/frontend/Index.svelte index 6a4595d9f..253e0ce1f 100644 --- a/custom_components/sandboxcomponent/frontend/Index.svelte +++ b/custom_components/sandboxcomponent/frontend/Index.svelte @@ -105,7 +105,7 @@ >
URL: {sandboxUrl}{sandboxUrl}
@@ -195,7 +195,7 @@ style={isFullScreen ? `height: 100%; width: 100%` : `height: ${height}px; width: ${width}px;`} > {#key iframeKey} -
+