Wauplin HF Staff commited on
Commit
a53aa3c
·
1 Parent(s): ea9e8e9

Upload folder using huggingface_hub

Browse files
Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM python:3.9
3
+
4
+ WORKDIR /code
5
+
6
+ COPY --link --chown=1000 . .
7
+
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces
11
+
12
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -1,10 +1,10 @@
 
1
  ---
2
- title: Gradio Blurhashimage
3
- emoji: 🐠
4
- colorFrom: gray
5
- colorTo: green
6
  sdk: docker
7
  pinned: false
 
8
  ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+
2
  ---
3
+ tags: [gradio-custom-component, gradio-template-Image]
4
+ title: gradio_blurhashimage V0.0.1
5
+ colorFrom: red
6
+ colorTo: red
7
  sdk: docker
8
  pinned: false
9
+ license: apache-2.0
10
  ---
 
 
__init__.py ADDED
File without changes
__pycache__/app.cpython-310.pyc ADDED
Binary file (467 Bytes). View file
 
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from gradio_blurhashimage import BlurhashImage
4
+
5
+
6
+ demo = gr.Interface(
7
+ lambda x:x,
8
+ gr.Image(),
9
+ BlurhashImage(),
10
+ )
11
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio_blurhashimage-0.0.1-py3-none-any.whl
src/.gitignore ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ .eggs/
2
+ dist/
3
+ *.pyc
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+ __tmp/*
8
+ *.pyi
9
+ node_modules
src/README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # gradio_blurhashimage
3
+ A Custom Gradio component.
4
+
5
+ ## Example usage
6
+
7
+ ```python
8
+ import gradio as gr
9
+ from gradio_blurhashimage import BlurhashImage
10
+ ```
src/backend/gradio_blurhashimage/__init__.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ from .blurhashimage import BlurhashImage
3
+
4
+ __all__ = ['BlurhashImage']
src/backend/gradio_blurhashimage/blurhashimage.py ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """gr.Image() component."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import warnings
6
+ from pathlib import Path
7
+ from typing import Any, Literal, cast
8
+
9
+ import numpy as np
10
+ from gradio_client.documentation import document, set_documentation_group
11
+ from PIL import Image as _Image # using _ to minimize namespace pollution
12
+
13
+ import blurhash
14
+ import gradio.image_utils as image_utils
15
+ from gradio import processing_utils, utils
16
+ from gradio.components.base import Component
17
+ from gradio.data_classes import FileData, GradioModel
18
+ from gradio.events import Events
19
+ from typing import Optional
20
+
21
+ set_documentation_group("component")
22
+ _Image.init() # fixes https://github.com/gradio-app/gradio/issues/2843
23
+
24
+ class BlurhashFileData(GradioModel):
25
+ image: FileData = None
26
+ blurhash: Optional[str] = None
27
+ width: Optional[int] = None
28
+ height: Optional[int] = None
29
+
30
+ @document()
31
+ class BlurhashImage(Component):
32
+ """
33
+ Creates an image component that can be used to display images (as an output). A blurhash image is displayed until the image is fully loaded.
34
+ Preprocessing: passes the uploaded image as a {numpy.array}, {PIL.Image} or {str} filepath depending on `type`.
35
+ Postprocessing: expects a {numpy.array}, {PIL.Image} or {str} or {pathlib.Path} filepath to an image and displays the image.
36
+ Examples-format: a {str} local filepath or URL to an image.
37
+ Demos: image_mod, image_mod_default_image
38
+ Guides: image-classification-in-pytorch, image-classification-in-tensorflow, image-classification-with-vision-transformers, create-your-own-friends-with-a-gan
39
+ """
40
+
41
+ EVENTS = [
42
+ Events.clear,
43
+ Events.change,
44
+ Events.stream,
45
+ Events.select,
46
+ Events.upload,
47
+ ]
48
+
49
+ data_model = BlurhashFileData
50
+
51
+ def __init__(
52
+ self,
53
+ value: str | _Image.Image | np.ndarray | None = None,
54
+ *,
55
+ height: int | None = None,
56
+ width: int | None = None,
57
+ image_mode: Literal[
58
+ "1", "L", "P", "RGB", "RGBA", "CMYK", "YCbCr", "LAB", "HSV", "I", "F"
59
+ ] = "RGB",
60
+ type: Literal["numpy", "pil", "filepath"] = "numpy",
61
+ label: str | None = None,
62
+ every: float | None = None,
63
+ show_label: bool | None = None,
64
+ show_download_button: bool = True,
65
+ container: bool = True,
66
+ scale: int | None = None,
67
+ min_width: int = 160,
68
+ visible: bool = True,
69
+ elem_id: str | None = None,
70
+ elem_classes: list[str] | str | None = None,
71
+ render: bool = True,
72
+ show_share_button: bool | None = None,
73
+ ):
74
+ """
75
+ Parameters:
76
+ value: A PIL BlurhashImage, numpy array, path or URL for the default value that BlurhashImage component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component.
77
+ height: Height of the displayed image in pixels.
78
+ width: Width of the displayed image in pixels.
79
+ image_mode: "RGB" if color, or "L" if black and white. See https://pillow.readthedocs.io/en/stable/handbook/concepts.html for other supported image modes and their meaning.
80
+ type: The format the image is converted to before being passed into the prediction function. "numpy" converts the image to a numpy array with shape (height, width, 3) and values from 0 to 255, "pil" converts the image to a PIL image object, "filepath" passes a str path to a temporary file containing the image.
81
+ label: The label for this component. Appears above the component 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 is assigned to.
82
+ every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
83
+ show_label: if True, will display label.
84
+ show_download_button: If True, will display button to download image.
85
+ container: If True, will place the component in a container - providing some extra padding around the border.
86
+ scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
87
+ 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.
88
+ visible: If False, component will be hidden.
89
+ elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
90
+ 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.
91
+ 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.
92
+ show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
93
+ """
94
+ valid_types = ["numpy", "pil", "filepath"]
95
+ if type not in valid_types:
96
+ raise ValueError(
97
+ f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}"
98
+ )
99
+ self.type = type
100
+ self.height = height
101
+ self.width = width
102
+ self.image_mode = image_mode
103
+
104
+ self.show_download_button = show_download_button
105
+ self.show_share_button = (
106
+ (utils.get_space() is not None)
107
+ if show_share_button is None
108
+ else show_share_button
109
+ )
110
+ super().__init__(
111
+ label=label,
112
+ every=every,
113
+ show_label=show_label,
114
+ container=container,
115
+ scale=scale,
116
+ min_width=min_width,
117
+ visible=visible,
118
+ elem_id=elem_id,
119
+ elem_classes=elem_classes,
120
+ render=render,
121
+ value=value,
122
+ )
123
+
124
+ def preprocess(
125
+ self, payload: BlurhashFileData | None
126
+ ) -> np.ndarray | _Image.Image | str | None:
127
+ if payload is None:
128
+ return payload
129
+ im = _Image.open(payload.image.path)
130
+ with warnings.catch_warnings():
131
+ warnings.simplefilter("ignore")
132
+ im = im.convert(self.image_mode)
133
+ return image_utils.format_image(
134
+ im, cast(Literal["numpy", "pil", "filepath"], self.type), self.GRADIO_CACHE
135
+ )
136
+
137
+ def postprocess(
138
+ self, value: np.ndarray | _Image.Image | str | Path | None
139
+ ) -> BlurhashFileData | None:
140
+ if value is None:
141
+ return None
142
+ path = image_utils.save_image(value, self.GRADIO_CACHE)
143
+ image = _Image.open(path)
144
+
145
+ return BlurhashFileData(
146
+ image=FileData(path=path),
147
+ blurhash=blurhash.encode(image, x_components=5, y_components=5),
148
+ width=image.width,
149
+ height=image.height,
150
+ )
151
+
152
+ def as_example(self, input_data: str | Path | None) -> str | None:
153
+ if input_data is None:
154
+ return None
155
+ return processing_utils.move_resource_to_block_cache(input_data, self)
156
+
157
+ def example_inputs(self) -> Any:
158
+ return "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
src/backend/gradio_blurhashimage/blurhashimage.pyi ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """gr.Image() component."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import warnings
6
+ from pathlib import Path
7
+ from typing import Any, Literal, cast
8
+
9
+ import numpy as np
10
+ from gradio_client.documentation import document, set_documentation_group
11
+ from PIL import Image as _Image # using _ to minimize namespace pollution
12
+
13
+ import blurhash
14
+ import gradio.image_utils as image_utils
15
+ from gradio import processing_utils, utils
16
+ from gradio.components.base import Component
17
+ from gradio.data_classes import FileData, GradioModel
18
+ from gradio.events import Events
19
+ from typing import Optional
20
+
21
+ set_documentation_group("component")
22
+ _Image.init() # fixes https://github.com/gradio-app/gradio/issues/2843
23
+
24
+ class BlurhashFileData(GradioModel):
25
+ image: FileData = None
26
+ blurhash: Optional[str] = None
27
+ width: Optional[int] = None
28
+ height: Optional[int] = None
29
+ from gradio.events import Dependency
30
+
31
+ @document()
32
+ class BlurhashImage(Component):
33
+ """
34
+ Creates an image component that can be used to display images (as an output). A blurhash image is displayed until the image is fully loaded.
35
+ Preprocessing: passes the uploaded image as a {numpy.array}, {PIL.Image} or {str} filepath depending on `type`.
36
+ Postprocessing: expects a {numpy.array}, {PIL.Image} or {str} or {pathlib.Path} filepath to an image and displays the image.
37
+ Examples-format: a {str} local filepath or URL to an image.
38
+ Demos: image_mod, image_mod_default_image
39
+ Guides: image-classification-in-pytorch, image-classification-in-tensorflow, image-classification-with-vision-transformers, create-your-own-friends-with-a-gan
40
+ """
41
+
42
+ EVENTS = [
43
+ Events.clear,
44
+ Events.change,
45
+ Events.stream,
46
+ Events.select,
47
+ Events.upload,
48
+ ]
49
+
50
+ data_model = BlurhashFileData
51
+
52
+ def __init__(
53
+ self,
54
+ value: str | _Image.Image | np.ndarray | None = None,
55
+ *,
56
+ height: int | None = None,
57
+ width: int | None = None,
58
+ image_mode: Literal[
59
+ "1", "L", "P", "RGB", "RGBA", "CMYK", "YCbCr", "LAB", "HSV", "I", "F"
60
+ ] = "RGB",
61
+ type: Literal["numpy", "pil", "filepath"] = "numpy",
62
+ label: str | None = None,
63
+ every: float | None = None,
64
+ show_label: bool | None = None,
65
+ show_download_button: bool = True,
66
+ container: bool = True,
67
+ scale: int | None = None,
68
+ min_width: int = 160,
69
+ visible: bool = True,
70
+ elem_id: str | None = None,
71
+ elem_classes: list[str] | str | None = None,
72
+ render: bool = True,
73
+ show_share_button: bool | None = None,
74
+ ):
75
+ """
76
+ Parameters:
77
+ value: A PIL BlurhashImage, numpy array, path or URL for the default value that BlurhashImage component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component.
78
+ height: Height of the displayed image in pixels.
79
+ width: Width of the displayed image in pixels.
80
+ image_mode: "RGB" if color, or "L" if black and white. See https://pillow.readthedocs.io/en/stable/handbook/concepts.html for other supported image modes and their meaning.
81
+ type: The format the image is converted to before being passed into the prediction function. "numpy" converts the image to a numpy array with shape (height, width, 3) and values from 0 to 255, "pil" converts the image to a PIL image object, "filepath" passes a str path to a temporary file containing the image.
82
+ label: The label for this component. Appears above the component 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 is assigned to.
83
+ every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
84
+ show_label: if True, will display label.
85
+ show_download_button: If True, will display button to download image.
86
+ container: If True, will place the component in a container - providing some extra padding around the border.
87
+ scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
88
+ 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.
89
+ visible: If False, component will be hidden.
90
+ elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
91
+ 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.
92
+ 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.
93
+ show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
94
+ """
95
+ valid_types = ["numpy", "pil", "filepath"]
96
+ if type not in valid_types:
97
+ raise ValueError(
98
+ f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}"
99
+ )
100
+ self.type = type
101
+ self.height = height
102
+ self.width = width
103
+ self.image_mode = image_mode
104
+
105
+ self.show_download_button = show_download_button
106
+ self.show_share_button = (
107
+ (utils.get_space() is not None)
108
+ if show_share_button is None
109
+ else show_share_button
110
+ )
111
+ super().__init__(
112
+ label=label,
113
+ every=every,
114
+ show_label=show_label,
115
+ container=container,
116
+ scale=scale,
117
+ min_width=min_width,
118
+ visible=visible,
119
+ elem_id=elem_id,
120
+ elem_classes=elem_classes,
121
+ render=render,
122
+ value=value,
123
+ )
124
+
125
+ def preprocess(
126
+ self, payload: BlurhashFileData | None
127
+ ) -> np.ndarray | _Image.Image | str | None:
128
+ if payload is None:
129
+ return payload
130
+ im = _Image.open(payload.image.path)
131
+ with warnings.catch_warnings():
132
+ warnings.simplefilter("ignore")
133
+ im = im.convert(self.image_mode)
134
+ return image_utils.format_image(
135
+ im, cast(Literal["numpy", "pil", "filepath"], self.type), self.GRADIO_CACHE
136
+ )
137
+
138
+ def postprocess(
139
+ self, value: np.ndarray | _Image.Image | str | Path | None
140
+ ) -> BlurhashFileData | None:
141
+ if value is None:
142
+ return None
143
+ path = image_utils.save_image(value, self.GRADIO_CACHE)
144
+ image = _Image.open(path)
145
+
146
+ return BlurhashFileData(
147
+ image=FileData(path=path),
148
+ blurhash=blurhash.encode(image, x_components=5, y_components=5),
149
+ width=image.width,
150
+ height=image.height,
151
+ )
152
+
153
+ def as_example(self, input_data: str | Path | None) -> str | None:
154
+ if input_data is None:
155
+ return None
156
+ return processing_utils.move_resource_to_block_cache(input_data, self)
157
+
158
+ def example_inputs(self) -> Any:
159
+ return "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"
160
+
161
+
162
+ def clear(self,
163
+ fn: Callable | None,
164
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
165
+ outputs: Component | Sequence[Component] | None = None,
166
+ api_name: str | None | Literal[False] = None,
167
+ status_tracker: None = None,
168
+ scroll_to_output: bool = False,
169
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
170
+ queue: bool | None = None,
171
+ batch: bool = False,
172
+ max_batch_size: int = 4,
173
+ preprocess: bool = True,
174
+ postprocess: bool = True,
175
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
176
+ every: float | None = None,
177
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
178
+ js: str | None = None,) -> Dependency:
179
+ """
180
+ Parameters:
181
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
182
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
183
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
184
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
185
+ scroll_to_output: If True, will scroll to output component on completion
186
+ show_progress: If True, will show progress animation while pending
187
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
188
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
189
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
190
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
191
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
192
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
193
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
194
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
195
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
196
+ """
197
+ ...
198
+
199
+ def change(self,
200
+ fn: Callable | None,
201
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
202
+ outputs: Component | Sequence[Component] | None = None,
203
+ api_name: str | None | Literal[False] = None,
204
+ status_tracker: None = None,
205
+ scroll_to_output: bool = False,
206
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
207
+ queue: bool | None = None,
208
+ batch: bool = False,
209
+ max_batch_size: int = 4,
210
+ preprocess: bool = True,
211
+ postprocess: bool = True,
212
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
213
+ every: float | None = None,
214
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
215
+ js: str | None = None,) -> Dependency:
216
+ """
217
+ Parameters:
218
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
219
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
220
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
221
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
222
+ scroll_to_output: If True, will scroll to output component on completion
223
+ show_progress: If True, will show progress animation while pending
224
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
225
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
226
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
227
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
228
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
229
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
230
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
231
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
232
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
233
+ """
234
+ ...
235
+
236
+ def stream(self,
237
+ fn: Callable | None,
238
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
239
+ outputs: Component | Sequence[Component] | None = None,
240
+ api_name: str | None | Literal[False] = None,
241
+ status_tracker: None = None,
242
+ scroll_to_output: bool = False,
243
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
244
+ queue: bool | None = None,
245
+ batch: bool = False,
246
+ max_batch_size: int = 4,
247
+ preprocess: bool = True,
248
+ postprocess: bool = True,
249
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
250
+ every: float | None = None,
251
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
252
+ js: str | None = None,) -> Dependency:
253
+ """
254
+ Parameters:
255
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
256
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
257
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
258
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
259
+ scroll_to_output: If True, will scroll to output component on completion
260
+ show_progress: If True, will show progress animation while pending
261
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
262
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
263
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
264
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
265
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
266
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
267
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
268
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
269
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
270
+ """
271
+ ...
272
+
273
+ def select(self,
274
+ fn: Callable | None,
275
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
276
+ outputs: Component | Sequence[Component] | None = None,
277
+ api_name: str | None | Literal[False] = None,
278
+ status_tracker: None = None,
279
+ scroll_to_output: bool = False,
280
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
281
+ queue: bool | None = None,
282
+ batch: bool = False,
283
+ max_batch_size: int = 4,
284
+ preprocess: bool = True,
285
+ postprocess: bool = True,
286
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
287
+ every: float | None = None,
288
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
289
+ js: str | None = None,) -> Dependency:
290
+ """
291
+ Parameters:
292
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
293
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
294
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
295
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
296
+ scroll_to_output: If True, will scroll to output component on completion
297
+ show_progress: If True, will show progress animation while pending
298
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
299
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
300
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
301
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
302
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
303
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
304
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
305
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
306
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
307
+ """
308
+ ...
309
+
310
+ def upload(self,
311
+ fn: Callable | None,
312
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
313
+ outputs: Component | Sequence[Component] | None = None,
314
+ api_name: str | None | Literal[False] = None,
315
+ status_tracker: None = None,
316
+ scroll_to_output: bool = False,
317
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
318
+ queue: bool | None = None,
319
+ batch: bool = False,
320
+ max_batch_size: int = 4,
321
+ preprocess: bool = True,
322
+ postprocess: bool = True,
323
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
324
+ every: float | None = None,
325
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
326
+ js: str | None = None,) -> Dependency:
327
+ """
328
+ Parameters:
329
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
330
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
331
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
332
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
333
+ scroll_to_output: If True, will scroll to output component on completion
334
+ show_progress: If True, will show progress animation while pending
335
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
336
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
337
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
338
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
339
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
340
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
341
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
342
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
343
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
344
+ """
345
+ ...
src/backend/gradio_blurhashimage/templates/component/index.js ADDED
@@ -0,0 +1,4144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const Ln = [
2
+ { color: "red", primary: 600, secondary: 100 },
3
+ { color: "green", primary: 600, secondary: 100 },
4
+ { color: "blue", primary: 600, secondary: 100 },
5
+ { color: "yellow", primary: 500, secondary: 100 },
6
+ { color: "purple", primary: 600, secondary: 100 },
7
+ { color: "teal", primary: 600, secondary: 100 },
8
+ { color: "orange", primary: 600, secondary: 100 },
9
+ { color: "cyan", primary: 600, secondary: 100 },
10
+ { color: "lime", primary: 500, secondary: 100 },
11
+ { color: "pink", primary: 600, secondary: 100 }
12
+ ], ht = {
13
+ inherit: "inherit",
14
+ current: "currentColor",
15
+ transparent: "transparent",
16
+ black: "#000",
17
+ white: "#fff",
18
+ slate: {
19
+ 50: "#f8fafc",
20
+ 100: "#f1f5f9",
21
+ 200: "#e2e8f0",
22
+ 300: "#cbd5e1",
23
+ 400: "#94a3b8",
24
+ 500: "#64748b",
25
+ 600: "#475569",
26
+ 700: "#334155",
27
+ 800: "#1e293b",
28
+ 900: "#0f172a",
29
+ 950: "#020617"
30
+ },
31
+ gray: {
32
+ 50: "#f9fafb",
33
+ 100: "#f3f4f6",
34
+ 200: "#e5e7eb",
35
+ 300: "#d1d5db",
36
+ 400: "#9ca3af",
37
+ 500: "#6b7280",
38
+ 600: "#4b5563",
39
+ 700: "#374151",
40
+ 800: "#1f2937",
41
+ 900: "#111827",
42
+ 950: "#030712"
43
+ },
44
+ zinc: {
45
+ 50: "#fafafa",
46
+ 100: "#f4f4f5",
47
+ 200: "#e4e4e7",
48
+ 300: "#d4d4d8",
49
+ 400: "#a1a1aa",
50
+ 500: "#71717a",
51
+ 600: "#52525b",
52
+ 700: "#3f3f46",
53
+ 800: "#27272a",
54
+ 900: "#18181b",
55
+ 950: "#09090b"
56
+ },
57
+ neutral: {
58
+ 50: "#fafafa",
59
+ 100: "#f5f5f5",
60
+ 200: "#e5e5e5",
61
+ 300: "#d4d4d4",
62
+ 400: "#a3a3a3",
63
+ 500: "#737373",
64
+ 600: "#525252",
65
+ 700: "#404040",
66
+ 800: "#262626",
67
+ 900: "#171717",
68
+ 950: "#0a0a0a"
69
+ },
70
+ stone: {
71
+ 50: "#fafaf9",
72
+ 100: "#f5f5f4",
73
+ 200: "#e7e5e4",
74
+ 300: "#d6d3d1",
75
+ 400: "#a8a29e",
76
+ 500: "#78716c",
77
+ 600: "#57534e",
78
+ 700: "#44403c",
79
+ 800: "#292524",
80
+ 900: "#1c1917",
81
+ 950: "#0c0a09"
82
+ },
83
+ red: {
84
+ 50: "#fef2f2",
85
+ 100: "#fee2e2",
86
+ 200: "#fecaca",
87
+ 300: "#fca5a5",
88
+ 400: "#f87171",
89
+ 500: "#ef4444",
90
+ 600: "#dc2626",
91
+ 700: "#b91c1c",
92
+ 800: "#991b1b",
93
+ 900: "#7f1d1d",
94
+ 950: "#450a0a"
95
+ },
96
+ orange: {
97
+ 50: "#fff7ed",
98
+ 100: "#ffedd5",
99
+ 200: "#fed7aa",
100
+ 300: "#fdba74",
101
+ 400: "#fb923c",
102
+ 500: "#f97316",
103
+ 600: "#ea580c",
104
+ 700: "#c2410c",
105
+ 800: "#9a3412",
106
+ 900: "#7c2d12",
107
+ 950: "#431407"
108
+ },
109
+ amber: {
110
+ 50: "#fffbeb",
111
+ 100: "#fef3c7",
112
+ 200: "#fde68a",
113
+ 300: "#fcd34d",
114
+ 400: "#fbbf24",
115
+ 500: "#f59e0b",
116
+ 600: "#d97706",
117
+ 700: "#b45309",
118
+ 800: "#92400e",
119
+ 900: "#78350f",
120
+ 950: "#451a03"
121
+ },
122
+ yellow: {
123
+ 50: "#fefce8",
124
+ 100: "#fef9c3",
125
+ 200: "#fef08a",
126
+ 300: "#fde047",
127
+ 400: "#facc15",
128
+ 500: "#eab308",
129
+ 600: "#ca8a04",
130
+ 700: "#a16207",
131
+ 800: "#854d0e",
132
+ 900: "#713f12",
133
+ 950: "#422006"
134
+ },
135
+ lime: {
136
+ 50: "#f7fee7",
137
+ 100: "#ecfccb",
138
+ 200: "#d9f99d",
139
+ 300: "#bef264",
140
+ 400: "#a3e635",
141
+ 500: "#84cc16",
142
+ 600: "#65a30d",
143
+ 700: "#4d7c0f",
144
+ 800: "#3f6212",
145
+ 900: "#365314",
146
+ 950: "#1a2e05"
147
+ },
148
+ green: {
149
+ 50: "#f0fdf4",
150
+ 100: "#dcfce7",
151
+ 200: "#bbf7d0",
152
+ 300: "#86efac",
153
+ 400: "#4ade80",
154
+ 500: "#22c55e",
155
+ 600: "#16a34a",
156
+ 700: "#15803d",
157
+ 800: "#166534",
158
+ 900: "#14532d",
159
+ 950: "#052e16"
160
+ },
161
+ emerald: {
162
+ 50: "#ecfdf5",
163
+ 100: "#d1fae5",
164
+ 200: "#a7f3d0",
165
+ 300: "#6ee7b7",
166
+ 400: "#34d399",
167
+ 500: "#10b981",
168
+ 600: "#059669",
169
+ 700: "#047857",
170
+ 800: "#065f46",
171
+ 900: "#064e3b",
172
+ 950: "#022c22"
173
+ },
174
+ teal: {
175
+ 50: "#f0fdfa",
176
+ 100: "#ccfbf1",
177
+ 200: "#99f6e4",
178
+ 300: "#5eead4",
179
+ 400: "#2dd4bf",
180
+ 500: "#14b8a6",
181
+ 600: "#0d9488",
182
+ 700: "#0f766e",
183
+ 800: "#115e59",
184
+ 900: "#134e4a",
185
+ 950: "#042f2e"
186
+ },
187
+ cyan: {
188
+ 50: "#ecfeff",
189
+ 100: "#cffafe",
190
+ 200: "#a5f3fc",
191
+ 300: "#67e8f9",
192
+ 400: "#22d3ee",
193
+ 500: "#06b6d4",
194
+ 600: "#0891b2",
195
+ 700: "#0e7490",
196
+ 800: "#155e75",
197
+ 900: "#164e63",
198
+ 950: "#083344"
199
+ },
200
+ sky: {
201
+ 50: "#f0f9ff",
202
+ 100: "#e0f2fe",
203
+ 200: "#bae6fd",
204
+ 300: "#7dd3fc",
205
+ 400: "#38bdf8",
206
+ 500: "#0ea5e9",
207
+ 600: "#0284c7",
208
+ 700: "#0369a1",
209
+ 800: "#075985",
210
+ 900: "#0c4a6e",
211
+ 950: "#082f49"
212
+ },
213
+ blue: {
214
+ 50: "#eff6ff",
215
+ 100: "#dbeafe",
216
+ 200: "#bfdbfe",
217
+ 300: "#93c5fd",
218
+ 400: "#60a5fa",
219
+ 500: "#3b82f6",
220
+ 600: "#2563eb",
221
+ 700: "#1d4ed8",
222
+ 800: "#1e40af",
223
+ 900: "#1e3a8a",
224
+ 950: "#172554"
225
+ },
226
+ indigo: {
227
+ 50: "#eef2ff",
228
+ 100: "#e0e7ff",
229
+ 200: "#c7d2fe",
230
+ 300: "#a5b4fc",
231
+ 400: "#818cf8",
232
+ 500: "#6366f1",
233
+ 600: "#4f46e5",
234
+ 700: "#4338ca",
235
+ 800: "#3730a3",
236
+ 900: "#312e81",
237
+ 950: "#1e1b4b"
238
+ },
239
+ violet: {
240
+ 50: "#f5f3ff",
241
+ 100: "#ede9fe",
242
+ 200: "#ddd6fe",
243
+ 300: "#c4b5fd",
244
+ 400: "#a78bfa",
245
+ 500: "#8b5cf6",
246
+ 600: "#7c3aed",
247
+ 700: "#6d28d9",
248
+ 800: "#5b21b6",
249
+ 900: "#4c1d95",
250
+ 950: "#2e1065"
251
+ },
252
+ purple: {
253
+ 50: "#faf5ff",
254
+ 100: "#f3e8ff",
255
+ 200: "#e9d5ff",
256
+ 300: "#d8b4fe",
257
+ 400: "#c084fc",
258
+ 500: "#a855f7",
259
+ 600: "#9333ea",
260
+ 700: "#7e22ce",
261
+ 800: "#6b21a8",
262
+ 900: "#581c87",
263
+ 950: "#3b0764"
264
+ },
265
+ fuchsia: {
266
+ 50: "#fdf4ff",
267
+ 100: "#fae8ff",
268
+ 200: "#f5d0fe",
269
+ 300: "#f0abfc",
270
+ 400: "#e879f9",
271
+ 500: "#d946ef",
272
+ 600: "#c026d3",
273
+ 700: "#a21caf",
274
+ 800: "#86198f",
275
+ 900: "#701a75",
276
+ 950: "#4a044e"
277
+ },
278
+ pink: {
279
+ 50: "#fdf2f8",
280
+ 100: "#fce7f3",
281
+ 200: "#fbcfe8",
282
+ 300: "#f9a8d4",
283
+ 400: "#f472b6",
284
+ 500: "#ec4899",
285
+ 600: "#db2777",
286
+ 700: "#be185d",
287
+ 800: "#9d174d",
288
+ 900: "#831843",
289
+ 950: "#500724"
290
+ },
291
+ rose: {
292
+ 50: "#fff1f2",
293
+ 100: "#ffe4e6",
294
+ 200: "#fecdd3",
295
+ 300: "#fda4af",
296
+ 400: "#fb7185",
297
+ 500: "#f43f5e",
298
+ 600: "#e11d48",
299
+ 700: "#be123c",
300
+ 800: "#9f1239",
301
+ 900: "#881337",
302
+ 950: "#4c0519"
303
+ }
304
+ };
305
+ Ln.reduce(
306
+ (l, { color: e, primary: t, secondary: n }) => ({
307
+ ...l,
308
+ [e]: {
309
+ primary: ht[e][t],
310
+ secondary: ht[e][n]
311
+ }
312
+ }),
313
+ {}
314
+ );
315
+ function zn(l) {
316
+ let e, t = l[0], n = 1;
317
+ for (; n < l.length; ) {
318
+ const i = l[n], s = l[n + 1];
319
+ if (n += 2, (i === "optionalAccess" || i === "optionalCall") && t == null)
320
+ return;
321
+ i === "access" || i === "optionalAccess" ? (e = t, t = s(t)) : (i === "call" || i === "optionalCall") && (t = s((...o) => t.call(e, ...o)), e = void 0);
322
+ }
323
+ return t;
324
+ }
325
+ class Ae extends Error {
326
+ constructor(e) {
327
+ super(e), this.name = "ShareError";
328
+ }
329
+ }
330
+ async function An(l, e) {
331
+ if (window.__gradio_space__ == null)
332
+ throw new Ae("Must be on Spaces to share.");
333
+ let t, n, i;
334
+ if (e === "url") {
335
+ const r = await fetch(l);
336
+ t = await r.blob(), n = r.headers.get("content-type") || "", i = r.headers.get("content-disposition") || "";
337
+ } else
338
+ t = Bn(l), n = l.split(";")[0].split(":")[1], i = "file" + n.split("/")[1];
339
+ const s = new File([t], i, { type: n }), o = await fetch("https://huggingface.co/uploads", {
340
+ method: "POST",
341
+ body: s,
342
+ headers: {
343
+ "Content-Type": s.type,
344
+ "X-Requested-With": "XMLHttpRequest"
345
+ }
346
+ });
347
+ if (!o.ok) {
348
+ if (zn([o, "access", (r) => r.headers, "access", (r) => r.get, "call", (r) => r("content-type"), "optionalAccess", (r) => r.includes, "call", (r) => r("application/json")])) {
349
+ const r = await o.json();
350
+ throw new Ae(`Upload failed: ${r.error}`);
351
+ }
352
+ throw new Ae("Upload failed.");
353
+ }
354
+ return await o.text();
355
+ }
356
+ function Bn(l) {
357
+ for (var e = l.split(","), t = e[0].match(/:(.*?);/)[1], n = atob(e[1]), i = n.length, s = new Uint8Array(i); i--; )
358
+ s[i] = n.charCodeAt(i);
359
+ return new Blob([s], { type: t });
360
+ }
361
+ const {
362
+ SvelteComponent: Fn,
363
+ assign: En,
364
+ create_slot: Dn,
365
+ detach: Rn,
366
+ element: Vn,
367
+ get_all_dirty_from_scope: Tn,
368
+ get_slot_changes: Pn,
369
+ get_spread_update: Nn,
370
+ init: Xn,
371
+ insert: Yn,
372
+ safe_not_equal: jn,
373
+ set_dynamic_element_data: gt,
374
+ set_style: F,
375
+ toggle_class: K,
376
+ transition_in: an,
377
+ transition_out: rn,
378
+ update_slot_base: Zn
379
+ } = window.__gradio__svelte__internal;
380
+ function Un(l) {
381
+ let e, t, n;
382
+ const i = (
383
+ /*#slots*/
384
+ l[17].default
385
+ ), s = Dn(
386
+ i,
387
+ l,
388
+ /*$$scope*/
389
+ l[16],
390
+ null
391
+ );
392
+ let o = [
393
+ { "data-testid": (
394
+ /*test_id*/
395
+ l[7]
396
+ ) },
397
+ { id: (
398
+ /*elem_id*/
399
+ l[2]
400
+ ) },
401
+ {
402
+ class: t = "block " + /*elem_classes*/
403
+ l[3].join(" ") + " svelte-1t38q2d"
404
+ }
405
+ ], a = {};
406
+ for (let r = 0; r < o.length; r += 1)
407
+ a = En(a, o[r]);
408
+ return {
409
+ c() {
410
+ e = Vn(
411
+ /*tag*/
412
+ l[14]
413
+ ), s && s.c(), gt(
414
+ /*tag*/
415
+ l[14]
416
+ )(e, a), K(
417
+ e,
418
+ "hidden",
419
+ /*visible*/
420
+ l[10] === !1
421
+ ), K(
422
+ e,
423
+ "padded",
424
+ /*padding*/
425
+ l[6]
426
+ ), K(
427
+ e,
428
+ "border_focus",
429
+ /*border_mode*/
430
+ l[5] === "focus"
431
+ ), K(e, "hide-container", !/*explicit_call*/
432
+ l[8] && !/*container*/
433
+ l[9]), F(e, "height", typeof /*height*/
434
+ l[0] == "number" ? (
435
+ /*height*/
436
+ l[0] + "px"
437
+ ) : void 0), F(e, "width", typeof /*width*/
438
+ l[1] == "number" ? `calc(min(${/*width*/
439
+ l[1]}px, 100%))` : void 0), F(
440
+ e,
441
+ "border-style",
442
+ /*variant*/
443
+ l[4]
444
+ ), F(
445
+ e,
446
+ "overflow",
447
+ /*allow_overflow*/
448
+ l[11] ? "visible" : "hidden"
449
+ ), F(
450
+ e,
451
+ "flex-grow",
452
+ /*scale*/
453
+ l[12]
454
+ ), F(e, "min-width", `calc(min(${/*min_width*/
455
+ l[13]}px, 100%))`), F(e, "border-width", "var(--block-border-width)");
456
+ },
457
+ m(r, f) {
458
+ Yn(r, e, f), s && s.m(e, null), n = !0;
459
+ },
460
+ p(r, f) {
461
+ s && s.p && (!n || f & /*$$scope*/
462
+ 65536) && Zn(
463
+ s,
464
+ i,
465
+ r,
466
+ /*$$scope*/
467
+ r[16],
468
+ n ? Pn(
469
+ i,
470
+ /*$$scope*/
471
+ r[16],
472
+ f,
473
+ null
474
+ ) : Tn(
475
+ /*$$scope*/
476
+ r[16]
477
+ ),
478
+ null
479
+ ), gt(
480
+ /*tag*/
481
+ r[14]
482
+ )(e, a = Nn(o, [
483
+ (!n || f & /*test_id*/
484
+ 128) && { "data-testid": (
485
+ /*test_id*/
486
+ r[7]
487
+ ) },
488
+ (!n || f & /*elem_id*/
489
+ 4) && { id: (
490
+ /*elem_id*/
491
+ r[2]
492
+ ) },
493
+ (!n || f & /*elem_classes*/
494
+ 8 && t !== (t = "block " + /*elem_classes*/
495
+ r[3].join(" ") + " svelte-1t38q2d")) && { class: t }
496
+ ])), K(
497
+ e,
498
+ "hidden",
499
+ /*visible*/
500
+ r[10] === !1
501
+ ), K(
502
+ e,
503
+ "padded",
504
+ /*padding*/
505
+ r[6]
506
+ ), K(
507
+ e,
508
+ "border_focus",
509
+ /*border_mode*/
510
+ r[5] === "focus"
511
+ ), K(e, "hide-container", !/*explicit_call*/
512
+ r[8] && !/*container*/
513
+ r[9]), f & /*height*/
514
+ 1 && F(e, "height", typeof /*height*/
515
+ r[0] == "number" ? (
516
+ /*height*/
517
+ r[0] + "px"
518
+ ) : void 0), f & /*width*/
519
+ 2 && F(e, "width", typeof /*width*/
520
+ r[1] == "number" ? `calc(min(${/*width*/
521
+ r[1]}px, 100%))` : void 0), f & /*variant*/
522
+ 16 && F(
523
+ e,
524
+ "border-style",
525
+ /*variant*/
526
+ r[4]
527
+ ), f & /*allow_overflow*/
528
+ 2048 && F(
529
+ e,
530
+ "overflow",
531
+ /*allow_overflow*/
532
+ r[11] ? "visible" : "hidden"
533
+ ), f & /*scale*/
534
+ 4096 && F(
535
+ e,
536
+ "flex-grow",
537
+ /*scale*/
538
+ r[12]
539
+ ), f & /*min_width*/
540
+ 8192 && F(e, "min-width", `calc(min(${/*min_width*/
541
+ r[13]}px, 100%))`);
542
+ },
543
+ i(r) {
544
+ n || (an(s, r), n = !0);
545
+ },
546
+ o(r) {
547
+ rn(s, r), n = !1;
548
+ },
549
+ d(r) {
550
+ r && Rn(e), s && s.d(r);
551
+ }
552
+ };
553
+ }
554
+ function On(l) {
555
+ let e, t = (
556
+ /*tag*/
557
+ l[14] && Un(l)
558
+ );
559
+ return {
560
+ c() {
561
+ t && t.c();
562
+ },
563
+ m(n, i) {
564
+ t && t.m(n, i), e = !0;
565
+ },
566
+ p(n, [i]) {
567
+ /*tag*/
568
+ n[14] && t.p(n, i);
569
+ },
570
+ i(n) {
571
+ e || (an(t, n), e = !0);
572
+ },
573
+ o(n) {
574
+ rn(t, n), e = !1;
575
+ },
576
+ d(n) {
577
+ t && t.d(n);
578
+ }
579
+ };
580
+ }
581
+ function Hn(l, e, t) {
582
+ let { $$slots: n = {}, $$scope: i } = e, { height: s = void 0 } = e, { width: o = void 0 } = e, { elem_id: a = "" } = e, { elem_classes: r = [] } = e, { variant: f = "solid" } = e, { border_mode: _ = "base" } = e, { padding: c = !0 } = e, { type: u = "normal" } = e, { test_id: d = void 0 } = e, { explicit_call: g = !1 } = e, { container: p = !0 } = e, { visible: C = !0 } = e, { allow_overflow: I = !0 } = e, { scale: S = null } = e, { min_width: m = 0 } = e, y = u === "fieldset" ? "fieldset" : "div";
583
+ return l.$$set = (w) => {
584
+ "height" in w && t(0, s = w.height), "width" in w && t(1, o = w.width), "elem_id" in w && t(2, a = w.elem_id), "elem_classes" in w && t(3, r = w.elem_classes), "variant" in w && t(4, f = w.variant), "border_mode" in w && t(5, _ = w.border_mode), "padding" in w && t(6, c = w.padding), "type" in w && t(15, u = w.type), "test_id" in w && t(7, d = w.test_id), "explicit_call" in w && t(8, g = w.explicit_call), "container" in w && t(9, p = w.container), "visible" in w && t(10, C = w.visible), "allow_overflow" in w && t(11, I = w.allow_overflow), "scale" in w && t(12, S = w.scale), "min_width" in w && t(13, m = w.min_width), "$$scope" in w && t(16, i = w.$$scope);
585
+ }, [
586
+ s,
587
+ o,
588
+ a,
589
+ r,
590
+ f,
591
+ _,
592
+ c,
593
+ d,
594
+ g,
595
+ p,
596
+ C,
597
+ I,
598
+ S,
599
+ m,
600
+ y,
601
+ u,
602
+ i,
603
+ n
604
+ ];
605
+ }
606
+ class Wn extends Fn {
607
+ constructor(e) {
608
+ super(), Xn(this, e, Hn, On, jn, {
609
+ height: 0,
610
+ width: 1,
611
+ elem_id: 2,
612
+ elem_classes: 3,
613
+ variant: 4,
614
+ border_mode: 5,
615
+ padding: 6,
616
+ type: 15,
617
+ test_id: 7,
618
+ explicit_call: 8,
619
+ container: 9,
620
+ visible: 10,
621
+ allow_overflow: 11,
622
+ scale: 12,
623
+ min_width: 13
624
+ });
625
+ }
626
+ }
627
+ const {
628
+ SvelteComponent: Gn,
629
+ append: Re,
630
+ attr: Se,
631
+ create_component: Kn,
632
+ destroy_component: Jn,
633
+ detach: Qn,
634
+ element: bt,
635
+ init: xn,
636
+ insert: $n,
637
+ mount_component: el,
638
+ safe_not_equal: tl,
639
+ set_data: nl,
640
+ space: ll,
641
+ text: il,
642
+ toggle_class: J,
643
+ transition_in: sl,
644
+ transition_out: ol
645
+ } = window.__gradio__svelte__internal;
646
+ function al(l) {
647
+ let e, t, n, i, s, o;
648
+ return n = new /*Icon*/
649
+ l[1]({}), {
650
+ c() {
651
+ e = bt("label"), t = bt("span"), Kn(n.$$.fragment), i = ll(), s = il(
652
+ /*label*/
653
+ l[0]
654
+ ), Se(t, "class", "svelte-9gxdi0"), Se(e, "for", ""), Se(e, "data-testid", "block-label"), Se(e, "class", "svelte-9gxdi0"), J(e, "hide", !/*show_label*/
655
+ l[2]), J(e, "sr-only", !/*show_label*/
656
+ l[2]), J(
657
+ e,
658
+ "float",
659
+ /*float*/
660
+ l[4]
661
+ ), J(
662
+ e,
663
+ "hide-label",
664
+ /*disable*/
665
+ l[3]
666
+ );
667
+ },
668
+ m(a, r) {
669
+ $n(a, e, r), Re(e, t), el(n, t, null), Re(e, i), Re(e, s), o = !0;
670
+ },
671
+ p(a, [r]) {
672
+ (!o || r & /*label*/
673
+ 1) && nl(
674
+ s,
675
+ /*label*/
676
+ a[0]
677
+ ), (!o || r & /*show_label*/
678
+ 4) && J(e, "hide", !/*show_label*/
679
+ a[2]), (!o || r & /*show_label*/
680
+ 4) && J(e, "sr-only", !/*show_label*/
681
+ a[2]), (!o || r & /*float*/
682
+ 16) && J(
683
+ e,
684
+ "float",
685
+ /*float*/
686
+ a[4]
687
+ ), (!o || r & /*disable*/
688
+ 8) && J(
689
+ e,
690
+ "hide-label",
691
+ /*disable*/
692
+ a[3]
693
+ );
694
+ },
695
+ i(a) {
696
+ o || (sl(n.$$.fragment, a), o = !0);
697
+ },
698
+ o(a) {
699
+ ol(n.$$.fragment, a), o = !1;
700
+ },
701
+ d(a) {
702
+ a && Qn(e), Jn(n);
703
+ }
704
+ };
705
+ }
706
+ function rl(l, e, t) {
707
+ let { label: n = null } = e, { Icon: i } = e, { show_label: s = !0 } = e, { disable: o = !1 } = e, { float: a = !0 } = e;
708
+ return l.$$set = (r) => {
709
+ "label" in r && t(0, n = r.label), "Icon" in r && t(1, i = r.Icon), "show_label" in r && t(2, s = r.show_label), "disable" in r && t(3, o = r.disable), "float" in r && t(4, a = r.float);
710
+ }, [n, i, s, o, a];
711
+ }
712
+ class fl extends Gn {
713
+ constructor(e) {
714
+ super(), xn(this, e, rl, al, tl, {
715
+ label: 0,
716
+ Icon: 1,
717
+ show_label: 2,
718
+ disable: 3,
719
+ float: 4
720
+ });
721
+ }
722
+ }
723
+ const {
724
+ SvelteComponent: _l,
725
+ append: Oe,
726
+ attr: ne,
727
+ bubble: cl,
728
+ create_component: ul,
729
+ destroy_component: dl,
730
+ detach: fn,
731
+ element: He,
732
+ init: ml,
733
+ insert: _n,
734
+ listen: hl,
735
+ mount_component: gl,
736
+ safe_not_equal: bl,
737
+ set_data: wl,
738
+ space: pl,
739
+ text: vl,
740
+ toggle_class: Q,
741
+ transition_in: kl,
742
+ transition_out: yl
743
+ } = window.__gradio__svelte__internal;
744
+ function wt(l) {
745
+ let e, t;
746
+ return {
747
+ c() {
748
+ e = He("span"), t = vl(
749
+ /*label*/
750
+ l[1]
751
+ ), ne(e, "class", "svelte-xtz2g8");
752
+ },
753
+ m(n, i) {
754
+ _n(n, e, i), Oe(e, t);
755
+ },
756
+ p(n, i) {
757
+ i & /*label*/
758
+ 2 && wl(
759
+ t,
760
+ /*label*/
761
+ n[1]
762
+ );
763
+ },
764
+ d(n) {
765
+ n && fn(e);
766
+ }
767
+ };
768
+ }
769
+ function Cl(l) {
770
+ let e, t, n, i, s, o, a, r = (
771
+ /*show_label*/
772
+ l[2] && wt(l)
773
+ );
774
+ return i = new /*Icon*/
775
+ l[0]({}), {
776
+ c() {
777
+ e = He("button"), r && r.c(), t = pl(), n = He("div"), ul(i.$$.fragment), ne(n, "class", "svelte-xtz2g8"), Q(
778
+ n,
779
+ "small",
780
+ /*size*/
781
+ l[4] === "small"
782
+ ), Q(
783
+ n,
784
+ "large",
785
+ /*size*/
786
+ l[4] === "large"
787
+ ), ne(
788
+ e,
789
+ "aria-label",
790
+ /*label*/
791
+ l[1]
792
+ ), ne(
793
+ e,
794
+ "title",
795
+ /*label*/
796
+ l[1]
797
+ ), ne(e, "class", "svelte-xtz2g8"), Q(
798
+ e,
799
+ "pending",
800
+ /*pending*/
801
+ l[3]
802
+ ), Q(
803
+ e,
804
+ "padded",
805
+ /*padded*/
806
+ l[5]
807
+ );
808
+ },
809
+ m(f, _) {
810
+ _n(f, e, _), r && r.m(e, null), Oe(e, t), Oe(e, n), gl(i, n, null), s = !0, o || (a = hl(
811
+ e,
812
+ "click",
813
+ /*click_handler*/
814
+ l[6]
815
+ ), o = !0);
816
+ },
817
+ p(f, [_]) {
818
+ /*show_label*/
819
+ f[2] ? r ? r.p(f, _) : (r = wt(f), r.c(), r.m(e, t)) : r && (r.d(1), r = null), (!s || _ & /*size*/
820
+ 16) && Q(
821
+ n,
822
+ "small",
823
+ /*size*/
824
+ f[4] === "small"
825
+ ), (!s || _ & /*size*/
826
+ 16) && Q(
827
+ n,
828
+ "large",
829
+ /*size*/
830
+ f[4] === "large"
831
+ ), (!s || _ & /*label*/
832
+ 2) && ne(
833
+ e,
834
+ "aria-label",
835
+ /*label*/
836
+ f[1]
837
+ ), (!s || _ & /*label*/
838
+ 2) && ne(
839
+ e,
840
+ "title",
841
+ /*label*/
842
+ f[1]
843
+ ), (!s || _ & /*pending*/
844
+ 8) && Q(
845
+ e,
846
+ "pending",
847
+ /*pending*/
848
+ f[3]
849
+ ), (!s || _ & /*padded*/
850
+ 32) && Q(
851
+ e,
852
+ "padded",
853
+ /*padded*/
854
+ f[5]
855
+ );
856
+ },
857
+ i(f) {
858
+ s || (kl(i.$$.fragment, f), s = !0);
859
+ },
860
+ o(f) {
861
+ yl(i.$$.fragment, f), s = !1;
862
+ },
863
+ d(f) {
864
+ f && fn(e), r && r.d(), dl(i), o = !1, a();
865
+ }
866
+ };
867
+ }
868
+ function ql(l, e, t) {
869
+ let { Icon: n } = e, { label: i = "" } = e, { show_label: s = !1 } = e, { pending: o = !1 } = e, { size: a = "small" } = e, { padded: r = !0 } = e;
870
+ function f(_) {
871
+ cl.call(this, l, _);
872
+ }
873
+ return l.$$set = (_) => {
874
+ "Icon" in _ && t(0, n = _.Icon), "label" in _ && t(1, i = _.label), "show_label" in _ && t(2, s = _.show_label), "pending" in _ && t(3, o = _.pending), "size" in _ && t(4, a = _.size), "padded" in _ && t(5, r = _.padded);
875
+ }, [n, i, s, o, a, r, f];
876
+ }
877
+ class cn extends _l {
878
+ constructor(e) {
879
+ super(), ml(this, e, ql, Cl, bl, {
880
+ Icon: 0,
881
+ label: 1,
882
+ show_label: 2,
883
+ pending: 3,
884
+ size: 4,
885
+ padded: 5
886
+ });
887
+ }
888
+ }
889
+ const {
890
+ SvelteComponent: Sl,
891
+ append: Ml,
892
+ attr: Ve,
893
+ binding_callbacks: Il,
894
+ create_slot: Ll,
895
+ detach: zl,
896
+ element: pt,
897
+ get_all_dirty_from_scope: Al,
898
+ get_slot_changes: Bl,
899
+ init: Fl,
900
+ insert: El,
901
+ safe_not_equal: Dl,
902
+ toggle_class: x,
903
+ transition_in: Rl,
904
+ transition_out: Vl,
905
+ update_slot_base: Tl
906
+ } = window.__gradio__svelte__internal;
907
+ function Pl(l) {
908
+ let e, t, n;
909
+ const i = (
910
+ /*#slots*/
911
+ l[5].default
912
+ ), s = Ll(
913
+ i,
914
+ l,
915
+ /*$$scope*/
916
+ l[4],
917
+ null
918
+ );
919
+ return {
920
+ c() {
921
+ e = pt("div"), t = pt("div"), s && s.c(), Ve(t, "class", "icon svelte-3w3rth"), Ve(e, "class", "empty svelte-3w3rth"), Ve(e, "aria-label", "Empty value"), x(
922
+ e,
923
+ "small",
924
+ /*size*/
925
+ l[0] === "small"
926
+ ), x(
927
+ e,
928
+ "large",
929
+ /*size*/
930
+ l[0] === "large"
931
+ ), x(
932
+ e,
933
+ "unpadded_box",
934
+ /*unpadded_box*/
935
+ l[1]
936
+ ), x(
937
+ e,
938
+ "small_parent",
939
+ /*parent_height*/
940
+ l[3]
941
+ );
942
+ },
943
+ m(o, a) {
944
+ El(o, e, a), Ml(e, t), s && s.m(t, null), l[6](e), n = !0;
945
+ },
946
+ p(o, [a]) {
947
+ s && s.p && (!n || a & /*$$scope*/
948
+ 16) && Tl(
949
+ s,
950
+ i,
951
+ o,
952
+ /*$$scope*/
953
+ o[4],
954
+ n ? Bl(
955
+ i,
956
+ /*$$scope*/
957
+ o[4],
958
+ a,
959
+ null
960
+ ) : Al(
961
+ /*$$scope*/
962
+ o[4]
963
+ ),
964
+ null
965
+ ), (!n || a & /*size*/
966
+ 1) && x(
967
+ e,
968
+ "small",
969
+ /*size*/
970
+ o[0] === "small"
971
+ ), (!n || a & /*size*/
972
+ 1) && x(
973
+ e,
974
+ "large",
975
+ /*size*/
976
+ o[0] === "large"
977
+ ), (!n || a & /*unpadded_box*/
978
+ 2) && x(
979
+ e,
980
+ "unpadded_box",
981
+ /*unpadded_box*/
982
+ o[1]
983
+ ), (!n || a & /*parent_height*/
984
+ 8) && x(
985
+ e,
986
+ "small_parent",
987
+ /*parent_height*/
988
+ o[3]
989
+ );
990
+ },
991
+ i(o) {
992
+ n || (Rl(s, o), n = !0);
993
+ },
994
+ o(o) {
995
+ Vl(s, o), n = !1;
996
+ },
997
+ d(o) {
998
+ o && zl(e), s && s.d(o), l[6](null);
999
+ }
1000
+ };
1001
+ }
1002
+ function Nl(l) {
1003
+ let e, t = l[0], n = 1;
1004
+ for (; n < l.length; ) {
1005
+ const i = l[n], s = l[n + 1];
1006
+ if (n += 2, (i === "optionalAccess" || i === "optionalCall") && t == null)
1007
+ return;
1008
+ i === "access" || i === "optionalAccess" ? (e = t, t = s(t)) : (i === "call" || i === "optionalCall") && (t = s((...o) => t.call(e, ...o)), e = void 0);
1009
+ }
1010
+ return t;
1011
+ }
1012
+ function Xl(l, e, t) {
1013
+ let n, { $$slots: i = {}, $$scope: s } = e, { size: o = "small" } = e, { unpadded_box: a = !1 } = e, r;
1014
+ function f(c) {
1015
+ if (!c)
1016
+ return !1;
1017
+ const { height: u } = c.getBoundingClientRect(), { height: d } = Nl([
1018
+ c,
1019
+ "access",
1020
+ (g) => g.parentElement,
1021
+ "optionalAccess",
1022
+ (g) => g.getBoundingClientRect,
1023
+ "call",
1024
+ (g) => g()
1025
+ ]) || { height: u };
1026
+ return u > d + 2;
1027
+ }
1028
+ function _(c) {
1029
+ Il[c ? "unshift" : "push"](() => {
1030
+ r = c, t(2, r);
1031
+ });
1032
+ }
1033
+ return l.$$set = (c) => {
1034
+ "size" in c && t(0, o = c.size), "unpadded_box" in c && t(1, a = c.unpadded_box), "$$scope" in c && t(4, s = c.$$scope);
1035
+ }, l.$$.update = () => {
1036
+ l.$$.dirty & /*el*/
1037
+ 4 && t(3, n = f(r));
1038
+ }, [o, a, r, n, s, i, _];
1039
+ }
1040
+ class Yl extends Sl {
1041
+ constructor(e) {
1042
+ super(), Fl(this, e, Xl, Pl, Dl, { size: 0, unpadded_box: 1 });
1043
+ }
1044
+ }
1045
+ const {
1046
+ SvelteComponent: jl,
1047
+ append: Zl,
1048
+ attr: ye,
1049
+ detach: Ul,
1050
+ init: Ol,
1051
+ insert: Hl,
1052
+ noop: Te,
1053
+ safe_not_equal: Wl,
1054
+ svg_element: vt
1055
+ } = window.__gradio__svelte__internal;
1056
+ function Gl(l) {
1057
+ let e, t;
1058
+ return {
1059
+ c() {
1060
+ e = vt("svg"), t = vt("path"), ye(t, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), ye(t, "fill", "currentColor"), ye(e, "id", "icon"), ye(e, "xmlns", "http://www.w3.org/2000/svg"), ye(e, "viewBox", "0 0 32 32");
1061
+ },
1062
+ m(n, i) {
1063
+ Hl(n, e, i), Zl(e, t);
1064
+ },
1065
+ p: Te,
1066
+ i: Te,
1067
+ o: Te,
1068
+ d(n) {
1069
+ n && Ul(e);
1070
+ }
1071
+ };
1072
+ }
1073
+ class Kl extends jl {
1074
+ constructor(e) {
1075
+ super(), Ol(this, e, null, Gl, Wl, {});
1076
+ }
1077
+ }
1078
+ const {
1079
+ SvelteComponent: Jl,
1080
+ append: Ql,
1081
+ attr: oe,
1082
+ detach: xl,
1083
+ init: $l,
1084
+ insert: ei,
1085
+ noop: Pe,
1086
+ safe_not_equal: ti,
1087
+ svg_element: kt
1088
+ } = window.__gradio__svelte__internal;
1089
+ function ni(l) {
1090
+ let e, t;
1091
+ return {
1092
+ c() {
1093
+ e = kt("svg"), t = kt("path"), oe(t, "fill", "currentColor"), oe(t, "d", "M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"), oe(e, "xmlns", "http://www.w3.org/2000/svg"), oe(e, "width", "100%"), oe(e, "height", "100%"), oe(e, "viewBox", "0 0 32 32");
1094
+ },
1095
+ m(n, i) {
1096
+ ei(n, e, i), Ql(e, t);
1097
+ },
1098
+ p: Pe,
1099
+ i: Pe,
1100
+ o: Pe,
1101
+ d(n) {
1102
+ n && xl(e);
1103
+ }
1104
+ };
1105
+ }
1106
+ class li extends Jl {
1107
+ constructor(e) {
1108
+ super(), $l(this, e, null, ni, ti, {});
1109
+ }
1110
+ }
1111
+ const {
1112
+ SvelteComponent: ii,
1113
+ append: Ne,
1114
+ attr: L,
1115
+ detach: si,
1116
+ init: oi,
1117
+ insert: ai,
1118
+ noop: Xe,
1119
+ safe_not_equal: ri,
1120
+ svg_element: Me
1121
+ } = window.__gradio__svelte__internal;
1122
+ function fi(l) {
1123
+ let e, t, n, i;
1124
+ return {
1125
+ c() {
1126
+ e = Me("svg"), t = Me("rect"), n = Me("circle"), i = Me("polyline"), L(t, "x", "3"), L(t, "y", "3"), L(t, "width", "18"), L(t, "height", "18"), L(t, "rx", "2"), L(t, "ry", "2"), L(n, "cx", "8.5"), L(n, "cy", "8.5"), L(n, "r", "1.5"), L(i, "points", "21 15 16 10 5 21"), L(e, "xmlns", "http://www.w3.org/2000/svg"), L(e, "width", "100%"), L(e, "height", "100%"), L(e, "viewBox", "0 0 24 24"), L(e, "fill", "none"), L(e, "stroke", "currentColor"), L(e, "stroke-width", "1.5"), L(e, "stroke-linecap", "round"), L(e, "stroke-linejoin", "round"), L(e, "class", "feather feather-image");
1127
+ },
1128
+ m(s, o) {
1129
+ ai(s, e, o), Ne(e, t), Ne(e, n), Ne(e, i);
1130
+ },
1131
+ p: Xe,
1132
+ i: Xe,
1133
+ o: Xe,
1134
+ d(s) {
1135
+ s && si(e);
1136
+ }
1137
+ };
1138
+ }
1139
+ let un = class extends ii {
1140
+ constructor(e) {
1141
+ super(), oi(this, e, null, fi, ri, {});
1142
+ }
1143
+ };
1144
+ const {
1145
+ SvelteComponent: _i,
1146
+ create_component: ci,
1147
+ destroy_component: ui,
1148
+ init: di,
1149
+ mount_component: mi,
1150
+ safe_not_equal: hi,
1151
+ transition_in: gi,
1152
+ transition_out: bi
1153
+ } = window.__gradio__svelte__internal, { createEventDispatcher: wi } = window.__gradio__svelte__internal;
1154
+ function pi(l) {
1155
+ let e, t;
1156
+ return e = new cn({
1157
+ props: {
1158
+ Icon: Kl,
1159
+ label: (
1160
+ /*i18n*/
1161
+ l[2]("common.share")
1162
+ ),
1163
+ pending: (
1164
+ /*pending*/
1165
+ l[3]
1166
+ )
1167
+ }
1168
+ }), e.$on(
1169
+ "click",
1170
+ /*click_handler*/
1171
+ l[5]
1172
+ ), {
1173
+ c() {
1174
+ ci(e.$$.fragment);
1175
+ },
1176
+ m(n, i) {
1177
+ mi(e, n, i), t = !0;
1178
+ },
1179
+ p(n, [i]) {
1180
+ const s = {};
1181
+ i & /*i18n*/
1182
+ 4 && (s.label = /*i18n*/
1183
+ n[2]("common.share")), i & /*pending*/
1184
+ 8 && (s.pending = /*pending*/
1185
+ n[3]), e.$set(s);
1186
+ },
1187
+ i(n) {
1188
+ t || (gi(e.$$.fragment, n), t = !0);
1189
+ },
1190
+ o(n) {
1191
+ bi(e.$$.fragment, n), t = !1;
1192
+ },
1193
+ d(n) {
1194
+ ui(e, n);
1195
+ }
1196
+ };
1197
+ }
1198
+ function vi(l, e, t) {
1199
+ const n = wi();
1200
+ let { formatter: i } = e, { value: s } = e, { i18n: o } = e, a = !1;
1201
+ const r = async () => {
1202
+ try {
1203
+ t(3, a = !0);
1204
+ const f = await i(s);
1205
+ n("share", { description: f });
1206
+ } catch (f) {
1207
+ console.error(f);
1208
+ let _ = f instanceof Ae ? f.message : "Share failed.";
1209
+ n("error", _);
1210
+ } finally {
1211
+ t(3, a = !1);
1212
+ }
1213
+ };
1214
+ return l.$$set = (f) => {
1215
+ "formatter" in f && t(0, i = f.formatter), "value" in f && t(1, s = f.value), "i18n" in f && t(2, o = f.i18n);
1216
+ }, [i, s, o, a, n, r];
1217
+ }
1218
+ class ki extends _i {
1219
+ constructor(e) {
1220
+ super(), di(this, e, vi, pi, hi, { formatter: 0, value: 1, i18n: 2 });
1221
+ }
1222
+ }
1223
+ const yi = (l) => {
1224
+ let e = l.currentTarget;
1225
+ const t = e.getBoundingClientRect(), n = e.naturalWidth / t.width, i = e.naturalHeight / t.height;
1226
+ if (n > i) {
1227
+ const a = e.naturalHeight / n, r = (t.height - a) / 2;
1228
+ var s = Math.round((l.clientX - t.left) * n), o = Math.round((l.clientY - t.top - r) * n);
1229
+ } else {
1230
+ const a = e.naturalWidth / i, r = (t.width - a) / 2;
1231
+ var s = Math.round((l.clientX - t.left - r) * i), o = Math.round((l.clientY - t.top) * i);
1232
+ }
1233
+ return s < 0 || s >= e.naturalWidth || o < 0 || o >= e.naturalHeight ? null : [s, o];
1234
+ };
1235
+ new Intl.Collator(0, { numeric: 1 }).compare;
1236
+ function dn(l, e, t) {
1237
+ if (l == null)
1238
+ return null;
1239
+ if (Array.isArray(l)) {
1240
+ const n = [];
1241
+ for (const i of l)
1242
+ i == null ? n.push(null) : n.push(dn(i, e, t));
1243
+ return n;
1244
+ }
1245
+ return l.is_stream ? t == null ? new Be({
1246
+ ...l,
1247
+ url: e + "/stream/" + l.path
1248
+ }) : new Be({
1249
+ ...l,
1250
+ url: "/proxy=" + t + "stream/" + l.path
1251
+ }) : new Be({
1252
+ ...l,
1253
+ url: qi(l.path, e, t)
1254
+ });
1255
+ }
1256
+ function Ci(l) {
1257
+ try {
1258
+ const e = new URL(l);
1259
+ return e.protocol === "http:" || e.protocol === "https:";
1260
+ } catch {
1261
+ return !1;
1262
+ }
1263
+ }
1264
+ function qi(l, e, t) {
1265
+ return l == null ? t ? `/proxy=${t}file=` : `${e}/file=` : Ci(l) ? l : t ? `/proxy=${t}file=${l}` : `${e}/file=${l}`;
1266
+ }
1267
+ class Be {
1268
+ constructor({
1269
+ path: e,
1270
+ url: t,
1271
+ orig_name: n,
1272
+ size: i,
1273
+ blob: s,
1274
+ is_stream: o,
1275
+ mime_type: a,
1276
+ alt_text: r
1277
+ }) {
1278
+ this.path = e, this.url = t, this.orig_name = n, this.size = i, this.blob = t ? void 0 : s, this.is_stream = o, this.mime_type = a, this.alt_text = r;
1279
+ }
1280
+ }
1281
+ class Si {
1282
+ constructor({ image: e, blurhash: t, width: n, height: i }) {
1283
+ this.image = e ? new Be(e) : void 0, this.blurhash = t, this.width = n, this.height = i;
1284
+ }
1285
+ }
1286
+ function mn(l, e, t) {
1287
+ if (l == null)
1288
+ return null;
1289
+ if (Array.isArray(l)) {
1290
+ const i = [];
1291
+ for (const s of l)
1292
+ i.push(mn(s, e));
1293
+ return i;
1294
+ }
1295
+ const n = l.image ? dn(l.image, e, null) : null;
1296
+ return new Si({
1297
+ image: n || void 0,
1298
+ blurhash: l.blurhash,
1299
+ width: l.width,
1300
+ height: l.height
1301
+ });
1302
+ }
1303
+ const {
1304
+ SvelteComponent: Mi,
1305
+ binding_callbacks: Ii,
1306
+ create_slot: Li,
1307
+ detach: zi,
1308
+ element: Ai,
1309
+ get_all_dirty_from_scope: Bi,
1310
+ get_slot_changes: Fi,
1311
+ init: Ei,
1312
+ insert: Di,
1313
+ safe_not_equal: Ri,
1314
+ transition_in: Vi,
1315
+ transition_out: Ti,
1316
+ update_slot_base: Pi
1317
+ } = window.__gradio__svelte__internal, { onMount: Ni } = window.__gradio__svelte__internal, Xi = (l) => ({
1318
+ visible: l & /*visible*/
1319
+ 4,
1320
+ hasBeenVisible: l & /*hasBeenVisible*/
1321
+ 2
1322
+ }), yt = (l) => ({
1323
+ visible: (
1324
+ /*visible*/
1325
+ l[2]
1326
+ ),
1327
+ hasBeenVisible: (
1328
+ /*hasBeenVisible*/
1329
+ l[1]
1330
+ )
1331
+ });
1332
+ function Yi(l) {
1333
+ let e, t;
1334
+ const n = (
1335
+ /*#slots*/
1336
+ l[5].default
1337
+ ), i = Li(
1338
+ n,
1339
+ l,
1340
+ /*$$scope*/
1341
+ l[4],
1342
+ yt
1343
+ );
1344
+ return {
1345
+ c() {
1346
+ e = Ai("div"), i && i.c();
1347
+ },
1348
+ m(s, o) {
1349
+ Di(s, e, o), i && i.m(e, null), l[6](e), t = !0;
1350
+ },
1351
+ p(s, [o]) {
1352
+ i && i.p && (!t || o & /*$$scope, visible, hasBeenVisible*/
1353
+ 22) && Pi(
1354
+ i,
1355
+ n,
1356
+ s,
1357
+ /*$$scope*/
1358
+ s[4],
1359
+ t ? Fi(
1360
+ n,
1361
+ /*$$scope*/
1362
+ s[4],
1363
+ o,
1364
+ Xi
1365
+ ) : Bi(
1366
+ /*$$scope*/
1367
+ s[4]
1368
+ ),
1369
+ yt
1370
+ );
1371
+ },
1372
+ i(s) {
1373
+ t || (Vi(i, s), t = !0);
1374
+ },
1375
+ o(s) {
1376
+ Ti(i, s), t = !1;
1377
+ },
1378
+ d(s) {
1379
+ s && zi(e), i && i.d(s), l[6](null);
1380
+ }
1381
+ };
1382
+ }
1383
+ let ji = "0px 0px 200px 0px";
1384
+ function Zi(l, e, t) {
1385
+ let { $$slots: n = {}, $$scope: i } = e, s = null, o = !1, a = !1, r = null;
1386
+ Ni(() => (t(3, r = new IntersectionObserver(
1387
+ (_) => {
1388
+ t(2, o = _[0].isIntersecting), t(1, a = a || o);
1389
+ },
1390
+ { rootMargin: ji }
1391
+ )), r.observe(s), () => {
1392
+ a || r.unobserve(s);
1393
+ }));
1394
+ function f(_) {
1395
+ Ii[_ ? "unshift" : "push"](() => {
1396
+ s = _, t(0, s);
1397
+ });
1398
+ }
1399
+ return l.$$set = (_) => {
1400
+ "$$scope" in _ && t(4, i = _.$$scope);
1401
+ }, l.$$.update = () => {
1402
+ l.$$.dirty & /*hasBeenVisible, observer, el*/
1403
+ 11 && a && r.unobserve(s);
1404
+ }, [s, a, o, r, i, n, f];
1405
+ }
1406
+ class Ui extends Mi {
1407
+ constructor(e) {
1408
+ super(), Ei(this, e, Zi, Yi, Ri, {});
1409
+ }
1410
+ }
1411
+ const Oi = [
1412
+ "0",
1413
+ "1",
1414
+ "2",
1415
+ "3",
1416
+ "4",
1417
+ "5",
1418
+ "6",
1419
+ "7",
1420
+ "8",
1421
+ "9",
1422
+ "A",
1423
+ "B",
1424
+ "C",
1425
+ "D",
1426
+ "E",
1427
+ "F",
1428
+ "G",
1429
+ "H",
1430
+ "I",
1431
+ "J",
1432
+ "K",
1433
+ "L",
1434
+ "M",
1435
+ "N",
1436
+ "O",
1437
+ "P",
1438
+ "Q",
1439
+ "R",
1440
+ "S",
1441
+ "T",
1442
+ "U",
1443
+ "V",
1444
+ "W",
1445
+ "X",
1446
+ "Y",
1447
+ "Z",
1448
+ "a",
1449
+ "b",
1450
+ "c",
1451
+ "d",
1452
+ "e",
1453
+ "f",
1454
+ "g",
1455
+ "h",
1456
+ "i",
1457
+ "j",
1458
+ "k",
1459
+ "l",
1460
+ "m",
1461
+ "n",
1462
+ "o",
1463
+ "p",
1464
+ "q",
1465
+ "r",
1466
+ "s",
1467
+ "t",
1468
+ "u",
1469
+ "v",
1470
+ "w",
1471
+ "x",
1472
+ "y",
1473
+ "z",
1474
+ "#",
1475
+ "$",
1476
+ "%",
1477
+ "*",
1478
+ "+",
1479
+ ",",
1480
+ "-",
1481
+ ".",
1482
+ ":",
1483
+ ";",
1484
+ "=",
1485
+ "?",
1486
+ "@",
1487
+ "[",
1488
+ "]",
1489
+ "^",
1490
+ "_",
1491
+ "{",
1492
+ "|",
1493
+ "}",
1494
+ "~"
1495
+ ], Ce = (l) => {
1496
+ let e = 0;
1497
+ for (let t = 0; t < l.length; t++) {
1498
+ const n = l[t], i = Oi.indexOf(n);
1499
+ e = e * 83 + i;
1500
+ }
1501
+ return e;
1502
+ }, Ye = (l) => {
1503
+ let e = l / 255;
1504
+ return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
1505
+ }, je = (l) => {
1506
+ let e = Math.max(0, Math.min(1, l));
1507
+ return e <= 31308e-7 ? Math.round(e * 12.92 * 255 + 0.5) : Math.round((1.055 * Math.pow(e, 1 / 2.4) - 0.055) * 255 + 0.5);
1508
+ }, Hi = (l) => l < 0 ? -1 : 1, Ze = (l, e) => Hi(l) * Math.pow(Math.abs(l), e);
1509
+ class Ct extends Error {
1510
+ constructor(e) {
1511
+ super(e), this.name = "ValidationError", this.message = e;
1512
+ }
1513
+ }
1514
+ const Wi = (l) => {
1515
+ if (!l || l.length < 6)
1516
+ throw new Ct("The blurhash string must be at least 6 characters");
1517
+ const e = Ce(l[0]), t = Math.floor(e / 9) + 1, n = e % 9 + 1;
1518
+ if (l.length !== 4 + 2 * n * t)
1519
+ throw new Ct(`blurhash length mismatch: length is ${l.length} but it should be ${4 + 2 * n * t}`);
1520
+ }, Gi = (l) => {
1521
+ const e = l >> 16, t = l >> 8 & 255, n = l & 255;
1522
+ return [Ye(e), Ye(t), Ye(n)];
1523
+ }, Ki = (l, e) => {
1524
+ const t = Math.floor(l / 361), n = Math.floor(l / 19) % 19, i = l % 19;
1525
+ return [
1526
+ Ze((t - 9) / 9, 2) * e,
1527
+ Ze((n - 9) / 9, 2) * e,
1528
+ Ze((i - 9) / 9, 2) * e
1529
+ ];
1530
+ }, Ji = (l, e, t, n) => {
1531
+ Wi(l), n = n | 1;
1532
+ const i = Ce(l[0]), s = Math.floor(i / 9) + 1, o = i % 9 + 1, r = (Ce(l[1]) + 1) / 166, f = new Array(o * s);
1533
+ for (let u = 0; u < f.length; u++)
1534
+ if (u === 0) {
1535
+ const d = Ce(l.substring(2, 6));
1536
+ f[u] = Gi(d);
1537
+ } else {
1538
+ const d = Ce(l.substring(4 + u * 2, 6 + u * 2));
1539
+ f[u] = Ki(d, r * n);
1540
+ }
1541
+ const _ = e * 4, c = new Uint8ClampedArray(_ * t);
1542
+ for (let u = 0; u < t; u++)
1543
+ for (let d = 0; d < e; d++) {
1544
+ let g = 0, p = 0, C = 0;
1545
+ for (let y = 0; y < s; y++)
1546
+ for (let w = 0; w < o; w++) {
1547
+ const Z = Math.cos(Math.PI * d * w / e) * Math.cos(Math.PI * u * y / t);
1548
+ let V = f[w + y * o];
1549
+ g += V[0] * Z, p += V[1] * Z, C += V[2] * Z;
1550
+ }
1551
+ let I = je(g), S = je(p), m = je(C);
1552
+ c[4 * d + 0 + u * _] = I, c[4 * d + 1 + u * _] = S, c[4 * d + 2 + u * _] = m, c[4 * d + 3 + u * _] = 255;
1553
+ }
1554
+ return c;
1555
+ }, Qi = Ji, {
1556
+ SvelteComponent: xi,
1557
+ append: $i,
1558
+ attr: Ie,
1559
+ binding_callbacks: es,
1560
+ detach: ts,
1561
+ element: qt,
1562
+ init: ns,
1563
+ insert: ls,
1564
+ noop: St,
1565
+ safe_not_equal: is,
1566
+ set_style: ae
1567
+ } = window.__gradio__svelte__internal, { onMount: ss } = window.__gradio__svelte__internal;
1568
+ function os(l) {
1569
+ let e, t;
1570
+ return {
1571
+ c() {
1572
+ e = qt("div"), t = qt("canvas"), Ie(
1573
+ t,
1574
+ "width",
1575
+ /*resolutionX*/
1576
+ l[2]
1577
+ ), Ie(
1578
+ t,
1579
+ "height",
1580
+ /*resolutionY*/
1581
+ l[3]
1582
+ ), ae(t, "width", "100%"), ae(t, "height", "100%"), ae(
1583
+ e,
1584
+ "width",
1585
+ /*width*/
1586
+ l[0] + "px"
1587
+ ), ae(
1588
+ e,
1589
+ "height",
1590
+ /*height*/
1591
+ l[1] + "px"
1592
+ );
1593
+ },
1594
+ m(n, i) {
1595
+ ls(n, e, i), $i(e, t), l[7](t);
1596
+ },
1597
+ p(n, [i]) {
1598
+ i & /*resolutionX*/
1599
+ 4 && Ie(
1600
+ t,
1601
+ "width",
1602
+ /*resolutionX*/
1603
+ n[2]
1604
+ ), i & /*resolutionY*/
1605
+ 8 && Ie(
1606
+ t,
1607
+ "height",
1608
+ /*resolutionY*/
1609
+ n[3]
1610
+ ), i & /*width*/
1611
+ 1 && ae(
1612
+ e,
1613
+ "width",
1614
+ /*width*/
1615
+ n[0] + "px"
1616
+ ), i & /*height*/
1617
+ 2 && ae(
1618
+ e,
1619
+ "height",
1620
+ /*height*/
1621
+ n[1] + "px"
1622
+ );
1623
+ },
1624
+ i: St,
1625
+ o: St,
1626
+ d(n) {
1627
+ n && ts(e), l[7](null);
1628
+ }
1629
+ };
1630
+ }
1631
+ function as(l, e, t) {
1632
+ let { hash: n } = e, { width: i = 100 } = e, { height: s = 100 } = e, { resolutionX: o = 16 } = e, { resolutionY: a = 16 } = e, { punch: r = 1 } = e, f;
1633
+ ss(() => {
1634
+ if (n && f) {
1635
+ const c = Qi(n, o, a, r), u = f.getContext("2d"), d = u.createImageData(o, a);
1636
+ d.data.set(c), u.putImageData(d, 0, 0);
1637
+ }
1638
+ });
1639
+ function _(c) {
1640
+ es[c ? "unshift" : "push"](() => {
1641
+ f = c, t(4, f);
1642
+ });
1643
+ }
1644
+ return l.$$set = (c) => {
1645
+ "hash" in c && t(5, n = c.hash), "width" in c && t(0, i = c.width), "height" in c && t(1, s = c.height), "resolutionX" in c && t(2, o = c.resolutionX), "resolutionY" in c && t(3, a = c.resolutionY), "punch" in c && t(6, r = c.punch);
1646
+ }, [i, s, o, a, f, n, r, _];
1647
+ }
1648
+ class rs extends xi {
1649
+ constructor(e) {
1650
+ super(), ns(this, e, as, os, is, {
1651
+ hash: 5,
1652
+ width: 0,
1653
+ height: 1,
1654
+ resolutionX: 2,
1655
+ resolutionY: 3,
1656
+ punch: 6
1657
+ });
1658
+ }
1659
+ }
1660
+ const {
1661
+ SvelteComponent: fs,
1662
+ attr: X,
1663
+ binding_callbacks: _s,
1664
+ detach: cs,
1665
+ element: us,
1666
+ init: ds,
1667
+ insert: ms,
1668
+ noop: Mt,
1669
+ safe_not_equal: hs,
1670
+ set_style: re,
1671
+ src_url_equal: It
1672
+ } = window.__gradio__svelte__internal, { onMount: gs, createEventDispatcher: bs } = window.__gradio__svelte__internal;
1673
+ function ws(l) {
1674
+ let e, t;
1675
+ return {
1676
+ c() {
1677
+ e = us("img"), It(e.src, t = /*src*/
1678
+ l[0]) || X(e, "src", t), X(
1679
+ e,
1680
+ "alt",
1681
+ /*alt*/
1682
+ l[1]
1683
+ ), X(
1684
+ e,
1685
+ "width",
1686
+ /*width*/
1687
+ l[2]
1688
+ ), X(
1689
+ e,
1690
+ "height",
1691
+ /*height*/
1692
+ l[3]
1693
+ ), re(e, "position", "absolute"), re(e, "top", "0"), re(e, "left", "0"), re(e, "opacity", "0"), re(e, "transition", "opacity " + /*fadeDuration*/
1694
+ l[4] + "ms"), X(e, "loading", "lazy"), X(e, "decoding", "async");
1695
+ },
1696
+ m(n, i) {
1697
+ ms(n, e, i), l[6](e);
1698
+ },
1699
+ p(n, [i]) {
1700
+ i & /*src*/
1701
+ 1 && !It(e.src, t = /*src*/
1702
+ n[0]) && X(e, "src", t), i & /*alt*/
1703
+ 2 && X(
1704
+ e,
1705
+ "alt",
1706
+ /*alt*/
1707
+ n[1]
1708
+ ), i & /*width*/
1709
+ 4 && X(
1710
+ e,
1711
+ "width",
1712
+ /*width*/
1713
+ n[2]
1714
+ ), i & /*height*/
1715
+ 8 && X(
1716
+ e,
1717
+ "height",
1718
+ /*height*/
1719
+ n[3]
1720
+ ), i & /*fadeDuration*/
1721
+ 16 && re(e, "transition", "opacity " + /*fadeDuration*/
1722
+ n[4] + "ms");
1723
+ },
1724
+ i: Mt,
1725
+ o: Mt,
1726
+ d(n) {
1727
+ n && cs(e), l[6](null);
1728
+ }
1729
+ };
1730
+ }
1731
+ function ps(l, e, t) {
1732
+ const n = bs();
1733
+ let { src: i } = e, { alt: s } = e, { width: o } = e, { height: a } = e, { fadeDuration: r = 500 } = e, f;
1734
+ gs(() => {
1735
+ t(
1736
+ 5,
1737
+ f.onload = () => {
1738
+ t(5, f.style.opacity = 1, f), n("imageLoaded", { fadeDuration: r });
1739
+ },
1740
+ f
1741
+ );
1742
+ });
1743
+ function _(c) {
1744
+ _s[c ? "unshift" : "push"](() => {
1745
+ f = c, t(5, f);
1746
+ });
1747
+ }
1748
+ return l.$$set = (c) => {
1749
+ "src" in c && t(0, i = c.src), "alt" in c && t(1, s = c.alt), "width" in c && t(2, o = c.width), "height" in c && t(3, a = c.height), "fadeDuration" in c && t(4, r = c.fadeDuration);
1750
+ }, [i, s, o, a, r, f, _];
1751
+ }
1752
+ let vs = class extends fs {
1753
+ constructor(e) {
1754
+ super(), ds(this, e, ps, ws, hs, {
1755
+ src: 0,
1756
+ alt: 1,
1757
+ width: 2,
1758
+ height: 3,
1759
+ fadeDuration: 4
1760
+ });
1761
+ }
1762
+ };
1763
+ const {
1764
+ SvelteComponent: ks,
1765
+ append: ys,
1766
+ check_outros: hn,
1767
+ create_component: it,
1768
+ destroy_component: st,
1769
+ detach: ot,
1770
+ element: gn,
1771
+ empty: Cs,
1772
+ group_outros: bn,
1773
+ init: qs,
1774
+ insert: at,
1775
+ mount_component: rt,
1776
+ noop: Lt,
1777
+ safe_not_equal: Ss,
1778
+ set_style: qe,
1779
+ space: Ms,
1780
+ transition_in: ee,
1781
+ transition_out: se
1782
+ } = window.__gradio__svelte__internal;
1783
+ function zt(l) {
1784
+ let e, t, n, i, s, o;
1785
+ const a = [Ls, Is], r = [];
1786
+ function f(_, c) {
1787
+ return (
1788
+ /*isFadeIn*/
1789
+ _[6] ? 1 : 0
1790
+ );
1791
+ }
1792
+ return t = f(l), n = r[t] = a[t](l), s = new vs({
1793
+ props: {
1794
+ src: (
1795
+ /*src*/
1796
+ l[0]
1797
+ ),
1798
+ alt: (
1799
+ /*alt*/
1800
+ l[4]
1801
+ ),
1802
+ width: (
1803
+ /*width*/
1804
+ l[2]
1805
+ ),
1806
+ height: (
1807
+ /*height*/
1808
+ l[3]
1809
+ ),
1810
+ fadeDuration: (
1811
+ /*fadeDuration*/
1812
+ l[5]
1813
+ )
1814
+ }
1815
+ }), s.$on(
1816
+ "imageLoaded",
1817
+ /*onImageLoaded*/
1818
+ l[7]
1819
+ ), {
1820
+ c() {
1821
+ e = gn("div"), n.c(), i = Ms(), it(s.$$.fragment), qe(e, "position", "relative");
1822
+ },
1823
+ m(_, c) {
1824
+ at(_, e, c), r[t].m(e, null), ys(e, i), rt(s, e, null), o = !0;
1825
+ },
1826
+ p(_, c) {
1827
+ let u = t;
1828
+ t = f(_), t === u ? r[t].p(_, c) : (bn(), se(r[u], 1, 1, () => {
1829
+ r[u] = null;
1830
+ }), hn(), n = r[t], n ? n.p(_, c) : (n = r[t] = a[t](_), n.c()), ee(n, 1), n.m(e, i));
1831
+ const d = {};
1832
+ c & /*src*/
1833
+ 1 && (d.src = /*src*/
1834
+ _[0]), c & /*alt*/
1835
+ 16 && (d.alt = /*alt*/
1836
+ _[4]), c & /*width*/
1837
+ 4 && (d.width = /*width*/
1838
+ _[2]), c & /*height*/
1839
+ 8 && (d.height = /*height*/
1840
+ _[3]), c & /*fadeDuration*/
1841
+ 32 && (d.fadeDuration = /*fadeDuration*/
1842
+ _[5]), s.$set(d);
1843
+ },
1844
+ i(_) {
1845
+ o || (ee(n), ee(s.$$.fragment, _), o = !0);
1846
+ },
1847
+ o(_) {
1848
+ se(n), se(s.$$.fragment, _), o = !1;
1849
+ },
1850
+ d(_) {
1851
+ _ && ot(e), r[t].d(), st(s);
1852
+ }
1853
+ };
1854
+ }
1855
+ function Is(l) {
1856
+ let e;
1857
+ return {
1858
+ c() {
1859
+ e = gn("div"), qe(
1860
+ e,
1861
+ "width",
1862
+ /*width*/
1863
+ l[2] + "px"
1864
+ ), qe(
1865
+ e,
1866
+ "height",
1867
+ /*height*/
1868
+ l[3] + "px"
1869
+ );
1870
+ },
1871
+ m(t, n) {
1872
+ at(t, e, n);
1873
+ },
1874
+ p(t, n) {
1875
+ n & /*width*/
1876
+ 4 && qe(
1877
+ e,
1878
+ "width",
1879
+ /*width*/
1880
+ t[2] + "px"
1881
+ ), n & /*height*/
1882
+ 8 && qe(
1883
+ e,
1884
+ "height",
1885
+ /*height*/
1886
+ t[3] + "px"
1887
+ );
1888
+ },
1889
+ i: Lt,
1890
+ o: Lt,
1891
+ d(t) {
1892
+ t && ot(e);
1893
+ }
1894
+ };
1895
+ }
1896
+ function Ls(l) {
1897
+ let e, t;
1898
+ return e = new rs({
1899
+ props: {
1900
+ hash: (
1901
+ /*hash*/
1902
+ l[1]
1903
+ ),
1904
+ width: (
1905
+ /*width*/
1906
+ l[2]
1907
+ ),
1908
+ height: (
1909
+ /*height*/
1910
+ l[3]
1911
+ )
1912
+ }
1913
+ }), {
1914
+ c() {
1915
+ it(e.$$.fragment);
1916
+ },
1917
+ m(n, i) {
1918
+ rt(e, n, i), t = !0;
1919
+ },
1920
+ p(n, i) {
1921
+ const s = {};
1922
+ i & /*hash*/
1923
+ 2 && (s.hash = /*hash*/
1924
+ n[1]), i & /*width*/
1925
+ 4 && (s.width = /*width*/
1926
+ n[2]), i & /*height*/
1927
+ 8 && (s.height = /*height*/
1928
+ n[3]), e.$set(s);
1929
+ },
1930
+ i(n) {
1931
+ t || (ee(e.$$.fragment, n), t = !0);
1932
+ },
1933
+ o(n) {
1934
+ se(e.$$.fragment, n), t = !1;
1935
+ },
1936
+ d(n) {
1937
+ st(e, n);
1938
+ }
1939
+ };
1940
+ }
1941
+ function zs(l) {
1942
+ let e, t, n = (
1943
+ /*hasBeenVisible*/
1944
+ l[9] && zt(l)
1945
+ );
1946
+ return {
1947
+ c() {
1948
+ n && n.c(), e = Cs();
1949
+ },
1950
+ m(i, s) {
1951
+ n && n.m(i, s), at(i, e, s), t = !0;
1952
+ },
1953
+ p(i, s) {
1954
+ /*hasBeenVisible*/
1955
+ i[9] ? n ? (n.p(i, s), s & /*hasBeenVisible*/
1956
+ 512 && ee(n, 1)) : (n = zt(i), n.c(), ee(n, 1), n.m(e.parentNode, e)) : n && (bn(), se(n, 1, 1, () => {
1957
+ n = null;
1958
+ }), hn());
1959
+ },
1960
+ i(i) {
1961
+ t || (ee(n), t = !0);
1962
+ },
1963
+ o(i) {
1964
+ se(n), t = !1;
1965
+ },
1966
+ d(i) {
1967
+ i && ot(e), n && n.d(i);
1968
+ }
1969
+ };
1970
+ }
1971
+ function As(l) {
1972
+ let e, t;
1973
+ return e = new Ui({
1974
+ props: {
1975
+ $$slots: {
1976
+ default: [
1977
+ zs,
1978
+ ({ hasBeenVisible: n }) => ({ 9: n }),
1979
+ ({ hasBeenVisible: n }) => n ? 512 : 0
1980
+ ]
1981
+ },
1982
+ $$scope: { ctx: l }
1983
+ }
1984
+ }), {
1985
+ c() {
1986
+ it(e.$$.fragment);
1987
+ },
1988
+ m(n, i) {
1989
+ rt(e, n, i), t = !0;
1990
+ },
1991
+ p(n, [i]) {
1992
+ const s = {};
1993
+ i & /*$$scope, src, alt, width, height, fadeDuration, hash, isFadeIn, hasBeenVisible*/
1994
+ 1663 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s);
1995
+ },
1996
+ i(n) {
1997
+ t || (ee(e.$$.fragment, n), t = !0);
1998
+ },
1999
+ o(n) {
2000
+ se(e.$$.fragment, n), t = !1;
2001
+ },
2002
+ d(n) {
2003
+ st(e, n);
2004
+ }
2005
+ };
2006
+ }
2007
+ function Bs(l, e, t) {
2008
+ let { src: n = "#" } = e, { hash: i } = e, { width: s } = e, { height: o } = e, { alt: a = "" } = e, { fadeDuration: r = 500 } = e, f = !1;
2009
+ function _(u) {
2010
+ setTimeout(c, u.detail.fadeDuration + 100);
2011
+ }
2012
+ function c() {
2013
+ t(6, f = !0);
2014
+ }
2015
+ return l.$$set = (u) => {
2016
+ "src" in u && t(0, n = u.src), "hash" in u && t(1, i = u.hash), "width" in u && t(2, s = u.width), "height" in u && t(3, o = u.height), "alt" in u && t(4, a = u.alt), "fadeDuration" in u && t(5, r = u.fadeDuration);
2017
+ }, [n, i, s, o, a, r, f, _];
2018
+ }
2019
+ class Fs extends ks {
2020
+ constructor(e) {
2021
+ super(), qs(this, e, Bs, As, Ss, {
2022
+ src: 0,
2023
+ hash: 1,
2024
+ width: 2,
2025
+ height: 3,
2026
+ alt: 4,
2027
+ fadeDuration: 5
2028
+ });
2029
+ }
2030
+ }
2031
+ const {
2032
+ SvelteComponent: Es,
2033
+ append: At,
2034
+ attr: le,
2035
+ bubble: Bt,
2036
+ check_outros: We,
2037
+ create_component: we,
2038
+ destroy_component: pe,
2039
+ detach: de,
2040
+ element: Fe,
2041
+ empty: Ds,
2042
+ group_outros: Ge,
2043
+ init: Rs,
2044
+ insert: me,
2045
+ listen: Vs,
2046
+ mount_component: ve,
2047
+ safe_not_equal: Ts,
2048
+ space: Ke,
2049
+ transition_in: B,
2050
+ transition_out: D
2051
+ } = window.__gradio__svelte__internal, { createEventDispatcher: Ps } = window.__gradio__svelte__internal;
2052
+ function Ns(l) {
2053
+ let e, t, n, i, s, o, a, r, f, _ = (
2054
+ /*show_download_button*/
2055
+ l[3] && Ft(l)
2056
+ ), c = (
2057
+ /*show_share_button*/
2058
+ l[4] && Et(l)
2059
+ );
2060
+ return o = new Fs({
2061
+ props: {
2062
+ src: (
2063
+ /*value*/
2064
+ l[0].image.url
2065
+ ),
2066
+ hash: (
2067
+ /*value*/
2068
+ l[0].blurhash
2069
+ ),
2070
+ width: (
2071
+ /*value*/
2072
+ l[0].width
2073
+ ),
2074
+ height: (
2075
+ /*value*/
2076
+ l[0].height
2077
+ )
2078
+ }
2079
+ }), {
2080
+ c() {
2081
+ e = Fe("div"), _ && _.c(), t = Ke(), c && c.c(), n = Ke(), i = Fe("button"), s = Fe("div"), we(o.$$.fragment), le(e, "class", "icon-buttons svelte-fz4vky"), le(s, "class", "image-wrapper svelte-fz4vky"), le(i, "class", "selectable svelte-fz4vky");
2082
+ },
2083
+ m(u, d) {
2084
+ me(u, e, d), _ && _.m(e, null), At(e, t), c && c.m(e, null), me(u, n, d), me(u, i, d), At(i, s), ve(o, s, null), a = !0, r || (f = Vs(
2085
+ i,
2086
+ "click",
2087
+ /*handle_click*/
2088
+ l[6]
2089
+ ), r = !0);
2090
+ },
2091
+ p(u, d) {
2092
+ /*show_download_button*/
2093
+ u[3] ? _ ? (_.p(u, d), d & /*show_download_button*/
2094
+ 8 && B(_, 1)) : (_ = Ft(u), _.c(), B(_, 1), _.m(e, t)) : _ && (Ge(), D(_, 1, 1, () => {
2095
+ _ = null;
2096
+ }), We()), /*show_share_button*/
2097
+ u[4] ? c ? (c.p(u, d), d & /*show_share_button*/
2098
+ 16 && B(c, 1)) : (c = Et(u), c.c(), B(c, 1), c.m(e, null)) : c && (Ge(), D(c, 1, 1, () => {
2099
+ c = null;
2100
+ }), We());
2101
+ const g = {};
2102
+ d & /*value*/
2103
+ 1 && (g.src = /*value*/
2104
+ u[0].image.url), d & /*value*/
2105
+ 1 && (g.hash = /*value*/
2106
+ u[0].blurhash), d & /*value*/
2107
+ 1 && (g.width = /*value*/
2108
+ u[0].width), d & /*value*/
2109
+ 1 && (g.height = /*value*/
2110
+ u[0].height), o.$set(g);
2111
+ },
2112
+ i(u) {
2113
+ a || (B(_), B(c), B(o.$$.fragment, u), a = !0);
2114
+ },
2115
+ o(u) {
2116
+ D(_), D(c), D(o.$$.fragment, u), a = !1;
2117
+ },
2118
+ d(u) {
2119
+ u && (de(e), de(n), de(i)), _ && _.d(), c && c.d(), pe(o), r = !1, f();
2120
+ }
2121
+ };
2122
+ }
2123
+ function Xs(l) {
2124
+ let e, t;
2125
+ return e = new Yl({
2126
+ props: {
2127
+ unpadded_box: !0,
2128
+ size: "large",
2129
+ $$slots: { default: [Ys] },
2130
+ $$scope: { ctx: l }
2131
+ }
2132
+ }), {
2133
+ c() {
2134
+ we(e.$$.fragment);
2135
+ },
2136
+ m(n, i) {
2137
+ ve(e, n, i), t = !0;
2138
+ },
2139
+ p(n, i) {
2140
+ const s = {};
2141
+ i & /*$$scope*/
2142
+ 4096 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s);
2143
+ },
2144
+ i(n) {
2145
+ t || (B(e.$$.fragment, n), t = !0);
2146
+ },
2147
+ o(n) {
2148
+ D(e.$$.fragment, n), t = !1;
2149
+ },
2150
+ d(n) {
2151
+ pe(e, n);
2152
+ }
2153
+ };
2154
+ }
2155
+ function Ft(l) {
2156
+ let e, t, n, i;
2157
+ return t = new cn({
2158
+ props: {
2159
+ Icon: li,
2160
+ label: (
2161
+ /*i18n*/
2162
+ l[5]("common.download")
2163
+ )
2164
+ }
2165
+ }), {
2166
+ c() {
2167
+ e = Fe("a"), we(t.$$.fragment), le(e, "href", n = /*value*/
2168
+ l[0].image.url), le(e, "target", window.__is_colab__ ? "_blank" : null), le(e, "download", "image");
2169
+ },
2170
+ m(s, o) {
2171
+ me(s, e, o), ve(t, e, null), i = !0;
2172
+ },
2173
+ p(s, o) {
2174
+ const a = {};
2175
+ o & /*i18n*/
2176
+ 32 && (a.label = /*i18n*/
2177
+ s[5]("common.download")), t.$set(a), (!i || o & /*value*/
2178
+ 1 && n !== (n = /*value*/
2179
+ s[0].image.url)) && le(e, "href", n);
2180
+ },
2181
+ i(s) {
2182
+ i || (B(t.$$.fragment, s), i = !0);
2183
+ },
2184
+ o(s) {
2185
+ D(t.$$.fragment, s), i = !1;
2186
+ },
2187
+ d(s) {
2188
+ s && de(e), pe(t);
2189
+ }
2190
+ };
2191
+ }
2192
+ function Et(l) {
2193
+ let e, t;
2194
+ return e = new ki({
2195
+ props: {
2196
+ i18n: (
2197
+ /*i18n*/
2198
+ l[5]
2199
+ ),
2200
+ formatter: (
2201
+ /*func*/
2202
+ l[8]
2203
+ ),
2204
+ value: (
2205
+ /*value*/
2206
+ l[0]
2207
+ )
2208
+ }
2209
+ }), e.$on(
2210
+ "share",
2211
+ /*share_handler*/
2212
+ l[9]
2213
+ ), e.$on(
2214
+ "error",
2215
+ /*error_handler*/
2216
+ l[10]
2217
+ ), {
2218
+ c() {
2219
+ we(e.$$.fragment);
2220
+ },
2221
+ m(n, i) {
2222
+ ve(e, n, i), t = !0;
2223
+ },
2224
+ p(n, i) {
2225
+ const s = {};
2226
+ i & /*i18n*/
2227
+ 32 && (s.i18n = /*i18n*/
2228
+ n[5]), i & /*value*/
2229
+ 1 && (s.value = /*value*/
2230
+ n[0]), e.$set(s);
2231
+ },
2232
+ i(n) {
2233
+ t || (B(e.$$.fragment, n), t = !0);
2234
+ },
2235
+ o(n) {
2236
+ D(e.$$.fragment, n), t = !1;
2237
+ },
2238
+ d(n) {
2239
+ pe(e, n);
2240
+ }
2241
+ };
2242
+ }
2243
+ function Ys(l) {
2244
+ let e, t;
2245
+ return e = new un({}), {
2246
+ c() {
2247
+ we(e.$$.fragment);
2248
+ },
2249
+ m(n, i) {
2250
+ ve(e, n, i), t = !0;
2251
+ },
2252
+ i(n) {
2253
+ t || (B(e.$$.fragment, n), t = !0);
2254
+ },
2255
+ o(n) {
2256
+ D(e.$$.fragment, n), t = !1;
2257
+ },
2258
+ d(n) {
2259
+ pe(e, n);
2260
+ }
2261
+ };
2262
+ }
2263
+ function js(l) {
2264
+ let e, t, n, i, s, o;
2265
+ e = new fl({
2266
+ props: {
2267
+ show_label: (
2268
+ /*show_label*/
2269
+ l[2]
2270
+ ),
2271
+ Icon: un,
2272
+ label: (
2273
+ /*label*/
2274
+ l[1] || /*i18n*/
2275
+ l[5]("image.image")
2276
+ )
2277
+ }
2278
+ });
2279
+ const a = [Xs, Ns], r = [];
2280
+ function f(_, c) {
2281
+ return (
2282
+ /*value*/
2283
+ _[0] === null || /*value*/
2284
+ _[0].image === null || !/*value*/
2285
+ _[0].image.url ? 0 : 1
2286
+ );
2287
+ }
2288
+ return n = f(l), i = r[n] = a[n](l), {
2289
+ c() {
2290
+ we(e.$$.fragment), t = Ke(), i.c(), s = Ds();
2291
+ },
2292
+ m(_, c) {
2293
+ ve(e, _, c), me(_, t, c), r[n].m(_, c), me(_, s, c), o = !0;
2294
+ },
2295
+ p(_, [c]) {
2296
+ const u = {};
2297
+ c & /*show_label*/
2298
+ 4 && (u.show_label = /*show_label*/
2299
+ _[2]), c & /*label, i18n*/
2300
+ 34 && (u.label = /*label*/
2301
+ _[1] || /*i18n*/
2302
+ _[5]("image.image")), e.$set(u);
2303
+ let d = n;
2304
+ n = f(_), n === d ? r[n].p(_, c) : (Ge(), D(r[d], 1, 1, () => {
2305
+ r[d] = null;
2306
+ }), We(), i = r[n], i ? i.p(_, c) : (i = r[n] = a[n](_), i.c()), B(i, 1), i.m(s.parentNode, s));
2307
+ },
2308
+ i(_) {
2309
+ o || (B(e.$$.fragment, _), B(i), o = !0);
2310
+ },
2311
+ o(_) {
2312
+ D(e.$$.fragment, _), D(i), o = !1;
2313
+ },
2314
+ d(_) {
2315
+ _ && (de(t), de(s)), pe(e, _), r[n].d(_);
2316
+ }
2317
+ };
2318
+ }
2319
+ function Zs(l, e, t) {
2320
+ let { value: n } = e, { label: i = void 0 } = e, { show_label: s } = e, { show_download_button: o = !0 } = e, { show_share_button: a = !1 } = e, { root: r } = e, { i18n: f } = e;
2321
+ const _ = Ps(), c = (p) => {
2322
+ let C = yi(p);
2323
+ C && _("select", { index: C, value: null });
2324
+ }, u = async (p) => p ? `<img src="${await An(p, "base64")}" />` : "";
2325
+ function d(p) {
2326
+ Bt.call(this, l, p);
2327
+ }
2328
+ function g(p) {
2329
+ Bt.call(this, l, p);
2330
+ }
2331
+ return l.$$set = (p) => {
2332
+ "value" in p && t(0, n = p.value), "label" in p && t(1, i = p.label), "show_label" in p && t(2, s = p.show_label), "show_download_button" in p && t(3, o = p.show_download_button), "show_share_button" in p && t(4, a = p.show_share_button), "root" in p && t(7, r = p.root), "i18n" in p && t(5, f = p.i18n);
2333
+ }, l.$$.update = () => {
2334
+ l.$$.dirty & /*value, root*/
2335
+ 129 && t(0, n = mn(n, r));
2336
+ }, [
2337
+ n,
2338
+ i,
2339
+ s,
2340
+ o,
2341
+ a,
2342
+ f,
2343
+ c,
2344
+ r,
2345
+ u,
2346
+ d,
2347
+ g
2348
+ ];
2349
+ }
2350
+ class Us extends Es {
2351
+ constructor(e) {
2352
+ super(), Rs(this, e, Zs, js, Ts, {
2353
+ value: 0,
2354
+ label: 1,
2355
+ show_label: 2,
2356
+ show_download_button: 3,
2357
+ show_share_button: 4,
2358
+ root: 7,
2359
+ i18n: 5
2360
+ });
2361
+ }
2362
+ }
2363
+ function ce(l) {
2364
+ let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0;
2365
+ for (; l > 1e3 && t < e.length - 1; )
2366
+ l /= 1e3, t++;
2367
+ let n = e[t];
2368
+ return (Number.isInteger(l) ? l : l.toFixed(1)) + n;
2369
+ }
2370
+ function Ee() {
2371
+ }
2372
+ function Os(l, e) {
2373
+ return l != l ? e == e : l !== e || l && typeof l == "object" || typeof l == "function";
2374
+ }
2375
+ const wn = typeof window < "u";
2376
+ let Dt = wn ? () => window.performance.now() : () => Date.now(), pn = wn ? (l) => requestAnimationFrame(l) : Ee;
2377
+ const he = /* @__PURE__ */ new Set();
2378
+ function vn(l) {
2379
+ he.forEach((e) => {
2380
+ e.c(l) || (he.delete(e), e.f());
2381
+ }), he.size !== 0 && pn(vn);
2382
+ }
2383
+ function Hs(l) {
2384
+ let e;
2385
+ return he.size === 0 && pn(vn), {
2386
+ promise: new Promise((t) => {
2387
+ he.add(e = { c: l, f: t });
2388
+ }),
2389
+ abort() {
2390
+ he.delete(e);
2391
+ }
2392
+ };
2393
+ }
2394
+ const fe = [];
2395
+ function Ws(l, e = Ee) {
2396
+ let t;
2397
+ const n = /* @__PURE__ */ new Set();
2398
+ function i(a) {
2399
+ if (Os(l, a) && (l = a, t)) {
2400
+ const r = !fe.length;
2401
+ for (const f of n)
2402
+ f[1](), fe.push(f, l);
2403
+ if (r) {
2404
+ for (let f = 0; f < fe.length; f += 2)
2405
+ fe[f][0](fe[f + 1]);
2406
+ fe.length = 0;
2407
+ }
2408
+ }
2409
+ }
2410
+ function s(a) {
2411
+ i(a(l));
2412
+ }
2413
+ function o(a, r = Ee) {
2414
+ const f = [a, r];
2415
+ return n.add(f), n.size === 1 && (t = e(i, s) || Ee), a(l), () => {
2416
+ n.delete(f), n.size === 0 && t && (t(), t = null);
2417
+ };
2418
+ }
2419
+ return { set: i, update: s, subscribe: o };
2420
+ }
2421
+ function Rt(l) {
2422
+ return Object.prototype.toString.call(l) === "[object Date]";
2423
+ }
2424
+ function Je(l, e, t, n) {
2425
+ if (typeof t == "number" || Rt(t)) {
2426
+ const i = n - t, s = (t - e) / (l.dt || 1 / 60), o = l.opts.stiffness * i, a = l.opts.damping * s, r = (o - a) * l.inv_mass, f = (s + r) * l.dt;
2427
+ return Math.abs(f) < l.opts.precision && Math.abs(i) < l.opts.precision ? n : (l.settled = !1, Rt(t) ? new Date(t.getTime() + f) : t + f);
2428
+ } else {
2429
+ if (Array.isArray(t))
2430
+ return t.map(
2431
+ (i, s) => Je(l, e[s], t[s], n[s])
2432
+ );
2433
+ if (typeof t == "object") {
2434
+ const i = {};
2435
+ for (const s in t)
2436
+ i[s] = Je(l, e[s], t[s], n[s]);
2437
+ return i;
2438
+ } else
2439
+ throw new Error(`Cannot spring ${typeof t} values`);
2440
+ }
2441
+ }
2442
+ function Vt(l, e = {}) {
2443
+ const t = Ws(l), { stiffness: n = 0.15, damping: i = 0.8, precision: s = 0.01 } = e;
2444
+ let o, a, r, f = l, _ = l, c = 1, u = 0, d = !1;
2445
+ function g(C, I = {}) {
2446
+ _ = C;
2447
+ const S = r = {};
2448
+ return l == null || I.hard || p.stiffness >= 1 && p.damping >= 1 ? (d = !0, o = Dt(), f = C, t.set(l = _), Promise.resolve()) : (I.soft && (u = 1 / ((I.soft === !0 ? 0.5 : +I.soft) * 60), c = 0), a || (o = Dt(), d = !1, a = Hs((m) => {
2449
+ if (d)
2450
+ return d = !1, a = null, !1;
2451
+ c = Math.min(c + u, 1);
2452
+ const y = {
2453
+ inv_mass: c,
2454
+ opts: p,
2455
+ settled: !0,
2456
+ dt: (m - o) * 60 / 1e3
2457
+ }, w = Je(y, f, l, _);
2458
+ return o = m, f = l, t.set(l = w), y.settled && (a = null), !y.settled;
2459
+ })), new Promise((m) => {
2460
+ a.promise.then(() => {
2461
+ S === r && m();
2462
+ });
2463
+ }));
2464
+ }
2465
+ const p = {
2466
+ set: g,
2467
+ update: (C, I) => g(C(_, l), I),
2468
+ subscribe: t.subscribe,
2469
+ stiffness: n,
2470
+ damping: i,
2471
+ precision: s
2472
+ };
2473
+ return p;
2474
+ }
2475
+ const {
2476
+ SvelteComponent: Gs,
2477
+ append: T,
2478
+ attr: q,
2479
+ component_subscribe: Tt,
2480
+ detach: Ks,
2481
+ element: Js,
2482
+ init: Qs,
2483
+ insert: xs,
2484
+ noop: Pt,
2485
+ safe_not_equal: $s,
2486
+ set_style: Le,
2487
+ svg_element: P,
2488
+ toggle_class: Nt
2489
+ } = window.__gradio__svelte__internal, { onMount: eo } = window.__gradio__svelte__internal;
2490
+ function to(l) {
2491
+ let e, t, n, i, s, o, a, r, f, _, c, u;
2492
+ return {
2493
+ c() {
2494
+ e = Js("div"), t = P("svg"), n = P("g"), i = P("path"), s = P("path"), o = P("path"), a = P("path"), r = P("g"), f = P("path"), _ = P("path"), c = P("path"), u = P("path"), q(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), q(i, "fill", "#FF7C00"), q(i, "fill-opacity", "0.4"), q(i, "class", "svelte-43sxxs"), q(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), q(s, "fill", "#FF7C00"), q(s, "class", "svelte-43sxxs"), q(o, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), q(o, "fill", "#FF7C00"), q(o, "fill-opacity", "0.4"), q(o, "class", "svelte-43sxxs"), q(a, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), q(a, "fill", "#FF7C00"), q(a, "class", "svelte-43sxxs"), Le(n, "transform", "translate(" + /*$top*/
2495
+ l[1][0] + "px, " + /*$top*/
2496
+ l[1][1] + "px)"), q(f, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), q(f, "fill", "#FF7C00"), q(f, "fill-opacity", "0.4"), q(f, "class", "svelte-43sxxs"), q(_, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), q(_, "fill", "#FF7C00"), q(_, "class", "svelte-43sxxs"), q(c, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), q(c, "fill", "#FF7C00"), q(c, "fill-opacity", "0.4"), q(c, "class", "svelte-43sxxs"), q(u, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), q(u, "fill", "#FF7C00"), q(u, "class", "svelte-43sxxs"), Le(r, "transform", "translate(" + /*$bottom*/
2497
+ l[2][0] + "px, " + /*$bottom*/
2498
+ l[2][1] + "px)"), q(t, "viewBox", "-1200 -1200 3000 3000"), q(t, "fill", "none"), q(t, "xmlns", "http://www.w3.org/2000/svg"), q(t, "class", "svelte-43sxxs"), q(e, "class", "svelte-43sxxs"), Nt(
2499
+ e,
2500
+ "margin",
2501
+ /*margin*/
2502
+ l[0]
2503
+ );
2504
+ },
2505
+ m(d, g) {
2506
+ xs(d, e, g), T(e, t), T(t, n), T(n, i), T(n, s), T(n, o), T(n, a), T(t, r), T(r, f), T(r, _), T(r, c), T(r, u);
2507
+ },
2508
+ p(d, [g]) {
2509
+ g & /*$top*/
2510
+ 2 && Le(n, "transform", "translate(" + /*$top*/
2511
+ d[1][0] + "px, " + /*$top*/
2512
+ d[1][1] + "px)"), g & /*$bottom*/
2513
+ 4 && Le(r, "transform", "translate(" + /*$bottom*/
2514
+ d[2][0] + "px, " + /*$bottom*/
2515
+ d[2][1] + "px)"), g & /*margin*/
2516
+ 1 && Nt(
2517
+ e,
2518
+ "margin",
2519
+ /*margin*/
2520
+ d[0]
2521
+ );
2522
+ },
2523
+ i: Pt,
2524
+ o: Pt,
2525
+ d(d) {
2526
+ d && Ks(e);
2527
+ }
2528
+ };
2529
+ }
2530
+ function no(l, e, t) {
2531
+ let n, i, { margin: s = !0 } = e;
2532
+ const o = Vt([0, 0]);
2533
+ Tt(l, o, (u) => t(1, n = u));
2534
+ const a = Vt([0, 0]);
2535
+ Tt(l, a, (u) => t(2, i = u));
2536
+ let r;
2537
+ async function f() {
2538
+ await Promise.all([o.set([125, 140]), a.set([-125, -140])]), await Promise.all([o.set([-125, 140]), a.set([125, -140])]), await Promise.all([o.set([-125, 0]), a.set([125, -0])]), await Promise.all([o.set([125, 0]), a.set([-125, 0])]);
2539
+ }
2540
+ async function _() {
2541
+ await f(), r || _();
2542
+ }
2543
+ async function c() {
2544
+ await Promise.all([o.set([125, 0]), a.set([-125, 0])]), _();
2545
+ }
2546
+ return eo(() => (c(), () => r = !0)), l.$$set = (u) => {
2547
+ "margin" in u && t(0, s = u.margin);
2548
+ }, [s, n, i, o, a];
2549
+ }
2550
+ class lo extends Gs {
2551
+ constructor(e) {
2552
+ super(), Qs(this, e, no, to, $s, { margin: 0 });
2553
+ }
2554
+ }
2555
+ const {
2556
+ SvelteComponent: io,
2557
+ append: ie,
2558
+ attr: Y,
2559
+ binding_callbacks: Xt,
2560
+ check_outros: kn,
2561
+ create_component: so,
2562
+ create_slot: oo,
2563
+ destroy_component: ao,
2564
+ destroy_each: yn,
2565
+ detach: v,
2566
+ element: O,
2567
+ empty: ke,
2568
+ ensure_array_like: De,
2569
+ get_all_dirty_from_scope: ro,
2570
+ get_slot_changes: fo,
2571
+ group_outros: Cn,
2572
+ init: _o,
2573
+ insert: k,
2574
+ mount_component: co,
2575
+ noop: Qe,
2576
+ safe_not_equal: uo,
2577
+ set_data: R,
2578
+ set_style: $,
2579
+ space: j,
2580
+ text: M,
2581
+ toggle_class: E,
2582
+ transition_in: ge,
2583
+ transition_out: be,
2584
+ update_slot_base: mo
2585
+ } = window.__gradio__svelte__internal, { tick: ho } = window.__gradio__svelte__internal, { onDestroy: go } = window.__gradio__svelte__internal, bo = (l) => ({}), Yt = (l) => ({});
2586
+ function jt(l, e, t) {
2587
+ const n = l.slice();
2588
+ return n[38] = e[t], n[40] = t, n;
2589
+ }
2590
+ function Zt(l, e, t) {
2591
+ const n = l.slice();
2592
+ return n[38] = e[t], n;
2593
+ }
2594
+ function wo(l) {
2595
+ let e, t = (
2596
+ /*i18n*/
2597
+ l[1]("common.error") + ""
2598
+ ), n, i, s;
2599
+ const o = (
2600
+ /*#slots*/
2601
+ l[29].error
2602
+ ), a = oo(
2603
+ o,
2604
+ l,
2605
+ /*$$scope*/
2606
+ l[28],
2607
+ Yt
2608
+ );
2609
+ return {
2610
+ c() {
2611
+ e = O("span"), n = M(t), i = j(), a && a.c(), Y(e, "class", "error svelte-14miwb5");
2612
+ },
2613
+ m(r, f) {
2614
+ k(r, e, f), ie(e, n), k(r, i, f), a && a.m(r, f), s = !0;
2615
+ },
2616
+ p(r, f) {
2617
+ (!s || f[0] & /*i18n*/
2618
+ 2) && t !== (t = /*i18n*/
2619
+ r[1]("common.error") + "") && R(n, t), a && a.p && (!s || f[0] & /*$$scope*/
2620
+ 268435456) && mo(
2621
+ a,
2622
+ o,
2623
+ r,
2624
+ /*$$scope*/
2625
+ r[28],
2626
+ s ? fo(
2627
+ o,
2628
+ /*$$scope*/
2629
+ r[28],
2630
+ f,
2631
+ bo
2632
+ ) : ro(
2633
+ /*$$scope*/
2634
+ r[28]
2635
+ ),
2636
+ Yt
2637
+ );
2638
+ },
2639
+ i(r) {
2640
+ s || (ge(a, r), s = !0);
2641
+ },
2642
+ o(r) {
2643
+ be(a, r), s = !1;
2644
+ },
2645
+ d(r) {
2646
+ r && (v(e), v(i)), a && a.d(r);
2647
+ }
2648
+ };
2649
+ }
2650
+ function po(l) {
2651
+ let e, t, n, i, s, o, a, r, f, _ = (
2652
+ /*variant*/
2653
+ l[8] === "default" && /*show_eta_bar*/
2654
+ l[18] && /*show_progress*/
2655
+ l[6] === "full" && Ut(l)
2656
+ );
2657
+ function c(m, y) {
2658
+ if (
2659
+ /*progress*/
2660
+ m[7]
2661
+ )
2662
+ return yo;
2663
+ if (
2664
+ /*queue_position*/
2665
+ m[2] !== null && /*queue_size*/
2666
+ m[3] !== void 0 && /*queue_position*/
2667
+ m[2] >= 0
2668
+ )
2669
+ return ko;
2670
+ if (
2671
+ /*queue_position*/
2672
+ m[2] === 0
2673
+ )
2674
+ return vo;
2675
+ }
2676
+ let u = c(l), d = u && u(l), g = (
2677
+ /*timer*/
2678
+ l[5] && Wt(l)
2679
+ );
2680
+ const p = [Mo, So], C = [];
2681
+ function I(m, y) {
2682
+ return (
2683
+ /*last_progress_level*/
2684
+ m[15] != null ? 0 : (
2685
+ /*show_progress*/
2686
+ m[6] === "full" ? 1 : -1
2687
+ )
2688
+ );
2689
+ }
2690
+ ~(s = I(l)) && (o = C[s] = p[s](l));
2691
+ let S = !/*timer*/
2692
+ l[5] && en(l);
2693
+ return {
2694
+ c() {
2695
+ _ && _.c(), e = j(), t = O("div"), d && d.c(), n = j(), g && g.c(), i = j(), o && o.c(), a = j(), S && S.c(), r = ke(), Y(t, "class", "progress-text svelte-14miwb5"), E(
2696
+ t,
2697
+ "meta-text-center",
2698
+ /*variant*/
2699
+ l[8] === "center"
2700
+ ), E(
2701
+ t,
2702
+ "meta-text",
2703
+ /*variant*/
2704
+ l[8] === "default"
2705
+ );
2706
+ },
2707
+ m(m, y) {
2708
+ _ && _.m(m, y), k(m, e, y), k(m, t, y), d && d.m(t, null), ie(t, n), g && g.m(t, null), k(m, i, y), ~s && C[s].m(m, y), k(m, a, y), S && S.m(m, y), k(m, r, y), f = !0;
2709
+ },
2710
+ p(m, y) {
2711
+ /*variant*/
2712
+ m[8] === "default" && /*show_eta_bar*/
2713
+ m[18] && /*show_progress*/
2714
+ m[6] === "full" ? _ ? _.p(m, y) : (_ = Ut(m), _.c(), _.m(e.parentNode, e)) : _ && (_.d(1), _ = null), u === (u = c(m)) && d ? d.p(m, y) : (d && d.d(1), d = u && u(m), d && (d.c(), d.m(t, n))), /*timer*/
2715
+ m[5] ? g ? g.p(m, y) : (g = Wt(m), g.c(), g.m(t, null)) : g && (g.d(1), g = null), (!f || y[0] & /*variant*/
2716
+ 256) && E(
2717
+ t,
2718
+ "meta-text-center",
2719
+ /*variant*/
2720
+ m[8] === "center"
2721
+ ), (!f || y[0] & /*variant*/
2722
+ 256) && E(
2723
+ t,
2724
+ "meta-text",
2725
+ /*variant*/
2726
+ m[8] === "default"
2727
+ );
2728
+ let w = s;
2729
+ s = I(m), s === w ? ~s && C[s].p(m, y) : (o && (Cn(), be(C[w], 1, 1, () => {
2730
+ C[w] = null;
2731
+ }), kn()), ~s ? (o = C[s], o ? o.p(m, y) : (o = C[s] = p[s](m), o.c()), ge(o, 1), o.m(a.parentNode, a)) : o = null), /*timer*/
2732
+ m[5] ? S && (S.d(1), S = null) : S ? S.p(m, y) : (S = en(m), S.c(), S.m(r.parentNode, r));
2733
+ },
2734
+ i(m) {
2735
+ f || (ge(o), f = !0);
2736
+ },
2737
+ o(m) {
2738
+ be(o), f = !1;
2739
+ },
2740
+ d(m) {
2741
+ m && (v(e), v(t), v(i), v(a), v(r)), _ && _.d(m), d && d.d(), g && g.d(), ~s && C[s].d(m), S && S.d(m);
2742
+ }
2743
+ };
2744
+ }
2745
+ function Ut(l) {
2746
+ let e, t = `translateX(${/*eta_level*/
2747
+ (l[17] || 0) * 100 - 100}%)`;
2748
+ return {
2749
+ c() {
2750
+ e = O("div"), Y(e, "class", "eta-bar svelte-14miwb5"), $(e, "transform", t);
2751
+ },
2752
+ m(n, i) {
2753
+ k(n, e, i);
2754
+ },
2755
+ p(n, i) {
2756
+ i[0] & /*eta_level*/
2757
+ 131072 && t !== (t = `translateX(${/*eta_level*/
2758
+ (n[17] || 0) * 100 - 100}%)`) && $(e, "transform", t);
2759
+ },
2760
+ d(n) {
2761
+ n && v(e);
2762
+ }
2763
+ };
2764
+ }
2765
+ function vo(l) {
2766
+ let e;
2767
+ return {
2768
+ c() {
2769
+ e = M("processing |");
2770
+ },
2771
+ m(t, n) {
2772
+ k(t, e, n);
2773
+ },
2774
+ p: Qe,
2775
+ d(t) {
2776
+ t && v(e);
2777
+ }
2778
+ };
2779
+ }
2780
+ function ko(l) {
2781
+ let e, t = (
2782
+ /*queue_position*/
2783
+ l[2] + 1 + ""
2784
+ ), n, i, s, o;
2785
+ return {
2786
+ c() {
2787
+ e = M("queue: "), n = M(t), i = M("/"), s = M(
2788
+ /*queue_size*/
2789
+ l[3]
2790
+ ), o = M(" |");
2791
+ },
2792
+ m(a, r) {
2793
+ k(a, e, r), k(a, n, r), k(a, i, r), k(a, s, r), k(a, o, r);
2794
+ },
2795
+ p(a, r) {
2796
+ r[0] & /*queue_position*/
2797
+ 4 && t !== (t = /*queue_position*/
2798
+ a[2] + 1 + "") && R(n, t), r[0] & /*queue_size*/
2799
+ 8 && R(
2800
+ s,
2801
+ /*queue_size*/
2802
+ a[3]
2803
+ );
2804
+ },
2805
+ d(a) {
2806
+ a && (v(e), v(n), v(i), v(s), v(o));
2807
+ }
2808
+ };
2809
+ }
2810
+ function yo(l) {
2811
+ let e, t = De(
2812
+ /*progress*/
2813
+ l[7]
2814
+ ), n = [];
2815
+ for (let i = 0; i < t.length; i += 1)
2816
+ n[i] = Ht(Zt(l, t, i));
2817
+ return {
2818
+ c() {
2819
+ for (let i = 0; i < n.length; i += 1)
2820
+ n[i].c();
2821
+ e = ke();
2822
+ },
2823
+ m(i, s) {
2824
+ for (let o = 0; o < n.length; o += 1)
2825
+ n[o] && n[o].m(i, s);
2826
+ k(i, e, s);
2827
+ },
2828
+ p(i, s) {
2829
+ if (s[0] & /*progress*/
2830
+ 128) {
2831
+ t = De(
2832
+ /*progress*/
2833
+ i[7]
2834
+ );
2835
+ let o;
2836
+ for (o = 0; o < t.length; o += 1) {
2837
+ const a = Zt(i, t, o);
2838
+ n[o] ? n[o].p(a, s) : (n[o] = Ht(a), n[o].c(), n[o].m(e.parentNode, e));
2839
+ }
2840
+ for (; o < n.length; o += 1)
2841
+ n[o].d(1);
2842
+ n.length = t.length;
2843
+ }
2844
+ },
2845
+ d(i) {
2846
+ i && v(e), yn(n, i);
2847
+ }
2848
+ };
2849
+ }
2850
+ function Ot(l) {
2851
+ let e, t = (
2852
+ /*p*/
2853
+ l[38].unit + ""
2854
+ ), n, i, s = " ", o;
2855
+ function a(_, c) {
2856
+ return (
2857
+ /*p*/
2858
+ _[38].length != null ? qo : Co
2859
+ );
2860
+ }
2861
+ let r = a(l), f = r(l);
2862
+ return {
2863
+ c() {
2864
+ f.c(), e = j(), n = M(t), i = M(" | "), o = M(s);
2865
+ },
2866
+ m(_, c) {
2867
+ f.m(_, c), k(_, e, c), k(_, n, c), k(_, i, c), k(_, o, c);
2868
+ },
2869
+ p(_, c) {
2870
+ r === (r = a(_)) && f ? f.p(_, c) : (f.d(1), f = r(_), f && (f.c(), f.m(e.parentNode, e))), c[0] & /*progress*/
2871
+ 128 && t !== (t = /*p*/
2872
+ _[38].unit + "") && R(n, t);
2873
+ },
2874
+ d(_) {
2875
+ _ && (v(e), v(n), v(i), v(o)), f.d(_);
2876
+ }
2877
+ };
2878
+ }
2879
+ function Co(l) {
2880
+ let e = ce(
2881
+ /*p*/
2882
+ l[38].index || 0
2883
+ ) + "", t;
2884
+ return {
2885
+ c() {
2886
+ t = M(e);
2887
+ },
2888
+ m(n, i) {
2889
+ k(n, t, i);
2890
+ },
2891
+ p(n, i) {
2892
+ i[0] & /*progress*/
2893
+ 128 && e !== (e = ce(
2894
+ /*p*/
2895
+ n[38].index || 0
2896
+ ) + "") && R(t, e);
2897
+ },
2898
+ d(n) {
2899
+ n && v(t);
2900
+ }
2901
+ };
2902
+ }
2903
+ function qo(l) {
2904
+ let e = ce(
2905
+ /*p*/
2906
+ l[38].index || 0
2907
+ ) + "", t, n, i = ce(
2908
+ /*p*/
2909
+ l[38].length
2910
+ ) + "", s;
2911
+ return {
2912
+ c() {
2913
+ t = M(e), n = M("/"), s = M(i);
2914
+ },
2915
+ m(o, a) {
2916
+ k(o, t, a), k(o, n, a), k(o, s, a);
2917
+ },
2918
+ p(o, a) {
2919
+ a[0] & /*progress*/
2920
+ 128 && e !== (e = ce(
2921
+ /*p*/
2922
+ o[38].index || 0
2923
+ ) + "") && R(t, e), a[0] & /*progress*/
2924
+ 128 && i !== (i = ce(
2925
+ /*p*/
2926
+ o[38].length
2927
+ ) + "") && R(s, i);
2928
+ },
2929
+ d(o) {
2930
+ o && (v(t), v(n), v(s));
2931
+ }
2932
+ };
2933
+ }
2934
+ function Ht(l) {
2935
+ let e, t = (
2936
+ /*p*/
2937
+ l[38].index != null && Ot(l)
2938
+ );
2939
+ return {
2940
+ c() {
2941
+ t && t.c(), e = ke();
2942
+ },
2943
+ m(n, i) {
2944
+ t && t.m(n, i), k(n, e, i);
2945
+ },
2946
+ p(n, i) {
2947
+ /*p*/
2948
+ n[38].index != null ? t ? t.p(n, i) : (t = Ot(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
2949
+ },
2950
+ d(n) {
2951
+ n && v(e), t && t.d(n);
2952
+ }
2953
+ };
2954
+ }
2955
+ function Wt(l) {
2956
+ let e, t = (
2957
+ /*eta*/
2958
+ l[0] ? `/${/*formatted_eta*/
2959
+ l[19]}` : ""
2960
+ ), n, i;
2961
+ return {
2962
+ c() {
2963
+ e = M(
2964
+ /*formatted_timer*/
2965
+ l[20]
2966
+ ), n = M(t), i = M("s");
2967
+ },
2968
+ m(s, o) {
2969
+ k(s, e, o), k(s, n, o), k(s, i, o);
2970
+ },
2971
+ p(s, o) {
2972
+ o[0] & /*formatted_timer*/
2973
+ 1048576 && R(
2974
+ e,
2975
+ /*formatted_timer*/
2976
+ s[20]
2977
+ ), o[0] & /*eta, formatted_eta*/
2978
+ 524289 && t !== (t = /*eta*/
2979
+ s[0] ? `/${/*formatted_eta*/
2980
+ s[19]}` : "") && R(n, t);
2981
+ },
2982
+ d(s) {
2983
+ s && (v(e), v(n), v(i));
2984
+ }
2985
+ };
2986
+ }
2987
+ function So(l) {
2988
+ let e, t;
2989
+ return e = new lo({
2990
+ props: { margin: (
2991
+ /*variant*/
2992
+ l[8] === "default"
2993
+ ) }
2994
+ }), {
2995
+ c() {
2996
+ so(e.$$.fragment);
2997
+ },
2998
+ m(n, i) {
2999
+ co(e, n, i), t = !0;
3000
+ },
3001
+ p(n, i) {
3002
+ const s = {};
3003
+ i[0] & /*variant*/
3004
+ 256 && (s.margin = /*variant*/
3005
+ n[8] === "default"), e.$set(s);
3006
+ },
3007
+ i(n) {
3008
+ t || (ge(e.$$.fragment, n), t = !0);
3009
+ },
3010
+ o(n) {
3011
+ be(e.$$.fragment, n), t = !1;
3012
+ },
3013
+ d(n) {
3014
+ ao(e, n);
3015
+ }
3016
+ };
3017
+ }
3018
+ function Mo(l) {
3019
+ let e, t, n, i, s, o = `${/*last_progress_level*/
3020
+ l[15] * 100}%`, a = (
3021
+ /*progress*/
3022
+ l[7] != null && Gt(l)
3023
+ );
3024
+ return {
3025
+ c() {
3026
+ e = O("div"), t = O("div"), a && a.c(), n = j(), i = O("div"), s = O("div"), Y(t, "class", "progress-level-inner svelte-14miwb5"), Y(s, "class", "progress-bar svelte-14miwb5"), $(s, "width", o), Y(i, "class", "progress-bar-wrap svelte-14miwb5"), Y(e, "class", "progress-level svelte-14miwb5");
3027
+ },
3028
+ m(r, f) {
3029
+ k(r, e, f), ie(e, t), a && a.m(t, null), ie(e, n), ie(e, i), ie(i, s), l[30](s);
3030
+ },
3031
+ p(r, f) {
3032
+ /*progress*/
3033
+ r[7] != null ? a ? a.p(r, f) : (a = Gt(r), a.c(), a.m(t, null)) : a && (a.d(1), a = null), f[0] & /*last_progress_level*/
3034
+ 32768 && o !== (o = `${/*last_progress_level*/
3035
+ r[15] * 100}%`) && $(s, "width", o);
3036
+ },
3037
+ i: Qe,
3038
+ o: Qe,
3039
+ d(r) {
3040
+ r && v(e), a && a.d(), l[30](null);
3041
+ }
3042
+ };
3043
+ }
3044
+ function Gt(l) {
3045
+ let e, t = De(
3046
+ /*progress*/
3047
+ l[7]
3048
+ ), n = [];
3049
+ for (let i = 0; i < t.length; i += 1)
3050
+ n[i] = $t(jt(l, t, i));
3051
+ return {
3052
+ c() {
3053
+ for (let i = 0; i < n.length; i += 1)
3054
+ n[i].c();
3055
+ e = ke();
3056
+ },
3057
+ m(i, s) {
3058
+ for (let o = 0; o < n.length; o += 1)
3059
+ n[o] && n[o].m(i, s);
3060
+ k(i, e, s);
3061
+ },
3062
+ p(i, s) {
3063
+ if (s[0] & /*progress_level, progress*/
3064
+ 16512) {
3065
+ t = De(
3066
+ /*progress*/
3067
+ i[7]
3068
+ );
3069
+ let o;
3070
+ for (o = 0; o < t.length; o += 1) {
3071
+ const a = jt(i, t, o);
3072
+ n[o] ? n[o].p(a, s) : (n[o] = $t(a), n[o].c(), n[o].m(e.parentNode, e));
3073
+ }
3074
+ for (; o < n.length; o += 1)
3075
+ n[o].d(1);
3076
+ n.length = t.length;
3077
+ }
3078
+ },
3079
+ d(i) {
3080
+ i && v(e), yn(n, i);
3081
+ }
3082
+ };
3083
+ }
3084
+ function Kt(l) {
3085
+ let e, t, n, i, s = (
3086
+ /*i*/
3087
+ l[40] !== 0 && Io()
3088
+ ), o = (
3089
+ /*p*/
3090
+ l[38].desc != null && Jt(l)
3091
+ ), a = (
3092
+ /*p*/
3093
+ l[38].desc != null && /*progress_level*/
3094
+ l[14] && /*progress_level*/
3095
+ l[14][
3096
+ /*i*/
3097
+ l[40]
3098
+ ] != null && Qt()
3099
+ ), r = (
3100
+ /*progress_level*/
3101
+ l[14] != null && xt(l)
3102
+ );
3103
+ return {
3104
+ c() {
3105
+ s && s.c(), e = j(), o && o.c(), t = j(), a && a.c(), n = j(), r && r.c(), i = ke();
3106
+ },
3107
+ m(f, _) {
3108
+ s && s.m(f, _), k(f, e, _), o && o.m(f, _), k(f, t, _), a && a.m(f, _), k(f, n, _), r && r.m(f, _), k(f, i, _);
3109
+ },
3110
+ p(f, _) {
3111
+ /*p*/
3112
+ f[38].desc != null ? o ? o.p(f, _) : (o = Jt(f), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null), /*p*/
3113
+ f[38].desc != null && /*progress_level*/
3114
+ f[14] && /*progress_level*/
3115
+ f[14][
3116
+ /*i*/
3117
+ f[40]
3118
+ ] != null ? a || (a = Qt(), a.c(), a.m(n.parentNode, n)) : a && (a.d(1), a = null), /*progress_level*/
3119
+ f[14] != null ? r ? r.p(f, _) : (r = xt(f), r.c(), r.m(i.parentNode, i)) : r && (r.d(1), r = null);
3120
+ },
3121
+ d(f) {
3122
+ f && (v(e), v(t), v(n), v(i)), s && s.d(f), o && o.d(f), a && a.d(f), r && r.d(f);
3123
+ }
3124
+ };
3125
+ }
3126
+ function Io(l) {
3127
+ let e;
3128
+ return {
3129
+ c() {
3130
+ e = M(" /");
3131
+ },
3132
+ m(t, n) {
3133
+ k(t, e, n);
3134
+ },
3135
+ d(t) {
3136
+ t && v(e);
3137
+ }
3138
+ };
3139
+ }
3140
+ function Jt(l) {
3141
+ let e = (
3142
+ /*p*/
3143
+ l[38].desc + ""
3144
+ ), t;
3145
+ return {
3146
+ c() {
3147
+ t = M(e);
3148
+ },
3149
+ m(n, i) {
3150
+ k(n, t, i);
3151
+ },
3152
+ p(n, i) {
3153
+ i[0] & /*progress*/
3154
+ 128 && e !== (e = /*p*/
3155
+ n[38].desc + "") && R(t, e);
3156
+ },
3157
+ d(n) {
3158
+ n && v(t);
3159
+ }
3160
+ };
3161
+ }
3162
+ function Qt(l) {
3163
+ let e;
3164
+ return {
3165
+ c() {
3166
+ e = M("-");
3167
+ },
3168
+ m(t, n) {
3169
+ k(t, e, n);
3170
+ },
3171
+ d(t) {
3172
+ t && v(e);
3173
+ }
3174
+ };
3175
+ }
3176
+ function xt(l) {
3177
+ let e = (100 * /*progress_level*/
3178
+ (l[14][
3179
+ /*i*/
3180
+ l[40]
3181
+ ] || 0)).toFixed(1) + "", t, n;
3182
+ return {
3183
+ c() {
3184
+ t = M(e), n = M("%");
3185
+ },
3186
+ m(i, s) {
3187
+ k(i, t, s), k(i, n, s);
3188
+ },
3189
+ p(i, s) {
3190
+ s[0] & /*progress_level*/
3191
+ 16384 && e !== (e = (100 * /*progress_level*/
3192
+ (i[14][
3193
+ /*i*/
3194
+ i[40]
3195
+ ] || 0)).toFixed(1) + "") && R(t, e);
3196
+ },
3197
+ d(i) {
3198
+ i && (v(t), v(n));
3199
+ }
3200
+ };
3201
+ }
3202
+ function $t(l) {
3203
+ let e, t = (
3204
+ /*p*/
3205
+ (l[38].desc != null || /*progress_level*/
3206
+ l[14] && /*progress_level*/
3207
+ l[14][
3208
+ /*i*/
3209
+ l[40]
3210
+ ] != null) && Kt(l)
3211
+ );
3212
+ return {
3213
+ c() {
3214
+ t && t.c(), e = ke();
3215
+ },
3216
+ m(n, i) {
3217
+ t && t.m(n, i), k(n, e, i);
3218
+ },
3219
+ p(n, i) {
3220
+ /*p*/
3221
+ n[38].desc != null || /*progress_level*/
3222
+ n[14] && /*progress_level*/
3223
+ n[14][
3224
+ /*i*/
3225
+ n[40]
3226
+ ] != null ? t ? t.p(n, i) : (t = Kt(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
3227
+ },
3228
+ d(n) {
3229
+ n && v(e), t && t.d(n);
3230
+ }
3231
+ };
3232
+ }
3233
+ function en(l) {
3234
+ let e, t;
3235
+ return {
3236
+ c() {
3237
+ e = O("p"), t = M(
3238
+ /*loading_text*/
3239
+ l[9]
3240
+ ), Y(e, "class", "loading svelte-14miwb5");
3241
+ },
3242
+ m(n, i) {
3243
+ k(n, e, i), ie(e, t);
3244
+ },
3245
+ p(n, i) {
3246
+ i[0] & /*loading_text*/
3247
+ 512 && R(
3248
+ t,
3249
+ /*loading_text*/
3250
+ n[9]
3251
+ );
3252
+ },
3253
+ d(n) {
3254
+ n && v(e);
3255
+ }
3256
+ };
3257
+ }
3258
+ function Lo(l) {
3259
+ let e, t, n, i, s;
3260
+ const o = [po, wo], a = [];
3261
+ function r(f, _) {
3262
+ return (
3263
+ /*status*/
3264
+ f[4] === "pending" ? 0 : (
3265
+ /*status*/
3266
+ f[4] === "error" ? 1 : -1
3267
+ )
3268
+ );
3269
+ }
3270
+ return ~(t = r(l)) && (n = a[t] = o[t](l)), {
3271
+ c() {
3272
+ e = O("div"), n && n.c(), Y(e, "class", i = "wrap " + /*variant*/
3273
+ l[8] + " " + /*show_progress*/
3274
+ l[6] + " svelte-14miwb5"), E(e, "hide", !/*status*/
3275
+ l[4] || /*status*/
3276
+ l[4] === "complete" || /*show_progress*/
3277
+ l[6] === "hidden"), E(
3278
+ e,
3279
+ "translucent",
3280
+ /*variant*/
3281
+ l[8] === "center" && /*status*/
3282
+ (l[4] === "pending" || /*status*/
3283
+ l[4] === "error") || /*translucent*/
3284
+ l[11] || /*show_progress*/
3285
+ l[6] === "minimal"
3286
+ ), E(
3287
+ e,
3288
+ "generating",
3289
+ /*status*/
3290
+ l[4] === "generating"
3291
+ ), E(
3292
+ e,
3293
+ "border",
3294
+ /*border*/
3295
+ l[12]
3296
+ ), $(
3297
+ e,
3298
+ "position",
3299
+ /*absolute*/
3300
+ l[10] ? "absolute" : "static"
3301
+ ), $(
3302
+ e,
3303
+ "padding",
3304
+ /*absolute*/
3305
+ l[10] ? "0" : "var(--size-8) 0"
3306
+ );
3307
+ },
3308
+ m(f, _) {
3309
+ k(f, e, _), ~t && a[t].m(e, null), l[31](e), s = !0;
3310
+ },
3311
+ p(f, _) {
3312
+ let c = t;
3313
+ t = r(f), t === c ? ~t && a[t].p(f, _) : (n && (Cn(), be(a[c], 1, 1, () => {
3314
+ a[c] = null;
3315
+ }), kn()), ~t ? (n = a[t], n ? n.p(f, _) : (n = a[t] = o[t](f), n.c()), ge(n, 1), n.m(e, null)) : n = null), (!s || _[0] & /*variant, show_progress*/
3316
+ 320 && i !== (i = "wrap " + /*variant*/
3317
+ f[8] + " " + /*show_progress*/
3318
+ f[6] + " svelte-14miwb5")) && Y(e, "class", i), (!s || _[0] & /*variant, show_progress, status, show_progress*/
3319
+ 336) && E(e, "hide", !/*status*/
3320
+ f[4] || /*status*/
3321
+ f[4] === "complete" || /*show_progress*/
3322
+ f[6] === "hidden"), (!s || _[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
3323
+ 2384) && E(
3324
+ e,
3325
+ "translucent",
3326
+ /*variant*/
3327
+ f[8] === "center" && /*status*/
3328
+ (f[4] === "pending" || /*status*/
3329
+ f[4] === "error") || /*translucent*/
3330
+ f[11] || /*show_progress*/
3331
+ f[6] === "minimal"
3332
+ ), (!s || _[0] & /*variant, show_progress, status*/
3333
+ 336) && E(
3334
+ e,
3335
+ "generating",
3336
+ /*status*/
3337
+ f[4] === "generating"
3338
+ ), (!s || _[0] & /*variant, show_progress, border*/
3339
+ 4416) && E(
3340
+ e,
3341
+ "border",
3342
+ /*border*/
3343
+ f[12]
3344
+ ), _[0] & /*absolute*/
3345
+ 1024 && $(
3346
+ e,
3347
+ "position",
3348
+ /*absolute*/
3349
+ f[10] ? "absolute" : "static"
3350
+ ), _[0] & /*absolute*/
3351
+ 1024 && $(
3352
+ e,
3353
+ "padding",
3354
+ /*absolute*/
3355
+ f[10] ? "0" : "var(--size-8) 0"
3356
+ );
3357
+ },
3358
+ i(f) {
3359
+ s || (ge(n), s = !0);
3360
+ },
3361
+ o(f) {
3362
+ be(n), s = !1;
3363
+ },
3364
+ d(f) {
3365
+ f && v(e), ~t && a[t].d(), l[31](null);
3366
+ }
3367
+ };
3368
+ }
3369
+ let ze = [], Ue = !1;
3370
+ async function zo(l, e = !0) {
3371
+ if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && e !== !0)) {
3372
+ if (ze.push(l), !Ue)
3373
+ Ue = !0;
3374
+ else
3375
+ return;
3376
+ await ho(), requestAnimationFrame(() => {
3377
+ let t = [0, 0];
3378
+ for (let n = 0; n < ze.length; n++) {
3379
+ const s = ze[n].getBoundingClientRect();
3380
+ (n === 0 || s.top + window.scrollY <= t[0]) && (t[0] = s.top + window.scrollY, t[1] = n);
3381
+ }
3382
+ window.scrollTo({ top: t[0] - 20, behavior: "smooth" }), Ue = !1, ze = [];
3383
+ });
3384
+ }
3385
+ }
3386
+ function Ao(l, e, t) {
3387
+ let n, { $$slots: i = {}, $$scope: s } = e, { i18n: o } = e, { eta: a = null } = e, { queue: r = !1 } = e, { queue_position: f } = e, { queue_size: _ } = e, { status: c } = e, { scroll_to_output: u = !1 } = e, { timer: d = !0 } = e, { show_progress: g = "full" } = e, { message: p = null } = e, { progress: C = null } = e, { variant: I = "default" } = e, { loading_text: S = "Loading..." } = e, { absolute: m = !0 } = e, { translucent: y = !1 } = e, { border: w = !1 } = e, { autoscroll: Z } = e, V, h = !1, H = 0, A = 0, W = null, U = 0, N = null, te, G = null, ct = !0;
3388
+ const Sn = () => {
3389
+ t(25, H = performance.now()), t(26, A = 0), h = !0, ut();
3390
+ };
3391
+ function ut() {
3392
+ requestAnimationFrame(() => {
3393
+ t(26, A = (performance.now() - H) / 1e3), h && ut();
3394
+ });
3395
+ }
3396
+ function dt() {
3397
+ t(26, A = 0), h && (h = !1);
3398
+ }
3399
+ go(() => {
3400
+ h && dt();
3401
+ });
3402
+ let mt = null;
3403
+ function Mn(b) {
3404
+ Xt[b ? "unshift" : "push"](() => {
3405
+ G = b, t(16, G), t(7, C), t(14, N), t(15, te);
3406
+ });
3407
+ }
3408
+ function In(b) {
3409
+ Xt[b ? "unshift" : "push"](() => {
3410
+ V = b, t(13, V);
3411
+ });
3412
+ }
3413
+ return l.$$set = (b) => {
3414
+ "i18n" in b && t(1, o = b.i18n), "eta" in b && t(0, a = b.eta), "queue" in b && t(21, r = b.queue), "queue_position" in b && t(2, f = b.queue_position), "queue_size" in b && t(3, _ = b.queue_size), "status" in b && t(4, c = b.status), "scroll_to_output" in b && t(22, u = b.scroll_to_output), "timer" in b && t(5, d = b.timer), "show_progress" in b && t(6, g = b.show_progress), "message" in b && t(23, p = b.message), "progress" in b && t(7, C = b.progress), "variant" in b && t(8, I = b.variant), "loading_text" in b && t(9, S = b.loading_text), "absolute" in b && t(10, m = b.absolute), "translucent" in b && t(11, y = b.translucent), "border" in b && t(12, w = b.border), "autoscroll" in b && t(24, Z = b.autoscroll), "$$scope" in b && t(28, s = b.$$scope);
3415
+ }, l.$$.update = () => {
3416
+ l.$$.dirty[0] & /*eta, old_eta, queue, timer_start*/
3417
+ 169869313 && (a === null ? t(0, a = W) : r && t(0, a = (performance.now() - H) / 1e3 + a), a != null && (t(19, mt = a.toFixed(1)), t(27, W = a))), l.$$.dirty[0] & /*eta, timer_diff*/
3418
+ 67108865 && t(17, U = a === null || a <= 0 || !A ? null : Math.min(A / a, 1)), l.$$.dirty[0] & /*progress*/
3419
+ 128 && C != null && t(18, ct = !1), l.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
3420
+ 114816 && (C != null ? t(14, N = C.map((b) => {
3421
+ if (b.index != null && b.length != null)
3422
+ return b.index / b.length;
3423
+ if (b.progress != null)
3424
+ return b.progress;
3425
+ })) : t(14, N = null), N ? (t(15, te = N[N.length - 1]), G && (te === 0 ? t(16, G.style.transition = "0", G) : t(16, G.style.transition = "150ms", G))) : t(15, te = void 0)), l.$$.dirty[0] & /*status*/
3426
+ 16 && (c === "pending" ? Sn() : dt()), l.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
3427
+ 20979728 && V && u && (c === "pending" || c === "complete") && zo(V, Z), l.$$.dirty[0] & /*status, message*/
3428
+ 8388624, l.$$.dirty[0] & /*timer_diff*/
3429
+ 67108864 && t(20, n = A.toFixed(1));
3430
+ }, [
3431
+ a,
3432
+ o,
3433
+ f,
3434
+ _,
3435
+ c,
3436
+ d,
3437
+ g,
3438
+ C,
3439
+ I,
3440
+ S,
3441
+ m,
3442
+ y,
3443
+ w,
3444
+ V,
3445
+ N,
3446
+ te,
3447
+ G,
3448
+ U,
3449
+ ct,
3450
+ mt,
3451
+ n,
3452
+ r,
3453
+ u,
3454
+ p,
3455
+ Z,
3456
+ H,
3457
+ A,
3458
+ W,
3459
+ s,
3460
+ i,
3461
+ Mn,
3462
+ In
3463
+ ];
3464
+ }
3465
+ class Bo extends io {
3466
+ constructor(e) {
3467
+ super(), _o(
3468
+ this,
3469
+ e,
3470
+ Ao,
3471
+ Lo,
3472
+ uo,
3473
+ {
3474
+ i18n: 1,
3475
+ eta: 0,
3476
+ queue: 21,
3477
+ queue_position: 2,
3478
+ queue_size: 3,
3479
+ status: 4,
3480
+ scroll_to_output: 22,
3481
+ timer: 5,
3482
+ show_progress: 6,
3483
+ message: 23,
3484
+ progress: 7,
3485
+ variant: 8,
3486
+ loading_text: 9,
3487
+ absolute: 10,
3488
+ translucent: 11,
3489
+ border: 12,
3490
+ autoscroll: 24
3491
+ },
3492
+ null,
3493
+ [-1, -1]
3494
+ );
3495
+ }
3496
+ }
3497
+ const { setContext: La, getContext: Fo } = window.__gradio__svelte__internal, Eo = "WORKER_PROXY_CONTEXT_KEY";
3498
+ function Do() {
3499
+ return Fo(Eo);
3500
+ }
3501
+ function Ro(l) {
3502
+ return l.host === window.location.host || l.host === "localhost:7860" || l.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194
3503
+ l.host === "lite.local";
3504
+ }
3505
+ async function tn(l) {
3506
+ if (l == null)
3507
+ return l;
3508
+ const e = new URL(l);
3509
+ if (!Ro(e) || e.protocol !== "http:" && e.protocol !== "https:")
3510
+ return l;
3511
+ const t = Do();
3512
+ if (t == null)
3513
+ return l;
3514
+ const n = e.pathname;
3515
+ return t.httpRequest({
3516
+ method: "GET",
3517
+ path: n,
3518
+ headers: {},
3519
+ query_string: ""
3520
+ }).then((i) => {
3521
+ if (i.status !== 200)
3522
+ throw new Error(`Failed to get file ${n} from the Wasm worker.`);
3523
+ const s = new Blob([i.body], {
3524
+ type: i.headers["Content-Type"]
3525
+ });
3526
+ return URL.createObjectURL(s);
3527
+ });
3528
+ }
3529
+ const {
3530
+ SvelteComponent: Vo,
3531
+ append: To,
3532
+ assign: xe,
3533
+ compute_rest_props: nn,
3534
+ detach: ft,
3535
+ element: qn,
3536
+ empty: Po,
3537
+ exclude_internal_props: No,
3538
+ get_spread_update: Xo,
3539
+ handle_promise: ln,
3540
+ init: Yo,
3541
+ insert: _t,
3542
+ noop: ue,
3543
+ safe_not_equal: jo,
3544
+ set_attributes: sn,
3545
+ set_data: Zo,
3546
+ set_style: Uo,
3547
+ src_url_equal: Oo,
3548
+ text: Ho,
3549
+ toggle_class: on,
3550
+ update_await_block_branch: Wo
3551
+ } = window.__gradio__svelte__internal;
3552
+ function Go(l) {
3553
+ let e, t = (
3554
+ /*error*/
3555
+ l[3].message + ""
3556
+ ), n;
3557
+ return {
3558
+ c() {
3559
+ e = qn("p"), n = Ho(t), Uo(e, "color", "red");
3560
+ },
3561
+ m(i, s) {
3562
+ _t(i, e, s), To(e, n);
3563
+ },
3564
+ p(i, s) {
3565
+ s & /*src*/
3566
+ 1 && t !== (t = /*error*/
3567
+ i[3].message + "") && Zo(n, t);
3568
+ },
3569
+ d(i) {
3570
+ i && ft(e);
3571
+ }
3572
+ };
3573
+ }
3574
+ function Ko(l) {
3575
+ let e, t, n = [
3576
+ {
3577
+ src: t = /*resolved_src*/
3578
+ l[2]
3579
+ },
3580
+ /*$$restProps*/
3581
+ l[1]
3582
+ ], i = {};
3583
+ for (let s = 0; s < n.length; s += 1)
3584
+ i = xe(i, n[s]);
3585
+ return {
3586
+ c() {
3587
+ e = qn("img"), sn(e, i), on(e, "svelte-1k8xp4f", !0);
3588
+ },
3589
+ m(s, o) {
3590
+ _t(s, e, o);
3591
+ },
3592
+ p(s, o) {
3593
+ sn(e, i = Xo(n, [
3594
+ o & /*src*/
3595
+ 1 && !Oo(e.src, t = /*resolved_src*/
3596
+ s[2]) && { src: t },
3597
+ o & /*$$restProps*/
3598
+ 2 && /*$$restProps*/
3599
+ s[1]
3600
+ ])), on(e, "svelte-1k8xp4f", !0);
3601
+ },
3602
+ d(s) {
3603
+ s && ft(e);
3604
+ }
3605
+ };
3606
+ }
3607
+ function Jo(l) {
3608
+ return { c: ue, m: ue, p: ue, d: ue };
3609
+ }
3610
+ function Qo(l) {
3611
+ let e, t, n = {
3612
+ ctx: l,
3613
+ current: null,
3614
+ token: null,
3615
+ hasCatch: !0,
3616
+ pending: Jo,
3617
+ then: Ko,
3618
+ catch: Go,
3619
+ value: 2,
3620
+ error: 3
3621
+ };
3622
+ return ln(t = tn(
3623
+ /*src*/
3624
+ l[0]
3625
+ ), n), {
3626
+ c() {
3627
+ e = Po(), n.block.c();
3628
+ },
3629
+ m(i, s) {
3630
+ _t(i, e, s), n.block.m(i, n.anchor = s), n.mount = () => e.parentNode, n.anchor = e;
3631
+ },
3632
+ p(i, [s]) {
3633
+ l = i, n.ctx = l, s & /*src*/
3634
+ 1 && t !== (t = tn(
3635
+ /*src*/
3636
+ l[0]
3637
+ )) && ln(t, n) || Wo(n, l, s);
3638
+ },
3639
+ i: ue,
3640
+ o: ue,
3641
+ d(i) {
3642
+ i && ft(e), n.block.d(i), n.token = null, n = null;
3643
+ }
3644
+ };
3645
+ }
3646
+ function xo(l, e, t) {
3647
+ const n = ["src"];
3648
+ let i = nn(e, n), { src: s = void 0 } = e;
3649
+ return l.$$set = (o) => {
3650
+ e = xe(xe({}, e), No(o)), t(1, i = nn(e, n)), "src" in o && t(0, s = o.src);
3651
+ }, [s, i];
3652
+ }
3653
+ class $o extends Vo {
3654
+ constructor(e) {
3655
+ super(), Yo(this, e, xo, Qo, jo, { src: 0 });
3656
+ }
3657
+ }
3658
+ const {
3659
+ SvelteComponent: ea,
3660
+ attr: ta,
3661
+ create_component: na,
3662
+ destroy_component: la,
3663
+ detach: ia,
3664
+ element: sa,
3665
+ init: oa,
3666
+ insert: aa,
3667
+ mount_component: ra,
3668
+ safe_not_equal: fa,
3669
+ toggle_class: _e,
3670
+ transition_in: _a,
3671
+ transition_out: ca
3672
+ } = window.__gradio__svelte__internal;
3673
+ function ua(l) {
3674
+ let e, t, n;
3675
+ return t = new $o({
3676
+ props: {
3677
+ src: (
3678
+ /*samples_dir*/
3679
+ l[1] + /*value*/
3680
+ l[0]
3681
+ ),
3682
+ alt: ""
3683
+ }
3684
+ }), {
3685
+ c() {
3686
+ e = sa("div"), na(t.$$.fragment), ta(e, "class", "container svelte-1iqucjz"), _e(
3687
+ e,
3688
+ "table",
3689
+ /*type*/
3690
+ l[2] === "table"
3691
+ ), _e(
3692
+ e,
3693
+ "gallery",
3694
+ /*type*/
3695
+ l[2] === "gallery"
3696
+ ), _e(
3697
+ e,
3698
+ "selected",
3699
+ /*selected*/
3700
+ l[3]
3701
+ );
3702
+ },
3703
+ m(i, s) {
3704
+ aa(i, e, s), ra(t, e, null), n = !0;
3705
+ },
3706
+ p(i, [s]) {
3707
+ const o = {};
3708
+ s & /*samples_dir, value*/
3709
+ 3 && (o.src = /*samples_dir*/
3710
+ i[1] + /*value*/
3711
+ i[0]), t.$set(o), (!n || s & /*type*/
3712
+ 4) && _e(
3713
+ e,
3714
+ "table",
3715
+ /*type*/
3716
+ i[2] === "table"
3717
+ ), (!n || s & /*type*/
3718
+ 4) && _e(
3719
+ e,
3720
+ "gallery",
3721
+ /*type*/
3722
+ i[2] === "gallery"
3723
+ ), (!n || s & /*selected*/
3724
+ 8) && _e(
3725
+ e,
3726
+ "selected",
3727
+ /*selected*/
3728
+ i[3]
3729
+ );
3730
+ },
3731
+ i(i) {
3732
+ n || (_a(t.$$.fragment, i), n = !0);
3733
+ },
3734
+ o(i) {
3735
+ ca(t.$$.fragment, i), n = !1;
3736
+ },
3737
+ d(i) {
3738
+ i && ia(e), la(t);
3739
+ }
3740
+ };
3741
+ }
3742
+ function da(l, e, t) {
3743
+ let { value: n } = e, { samples_dir: i } = e, { type: s } = e, { selected: o = !1 } = e;
3744
+ return l.$$set = (a) => {
3745
+ "value" in a && t(0, n = a.value), "samples_dir" in a && t(1, i = a.samples_dir), "type" in a && t(2, s = a.type), "selected" in a && t(3, o = a.selected);
3746
+ }, [n, i, s, o];
3747
+ }
3748
+ class za extends ea {
3749
+ constructor(e) {
3750
+ super(), oa(this, e, da, ua, fa, {
3751
+ value: 0,
3752
+ samples_dir: 1,
3753
+ type: 2,
3754
+ selected: 3
3755
+ });
3756
+ }
3757
+ }
3758
+ const {
3759
+ SvelteComponent: ma,
3760
+ assign: ha,
3761
+ create_component: $e,
3762
+ destroy_component: et,
3763
+ detach: ga,
3764
+ flush: z,
3765
+ get_spread_object: ba,
3766
+ get_spread_update: wa,
3767
+ init: pa,
3768
+ insert: va,
3769
+ mount_component: tt,
3770
+ safe_not_equal: ka,
3771
+ space: ya,
3772
+ transition_in: nt,
3773
+ transition_out: lt
3774
+ } = window.__gradio__svelte__internal;
3775
+ function Ca(l) {
3776
+ let e, t, n, i;
3777
+ const s = [
3778
+ {
3779
+ autoscroll: (
3780
+ /*gradio*/
3781
+ l[15].autoscroll
3782
+ )
3783
+ },
3784
+ { i18n: (
3785
+ /*gradio*/
3786
+ l[15].i18n
3787
+ ) },
3788
+ /*loading_status*/
3789
+ l[13]
3790
+ ];
3791
+ let o = {};
3792
+ for (let a = 0; a < s.length; a += 1)
3793
+ o = ha(o, s[a]);
3794
+ return e = new Bo({ props: o }), n = new Us({
3795
+ props: {
3796
+ root: (
3797
+ /*root*/
3798
+ l[7]
3799
+ ),
3800
+ value: (
3801
+ /*value*/
3802
+ l[0]
3803
+ ),
3804
+ label: (
3805
+ /*label*/
3806
+ l[4]
3807
+ ),
3808
+ show_label: (
3809
+ /*show_label*/
3810
+ l[5]
3811
+ ),
3812
+ show_download_button: (
3813
+ /*show_download_button*/
3814
+ l[6]
3815
+ ),
3816
+ show_share_button: (
3817
+ /*show_share_button*/
3818
+ l[14]
3819
+ ),
3820
+ i18n: (
3821
+ /*gradio*/
3822
+ l[15].i18n
3823
+ )
3824
+ }
3825
+ }), n.$on(
3826
+ "select",
3827
+ /*select_handler*/
3828
+ l[17]
3829
+ ), n.$on(
3830
+ "share",
3831
+ /*share_handler*/
3832
+ l[18]
3833
+ ), n.$on(
3834
+ "error",
3835
+ /*error_handler*/
3836
+ l[19]
3837
+ ), {
3838
+ c() {
3839
+ $e(e.$$.fragment), t = ya(), $e(n.$$.fragment);
3840
+ },
3841
+ m(a, r) {
3842
+ tt(e, a, r), va(a, t, r), tt(n, a, r), i = !0;
3843
+ },
3844
+ p(a, r) {
3845
+ const f = r & /*gradio, loading_status*/
3846
+ 40960 ? wa(s, [
3847
+ r & /*gradio*/
3848
+ 32768 && {
3849
+ autoscroll: (
3850
+ /*gradio*/
3851
+ a[15].autoscroll
3852
+ )
3853
+ },
3854
+ r & /*gradio*/
3855
+ 32768 && { i18n: (
3856
+ /*gradio*/
3857
+ a[15].i18n
3858
+ ) },
3859
+ r & /*loading_status*/
3860
+ 8192 && ba(
3861
+ /*loading_status*/
3862
+ a[13]
3863
+ )
3864
+ ]) : {};
3865
+ e.$set(f);
3866
+ const _ = {};
3867
+ r & /*root*/
3868
+ 128 && (_.root = /*root*/
3869
+ a[7]), r & /*value*/
3870
+ 1 && (_.value = /*value*/
3871
+ a[0]), r & /*label*/
3872
+ 16 && (_.label = /*label*/
3873
+ a[4]), r & /*show_label*/
3874
+ 32 && (_.show_label = /*show_label*/
3875
+ a[5]), r & /*show_download_button*/
3876
+ 64 && (_.show_download_button = /*show_download_button*/
3877
+ a[6]), r & /*show_share_button*/
3878
+ 16384 && (_.show_share_button = /*show_share_button*/
3879
+ a[14]), r & /*gradio*/
3880
+ 32768 && (_.i18n = /*gradio*/
3881
+ a[15].i18n), n.$set(_);
3882
+ },
3883
+ i(a) {
3884
+ i || (nt(e.$$.fragment, a), nt(n.$$.fragment, a), i = !0);
3885
+ },
3886
+ o(a) {
3887
+ lt(e.$$.fragment, a), lt(n.$$.fragment, a), i = !1;
3888
+ },
3889
+ d(a) {
3890
+ a && ga(t), et(e, a), et(n, a);
3891
+ }
3892
+ };
3893
+ }
3894
+ function qa(l) {
3895
+ let e, t;
3896
+ return e = new Wn({
3897
+ props: {
3898
+ visible: (
3899
+ /*visible*/
3900
+ l[3]
3901
+ ),
3902
+ variant: "solid",
3903
+ border_mode: (
3904
+ /*dragging*/
3905
+ l[16] ? "focus" : "base"
3906
+ ),
3907
+ padding: !1,
3908
+ elem_id: (
3909
+ /*elem_id*/
3910
+ l[1]
3911
+ ),
3912
+ elem_classes: (
3913
+ /*elem_classes*/
3914
+ l[2]
3915
+ ),
3916
+ height: (
3917
+ /*height*/
3918
+ l[8] || void 0
3919
+ ),
3920
+ width: (
3921
+ /*width*/
3922
+ l[9]
3923
+ ),
3924
+ allow_overflow: !1,
3925
+ container: (
3926
+ /*container*/
3927
+ l[10]
3928
+ ),
3929
+ scale: (
3930
+ /*scale*/
3931
+ l[11]
3932
+ ),
3933
+ min_width: (
3934
+ /*min_width*/
3935
+ l[12]
3936
+ ),
3937
+ $$slots: { default: [Ca] },
3938
+ $$scope: { ctx: l }
3939
+ }
3940
+ }), {
3941
+ c() {
3942
+ $e(e.$$.fragment);
3943
+ },
3944
+ m(n, i) {
3945
+ tt(e, n, i), t = !0;
3946
+ },
3947
+ p(n, [i]) {
3948
+ const s = {};
3949
+ i & /*visible*/
3950
+ 8 && (s.visible = /*visible*/
3951
+ n[3]), i & /*elem_id*/
3952
+ 2 && (s.elem_id = /*elem_id*/
3953
+ n[1]), i & /*elem_classes*/
3954
+ 4 && (s.elem_classes = /*elem_classes*/
3955
+ n[2]), i & /*height*/
3956
+ 256 && (s.height = /*height*/
3957
+ n[8] || void 0), i & /*width*/
3958
+ 512 && (s.width = /*width*/
3959
+ n[9]), i & /*container*/
3960
+ 1024 && (s.container = /*container*/
3961
+ n[10]), i & /*scale*/
3962
+ 2048 && (s.scale = /*scale*/
3963
+ n[11]), i & /*min_width*/
3964
+ 4096 && (s.min_width = /*min_width*/
3965
+ n[12]), i & /*$$scope, root, value, label, show_label, show_download_button, show_share_button, gradio, loading_status*/
3966
+ 2154737 && (s.$$scope = { dirty: i, ctx: n }), e.$set(s);
3967
+ },
3968
+ i(n) {
3969
+ t || (nt(e.$$.fragment, n), t = !0);
3970
+ },
3971
+ o(n) {
3972
+ lt(e.$$.fragment, n), t = !1;
3973
+ },
3974
+ d(n) {
3975
+ et(e, n);
3976
+ }
3977
+ };
3978
+ }
3979
+ function Sa(l, e, t) {
3980
+ function n(h) {
3981
+ let H, A = h[0], W = 1;
3982
+ for (; W < h.length; ) {
3983
+ const U = h[W], N = h[W + 1];
3984
+ if (W += 2, (U === "optionalAccess" || U === "optionalCall") && A == null)
3985
+ return;
3986
+ U === "access" || U === "optionalAccess" ? (H = A, A = N(A)) : (U === "call" || U === "optionalCall") && (A = N((...te) => A.call(H, ...te)), H = void 0);
3987
+ }
3988
+ return A;
3989
+ }
3990
+ let { elem_id: i = "" } = e, { elem_classes: s = [] } = e, { visible: o = !0 } = e, { value: a = null } = e, { label: r } = e, { show_label: f } = e, { show_download_button: _ } = e, { root: c } = e, { height: u } = e, { width: d } = e, { container: g = !0 } = e, { scale: p = null } = e, { min_width: C = void 0 } = e, { loading_status: I } = e, { show_share_button: S = !1 } = e, { gradio: m } = e, y;
3991
+ const w = ({ detail: h }) => m.dispatch("select", h), Z = ({ detail: h }) => m.dispatch("share", h), V = ({ detail: h }) => m.dispatch("error", h);
3992
+ return l.$$set = (h) => {
3993
+ "elem_id" in h && t(1, i = h.elem_id), "elem_classes" in h && t(2, s = h.elem_classes), "visible" in h && t(3, o = h.visible), "value" in h && t(0, a = h.value), "label" in h && t(4, r = h.label), "show_label" in h && t(5, f = h.show_label), "show_download_button" in h && t(6, _ = h.show_download_button), "root" in h && t(7, c = h.root), "height" in h && t(8, u = h.height), "width" in h && t(9, d = h.width), "container" in h && t(10, g = h.container), "scale" in h && t(11, p = h.scale), "min_width" in h && t(12, C = h.min_width), "loading_status" in h && t(13, I = h.loading_status), "show_share_button" in h && t(14, S = h.show_share_button), "gradio" in h && t(15, m = h.gradio);
3994
+ }, l.$$.update = () => {
3995
+ l.$$.dirty & /*value*/
3996
+ 1 && t(0, a = a || null), l.$$.dirty & /*value*/
3997
+ 1 && console.log(a), l.$$.dirty & /*value, gradio*/
3998
+ 32769 && n([a, "optionalAccess", (h) => h.image, "optionalAccess", (h) => h.url]) && m.dispatch("change");
3999
+ }, [
4000
+ a,
4001
+ i,
4002
+ s,
4003
+ o,
4004
+ r,
4005
+ f,
4006
+ _,
4007
+ c,
4008
+ u,
4009
+ d,
4010
+ g,
4011
+ p,
4012
+ C,
4013
+ I,
4014
+ S,
4015
+ m,
4016
+ y,
4017
+ w,
4018
+ Z,
4019
+ V
4020
+ ];
4021
+ }
4022
+ class Aa extends ma {
4023
+ constructor(e) {
4024
+ super(), pa(this, e, Sa, qa, ka, {
4025
+ elem_id: 1,
4026
+ elem_classes: 2,
4027
+ visible: 3,
4028
+ value: 0,
4029
+ label: 4,
4030
+ show_label: 5,
4031
+ show_download_button: 6,
4032
+ root: 7,
4033
+ height: 8,
4034
+ width: 9,
4035
+ container: 10,
4036
+ scale: 11,
4037
+ min_width: 12,
4038
+ loading_status: 13,
4039
+ show_share_button: 14,
4040
+ gradio: 15
4041
+ });
4042
+ }
4043
+ get elem_id() {
4044
+ return this.$$.ctx[1];
4045
+ }
4046
+ set elem_id(e) {
4047
+ this.$$set({ elem_id: e }), z();
4048
+ }
4049
+ get elem_classes() {
4050
+ return this.$$.ctx[2];
4051
+ }
4052
+ set elem_classes(e) {
4053
+ this.$$set({ elem_classes: e }), z();
4054
+ }
4055
+ get visible() {
4056
+ return this.$$.ctx[3];
4057
+ }
4058
+ set visible(e) {
4059
+ this.$$set({ visible: e }), z();
4060
+ }
4061
+ get value() {
4062
+ return this.$$.ctx[0];
4063
+ }
4064
+ set value(e) {
4065
+ this.$$set({ value: e }), z();
4066
+ }
4067
+ get label() {
4068
+ return this.$$.ctx[4];
4069
+ }
4070
+ set label(e) {
4071
+ this.$$set({ label: e }), z();
4072
+ }
4073
+ get show_label() {
4074
+ return this.$$.ctx[5];
4075
+ }
4076
+ set show_label(e) {
4077
+ this.$$set({ show_label: e }), z();
4078
+ }
4079
+ get show_download_button() {
4080
+ return this.$$.ctx[6];
4081
+ }
4082
+ set show_download_button(e) {
4083
+ this.$$set({ show_download_button: e }), z();
4084
+ }
4085
+ get root() {
4086
+ return this.$$.ctx[7];
4087
+ }
4088
+ set root(e) {
4089
+ this.$$set({ root: e }), z();
4090
+ }
4091
+ get height() {
4092
+ return this.$$.ctx[8];
4093
+ }
4094
+ set height(e) {
4095
+ this.$$set({ height: e }), z();
4096
+ }
4097
+ get width() {
4098
+ return this.$$.ctx[9];
4099
+ }
4100
+ set width(e) {
4101
+ this.$$set({ width: e }), z();
4102
+ }
4103
+ get container() {
4104
+ return this.$$.ctx[10];
4105
+ }
4106
+ set container(e) {
4107
+ this.$$set({ container: e }), z();
4108
+ }
4109
+ get scale() {
4110
+ return this.$$.ctx[11];
4111
+ }
4112
+ set scale(e) {
4113
+ this.$$set({ scale: e }), z();
4114
+ }
4115
+ get min_width() {
4116
+ return this.$$.ctx[12];
4117
+ }
4118
+ set min_width(e) {
4119
+ this.$$set({ min_width: e }), z();
4120
+ }
4121
+ get loading_status() {
4122
+ return this.$$.ctx[13];
4123
+ }
4124
+ set loading_status(e) {
4125
+ this.$$set({ loading_status: e }), z();
4126
+ }
4127
+ get show_share_button() {
4128
+ return this.$$.ctx[14];
4129
+ }
4130
+ set show_share_button(e) {
4131
+ this.$$set({ show_share_button: e }), z();
4132
+ }
4133
+ get gradio() {
4134
+ return this.$$.ctx[15];
4135
+ }
4136
+ set gradio(e) {
4137
+ this.$$set({ gradio: e }), z();
4138
+ }
4139
+ }
4140
+ export {
4141
+ za as BaseExample,
4142
+ Us as BaseStaticImage,
4143
+ Aa as default
4144
+ };
src/backend/gradio_blurhashimage/templates/component/style.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .block.svelte-1t38q2d{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.svelte-1t38q2d{border-color:var(--color-accent)}.padded.svelte-1t38q2d{padding:var(--block-padding)}.hidden.svelte-1t38q2d{display:none}.hide-container.svelte-1t38q2d{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.svelte-1hnfib2{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.svelte-22c38v{margin-bottom:var(--spacing-xs)}span.svelte-22c38v:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-22c38v{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.svelte-22c38v{margin:0;height:0}label.svelte-9gxdi0{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-9gxdi0{border-top-left-radius:0}label.float.svelte-9gxdi0{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-9gxdi0:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-9gxdi0{height:0}span.svelte-9gxdi0{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-9gxdi0{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.svelte-xtz2g8{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-sm);color:var(--block-label-text-color);border:1px solid transparent}.padded.svelte-xtz2g8{padding:2px;background:var(--background-fill-primary);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color)}button.svelte-xtz2g8:hover{cursor:pointer;color:var(--color-accent)}.padded.svelte-xtz2g8:hover{border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.svelte-xtz2g8{padding:0 1px;font-size:10px}div.svelte-xtz2g8{padding:2px;display:flex;align-items:flex-end}.small.svelte-xtz2g8{width:14px;height:14px}.large.svelte-xtz2g8{width:22px;height:22px}.pending.svelte-xtz2g8{animation:svelte-xtz2g8-flash .5s infinite}@keyframes svelte-xtz2g8-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-145leq6{fill:currentColor}.wrap.svelte-kzcjhc{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3)}.or.svelte-kzcjhc{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-kzcjhc{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.svelte-kzcjhc{font-size:var(--text-lg)}}.hovered.svelte-kzcjhc{color:var(--color-accent)}div.svelte-1nba87b{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;box-shadow:var(--shadow-drop);padding:var(--spacing-xl) 0;color:var(--block-label-text-color);flex-shrink:0;width:95%}.show_border.svelte-1nba87b{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl)}.source-selection.svelte-lde7lt{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:95%;bottom:0;left:0;right:0;margin-left:auto;margin-right:auto;align-self:flex-end}.icon.svelte-lde7lt{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-lde7lt{color:var(--color-accent)}.icon.svelte-lde7lt:hover,.icon.svelte-lde7lt:focus{color:var(--color-accent)}.image-wrapper.svelte-fz4vky{max-width:100%;object-fit:cover}button.svelte-fz4vky{width:var(--size-full);height:var(--size-full);object-fit:contain;display:block}.selectable.svelte-fz4vky{cursor:crosshair}.icon-buttons.svelte-fz4vky{display:flex;position:absolute;top:6px;right:6px;gap:var(--size-1)}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.svelte-14miwb5.svelte-14miwb5{top:0;right:0;left:0}.wrap.default.svelte-14miwb5.svelte-14miwb5{top:0;right:0;bottom:0;left:0}.hide.svelte-14miwb5.svelte-14miwb5{opacity:0;pointer-events:none}.generating.svelte-14miwb5.svelte-14miwb5{animation:svelte-14miwb5-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-14miwb5.svelte-14miwb5{background:none}@keyframes svelte-14miwb5-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-14miwb5.svelte-14miwb5{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-14miwb5.svelte-14miwb5{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-14miwb5.svelte-14miwb5{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-14miwb5.svelte-14miwb5{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-14miwb5.svelte-14miwb5{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-14miwb5 .progress-text.svelte-14miwb5{background:var(--block-background-fill)}.border.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary)}.toast-body.svelte-solcu7{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-solcu7{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-solcu7{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.svelte-solcu7{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-title.error.svelte-solcu7{color:var(--color-red-50)}.toast-title.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-title.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-title.info.svelte-solcu7{color:var(--color-grey-50)}.toast-close.svelte-solcu7{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-close.error.svelte-solcu7{color:var(--color-red-500)}.toast-close.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-close.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-close.info.svelte-solcu7{color:var(--color-grey-500)}.toast-text.svelte-solcu7{font-size:var(--text-lg)}.toast-text.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-text.error.svelte-solcu7{color:var(--color-red-50)}.toast-text.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-text.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-text.info.svelte-solcu7{color:var(--color-grey-50)}.toast-details.svelte-solcu7{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-solcu7{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-icon.error.svelte-solcu7{color:var(--color-red-500)}.toast-icon.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-icon.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-solcu7{color:var(--color-grey-500)}@keyframes svelte-solcu7-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-solcu7{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-solcu7-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-solcu7{background:var(--color-red-700)}.dark .timer.error.svelte-solcu7{background:var(--color-red-500)}.timer.warning.svelte-solcu7{background:var(--color-yellow-700)}.dark .timer.warning.svelte-solcu7{background:var(--color-yellow-500)}.timer.info.svelte-solcu7{background:var(--color-grey-700)}.dark .timer.info.svelte-solcu7{background:var(--color-grey-500)}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}img.svelte-1k8xp4f{max-width:100%;max-height:100%;border-radius:var(--radius-lg);max-width:none}.container.selected.svelte-1iqucjz{border-color:var(--border-color-accent)}.container.table.svelte-1iqucjz{margin:0 auto;border:2px solid var(--border-color-primary);border-radius:var(--radius-lg);width:var(--size-20);height:var(--size-20);object-fit:cover}.container.gallery.svelte-1iqucjz{border:2px solid var(--border-color-primary);height:var(--size-20);max-height:var(--size-20);object-fit:cover}
src/backend/gradio_blurhashimage/templates/example/index.js ADDED
@@ -0,0 +1,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const { setContext: te, getContext: v } = window.__gradio__svelte__internal, y = "WORKER_PROXY_CONTEXT_KEY";
2
+ function k() {
3
+ return v(y);
4
+ }
5
+ function w(l) {
6
+ return l.host === window.location.host || l.host === "localhost:7860" || l.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194
7
+ l.host === "lite.local";
8
+ }
9
+ async function f(l) {
10
+ if (l == null)
11
+ return l;
12
+ const e = new URL(l);
13
+ if (!w(e) || e.protocol !== "http:" && e.protocol !== "https:")
14
+ return l;
15
+ const o = k();
16
+ if (o == null)
17
+ return l;
18
+ const n = e.pathname;
19
+ return o.httpRequest({
20
+ method: "GET",
21
+ path: n,
22
+ headers: {},
23
+ query_string: ""
24
+ }).then((t) => {
25
+ if (t.status !== 200)
26
+ throw new Error(`Failed to get file ${n} from the Wasm worker.`);
27
+ const s = new Blob([t.body], {
28
+ type: t.headers["Content-Type"]
29
+ });
30
+ return URL.createObjectURL(s);
31
+ });
32
+ }
33
+ const {
34
+ SvelteComponent: C,
35
+ append: E,
36
+ assign: c,
37
+ compute_rest_props: d,
38
+ detach: u,
39
+ element: b,
40
+ empty: R,
41
+ exclude_internal_props: q,
42
+ get_spread_update: O,
43
+ handle_promise: g,
44
+ init: T,
45
+ insert: m,
46
+ noop: i,
47
+ safe_not_equal: P,
48
+ set_attributes: h,
49
+ set_data: U,
50
+ set_style: W,
51
+ src_url_equal: K,
52
+ text: X,
53
+ toggle_class: p,
54
+ update_await_block_branch: Y
55
+ } = window.__gradio__svelte__internal;
56
+ function L(l) {
57
+ let e, o = (
58
+ /*error*/
59
+ l[3].message + ""
60
+ ), n;
61
+ return {
62
+ c() {
63
+ e = b("p"), n = X(o), W(e, "color", "red");
64
+ },
65
+ m(t, s) {
66
+ m(t, e, s), E(e, n);
67
+ },
68
+ p(t, s) {
69
+ s & /*src*/
70
+ 1 && o !== (o = /*error*/
71
+ t[3].message + "") && U(n, o);
72
+ },
73
+ d(t) {
74
+ t && u(e);
75
+ }
76
+ };
77
+ }
78
+ function N(l) {
79
+ let e, o, n = [
80
+ {
81
+ src: o = /*resolved_src*/
82
+ l[2]
83
+ },
84
+ /*$$restProps*/
85
+ l[1]
86
+ ], t = {};
87
+ for (let s = 0; s < n.length; s += 1)
88
+ t = c(t, n[s]);
89
+ return {
90
+ c() {
91
+ e = b("img"), h(e, t), p(e, "svelte-1k8xp4f", !0);
92
+ },
93
+ m(s, r) {
94
+ m(s, e, r);
95
+ },
96
+ p(s, r) {
97
+ h(e, t = O(n, [
98
+ r & /*src*/
99
+ 1 && !K(e.src, o = /*resolved_src*/
100
+ s[2]) && { src: o },
101
+ r & /*$$restProps*/
102
+ 2 && /*$$restProps*/
103
+ s[1]
104
+ ])), p(e, "svelte-1k8xp4f", !0);
105
+ },
106
+ d(s) {
107
+ s && u(e);
108
+ }
109
+ };
110
+ }
111
+ function S(l) {
112
+ return { c: i, m: i, p: i, d: i };
113
+ }
114
+ function j(l) {
115
+ let e, o, n = {
116
+ ctx: l,
117
+ current: null,
118
+ token: null,
119
+ hasCatch: !0,
120
+ pending: S,
121
+ then: N,
122
+ catch: L,
123
+ value: 2,
124
+ error: 3
125
+ };
126
+ return g(o = f(
127
+ /*src*/
128
+ l[0]
129
+ ), n), {
130
+ c() {
131
+ e = R(), n.block.c();
132
+ },
133
+ m(t, s) {
134
+ m(t, e, s), n.block.m(t, n.anchor = s), n.mount = () => e.parentNode, n.anchor = e;
135
+ },
136
+ p(t, [s]) {
137
+ l = t, n.ctx = l, s & /*src*/
138
+ 1 && o !== (o = f(
139
+ /*src*/
140
+ l[0]
141
+ )) && g(o, n) || Y(n, l, s);
142
+ },
143
+ i,
144
+ o: i,
145
+ d(t) {
146
+ t && u(e), n.block.d(t), n.token = null, n = null;
147
+ }
148
+ };
149
+ }
150
+ function I(l, e, o) {
151
+ const n = ["src"];
152
+ let t = d(e, n), { src: s = void 0 } = e;
153
+ return l.$$set = (r) => {
154
+ e = c(c({}, e), q(r)), o(1, t = d(e, n)), "src" in r && o(0, s = r.src);
155
+ }, [s, t];
156
+ }
157
+ class x extends C {
158
+ constructor(e) {
159
+ super(), T(this, e, I, j, P, { src: 0 });
160
+ }
161
+ }
162
+ const {
163
+ SvelteComponent: z,
164
+ attr: B,
165
+ create_component: F,
166
+ destroy_component: G,
167
+ detach: A,
168
+ element: D,
169
+ init: H,
170
+ insert: J,
171
+ mount_component: M,
172
+ safe_not_equal: Q,
173
+ toggle_class: _,
174
+ transition_in: V,
175
+ transition_out: Z
176
+ } = window.__gradio__svelte__internal;
177
+ function $(l) {
178
+ let e, o, n;
179
+ return o = new x({
180
+ props: {
181
+ src: (
182
+ /*samples_dir*/
183
+ l[1] + /*value*/
184
+ l[0]
185
+ ),
186
+ alt: ""
187
+ }
188
+ }), {
189
+ c() {
190
+ e = D("div"), F(o.$$.fragment), B(e, "class", "container svelte-1iqucjz"), _(
191
+ e,
192
+ "table",
193
+ /*type*/
194
+ l[2] === "table"
195
+ ), _(
196
+ e,
197
+ "gallery",
198
+ /*type*/
199
+ l[2] === "gallery"
200
+ ), _(
201
+ e,
202
+ "selected",
203
+ /*selected*/
204
+ l[3]
205
+ );
206
+ },
207
+ m(t, s) {
208
+ J(t, e, s), M(o, e, null), n = !0;
209
+ },
210
+ p(t, [s]) {
211
+ const r = {};
212
+ s & /*samples_dir, value*/
213
+ 3 && (r.src = /*samples_dir*/
214
+ t[1] + /*value*/
215
+ t[0]), o.$set(r), (!n || s & /*type*/
216
+ 4) && _(
217
+ e,
218
+ "table",
219
+ /*type*/
220
+ t[2] === "table"
221
+ ), (!n || s & /*type*/
222
+ 4) && _(
223
+ e,
224
+ "gallery",
225
+ /*type*/
226
+ t[2] === "gallery"
227
+ ), (!n || s & /*selected*/
228
+ 8) && _(
229
+ e,
230
+ "selected",
231
+ /*selected*/
232
+ t[3]
233
+ );
234
+ },
235
+ i(t) {
236
+ n || (V(o.$$.fragment, t), n = !0);
237
+ },
238
+ o(t) {
239
+ Z(o.$$.fragment, t), n = !1;
240
+ },
241
+ d(t) {
242
+ t && A(e), G(o);
243
+ }
244
+ };
245
+ }
246
+ function ee(l, e, o) {
247
+ let { value: n } = e, { samples_dir: t } = e, { type: s } = e, { selected: r = !1 } = e;
248
+ return l.$$set = (a) => {
249
+ "value" in a && o(0, n = a.value), "samples_dir" in a && o(1, t = a.samples_dir), "type" in a && o(2, s = a.type), "selected" in a && o(3, r = a.selected);
250
+ }, [n, t, s, r];
251
+ }
252
+ class ne extends z {
253
+ constructor(e) {
254
+ super(), H(this, e, ee, $, Q, {
255
+ value: 0,
256
+ samples_dir: 1,
257
+ type: 2,
258
+ selected: 3
259
+ });
260
+ }
261
+ }
262
+ export {
263
+ ne as default
264
+ };
src/backend/gradio_blurhashimage/templates/example/style.css ADDED
@@ -0,0 +1 @@
 
 
1
+ img.svelte-1k8xp4f{max-width:100%;max-height:100%;border-radius:var(--radius-lg);max-width:none}.container.selected.svelte-1iqucjz{border-color:var(--border-color-accent)}.container.table.svelte-1iqucjz{margin:0 auto;border:2px solid var(--border-color-primary);border-radius:var(--radius-lg);width:var(--size-20);height:var(--size-20);object-fit:cover}.container.gallery.svelte-1iqucjz{border:2px solid var(--border-color-primary);height:var(--size-20);max-height:var(--size-20);object-fit:cover}
src/demo/__init__.py ADDED
File without changes
src/demo/app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from gradio_blurhashimage import BlurhashImage
4
+
5
+
6
+ demo = gr.Interface(
7
+ lambda x:x,
8
+ gr.Image(),
9
+ BlurhashImage(),
10
+ )
11
+ demo.launch()
src/frontend/Example.svelte ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import Image from "./shared/Image.svelte";
3
+
4
+ export let value: string;
5
+ export let samples_dir: string;
6
+ export let type: "gallery" | "table";
7
+ export let selected = false;
8
+ </script>
9
+
10
+ <div
11
+ class="container"
12
+ class:table={type === "table"}
13
+ class:gallery={type === "gallery"}
14
+ class:selected
15
+ >
16
+ <Image src={samples_dir + value} alt="" />
17
+ </div>
18
+
19
+ <style>
20
+ .container.selected {
21
+ border-color: var(--border-color-accent);
22
+ }
23
+
24
+ .container.table {
25
+ margin: 0 auto;
26
+ border: 2px solid var(--border-color-primary);
27
+ border-radius: var(--radius-lg);
28
+ width: var(--size-20);
29
+ height: var(--size-20);
30
+ object-fit: cover;
31
+ }
32
+
33
+ .container.gallery {
34
+ border: 2px solid var(--border-color-primary);
35
+ height: var(--size-20);
36
+ max-height: var(--size-20);
37
+ object-fit: cover;
38
+ }
39
+ </style>
src/frontend/Index.svelte ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svelte:options accessors={true} />
2
+
3
+ <script context="module" lang="ts">
4
+ export { default as BaseStaticImage } from "./shared/ImagePreview.svelte";
5
+ export { default as BaseExample } from "./Example.svelte";
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import type { Gradio, SelectData } from "@gradio/utils";
10
+ import StaticImage from "./shared/ImagePreview.svelte";
11
+
12
+ import { Block } from "@gradio/atoms";
13
+ import { StatusTracker } from "@gradio/statustracker";
14
+ import type { BlurhashFileData } from "./shared/data";
15
+ import type { LoadingStatus } from "@gradio/statustracker";
16
+
17
+ export let elem_id = "";
18
+ export let elem_classes: string[] = [];
19
+ export let visible = true;
20
+ export let value: null | BlurhashFileData = null;
21
+ export let label: string;
22
+ export let show_label: boolean;
23
+ export let show_download_button: boolean;
24
+ export let root: string;
25
+
26
+ export let height: number | undefined;
27
+ export let width: number | undefined;
28
+
29
+ export let container = true;
30
+ export let scale: number | null = null;
31
+ export let min_width: number | undefined = undefined;
32
+ export let loading_status: LoadingStatus;
33
+ export let show_share_button = false;
34
+
35
+ export let gradio: Gradio<{
36
+ change: never;
37
+ error: string;
38
+ edit: never;
39
+ stream: never;
40
+ drag: never;
41
+ upload: never;
42
+ clear: never;
43
+ select: SelectData;
44
+ share: ShareData;
45
+ }>;
46
+
47
+ $: console.log(value);
48
+ $: value?.image?.url && gradio.dispatch("change");
49
+ let dragging: boolean;
50
+
51
+ $: value = !value ? null : value;
52
+ </script>
53
+
54
+ <Block
55
+ {visible}
56
+ variant={"solid"}
57
+ border_mode={dragging ? "focus" : "base"}
58
+ padding={false}
59
+ {elem_id}
60
+ {elem_classes}
61
+ height={height || undefined}
62
+ {width}
63
+ allow_overflow={false}
64
+ {container}
65
+ {scale}
66
+ {min_width}
67
+ >
68
+ <StatusTracker
69
+ autoscroll={gradio.autoscroll}
70
+ i18n={gradio.i18n}
71
+ {...loading_status}
72
+ />
73
+ <StaticImage
74
+ on:select={({ detail }) => gradio.dispatch("select", detail)}
75
+ on:share={({ detail }) => gradio.dispatch("share", detail)}
76
+ on:error={({ detail }) => gradio.dispatch("error", detail)}
77
+ {root}
78
+ {value}
79
+ {label}
80
+ {show_label}
81
+ {show_download_button}
82
+ {show_share_button}
83
+ i18n={gradio.i18n}
84
+ />
85
+ </Block>
src/frontend/package-lock.json ADDED
@@ -0,0 +1,1781 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "gradio_blurhashimage",
3
+ "version": "0.3.3",
4
+ "lockfileVersion": 2,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "gradio_blurhashimage",
9
+ "version": "0.3.3",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "@gradio/atoms": "0.2.1",
13
+ "@gradio/client": "0.7.2",
14
+ "@gradio/icons": "0.2.0",
15
+ "@gradio/statustracker": "0.3.1",
16
+ "@gradio/upload": "0.3.3",
17
+ "@gradio/utils": "0.2.0",
18
+ "@gradio/wasm": "0.2.0",
19
+ "blurhash": "^1.1.5",
20
+ "cropperjs": "^1.5.12",
21
+ "lazy-brush": "^1.0.1",
22
+ "resize-observer-polyfill": "^1.5.1",
23
+ "svelte-blurhash": "^1.2.1"
24
+ }
25
+ },
26
+ "node_modules/@ampproject/remapping": {
27
+ "version": "2.2.1",
28
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
29
+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
30
+ "peer": true,
31
+ "dependencies": {
32
+ "@jridgewell/gen-mapping": "^0.3.0",
33
+ "@jridgewell/trace-mapping": "^0.3.9"
34
+ },
35
+ "engines": {
36
+ "node": ">=6.0.0"
37
+ }
38
+ },
39
+ "node_modules/@esbuild/android-arm": {
40
+ "version": "0.19.5",
41
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
42
+ "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
43
+ "cpu": [
44
+ "arm"
45
+ ],
46
+ "optional": true,
47
+ "os": [
48
+ "android"
49
+ ],
50
+ "engines": {
51
+ "node": ">=12"
52
+ }
53
+ },
54
+ "node_modules/@esbuild/android-arm64": {
55
+ "version": "0.19.5",
56
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
57
+ "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
58
+ "cpu": [
59
+ "arm64"
60
+ ],
61
+ "optional": true,
62
+ "os": [
63
+ "android"
64
+ ],
65
+ "engines": {
66
+ "node": ">=12"
67
+ }
68
+ },
69
+ "node_modules/@esbuild/android-x64": {
70
+ "version": "0.19.5",
71
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
72
+ "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
73
+ "cpu": [
74
+ "x64"
75
+ ],
76
+ "optional": true,
77
+ "os": [
78
+ "android"
79
+ ],
80
+ "engines": {
81
+ "node": ">=12"
82
+ }
83
+ },
84
+ "node_modules/@esbuild/darwin-arm64": {
85
+ "version": "0.19.5",
86
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
87
+ "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
88
+ "cpu": [
89
+ "arm64"
90
+ ],
91
+ "optional": true,
92
+ "os": [
93
+ "darwin"
94
+ ],
95
+ "engines": {
96
+ "node": ">=12"
97
+ }
98
+ },
99
+ "node_modules/@esbuild/darwin-x64": {
100
+ "version": "0.19.5",
101
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
102
+ "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
103
+ "cpu": [
104
+ "x64"
105
+ ],
106
+ "optional": true,
107
+ "os": [
108
+ "darwin"
109
+ ],
110
+ "engines": {
111
+ "node": ">=12"
112
+ }
113
+ },
114
+ "node_modules/@esbuild/freebsd-arm64": {
115
+ "version": "0.19.5",
116
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
117
+ "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
118
+ "cpu": [
119
+ "arm64"
120
+ ],
121
+ "optional": true,
122
+ "os": [
123
+ "freebsd"
124
+ ],
125
+ "engines": {
126
+ "node": ">=12"
127
+ }
128
+ },
129
+ "node_modules/@esbuild/freebsd-x64": {
130
+ "version": "0.19.5",
131
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
132
+ "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
133
+ "cpu": [
134
+ "x64"
135
+ ],
136
+ "optional": true,
137
+ "os": [
138
+ "freebsd"
139
+ ],
140
+ "engines": {
141
+ "node": ">=12"
142
+ }
143
+ },
144
+ "node_modules/@esbuild/linux-arm": {
145
+ "version": "0.19.5",
146
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
147
+ "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
148
+ "cpu": [
149
+ "arm"
150
+ ],
151
+ "optional": true,
152
+ "os": [
153
+ "linux"
154
+ ],
155
+ "engines": {
156
+ "node": ">=12"
157
+ }
158
+ },
159
+ "node_modules/@esbuild/linux-arm64": {
160
+ "version": "0.19.5",
161
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
162
+ "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
163
+ "cpu": [
164
+ "arm64"
165
+ ],
166
+ "optional": true,
167
+ "os": [
168
+ "linux"
169
+ ],
170
+ "engines": {
171
+ "node": ">=12"
172
+ }
173
+ },
174
+ "node_modules/@esbuild/linux-ia32": {
175
+ "version": "0.19.5",
176
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
177
+ "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
178
+ "cpu": [
179
+ "ia32"
180
+ ],
181
+ "optional": true,
182
+ "os": [
183
+ "linux"
184
+ ],
185
+ "engines": {
186
+ "node": ">=12"
187
+ }
188
+ },
189
+ "node_modules/@esbuild/linux-loong64": {
190
+ "version": "0.19.5",
191
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
192
+ "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
193
+ "cpu": [
194
+ "loong64"
195
+ ],
196
+ "optional": true,
197
+ "os": [
198
+ "linux"
199
+ ],
200
+ "engines": {
201
+ "node": ">=12"
202
+ }
203
+ },
204
+ "node_modules/@esbuild/linux-mips64el": {
205
+ "version": "0.19.5",
206
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
207
+ "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
208
+ "cpu": [
209
+ "mips64el"
210
+ ],
211
+ "optional": true,
212
+ "os": [
213
+ "linux"
214
+ ],
215
+ "engines": {
216
+ "node": ">=12"
217
+ }
218
+ },
219
+ "node_modules/@esbuild/linux-ppc64": {
220
+ "version": "0.19.5",
221
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
222
+ "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
223
+ "cpu": [
224
+ "ppc64"
225
+ ],
226
+ "optional": true,
227
+ "os": [
228
+ "linux"
229
+ ],
230
+ "engines": {
231
+ "node": ">=12"
232
+ }
233
+ },
234
+ "node_modules/@esbuild/linux-riscv64": {
235
+ "version": "0.19.5",
236
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
237
+ "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
238
+ "cpu": [
239
+ "riscv64"
240
+ ],
241
+ "optional": true,
242
+ "os": [
243
+ "linux"
244
+ ],
245
+ "engines": {
246
+ "node": ">=12"
247
+ }
248
+ },
249
+ "node_modules/@esbuild/linux-s390x": {
250
+ "version": "0.19.5",
251
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
252
+ "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
253
+ "cpu": [
254
+ "s390x"
255
+ ],
256
+ "optional": true,
257
+ "os": [
258
+ "linux"
259
+ ],
260
+ "engines": {
261
+ "node": ">=12"
262
+ }
263
+ },
264
+ "node_modules/@esbuild/linux-x64": {
265
+ "version": "0.19.5",
266
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
267
+ "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
268
+ "cpu": [
269
+ "x64"
270
+ ],
271
+ "optional": true,
272
+ "os": [
273
+ "linux"
274
+ ],
275
+ "engines": {
276
+ "node": ">=12"
277
+ }
278
+ },
279
+ "node_modules/@esbuild/netbsd-x64": {
280
+ "version": "0.19.5",
281
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
282
+ "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
283
+ "cpu": [
284
+ "x64"
285
+ ],
286
+ "optional": true,
287
+ "os": [
288
+ "netbsd"
289
+ ],
290
+ "engines": {
291
+ "node": ">=12"
292
+ }
293
+ },
294
+ "node_modules/@esbuild/openbsd-x64": {
295
+ "version": "0.19.5",
296
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
297
+ "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
298
+ "cpu": [
299
+ "x64"
300
+ ],
301
+ "optional": true,
302
+ "os": [
303
+ "openbsd"
304
+ ],
305
+ "engines": {
306
+ "node": ">=12"
307
+ }
308
+ },
309
+ "node_modules/@esbuild/sunos-x64": {
310
+ "version": "0.19.5",
311
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
312
+ "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
313
+ "cpu": [
314
+ "x64"
315
+ ],
316
+ "optional": true,
317
+ "os": [
318
+ "sunos"
319
+ ],
320
+ "engines": {
321
+ "node": ">=12"
322
+ }
323
+ },
324
+ "node_modules/@esbuild/win32-arm64": {
325
+ "version": "0.19.5",
326
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
327
+ "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
328
+ "cpu": [
329
+ "arm64"
330
+ ],
331
+ "optional": true,
332
+ "os": [
333
+ "win32"
334
+ ],
335
+ "engines": {
336
+ "node": ">=12"
337
+ }
338
+ },
339
+ "node_modules/@esbuild/win32-ia32": {
340
+ "version": "0.19.5",
341
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
342
+ "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
343
+ "cpu": [
344
+ "ia32"
345
+ ],
346
+ "optional": true,
347
+ "os": [
348
+ "win32"
349
+ ],
350
+ "engines": {
351
+ "node": ">=12"
352
+ }
353
+ },
354
+ "node_modules/@esbuild/win32-x64": {
355
+ "version": "0.19.5",
356
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
357
+ "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
358
+ "cpu": [
359
+ "x64"
360
+ ],
361
+ "optional": true,
362
+ "os": [
363
+ "win32"
364
+ ],
365
+ "engines": {
366
+ "node": ">=12"
367
+ }
368
+ },
369
+ "node_modules/@formatjs/ecma402-abstract": {
370
+ "version": "1.11.4",
371
+ "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz",
372
+ "integrity": "sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==",
373
+ "dependencies": {
374
+ "@formatjs/intl-localematcher": "0.2.25",
375
+ "tslib": "^2.1.0"
376
+ }
377
+ },
378
+ "node_modules/@formatjs/fast-memoize": {
379
+ "version": "1.2.1",
380
+ "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz",
381
+ "integrity": "sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==",
382
+ "dependencies": {
383
+ "tslib": "^2.1.0"
384
+ }
385
+ },
386
+ "node_modules/@formatjs/icu-messageformat-parser": {
387
+ "version": "2.1.0",
388
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz",
389
+ "integrity": "sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw==",
390
+ "dependencies": {
391
+ "@formatjs/ecma402-abstract": "1.11.4",
392
+ "@formatjs/icu-skeleton-parser": "1.3.6",
393
+ "tslib": "^2.1.0"
394
+ }
395
+ },
396
+ "node_modules/@formatjs/icu-skeleton-parser": {
397
+ "version": "1.3.6",
398
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz",
399
+ "integrity": "sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg==",
400
+ "dependencies": {
401
+ "@formatjs/ecma402-abstract": "1.11.4",
402
+ "tslib": "^2.1.0"
403
+ }
404
+ },
405
+ "node_modules/@formatjs/intl-localematcher": {
406
+ "version": "0.2.25",
407
+ "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz",
408
+ "integrity": "sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==",
409
+ "dependencies": {
410
+ "tslib": "^2.1.0"
411
+ }
412
+ },
413
+ "node_modules/@gradio/atoms": {
414
+ "version": "0.2.1",
415
+ "resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.2.1.tgz",
416
+ "integrity": "sha512-di3kKSbjxKGngvTAaqUaA6whOVs5BFlQULlWDPq1m37VRgUD7Oq2MkIE+T+YiNAhByN93pqA0hGrWwAUUuxy5Q==",
417
+ "dependencies": {
418
+ "@gradio/icons": "^0.2.0",
419
+ "@gradio/utils": "^0.2.0"
420
+ }
421
+ },
422
+ "node_modules/@gradio/client": {
423
+ "version": "0.7.2",
424
+ "resolved": "https://registry.npmjs.org/@gradio/client/-/client-0.7.2.tgz",
425
+ "integrity": "sha512-YkT3c0u38ZYPKvOCmT0xLu3Gau4SwMe1Yo0PNvqTLwHfI4++dp5MJIWH97820MUqgQhYy6V3GmVAliHRmnfPbw==",
426
+ "dependencies": {
427
+ "bufferutil": "^4.0.7",
428
+ "semiver": "^1.1.0",
429
+ "ws": "^8.13.0"
430
+ },
431
+ "engines": {
432
+ "node": ">=18.0.0"
433
+ }
434
+ },
435
+ "node_modules/@gradio/column": {
436
+ "version": "0.1.0",
437
+ "resolved": "https://registry.npmjs.org/@gradio/column/-/column-0.1.0.tgz",
438
+ "integrity": "sha512-P24nqqVnMXBaDA1f/zSN5HZRho4PxP8Dq+7VltPHlmxIEiZYik2AJ4J0LeuIha34FDO0guu/16evdrpvGIUAfw=="
439
+ },
440
+ "node_modules/@gradio/icons": {
441
+ "version": "0.2.0",
442
+ "resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.2.0.tgz",
443
+ "integrity": "sha512-rfCSmOF+ALqBOjTWL1ICasyA8JuO0MPwFrtlVMyAWp7R14AN8YChC/gbz5fZ0kNBiGGEYOOfqpKxyvC95jGGlg=="
444
+ },
445
+ "node_modules/@gradio/statustracker": {
446
+ "version": "0.3.1",
447
+ "resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.3.1.tgz",
448
+ "integrity": "sha512-ZpmXZSnbgoFU2J54SrNntwfo2OEuEoRV310Q0zGVTH1VL7loziR7GuYhfIbgS8qFlrWM0MhMoLGDX+k7LAig5w==",
449
+ "dependencies": {
450
+ "@gradio/atoms": "^0.2.1",
451
+ "@gradio/column": "^0.1.0",
452
+ "@gradio/icons": "^0.2.0",
453
+ "@gradio/utils": "^0.2.0"
454
+ }
455
+ },
456
+ "node_modules/@gradio/theme": {
457
+ "version": "0.2.0",
458
+ "resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.2.0.tgz",
459
+ "integrity": "sha512-33c68Nk7oRXLn08OxPfjcPm7S4tXGOUV1I1bVgzdM2YV5o1QBOS1GEnXPZPu/CEYPePLMB6bsDwffrLEyLGWVQ=="
460
+ },
461
+ "node_modules/@gradio/upload": {
462
+ "version": "0.3.3",
463
+ "resolved": "https://registry.npmjs.org/@gradio/upload/-/upload-0.3.3.tgz",
464
+ "integrity": "sha512-KWRtH9UTe20u1/14KezuZDEwecLZzjDHdSPDUCrk27SrE6ptV8/qLtefOkg9zE+W51iATxDtQAvi0afLQ8XGrw==",
465
+ "dependencies": {
466
+ "@gradio/atoms": "^0.2.1",
467
+ "@gradio/client": "^0.7.2",
468
+ "@gradio/icons": "^0.2.0",
469
+ "@gradio/upload": "^0.3.3",
470
+ "@gradio/utils": "^0.2.0"
471
+ }
472
+ },
473
+ "node_modules/@gradio/utils": {
474
+ "version": "0.2.0",
475
+ "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0.tgz",
476
+ "integrity": "sha512-YkwzXufi6IxQrlMW+1sFo8Yn6F9NLL69ZoBsbo7QEhms0v5L7pmOTw+dfd7M3dwbRP2lgjrb52i1kAIN3n6aqQ==",
477
+ "dependencies": {
478
+ "@gradio/theme": "^0.2.0",
479
+ "svelte-i18n": "^3.6.0"
480
+ }
481
+ },
482
+ "node_modules/@gradio/wasm": {
483
+ "version": "0.2.0",
484
+ "resolved": "https://registry.npmjs.org/@gradio/wasm/-/wasm-0.2.0.tgz",
485
+ "integrity": "sha512-lU0Uzn4avbyO4AA1yp7IR2FQcO23YUEU3kn0NA8S9cGIZLzxj1FepPO1TsNXtMymDdKKx72TJW2v4yrv/j3H2A==",
486
+ "dependencies": {
487
+ "@types/path-browserify": "^1.0.0",
488
+ "path-browserify": "^1.0.1"
489
+ }
490
+ },
491
+ "node_modules/@jridgewell/gen-mapping": {
492
+ "version": "0.3.3",
493
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
494
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
495
+ "peer": true,
496
+ "dependencies": {
497
+ "@jridgewell/set-array": "^1.0.1",
498
+ "@jridgewell/sourcemap-codec": "^1.4.10",
499
+ "@jridgewell/trace-mapping": "^0.3.9"
500
+ },
501
+ "engines": {
502
+ "node": ">=6.0.0"
503
+ }
504
+ },
505
+ "node_modules/@jridgewell/resolve-uri": {
506
+ "version": "3.1.1",
507
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
508
+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
509
+ "peer": true,
510
+ "engines": {
511
+ "node": ">=6.0.0"
512
+ }
513
+ },
514
+ "node_modules/@jridgewell/set-array": {
515
+ "version": "1.1.2",
516
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
517
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
518
+ "peer": true,
519
+ "engines": {
520
+ "node": ">=6.0.0"
521
+ }
522
+ },
523
+ "node_modules/@jridgewell/sourcemap-codec": {
524
+ "version": "1.4.15",
525
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
526
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
527
+ "peer": true
528
+ },
529
+ "node_modules/@jridgewell/trace-mapping": {
530
+ "version": "0.3.20",
531
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
532
+ "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
533
+ "peer": true,
534
+ "dependencies": {
535
+ "@jridgewell/resolve-uri": "^3.1.0",
536
+ "@jridgewell/sourcemap-codec": "^1.4.14"
537
+ }
538
+ },
539
+ "node_modules/@types/estree": {
540
+ "version": "1.0.5",
541
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
542
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
543
+ "peer": true
544
+ },
545
+ "node_modules/@types/path-browserify": {
546
+ "version": "1.0.2",
547
+ "resolved": "https://registry.npmjs.org/@types/path-browserify/-/path-browserify-1.0.2.tgz",
548
+ "integrity": "sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA=="
549
+ },
550
+ "node_modules/acorn": {
551
+ "version": "8.11.2",
552
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
553
+ "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
554
+ "peer": true,
555
+ "bin": {
556
+ "acorn": "bin/acorn"
557
+ },
558
+ "engines": {
559
+ "node": ">=0.4.0"
560
+ }
561
+ },
562
+ "node_modules/aria-query": {
563
+ "version": "5.3.0",
564
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
565
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
566
+ "peer": true,
567
+ "dependencies": {
568
+ "dequal": "^2.0.3"
569
+ }
570
+ },
571
+ "node_modules/axobject-query": {
572
+ "version": "3.2.1",
573
+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
574
+ "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==",
575
+ "peer": true,
576
+ "dependencies": {
577
+ "dequal": "^2.0.3"
578
+ }
579
+ },
580
+ "node_modules/blurhash": {
581
+ "version": "1.1.5",
582
+ "resolved": "https://registry.npmjs.org/blurhash/-/blurhash-1.1.5.tgz",
583
+ "integrity": "sha512-a+LO3A2DfxTaTztsmkbLYmUzUeApi0LZuKalwbNmqAHR6HhJGMt1qSV/R3wc+w4DL28holjqO3Bg74aUGavGjg=="
584
+ },
585
+ "node_modules/bufferutil": {
586
+ "version": "4.0.8",
587
+ "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz",
588
+ "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==",
589
+ "hasInstallScript": true,
590
+ "dependencies": {
591
+ "node-gyp-build": "^4.3.0"
592
+ },
593
+ "engines": {
594
+ "node": ">=6.14.2"
595
+ }
596
+ },
597
+ "node_modules/cli-color": {
598
+ "version": "2.0.3",
599
+ "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz",
600
+ "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==",
601
+ "dependencies": {
602
+ "d": "^1.0.1",
603
+ "es5-ext": "^0.10.61",
604
+ "es6-iterator": "^2.0.3",
605
+ "memoizee": "^0.4.15",
606
+ "timers-ext": "^0.1.7"
607
+ },
608
+ "engines": {
609
+ "node": ">=0.10"
610
+ }
611
+ },
612
+ "node_modules/code-red": {
613
+ "version": "1.0.4",
614
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
615
+ "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
616
+ "peer": true,
617
+ "dependencies": {
618
+ "@jridgewell/sourcemap-codec": "^1.4.15",
619
+ "@types/estree": "^1.0.1",
620
+ "acorn": "^8.10.0",
621
+ "estree-walker": "^3.0.3",
622
+ "periscopic": "^3.1.0"
623
+ }
624
+ },
625
+ "node_modules/cropperjs": {
626
+ "version": "1.6.1",
627
+ "resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.6.1.tgz",
628
+ "integrity": "sha512-F4wsi+XkDHCOMrHMYjrTEE4QBOrsHHN5/2VsVAaRq8P7E5z7xQpT75S+f/9WikmBEailas3+yo+6zPIomW+NOA=="
629
+ },
630
+ "node_modules/css-tree": {
631
+ "version": "2.3.1",
632
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
633
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
634
+ "peer": true,
635
+ "dependencies": {
636
+ "mdn-data": "2.0.30",
637
+ "source-map-js": "^1.0.1"
638
+ },
639
+ "engines": {
640
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
641
+ }
642
+ },
643
+ "node_modules/d": {
644
+ "version": "1.0.1",
645
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
646
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
647
+ "dependencies": {
648
+ "es5-ext": "^0.10.50",
649
+ "type": "^1.0.1"
650
+ }
651
+ },
652
+ "node_modules/deepmerge": {
653
+ "version": "4.3.1",
654
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
655
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
656
+ "engines": {
657
+ "node": ">=0.10.0"
658
+ }
659
+ },
660
+ "node_modules/dequal": {
661
+ "version": "2.0.3",
662
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
663
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
664
+ "peer": true,
665
+ "engines": {
666
+ "node": ">=6"
667
+ }
668
+ },
669
+ "node_modules/es5-ext": {
670
+ "version": "0.10.62",
671
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz",
672
+ "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==",
673
+ "hasInstallScript": true,
674
+ "dependencies": {
675
+ "es6-iterator": "^2.0.3",
676
+ "es6-symbol": "^3.1.3",
677
+ "next-tick": "^1.1.0"
678
+ },
679
+ "engines": {
680
+ "node": ">=0.10"
681
+ }
682
+ },
683
+ "node_modules/es6-iterator": {
684
+ "version": "2.0.3",
685
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
686
+ "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
687
+ "dependencies": {
688
+ "d": "1",
689
+ "es5-ext": "^0.10.35",
690
+ "es6-symbol": "^3.1.1"
691
+ }
692
+ },
693
+ "node_modules/es6-symbol": {
694
+ "version": "3.1.3",
695
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
696
+ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
697
+ "dependencies": {
698
+ "d": "^1.0.1",
699
+ "ext": "^1.1.2"
700
+ }
701
+ },
702
+ "node_modules/es6-weak-map": {
703
+ "version": "2.0.3",
704
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
705
+ "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
706
+ "dependencies": {
707
+ "d": "1",
708
+ "es5-ext": "^0.10.46",
709
+ "es6-iterator": "^2.0.3",
710
+ "es6-symbol": "^3.1.1"
711
+ }
712
+ },
713
+ "node_modules/esbuild": {
714
+ "version": "0.19.5",
715
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
716
+ "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
717
+ "hasInstallScript": true,
718
+ "bin": {
719
+ "esbuild": "bin/esbuild"
720
+ },
721
+ "engines": {
722
+ "node": ">=12"
723
+ },
724
+ "optionalDependencies": {
725
+ "@esbuild/android-arm": "0.19.5",
726
+ "@esbuild/android-arm64": "0.19.5",
727
+ "@esbuild/android-x64": "0.19.5",
728
+ "@esbuild/darwin-arm64": "0.19.5",
729
+ "@esbuild/darwin-x64": "0.19.5",
730
+ "@esbuild/freebsd-arm64": "0.19.5",
731
+ "@esbuild/freebsd-x64": "0.19.5",
732
+ "@esbuild/linux-arm": "0.19.5",
733
+ "@esbuild/linux-arm64": "0.19.5",
734
+ "@esbuild/linux-ia32": "0.19.5",
735
+ "@esbuild/linux-loong64": "0.19.5",
736
+ "@esbuild/linux-mips64el": "0.19.5",
737
+ "@esbuild/linux-ppc64": "0.19.5",
738
+ "@esbuild/linux-riscv64": "0.19.5",
739
+ "@esbuild/linux-s390x": "0.19.5",
740
+ "@esbuild/linux-x64": "0.19.5",
741
+ "@esbuild/netbsd-x64": "0.19.5",
742
+ "@esbuild/openbsd-x64": "0.19.5",
743
+ "@esbuild/sunos-x64": "0.19.5",
744
+ "@esbuild/win32-arm64": "0.19.5",
745
+ "@esbuild/win32-ia32": "0.19.5",
746
+ "@esbuild/win32-x64": "0.19.5"
747
+ }
748
+ },
749
+ "node_modules/estree-walker": {
750
+ "version": "3.0.3",
751
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
752
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
753
+ "peer": true,
754
+ "dependencies": {
755
+ "@types/estree": "^1.0.0"
756
+ }
757
+ },
758
+ "node_modules/event-emitter": {
759
+ "version": "0.3.5",
760
+ "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
761
+ "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
762
+ "dependencies": {
763
+ "d": "1",
764
+ "es5-ext": "~0.10.14"
765
+ }
766
+ },
767
+ "node_modules/ext": {
768
+ "version": "1.7.0",
769
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
770
+ "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
771
+ "dependencies": {
772
+ "type": "^2.7.2"
773
+ }
774
+ },
775
+ "node_modules/ext/node_modules/type": {
776
+ "version": "2.7.2",
777
+ "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz",
778
+ "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
779
+ },
780
+ "node_modules/globalyzer": {
781
+ "version": "0.1.0",
782
+ "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
783
+ "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
784
+ },
785
+ "node_modules/globrex": {
786
+ "version": "0.1.2",
787
+ "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
788
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
789
+ },
790
+ "node_modules/intl-messageformat": {
791
+ "version": "9.13.0",
792
+ "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz",
793
+ "integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==",
794
+ "dependencies": {
795
+ "@formatjs/ecma402-abstract": "1.11.4",
796
+ "@formatjs/fast-memoize": "1.2.1",
797
+ "@formatjs/icu-messageformat-parser": "2.1.0",
798
+ "tslib": "^2.1.0"
799
+ }
800
+ },
801
+ "node_modules/is-promise": {
802
+ "version": "2.2.2",
803
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
804
+ "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
805
+ },
806
+ "node_modules/is-reference": {
807
+ "version": "3.0.2",
808
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
809
+ "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
810
+ "peer": true,
811
+ "dependencies": {
812
+ "@types/estree": "*"
813
+ }
814
+ },
815
+ "node_modules/lazy-brush": {
816
+ "version": "1.0.1",
817
+ "resolved": "https://registry.npmjs.org/lazy-brush/-/lazy-brush-1.0.1.tgz",
818
+ "integrity": "sha512-xT/iSClTVi7vLoF8dCWTBhCuOWqsLXCMPa6ucVmVAk6hyNCM5JeS1NLhXqIrJktUg+caEYKlqSOUU4u3cpXzKg=="
819
+ },
820
+ "node_modules/locate-character": {
821
+ "version": "3.0.0",
822
+ "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
823
+ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
824
+ "peer": true
825
+ },
826
+ "node_modules/lru-queue": {
827
+ "version": "0.1.0",
828
+ "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
829
+ "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==",
830
+ "dependencies": {
831
+ "es5-ext": "~0.10.2"
832
+ }
833
+ },
834
+ "node_modules/magic-string": {
835
+ "version": "0.30.5",
836
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
837
+ "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
838
+ "peer": true,
839
+ "dependencies": {
840
+ "@jridgewell/sourcemap-codec": "^1.4.15"
841
+ },
842
+ "engines": {
843
+ "node": ">=12"
844
+ }
845
+ },
846
+ "node_modules/mdn-data": {
847
+ "version": "2.0.30",
848
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
849
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
850
+ "peer": true
851
+ },
852
+ "node_modules/memoizee": {
853
+ "version": "0.4.15",
854
+ "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz",
855
+ "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==",
856
+ "dependencies": {
857
+ "d": "^1.0.1",
858
+ "es5-ext": "^0.10.53",
859
+ "es6-weak-map": "^2.0.3",
860
+ "event-emitter": "^0.3.5",
861
+ "is-promise": "^2.2.2",
862
+ "lru-queue": "^0.1.0",
863
+ "next-tick": "^1.1.0",
864
+ "timers-ext": "^0.1.7"
865
+ }
866
+ },
867
+ "node_modules/mri": {
868
+ "version": "1.2.0",
869
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
870
+ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
871
+ "engines": {
872
+ "node": ">=4"
873
+ }
874
+ },
875
+ "node_modules/next-tick": {
876
+ "version": "1.1.0",
877
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
878
+ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
879
+ },
880
+ "node_modules/node-gyp-build": {
881
+ "version": "4.6.1",
882
+ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz",
883
+ "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==",
884
+ "bin": {
885
+ "node-gyp-build": "bin.js",
886
+ "node-gyp-build-optional": "optional.js",
887
+ "node-gyp-build-test": "build-test.js"
888
+ }
889
+ },
890
+ "node_modules/path-browserify": {
891
+ "version": "1.0.1",
892
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
893
+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
894
+ },
895
+ "node_modules/periscopic": {
896
+ "version": "3.1.0",
897
+ "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
898
+ "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
899
+ "peer": true,
900
+ "dependencies": {
901
+ "@types/estree": "^1.0.0",
902
+ "estree-walker": "^3.0.0",
903
+ "is-reference": "^3.0.0"
904
+ }
905
+ },
906
+ "node_modules/resize-observer-polyfill": {
907
+ "version": "1.5.1",
908
+ "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
909
+ "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
910
+ },
911
+ "node_modules/sade": {
912
+ "version": "1.8.1",
913
+ "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
914
+ "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
915
+ "dependencies": {
916
+ "mri": "^1.1.0"
917
+ },
918
+ "engines": {
919
+ "node": ">=6"
920
+ }
921
+ },
922
+ "node_modules/semiver": {
923
+ "version": "1.1.0",
924
+ "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz",
925
+ "integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==",
926
+ "engines": {
927
+ "node": ">=6"
928
+ }
929
+ },
930
+ "node_modules/source-map-js": {
931
+ "version": "1.0.2",
932
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
933
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
934
+ "peer": true,
935
+ "engines": {
936
+ "node": ">=0.10.0"
937
+ }
938
+ },
939
+ "node_modules/svelte": {
940
+ "version": "4.2.2",
941
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.2.tgz",
942
+ "integrity": "sha512-My2tytF2e2NnHSpn2M7/3VdXT4JdTglYVUuSuK/mXL2XtulPYbeBfl8Dm1QiaKRn0zoULRnL+EtfZHHP0k4H3A==",
943
+ "peer": true,
944
+ "dependencies": {
945
+ "@ampproject/remapping": "^2.2.1",
946
+ "@jridgewell/sourcemap-codec": "^1.4.15",
947
+ "@jridgewell/trace-mapping": "^0.3.18",
948
+ "acorn": "^8.9.0",
949
+ "aria-query": "^5.3.0",
950
+ "axobject-query": "^3.2.1",
951
+ "code-red": "^1.0.3",
952
+ "css-tree": "^2.3.1",
953
+ "estree-walker": "^3.0.3",
954
+ "is-reference": "^3.0.1",
955
+ "locate-character": "^3.0.0",
956
+ "magic-string": "^0.30.4",
957
+ "periscopic": "^3.1.0"
958
+ },
959
+ "engines": {
960
+ "node": ">=16"
961
+ }
962
+ },
963
+ "node_modules/svelte-blurhash": {
964
+ "version": "1.2.1",
965
+ "resolved": "https://registry.npmjs.org/svelte-blurhash/-/svelte-blurhash-1.2.1.tgz",
966
+ "integrity": "sha512-OgI/u+3K1pIjODaYdIagqQJEEkaPky31ska+K+WGBMWFMG2vBdSXkt8i13mc/+HvVQ+go2K9GEHUCAgMPkszGA==",
967
+ "peerDependencies": {
968
+ "blurhash": "^1.1.3"
969
+ }
970
+ },
971
+ "node_modules/svelte-i18n": {
972
+ "version": "3.7.4",
973
+ "resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.7.4.tgz",
974
+ "integrity": "sha512-yGRCNo+eBT4cPuU7IVsYTYjxB7I2V8qgUZPlHnNctJj5IgbJgV78flsRzpjZ/8iUYZrS49oCt7uxlU3AZv/N5Q==",
975
+ "dependencies": {
976
+ "cli-color": "^2.0.3",
977
+ "deepmerge": "^4.2.2",
978
+ "esbuild": "^0.19.2",
979
+ "estree-walker": "^2",
980
+ "intl-messageformat": "^9.13.0",
981
+ "sade": "^1.8.1",
982
+ "tiny-glob": "^0.2.9"
983
+ },
984
+ "bin": {
985
+ "svelte-i18n": "dist/cli.js"
986
+ },
987
+ "engines": {
988
+ "node": ">= 16"
989
+ },
990
+ "peerDependencies": {
991
+ "svelte": "^3 || ^4"
992
+ }
993
+ },
994
+ "node_modules/svelte-i18n/node_modules/estree-walker": {
995
+ "version": "2.0.2",
996
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
997
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
998
+ },
999
+ "node_modules/timers-ext": {
1000
+ "version": "0.1.7",
1001
+ "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
1002
+ "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
1003
+ "dependencies": {
1004
+ "es5-ext": "~0.10.46",
1005
+ "next-tick": "1"
1006
+ }
1007
+ },
1008
+ "node_modules/tiny-glob": {
1009
+ "version": "0.2.9",
1010
+ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
1011
+ "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
1012
+ "dependencies": {
1013
+ "globalyzer": "0.1.0",
1014
+ "globrex": "^0.1.2"
1015
+ }
1016
+ },
1017
+ "node_modules/tslib": {
1018
+ "version": "2.6.2",
1019
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
1020
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
1021
+ },
1022
+ "node_modules/type": {
1023
+ "version": "1.2.0",
1024
+ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
1025
+ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
1026
+ },
1027
+ "node_modules/ws": {
1028
+ "version": "8.14.2",
1029
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
1030
+ "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
1031
+ "engines": {
1032
+ "node": ">=10.0.0"
1033
+ },
1034
+ "peerDependencies": {
1035
+ "bufferutil": "^4.0.1",
1036
+ "utf-8-validate": ">=5.0.2"
1037
+ },
1038
+ "peerDependenciesMeta": {
1039
+ "bufferutil": {
1040
+ "optional": true
1041
+ },
1042
+ "utf-8-validate": {
1043
+ "optional": true
1044
+ }
1045
+ }
1046
+ }
1047
+ },
1048
+ "dependencies": {
1049
+ "@ampproject/remapping": {
1050
+ "version": "2.2.1",
1051
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
1052
+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
1053
+ "peer": true,
1054
+ "requires": {
1055
+ "@jridgewell/gen-mapping": "^0.3.0",
1056
+ "@jridgewell/trace-mapping": "^0.3.9"
1057
+ }
1058
+ },
1059
+ "@esbuild/android-arm": {
1060
+ "version": "0.19.5",
1061
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
1062
+ "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
1063
+ "optional": true
1064
+ },
1065
+ "@esbuild/android-arm64": {
1066
+ "version": "0.19.5",
1067
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
1068
+ "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
1069
+ "optional": true
1070
+ },
1071
+ "@esbuild/android-x64": {
1072
+ "version": "0.19.5",
1073
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
1074
+ "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
1075
+ "optional": true
1076
+ },
1077
+ "@esbuild/darwin-arm64": {
1078
+ "version": "0.19.5",
1079
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
1080
+ "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
1081
+ "optional": true
1082
+ },
1083
+ "@esbuild/darwin-x64": {
1084
+ "version": "0.19.5",
1085
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
1086
+ "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
1087
+ "optional": true
1088
+ },
1089
+ "@esbuild/freebsd-arm64": {
1090
+ "version": "0.19.5",
1091
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
1092
+ "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
1093
+ "optional": true
1094
+ },
1095
+ "@esbuild/freebsd-x64": {
1096
+ "version": "0.19.5",
1097
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
1098
+ "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
1099
+ "optional": true
1100
+ },
1101
+ "@esbuild/linux-arm": {
1102
+ "version": "0.19.5",
1103
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
1104
+ "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
1105
+ "optional": true
1106
+ },
1107
+ "@esbuild/linux-arm64": {
1108
+ "version": "0.19.5",
1109
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
1110
+ "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
1111
+ "optional": true
1112
+ },
1113
+ "@esbuild/linux-ia32": {
1114
+ "version": "0.19.5",
1115
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
1116
+ "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
1117
+ "optional": true
1118
+ },
1119
+ "@esbuild/linux-loong64": {
1120
+ "version": "0.19.5",
1121
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
1122
+ "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
1123
+ "optional": true
1124
+ },
1125
+ "@esbuild/linux-mips64el": {
1126
+ "version": "0.19.5",
1127
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
1128
+ "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
1129
+ "optional": true
1130
+ },
1131
+ "@esbuild/linux-ppc64": {
1132
+ "version": "0.19.5",
1133
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
1134
+ "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
1135
+ "optional": true
1136
+ },
1137
+ "@esbuild/linux-riscv64": {
1138
+ "version": "0.19.5",
1139
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
1140
+ "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
1141
+ "optional": true
1142
+ },
1143
+ "@esbuild/linux-s390x": {
1144
+ "version": "0.19.5",
1145
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
1146
+ "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
1147
+ "optional": true
1148
+ },
1149
+ "@esbuild/linux-x64": {
1150
+ "version": "0.19.5",
1151
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
1152
+ "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
1153
+ "optional": true
1154
+ },
1155
+ "@esbuild/netbsd-x64": {
1156
+ "version": "0.19.5",
1157
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
1158
+ "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
1159
+ "optional": true
1160
+ },
1161
+ "@esbuild/openbsd-x64": {
1162
+ "version": "0.19.5",
1163
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
1164
+ "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
1165
+ "optional": true
1166
+ },
1167
+ "@esbuild/sunos-x64": {
1168
+ "version": "0.19.5",
1169
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
1170
+ "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
1171
+ "optional": true
1172
+ },
1173
+ "@esbuild/win32-arm64": {
1174
+ "version": "0.19.5",
1175
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
1176
+ "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
1177
+ "optional": true
1178
+ },
1179
+ "@esbuild/win32-ia32": {
1180
+ "version": "0.19.5",
1181
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
1182
+ "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
1183
+ "optional": true
1184
+ },
1185
+ "@esbuild/win32-x64": {
1186
+ "version": "0.19.5",
1187
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
1188
+ "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
1189
+ "optional": true
1190
+ },
1191
+ "@formatjs/ecma402-abstract": {
1192
+ "version": "1.11.4",
1193
+ "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz",
1194
+ "integrity": "sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==",
1195
+ "requires": {
1196
+ "@formatjs/intl-localematcher": "0.2.25",
1197
+ "tslib": "^2.1.0"
1198
+ }
1199
+ },
1200
+ "@formatjs/fast-memoize": {
1201
+ "version": "1.2.1",
1202
+ "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz",
1203
+ "integrity": "sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==",
1204
+ "requires": {
1205
+ "tslib": "^2.1.0"
1206
+ }
1207
+ },
1208
+ "@formatjs/icu-messageformat-parser": {
1209
+ "version": "2.1.0",
1210
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz",
1211
+ "integrity": "sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw==",
1212
+ "requires": {
1213
+ "@formatjs/ecma402-abstract": "1.11.4",
1214
+ "@formatjs/icu-skeleton-parser": "1.3.6",
1215
+ "tslib": "^2.1.0"
1216
+ }
1217
+ },
1218
+ "@formatjs/icu-skeleton-parser": {
1219
+ "version": "1.3.6",
1220
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz",
1221
+ "integrity": "sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg==",
1222
+ "requires": {
1223
+ "@formatjs/ecma402-abstract": "1.11.4",
1224
+ "tslib": "^2.1.0"
1225
+ }
1226
+ },
1227
+ "@formatjs/intl-localematcher": {
1228
+ "version": "0.2.25",
1229
+ "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz",
1230
+ "integrity": "sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==",
1231
+ "requires": {
1232
+ "tslib": "^2.1.0"
1233
+ }
1234
+ },
1235
+ "@gradio/atoms": {
1236
+ "version": "0.2.1",
1237
+ "resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.2.1.tgz",
1238
+ "integrity": "sha512-di3kKSbjxKGngvTAaqUaA6whOVs5BFlQULlWDPq1m37VRgUD7Oq2MkIE+T+YiNAhByN93pqA0hGrWwAUUuxy5Q==",
1239
+ "requires": {
1240
+ "@gradio/icons": "^0.2.0",
1241
+ "@gradio/utils": "^0.2.0"
1242
+ }
1243
+ },
1244
+ "@gradio/client": {
1245
+ "version": "0.7.2",
1246
+ "resolved": "https://registry.npmjs.org/@gradio/client/-/client-0.7.2.tgz",
1247
+ "integrity": "sha512-YkT3c0u38ZYPKvOCmT0xLu3Gau4SwMe1Yo0PNvqTLwHfI4++dp5MJIWH97820MUqgQhYy6V3GmVAliHRmnfPbw==",
1248
+ "requires": {
1249
+ "bufferutil": "^4.0.7",
1250
+ "semiver": "^1.1.0",
1251
+ "ws": "^8.13.0"
1252
+ }
1253
+ },
1254
+ "@gradio/column": {
1255
+ "version": "0.1.0",
1256
+ "resolved": "https://registry.npmjs.org/@gradio/column/-/column-0.1.0.tgz",
1257
+ "integrity": "sha512-P24nqqVnMXBaDA1f/zSN5HZRho4PxP8Dq+7VltPHlmxIEiZYik2AJ4J0LeuIha34FDO0guu/16evdrpvGIUAfw=="
1258
+ },
1259
+ "@gradio/icons": {
1260
+ "version": "0.2.0",
1261
+ "resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.2.0.tgz",
1262
+ "integrity": "sha512-rfCSmOF+ALqBOjTWL1ICasyA8JuO0MPwFrtlVMyAWp7R14AN8YChC/gbz5fZ0kNBiGGEYOOfqpKxyvC95jGGlg=="
1263
+ },
1264
+ "@gradio/statustracker": {
1265
+ "version": "0.3.1",
1266
+ "resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.3.1.tgz",
1267
+ "integrity": "sha512-ZpmXZSnbgoFU2J54SrNntwfo2OEuEoRV310Q0zGVTH1VL7loziR7GuYhfIbgS8qFlrWM0MhMoLGDX+k7LAig5w==",
1268
+ "requires": {
1269
+ "@gradio/atoms": "^0.2.1",
1270
+ "@gradio/column": "^0.1.0",
1271
+ "@gradio/icons": "^0.2.0",
1272
+ "@gradio/utils": "^0.2.0"
1273
+ }
1274
+ },
1275
+ "@gradio/theme": {
1276
+ "version": "0.2.0",
1277
+ "resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.2.0.tgz",
1278
+ "integrity": "sha512-33c68Nk7oRXLn08OxPfjcPm7S4tXGOUV1I1bVgzdM2YV5o1QBOS1GEnXPZPu/CEYPePLMB6bsDwffrLEyLGWVQ=="
1279
+ },
1280
+ "@gradio/upload": {
1281
+ "version": "0.3.3",
1282
+ "resolved": "https://registry.npmjs.org/@gradio/upload/-/upload-0.3.3.tgz",
1283
+ "integrity": "sha512-KWRtH9UTe20u1/14KezuZDEwecLZzjDHdSPDUCrk27SrE6ptV8/qLtefOkg9zE+W51iATxDtQAvi0afLQ8XGrw==",
1284
+ "requires": {
1285
+ "@gradio/atoms": "^0.2.1",
1286
+ "@gradio/client": "^0.7.2",
1287
+ "@gradio/icons": "^0.2.0",
1288
+ "@gradio/upload": "^0.3.3",
1289
+ "@gradio/utils": "^0.2.0"
1290
+ }
1291
+ },
1292
+ "@gradio/utils": {
1293
+ "version": "0.2.0",
1294
+ "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0.tgz",
1295
+ "integrity": "sha512-YkwzXufi6IxQrlMW+1sFo8Yn6F9NLL69ZoBsbo7QEhms0v5L7pmOTw+dfd7M3dwbRP2lgjrb52i1kAIN3n6aqQ==",
1296
+ "requires": {
1297
+ "@gradio/theme": "^0.2.0",
1298
+ "svelte-i18n": "^3.6.0"
1299
+ }
1300
+ },
1301
+ "@gradio/wasm": {
1302
+ "version": "0.2.0",
1303
+ "resolved": "https://registry.npmjs.org/@gradio/wasm/-/wasm-0.2.0.tgz",
1304
+ "integrity": "sha512-lU0Uzn4avbyO4AA1yp7IR2FQcO23YUEU3kn0NA8S9cGIZLzxj1FepPO1TsNXtMymDdKKx72TJW2v4yrv/j3H2A==",
1305
+ "requires": {
1306
+ "@types/path-browserify": "^1.0.0",
1307
+ "path-browserify": "^1.0.1"
1308
+ }
1309
+ },
1310
+ "@jridgewell/gen-mapping": {
1311
+ "version": "0.3.3",
1312
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
1313
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
1314
+ "peer": true,
1315
+ "requires": {
1316
+ "@jridgewell/set-array": "^1.0.1",
1317
+ "@jridgewell/sourcemap-codec": "^1.4.10",
1318
+ "@jridgewell/trace-mapping": "^0.3.9"
1319
+ }
1320
+ },
1321
+ "@jridgewell/resolve-uri": {
1322
+ "version": "3.1.1",
1323
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
1324
+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
1325
+ "peer": true
1326
+ },
1327
+ "@jridgewell/set-array": {
1328
+ "version": "1.1.2",
1329
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
1330
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
1331
+ "peer": true
1332
+ },
1333
+ "@jridgewell/sourcemap-codec": {
1334
+ "version": "1.4.15",
1335
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
1336
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
1337
+ "peer": true
1338
+ },
1339
+ "@jridgewell/trace-mapping": {
1340
+ "version": "0.3.20",
1341
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
1342
+ "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
1343
+ "peer": true,
1344
+ "requires": {
1345
+ "@jridgewell/resolve-uri": "^3.1.0",
1346
+ "@jridgewell/sourcemap-codec": "^1.4.14"
1347
+ }
1348
+ },
1349
+ "@types/estree": {
1350
+ "version": "1.0.5",
1351
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
1352
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
1353
+ "peer": true
1354
+ },
1355
+ "@types/path-browserify": {
1356
+ "version": "1.0.2",
1357
+ "resolved": "https://registry.npmjs.org/@types/path-browserify/-/path-browserify-1.0.2.tgz",
1358
+ "integrity": "sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA=="
1359
+ },
1360
+ "acorn": {
1361
+ "version": "8.11.2",
1362
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
1363
+ "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
1364
+ "peer": true
1365
+ },
1366
+ "aria-query": {
1367
+ "version": "5.3.0",
1368
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
1369
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
1370
+ "peer": true,
1371
+ "requires": {
1372
+ "dequal": "^2.0.3"
1373
+ }
1374
+ },
1375
+ "axobject-query": {
1376
+ "version": "3.2.1",
1377
+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
1378
+ "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==",
1379
+ "peer": true,
1380
+ "requires": {
1381
+ "dequal": "^2.0.3"
1382
+ }
1383
+ },
1384
+ "blurhash": {
1385
+ "version": "1.1.5",
1386
+ "resolved": "https://registry.npmjs.org/blurhash/-/blurhash-1.1.5.tgz",
1387
+ "integrity": "sha512-a+LO3A2DfxTaTztsmkbLYmUzUeApi0LZuKalwbNmqAHR6HhJGMt1qSV/R3wc+w4DL28holjqO3Bg74aUGavGjg=="
1388
+ },
1389
+ "bufferutil": {
1390
+ "version": "4.0.8",
1391
+ "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz",
1392
+ "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==",
1393
+ "requires": {
1394
+ "node-gyp-build": "^4.3.0"
1395
+ }
1396
+ },
1397
+ "cli-color": {
1398
+ "version": "2.0.3",
1399
+ "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz",
1400
+ "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==",
1401
+ "requires": {
1402
+ "d": "^1.0.1",
1403
+ "es5-ext": "^0.10.61",
1404
+ "es6-iterator": "^2.0.3",
1405
+ "memoizee": "^0.4.15",
1406
+ "timers-ext": "^0.1.7"
1407
+ }
1408
+ },
1409
+ "code-red": {
1410
+ "version": "1.0.4",
1411
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
1412
+ "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
1413
+ "peer": true,
1414
+ "requires": {
1415
+ "@jridgewell/sourcemap-codec": "^1.4.15",
1416
+ "@types/estree": "^1.0.1",
1417
+ "acorn": "^8.10.0",
1418
+ "estree-walker": "^3.0.3",
1419
+ "periscopic": "^3.1.0"
1420
+ }
1421
+ },
1422
+ "cropperjs": {
1423
+ "version": "1.6.1",
1424
+ "resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.6.1.tgz",
1425
+ "integrity": "sha512-F4wsi+XkDHCOMrHMYjrTEE4QBOrsHHN5/2VsVAaRq8P7E5z7xQpT75S+f/9WikmBEailas3+yo+6zPIomW+NOA=="
1426
+ },
1427
+ "css-tree": {
1428
+ "version": "2.3.1",
1429
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
1430
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
1431
+ "peer": true,
1432
+ "requires": {
1433
+ "mdn-data": "2.0.30",
1434
+ "source-map-js": "^1.0.1"
1435
+ }
1436
+ },
1437
+ "d": {
1438
+ "version": "1.0.1",
1439
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
1440
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
1441
+ "requires": {
1442
+ "es5-ext": "^0.10.50",
1443
+ "type": "^1.0.1"
1444
+ }
1445
+ },
1446
+ "deepmerge": {
1447
+ "version": "4.3.1",
1448
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
1449
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="
1450
+ },
1451
+ "dequal": {
1452
+ "version": "2.0.3",
1453
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
1454
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
1455
+ "peer": true
1456
+ },
1457
+ "es5-ext": {
1458
+ "version": "0.10.62",
1459
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz",
1460
+ "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==",
1461
+ "requires": {
1462
+ "es6-iterator": "^2.0.3",
1463
+ "es6-symbol": "^3.1.3",
1464
+ "next-tick": "^1.1.0"
1465
+ }
1466
+ },
1467
+ "es6-iterator": {
1468
+ "version": "2.0.3",
1469
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
1470
+ "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
1471
+ "requires": {
1472
+ "d": "1",
1473
+ "es5-ext": "^0.10.35",
1474
+ "es6-symbol": "^3.1.1"
1475
+ }
1476
+ },
1477
+ "es6-symbol": {
1478
+ "version": "3.1.3",
1479
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
1480
+ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
1481
+ "requires": {
1482
+ "d": "^1.0.1",
1483
+ "ext": "^1.1.2"
1484
+ }
1485
+ },
1486
+ "es6-weak-map": {
1487
+ "version": "2.0.3",
1488
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
1489
+ "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
1490
+ "requires": {
1491
+ "d": "1",
1492
+ "es5-ext": "^0.10.46",
1493
+ "es6-iterator": "^2.0.3",
1494
+ "es6-symbol": "^3.1.1"
1495
+ }
1496
+ },
1497
+ "esbuild": {
1498
+ "version": "0.19.5",
1499
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
1500
+ "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
1501
+ "requires": {
1502
+ "@esbuild/android-arm": "0.19.5",
1503
+ "@esbuild/android-arm64": "0.19.5",
1504
+ "@esbuild/android-x64": "0.19.5",
1505
+ "@esbuild/darwin-arm64": "0.19.5",
1506
+ "@esbuild/darwin-x64": "0.19.5",
1507
+ "@esbuild/freebsd-arm64": "0.19.5",
1508
+ "@esbuild/freebsd-x64": "0.19.5",
1509
+ "@esbuild/linux-arm": "0.19.5",
1510
+ "@esbuild/linux-arm64": "0.19.5",
1511
+ "@esbuild/linux-ia32": "0.19.5",
1512
+ "@esbuild/linux-loong64": "0.19.5",
1513
+ "@esbuild/linux-mips64el": "0.19.5",
1514
+ "@esbuild/linux-ppc64": "0.19.5",
1515
+ "@esbuild/linux-riscv64": "0.19.5",
1516
+ "@esbuild/linux-s390x": "0.19.5",
1517
+ "@esbuild/linux-x64": "0.19.5",
1518
+ "@esbuild/netbsd-x64": "0.19.5",
1519
+ "@esbuild/openbsd-x64": "0.19.5",
1520
+ "@esbuild/sunos-x64": "0.19.5",
1521
+ "@esbuild/win32-arm64": "0.19.5",
1522
+ "@esbuild/win32-ia32": "0.19.5",
1523
+ "@esbuild/win32-x64": "0.19.5"
1524
+ }
1525
+ },
1526
+ "estree-walker": {
1527
+ "version": "3.0.3",
1528
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
1529
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
1530
+ "peer": true,
1531
+ "requires": {
1532
+ "@types/estree": "^1.0.0"
1533
+ }
1534
+ },
1535
+ "event-emitter": {
1536
+ "version": "0.3.5",
1537
+ "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
1538
+ "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
1539
+ "requires": {
1540
+ "d": "1",
1541
+ "es5-ext": "~0.10.14"
1542
+ }
1543
+ },
1544
+ "ext": {
1545
+ "version": "1.7.0",
1546
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
1547
+ "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
1548
+ "requires": {
1549
+ "type": "^2.7.2"
1550
+ },
1551
+ "dependencies": {
1552
+ "type": {
1553
+ "version": "2.7.2",
1554
+ "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz",
1555
+ "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
1556
+ }
1557
+ }
1558
+ },
1559
+ "globalyzer": {
1560
+ "version": "0.1.0",
1561
+ "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
1562
+ "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
1563
+ },
1564
+ "globrex": {
1565
+ "version": "0.1.2",
1566
+ "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
1567
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
1568
+ },
1569
+ "intl-messageformat": {
1570
+ "version": "9.13.0",
1571
+ "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz",
1572
+ "integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==",
1573
+ "requires": {
1574
+ "@formatjs/ecma402-abstract": "1.11.4",
1575
+ "@formatjs/fast-memoize": "1.2.1",
1576
+ "@formatjs/icu-messageformat-parser": "2.1.0",
1577
+ "tslib": "^2.1.0"
1578
+ }
1579
+ },
1580
+ "is-promise": {
1581
+ "version": "2.2.2",
1582
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
1583
+ "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
1584
+ },
1585
+ "is-reference": {
1586
+ "version": "3.0.2",
1587
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
1588
+ "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
1589
+ "peer": true,
1590
+ "requires": {
1591
+ "@types/estree": "*"
1592
+ }
1593
+ },
1594
+ "lazy-brush": {
1595
+ "version": "1.0.1",
1596
+ "resolved": "https://registry.npmjs.org/lazy-brush/-/lazy-brush-1.0.1.tgz",
1597
+ "integrity": "sha512-xT/iSClTVi7vLoF8dCWTBhCuOWqsLXCMPa6ucVmVAk6hyNCM5JeS1NLhXqIrJktUg+caEYKlqSOUU4u3cpXzKg=="
1598
+ },
1599
+ "locate-character": {
1600
+ "version": "3.0.0",
1601
+ "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
1602
+ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
1603
+ "peer": true
1604
+ },
1605
+ "lru-queue": {
1606
+ "version": "0.1.0",
1607
+ "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
1608
+ "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==",
1609
+ "requires": {
1610
+ "es5-ext": "~0.10.2"
1611
+ }
1612
+ },
1613
+ "magic-string": {
1614
+ "version": "0.30.5",
1615
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
1616
+ "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
1617
+ "peer": true,
1618
+ "requires": {
1619
+ "@jridgewell/sourcemap-codec": "^1.4.15"
1620
+ }
1621
+ },
1622
+ "mdn-data": {
1623
+ "version": "2.0.30",
1624
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
1625
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
1626
+ "peer": true
1627
+ },
1628
+ "memoizee": {
1629
+ "version": "0.4.15",
1630
+ "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz",
1631
+ "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==",
1632
+ "requires": {
1633
+ "d": "^1.0.1",
1634
+ "es5-ext": "^0.10.53",
1635
+ "es6-weak-map": "^2.0.3",
1636
+ "event-emitter": "^0.3.5",
1637
+ "is-promise": "^2.2.2",
1638
+ "lru-queue": "^0.1.0",
1639
+ "next-tick": "^1.1.0",
1640
+ "timers-ext": "^0.1.7"
1641
+ }
1642
+ },
1643
+ "mri": {
1644
+ "version": "1.2.0",
1645
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
1646
+ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="
1647
+ },
1648
+ "next-tick": {
1649
+ "version": "1.1.0",
1650
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
1651
+ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
1652
+ },
1653
+ "node-gyp-build": {
1654
+ "version": "4.6.1",
1655
+ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz",
1656
+ "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ=="
1657
+ },
1658
+ "path-browserify": {
1659
+ "version": "1.0.1",
1660
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
1661
+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
1662
+ },
1663
+ "periscopic": {
1664
+ "version": "3.1.0",
1665
+ "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
1666
+ "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
1667
+ "peer": true,
1668
+ "requires": {
1669
+ "@types/estree": "^1.0.0",
1670
+ "estree-walker": "^3.0.0",
1671
+ "is-reference": "^3.0.0"
1672
+ }
1673
+ },
1674
+ "resize-observer-polyfill": {
1675
+ "version": "1.5.1",
1676
+ "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
1677
+ "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
1678
+ },
1679
+ "sade": {
1680
+ "version": "1.8.1",
1681
+ "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
1682
+ "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
1683
+ "requires": {
1684
+ "mri": "^1.1.0"
1685
+ }
1686
+ },
1687
+ "semiver": {
1688
+ "version": "1.1.0",
1689
+ "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz",
1690
+ "integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg=="
1691
+ },
1692
+ "source-map-js": {
1693
+ "version": "1.0.2",
1694
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
1695
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
1696
+ "peer": true
1697
+ },
1698
+ "svelte": {
1699
+ "version": "4.2.2",
1700
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.2.tgz",
1701
+ "integrity": "sha512-My2tytF2e2NnHSpn2M7/3VdXT4JdTglYVUuSuK/mXL2XtulPYbeBfl8Dm1QiaKRn0zoULRnL+EtfZHHP0k4H3A==",
1702
+ "peer": true,
1703
+ "requires": {
1704
+ "@ampproject/remapping": "^2.2.1",
1705
+ "@jridgewell/sourcemap-codec": "^1.4.15",
1706
+ "@jridgewell/trace-mapping": "^0.3.18",
1707
+ "acorn": "^8.9.0",
1708
+ "aria-query": "^5.3.0",
1709
+ "axobject-query": "^3.2.1",
1710
+ "code-red": "^1.0.3",
1711
+ "css-tree": "^2.3.1",
1712
+ "estree-walker": "^3.0.3",
1713
+ "is-reference": "^3.0.1",
1714
+ "locate-character": "^3.0.0",
1715
+ "magic-string": "^0.30.4",
1716
+ "periscopic": "^3.1.0"
1717
+ }
1718
+ },
1719
+ "svelte-blurhash": {
1720
+ "version": "1.2.1",
1721
+ "resolved": "https://registry.npmjs.org/svelte-blurhash/-/svelte-blurhash-1.2.1.tgz",
1722
+ "integrity": "sha512-OgI/u+3K1pIjODaYdIagqQJEEkaPky31ska+K+WGBMWFMG2vBdSXkt8i13mc/+HvVQ+go2K9GEHUCAgMPkszGA==",
1723
+ "requires": {}
1724
+ },
1725
+ "svelte-i18n": {
1726
+ "version": "3.7.4",
1727
+ "resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.7.4.tgz",
1728
+ "integrity": "sha512-yGRCNo+eBT4cPuU7IVsYTYjxB7I2V8qgUZPlHnNctJj5IgbJgV78flsRzpjZ/8iUYZrS49oCt7uxlU3AZv/N5Q==",
1729
+ "requires": {
1730
+ "cli-color": "^2.0.3",
1731
+ "deepmerge": "^4.2.2",
1732
+ "esbuild": "^0.19.2",
1733
+ "estree-walker": "^2",
1734
+ "intl-messageformat": "^9.13.0",
1735
+ "sade": "^1.8.1",
1736
+ "tiny-glob": "^0.2.9"
1737
+ },
1738
+ "dependencies": {
1739
+ "estree-walker": {
1740
+ "version": "2.0.2",
1741
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
1742
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
1743
+ }
1744
+ }
1745
+ },
1746
+ "timers-ext": {
1747
+ "version": "0.1.7",
1748
+ "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
1749
+ "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
1750
+ "requires": {
1751
+ "es5-ext": "~0.10.46",
1752
+ "next-tick": "1"
1753
+ }
1754
+ },
1755
+ "tiny-glob": {
1756
+ "version": "0.2.9",
1757
+ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
1758
+ "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
1759
+ "requires": {
1760
+ "globalyzer": "0.1.0",
1761
+ "globrex": "^0.1.2"
1762
+ }
1763
+ },
1764
+ "tslib": {
1765
+ "version": "2.6.2",
1766
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
1767
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
1768
+ },
1769
+ "type": {
1770
+ "version": "1.2.0",
1771
+ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
1772
+ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
1773
+ },
1774
+ "ws": {
1775
+ "version": "8.14.2",
1776
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
1777
+ "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
1778
+ "requires": {}
1779
+ }
1780
+ }
1781
+ }
src/frontend/package.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "gradio_blurhashimage",
3
+ "version": "0.3.3",
4
+ "description": "Gradio UI packages",
5
+ "type": "module",
6
+ "author": "",
7
+ "license": "ISC",
8
+ "private": false,
9
+ "dependencies": {
10
+ "@gradio/atoms": "0.2.1",
11
+ "@gradio/client": "0.7.2",
12
+ "@gradio/icons": "0.2.0",
13
+ "@gradio/statustracker": "0.3.1",
14
+ "@gradio/upload": "0.3.3",
15
+ "@gradio/utils": "0.2.0",
16
+ "@gradio/wasm": "0.2.0",
17
+ "blurhash": "^1.1.5",
18
+ "cropperjs": "^1.5.12",
19
+ "lazy-brush": "^1.0.1",
20
+ "resize-observer-polyfill": "^1.5.1",
21
+ "svelte-blurhash": "^1.2.1"
22
+ },
23
+ "main_changeset": true,
24
+ "main": "./Index.svelte",
25
+ "exports": {
26
+ ".": "./Index.svelte",
27
+ "./example": "./Example.svelte",
28
+ "./package.json": "./package.json"
29
+ }
30
+ }
src/frontend/shared/ClearImage.svelte ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import { createEventDispatcher } from "svelte";
3
+ import { IconButton } from "@gradio/atoms";
4
+ import { Clear } from "@gradio/icons";
5
+
6
+ const dispatch = createEventDispatcher();
7
+ </script>
8
+
9
+ <div>
10
+ <IconButton
11
+ Icon={Clear}
12
+ label="Remove Image"
13
+ on:click={(event) => {
14
+ dispatch("remove_image");
15
+ event.stopPropagation();
16
+ }}
17
+ />
18
+ </div>
19
+
20
+ <style>
21
+ div {
22
+ display: flex;
23
+ position: absolute;
24
+ top: var(--size-2);
25
+ right: var(--size-2);
26
+ justify-content: flex-end;
27
+ gap: var(--spacing-sm);
28
+ z-index: var(--layer-5);
29
+ }
30
+ </style>
src/frontend/shared/Image.svelte ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import type { HTMLImgAttributes } from "svelte/elements";
3
+ type $$Props = HTMLImgAttributes;
4
+
5
+ import { resolve_wasm_src } from "@gradio/wasm/svelte";
6
+
7
+ export let src: HTMLImgAttributes["src"] = undefined;
8
+ </script>
9
+
10
+ {#await resolve_wasm_src(src) then resolved_src}
11
+ <!-- svelte-ignore a11y-missing-attribute -->
12
+ <img src={resolved_src} {...$$restProps} />
13
+ {:catch error}
14
+ <p style="color: red;">{error.message}</p>
15
+ {/await}
16
+
17
+ <style>
18
+ img {
19
+ max-width: 100%;
20
+ max-height: 100%;
21
+ border-radius: var(--radius-lg);
22
+ max-width: none;
23
+ }
24
+ </style>
src/frontend/shared/ImagePreview.svelte ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import { createEventDispatcher } from "svelte";
3
+ import type { SelectData } from "@gradio/utils";
4
+ import { uploadToHuggingFace } from "@gradio/utils";
5
+ import { BlockLabel, Empty, IconButton, ShareButton } from "@gradio/atoms";
6
+ import { Download } from "@gradio/icons";
7
+ import { get_coordinates_of_clicked_image } from "./utils";
8
+ import { normalise_blurhash_file, BlurhashFileData } from "./data";
9
+ import { BlurhashImage } from 'svelte-blurhash';
10
+
11
+ import { Image } from "@gradio/icons";
12
+ import type { I18nFormatter } from "@gradio/utils";
13
+
14
+ export let value: null | BlurhashFileData;
15
+ export let label: string | undefined = undefined;
16
+ export let show_label: boolean;
17
+ export let show_download_button = true;
18
+ export let show_share_button = false;
19
+ export let root: string;
20
+ export let i18n: I18nFormatter;
21
+
22
+ const dispatch = createEventDispatcher<{
23
+ change: string;
24
+ select: SelectData;
25
+ }>();
26
+
27
+ $: value = normalise_blurhash_file(value, root, null);
28
+
29
+ const handle_click = (evt: MouseEvent): void => {
30
+ let coordinates = get_coordinates_of_clicked_image(evt);
31
+ if (coordinates) {
32
+ dispatch("select", { index: coordinates, value: null });
33
+ }
34
+ };
35
+ </script>
36
+
37
+ <BlockLabel {show_label} Icon={Image} label={label || i18n("image.image")} />
38
+ {#if value === null || value.image === null || !value.image.url}
39
+ <Empty unpadded_box={true} size="large"><Image /></Empty>
40
+ {:else}
41
+ <div class="icon-buttons">
42
+ {#if show_download_button}
43
+ <a
44
+ href={value.image.url}
45
+ target={window.__is_colab__ ? "_blank" : null}
46
+ download={"image"}
47
+ >
48
+ <IconButton Icon={Download} label={i18n("common.download")} />
49
+ </a>
50
+ {/if}
51
+ {#if show_share_button}
52
+ <ShareButton
53
+ {i18n}
54
+ on:share
55
+ on:error
56
+ formatter={async (value) => {
57
+ if (!value) return "";
58
+ let url = await uploadToHuggingFace(value, "base64");
59
+ return `<img src="${url}" />`;
60
+ }}
61
+ {value}
62
+ />
63
+ {/if}
64
+
65
+ </div>
66
+ <button on:click={handle_click} class="selectable">
67
+ <div class="image-wrapper">
68
+ <BlurhashImage
69
+ src={value.image.url}
70
+ hash={value.blurhash}
71
+ width={value.width}
72
+ height={value.height}
73
+ />
74
+ </div>
75
+ </button>
76
+
77
+ {/if}
78
+
79
+ <style>
80
+ .image-wrapper {
81
+ max-width: 100%;
82
+ object-fit: cover;
83
+ }
84
+
85
+ button {
86
+ width: var(--size-full);
87
+ height: var(--size-full);
88
+ object-fit: contain;
89
+ display: block;
90
+ }
91
+
92
+ .selectable {
93
+ cursor: crosshair;
94
+ }
95
+
96
+ .icon-buttons {
97
+ display: flex;
98
+ position: absolute;
99
+ top: 6px;
100
+ right: 6px;
101
+ gap: var(--size-1);
102
+ }
103
+ </style>
src/frontend/shared/data.ts ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { normalise_file, FileData } from "@gradio/client";
2
+
3
+ export class BlurhashFileData {
4
+ image?: FileData;
5
+ blurhash?: string;
6
+ width?: number;
7
+ height?: number;
8
+ constructor({ image, blurhash, width, height }: { image?: FileData; blurhash?: string; width?: number; height?: number }) {
9
+ this.image = image ? new FileData(image) : undefined;
10
+ this.blurhash = blurhash;
11
+ this.width = width;
12
+ this.height = height;
13
+ }
14
+ }
15
+
16
+ export function normalise_blurhash_file(
17
+ file: BlurhashFileData | null,
18
+ server_url: string,
19
+ proxy_url: string | null
20
+ ): BlurhashFileData | null;
21
+
22
+ export function normalise_blurhash_file(
23
+ file: BlurhashFileData[] | null,
24
+ server_url: string,
25
+ proxy_url: string | null
26
+ ): BlurhashFileData[] | null;
27
+
28
+ export function normalise_blurhash_file(
29
+ file: BlurhashFileData[] | BlurhashFileData | null,
30
+ server_url: string, // root: string,
31
+ proxy_url: string | null // root_url: string | null
32
+ ): BlurhashFileData[] | BlurhashFileData | null;
33
+
34
+ export function normalise_blurhash_file(
35
+ blurhash_file: BlurhashFileData[] | BlurhashFileData | null,
36
+ server_url: string, // root: string,
37
+ proxy_url: string | null // root_url: string | null
38
+ ): BlurhashFileData[] | BlurhashFileData | null {
39
+ if (blurhash_file == null) {
40
+ return null;
41
+ }
42
+
43
+ if (Array.isArray(blurhash_file)) {
44
+ const normalized_files: (BlurhashFileData | null)[] = [];
45
+
46
+ for (const x of blurhash_file) {
47
+ normalized_files.push(normalise_blurhash_file(x, server_url, proxy_url));
48
+ }
49
+
50
+ return normalized_files as BlurhashFileData[];
51
+ }
52
+
53
+ const file_data = blurhash_file.image ? normalise_file(blurhash_file.image, server_url, null) : null;
54
+
55
+ return new BlurhashFileData({
56
+ image: file_data ? file_data : undefined,
57
+ blurhash: blurhash_file.blurhash,
58
+ width: blurhash_file.width,
59
+ height: blurhash_file.height,
60
+ });
61
+ }
src/frontend/shared/utils.ts ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export const get_coordinates_of_clicked_image = (
2
+ evt: MouseEvent
3
+ ): [number, number] | null => {
4
+ let image = evt.currentTarget as HTMLImageElement;
5
+
6
+ const imageRect = image.getBoundingClientRect();
7
+ const xScale = image.naturalWidth / imageRect.width;
8
+ const yScale = image.naturalHeight / imageRect.height;
9
+ if (xScale > yScale) {
10
+ const displayed_height = image.naturalHeight / xScale;
11
+ const y_offset = (imageRect.height - displayed_height) / 2;
12
+ var x = Math.round((evt.clientX - imageRect.left) * xScale);
13
+ var y = Math.round((evt.clientY - imageRect.top - y_offset) * xScale);
14
+ } else {
15
+ const displayed_width = image.naturalWidth / yScale;
16
+ const x_offset = (imageRect.width - displayed_width) / 2;
17
+ var x = Math.round((evt.clientX - imageRect.left - x_offset) * yScale);
18
+ var y = Math.round((evt.clientY - imageRect.top) * yScale);
19
+ }
20
+ if (x < 0 || x >= image.naturalWidth || y < 0 || y >= image.naturalHeight) {
21
+ return null;
22
+ }
23
+ return [x, y];
24
+ };
src/pyproject.toml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = [
3
+ "hatchling",
4
+ "hatch-requirements-txt",
5
+ "hatch-fancy-pypi-readme>=22.5.0",
6
+ ]
7
+ build-backend = "hatchling.build"
8
+
9
+ [project]
10
+ name = "gradio_blurhashimage"
11
+ version = "0.0.1"
12
+ description = "Python library for easily interacting with trained machine learning models"
13
+ readme = "README.md"
14
+ license = "Apache-2.0"
15
+ requires-python = ">=3.8"
16
+ authors = [{ name = "Lucain Pouget", email = "[email protected]" }]
17
+ keywords = [
18
+ "machine learning",
19
+ "reproducibility",
20
+ "visualization",
21
+ "gradio",
22
+ "gradio custom component",
23
+ "gradio-template-Image"
24
+ ]
25
+ # Add dependencies here
26
+ dependencies = ["gradio>=4.0,<5.0", "blurhash-python"]
27
+ classifiers = [
28
+ 'Development Status :: 3 - Alpha',
29
+ 'License :: OSI Approved :: Apache Software License',
30
+ 'Operating System :: OS Independent',
31
+ 'Programming Language :: Python :: 3',
32
+ 'Programming Language :: Python :: 3 :: Only',
33
+ 'Programming Language :: Python :: 3.8',
34
+ 'Programming Language :: Python :: 3.9',
35
+ 'Programming Language :: Python :: 3.10',
36
+ 'Programming Language :: Python :: 3.11',
37
+ 'Topic :: Scientific/Engineering',
38
+ 'Topic :: Scientific/Engineering :: Artificial Intelligence',
39
+ 'Topic :: Scientific/Engineering :: Visualization',
40
+ ]
41
+
42
+ [project.optional-dependencies]
43
+ dev = ["build", "twine"]
44
+
45
+ [tool.hatch.build]
46
+ artifacts = ["/backend/gradio_blurhashimage/templates", "*.pyi", "backend/gradio_blurhashimage/templates"]
47
+
48
+ [tool.hatch.build.targets.wheel]
49
+ packages = ["/backend/gradio_blurhashimage"]
src/sample.png ADDED