diff --git a/README.md b/README.md
index b891c2efb4027f724d1e34f02bee3eda99bb2981..24987dc9b284ec402758d6f8a9e8ea1d767b75d6 100644
--- a/README.md
+++ b/README.md
@@ -10,11 +10,11 @@ app_file: space.py
---
# `gradio_propertysheet`
-

💻 Component GitHub Code
+

💻 Component GitHub Code
The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications.
-
+
## Key Features
diff --git a/src/README.md b/src/README.md
index b891c2efb4027f724d1e34f02bee3eda99bb2981..24987dc9b284ec402758d6f8a9e8ea1d767b75d6 100644
--- a/src/README.md
+++ b/src/README.md
@@ -10,11 +10,11 @@ app_file: space.py
---
# `gradio_propertysheet`
-

💻 Component GitHub Code
+

💻 Component GitHub Code
The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications.
-
+
## Key Features
diff --git a/src/backend/gradio_propertysheet/helpers.py b/src/backend/gradio_propertysheet/helpers.py
new file mode 100644
index 0000000000000000000000000000000000000000..f831499c4dc7f9e12d1d7a649eac64e298435f19
--- /dev/null
+++ b/src/backend/gradio_propertysheet/helpers.py
@@ -0,0 +1,112 @@
+from dataclasses import fields, is_dataclass
+import dataclasses
+from gradio_client.documentation import document
+from typing import Any, Dict, Literal, Type, get_args, get_origin, get_type_hints
+
+@document()
+def extract_prop_metadata(cls: Type, field: dataclasses.Field) -> Dict[str, Any]:
+ """
+ Inspects a dataclass field and extracts metadata for UI rendering.
+
+ This function infers the appropriate frontend component (e.g., slider, checkbox)
+ based on the field's type hint if not explicitly specified in the metadata.
+
+ Args:
+ cls: The dataclass instance containing the field.
+ field: The dataclasses.Field object to inspect.
+ Returns:
+ A dictionary of metadata for the frontend to render a property control.
+ """
+ metadata = field.metadata.copy()
+ metadata["name"] = field.name
+ current_value = getattr(cls, field.name)
+ metadata["value"] = current_value if current_value is not None else (field.default if field.default is not dataclasses.MISSING else None)
+ metadata["label"] = metadata.get("label", field.name.replace("_", " ").capitalize())
+
+ prop_type = get_type_hints(type(cls)).get(field.name)
+ if "component" not in metadata:
+ if metadata.get("component") == "colorpicker": pass
+ elif get_origin(prop_type) is Literal: metadata["component"] = "dropdown"
+ elif prop_type is bool: metadata["component"] = "checkbox"
+ elif prop_type is int: metadata["component"] = "number_integer"
+ elif prop_type is float: metadata["component"] = "number_float"
+ else: metadata["component"] = "string"
+
+ if metadata.get("component") == "dropdown":
+ if get_origin(prop_type) is Literal:
+ choices = list(get_args(prop_type))
+ metadata["choices"] = choices
+ if metadata["value"] not in choices:
+ metadata["value"] = choices[0] if choices else None
+ return metadata
+
+@document()
+def build_dataclass_fields(cls: Type, prefix: str = "") -> Dict[str, str]:
+ """
+ Recursively builds a mapping of field labels to field paths for a dataclass.
+
+ This function traverses a dataclass and its nested dataclasses, creating a dictionary
+ that maps metadata labels (from `metadata={"label": ...}`) to dot-separated field paths
+ (e.g., "image_settings.model"). It is used to associate metadata labels with their
+ corresponding fields in a dataclass hierarchy.
+
+ Args:
+ cls: The dataclass type to process (e.g., PropertyConfig).
+ prefix: A string prefix for field paths, used during recursion to track nested fields.
+
+ Returns:
+ A dictionary mapping metadata labels (str) to field paths (str).
+ Example: `{"Model": "image_settings.model", "Description": "description"}`
+ """
+ dataclass_fields = {}
+ type_hints = get_type_hints(cls)
+
+ for field in fields(cls):
+ field_name = field.name
+ field_type = type_hints.get(field_name, field.type)
+ field_label = field.metadata.get('label')
+ current_path = f"{prefix}{field_name}" if prefix else field_name
+
+ if field_label:
+ dataclass_fields[field_label] = current_path
+ if is_dataclass(field_type):
+ sub_fields = build_dataclass_fields(field_type, f"{current_path}.")
+ dataclass_fields.update(sub_fields)
+
+ return dataclass_fields
+
+@document()
+def create_dataclass_instance(cls: Type, data: Dict[str, Any]) -> Any:
+ """
+ Recursively creates an instance of a dataclass from a nested dictionary.
+
+ This function constructs an instance of the specified dataclass, populating its fields
+ with values from the provided dictionary. For fields that are themselves dataclasses,
+ it recursively creates instances of those dataclasses. If a field is missing from the
+ dictionary, it uses the field's default value or default_factory.
+
+ Args:
+ cls: The dataclass type to instantiate (e.g., PropertyConfig).
+ data: A dictionary containing field values, which may be nested to match the dataclass hierarchy.
+
+ Returns:
+ An instance of the dataclass with fields populated from the dictionary.
+ """
+ kwargs = {}
+ type_hints = get_type_hints(cls)
+
+ for field in fields(cls):
+ field_name = field.name
+ field_type = type_hints.get(field_name, field.type)
+ if field_name in data:
+ if is_dataclass(field_type) and isinstance(data[field_name], dict):
+ kwargs[field_name] = create_dataclass_instance(field_type, data[field_name])
+ else:
+ kwargs[field_name] = field.default if data[field_name] is None else data[field_name]
+ else:
+ if field.default_factory is not None:
+ kwargs[field_name] = field.default_factory()
+ else:
+ kwargs[field_name] = field.default
+
+ return cls(**kwargs)
\ No newline at end of file
diff --git a/src/backend/gradio_propertysheet/propertysheet.py b/src/backend/gradio_propertysheet/propertysheet.py
index 49ba938115160a734fc2d36364aacfbf971ddf5c..351e4259aacd1ae67339d1d5b0c57aec7311b04c 100644
--- a/src/backend/gradio_propertysheet/propertysheet.py
+++ b/src/backend/gradio_propertysheet/propertysheet.py
@@ -1,8 +1,10 @@
from __future__ import annotations
import copy
-from typing import Any, Dict, List, get_type_hints, get_origin, get_args, Literal
+from typing import Any, Dict, List, get_type_hints
import dataclasses
from gradio.components.base import Component
+from gradio_propertysheet.helpers import extract_prop_metadata
+from gradio_client.documentation import document
def prop_meta(**kwargs) -> dataclasses.Field:
"""
@@ -12,7 +14,7 @@ def prop_meta(**kwargs) -> dataclasses.Field:
A dataclasses.Field instance with the provided metadata.
"""
return dataclasses.field(metadata=kwargs)
-
+@document()
class PropertySheet(Component):
"""
A Gradio component that renders a dynamic UI from a Python dataclass instance.
@@ -79,42 +81,8 @@ class PropertySheet(Component):
value=self._dataclass_value, **kwargs
)
- def _extract_prop_metadata(self, obj: Any, field: dataclasses.Field) -> Dict[str, Any]:
- """
- Inspects a dataclass field and extracts metadata for UI rendering.
-
- This function infers the appropriate frontend component (e.g., slider, checkbox)
- based on the field's type hint if not explicitly specified in the metadata.
-
- Args:
- obj: The dataclass instance containing the field.
- field: The dataclasses.Field object to inspect.
- Returns:
- A dictionary of metadata for the frontend to render a property control.
- """
- metadata = field.metadata.copy()
- metadata["name"] = field.name
- current_value = getattr(obj, field.name)
- metadata["value"] = current_value if current_value is not None else (field.default if field.default is not dataclasses.MISSING else None)
- metadata["label"] = metadata.get("label", field.name.replace("_", " ").capitalize())
-
- prop_type = get_type_hints(type(obj)).get(field.name)
- if "component" not in metadata:
- if metadata.get("component") == "colorpicker": pass
- elif get_origin(prop_type) is Literal: metadata["component"] = "dropdown"
- elif prop_type is bool: metadata["component"] = "checkbox"
- elif prop_type is int: metadata["component"] = "number_integer"
- elif prop_type is float: metadata["component"] = "number_float"
- else: metadata["component"] = "string"
-
- if metadata.get("component") == "dropdown":
- if get_origin(prop_type) is Literal:
- choices = list(get_args(prop_type))
- metadata["choices"] = choices
- if metadata["value"] not in choices:
- metadata["value"] = choices[0] if choices else None
- return metadata
-
+
+ @document()
def postprocess(self, value: Any) -> List[Dict[str, Any]]:
"""
Converts the Python dataclass instance into a JSON schema for the frontend.
@@ -153,7 +121,7 @@ class PropertySheet(Component):
group_obj = getattr(current_value, field.name)
group_props = []
for group_field in dataclasses.fields(group_obj):
- metadata = self._extract_prop_metadata(group_obj, group_field)
+ metadata = extract_prop_metadata(group_obj, group_field)
metadata["name"] = f"{field.name}.{group_field.name}"
group_props.append(metadata)
@@ -169,7 +137,7 @@ class PropertySheet(Component):
json_schema.append({"group_name": unique_group_name, "properties": group_props})
else:
# Collect root properties to be processed later
- root_properties.append(self._extract_prop_metadata(current_value, field))
+ root_properties.append(extract_prop_metadata(current_value, field))
# Process root properties, if any exist
if root_properties:
@@ -185,7 +153,8 @@ class PropertySheet(Component):
json_schema.insert(0, {"group_name": unique_root_label, "properties": root_properties})
return json_schema
-
+
+ @document()
def preprocess(self, payload: Any) -> Any:
"""
Processes the payload from the frontend to create an updated dataclass instance.
diff --git a/src/backend/gradio_propertysheet/templates/component/index.js b/src/backend/gradio_propertysheet/templates/component/index.js
index ad308828ade867dfa4eb344e4f343166aa97db38..f7a51602246cab5d8035c914581c4ed690c16ca8 100644
--- a/src/backend/gradio_propertysheet/templates/component/index.js
+++ b/src/backend/gradio_propertysheet/templates/component/index.js
@@ -1,41 +1,41 @@
-var Ul = Object.defineProperty;
+var Hl = Object.defineProperty;
var Si = (i) => {
throw TypeError(i);
};
-var Hl = (i, e, t) => e in i ? Ul(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
-var J = (i, e, t) => Hl(i, typeof e != "symbol" ? e + "" : e, t), Gl = (i, e, t) => e.has(i) || Si("Cannot " + t);
+var Gl = (i, e, t) => e in i ? Hl(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
+var J = (i, e, t) => Gl(i, typeof e != "symbol" ? e + "" : e, t), jl = (i, e, t) => e.has(i) || Si("Cannot " + t);
var Ti = (i, e, t) => e.has(i) ? Si("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t);
-var fn = (i, e, t) => (Gl(i, e, "access private method"), t);
+var fn = (i, e, t) => (jl(i, e, "access private method"), t);
const {
- SvelteComponent: jl,
+ SvelteComponent: Vl,
append_hydration: Xn,
- assign: Vl,
+ assign: Wl,
attr: De,
- binding_callbacks: Wl,
+ binding_callbacks: Zl,
children: Qt,
- claim_element: ja,
- claim_space: Va,
+ claim_element: Va,
+ claim_space: Wa,
claim_svg_element: Nn,
- create_slot: Zl,
+ create_slot: Yl,
detach: tt,
- element: Wa,
+ element: Za,
empty: Bi,
- get_all_dirty_from_scope: Yl,
- get_slot_changes: Xl,
- get_spread_update: Kl,
- init: Ql,
+ get_all_dirty_from_scope: Xl,
+ get_slot_changes: Kl,
+ get_spread_update: Ql,
+ init: Jl,
insert_hydration: an,
- listen: Jl,
- noop: eo,
- safe_not_equal: to,
+ listen: eo,
+ noop: to,
+ safe_not_equal: no,
set_dynamic_element_data: Ri,
set_style: V,
- space: Za,
+ space: Ya,
svg_element: Mn,
toggle_class: fe,
- transition_in: Ya,
- transition_out: Xa,
- update_slot_base: no
+ transition_in: Xa,
+ transition_out: Ka,
+ update_slot_base: io
} = window.__gradio__svelte__internal;
function Ii(i) {
let e, t, n, l, o;
@@ -66,26 +66,26 @@ function Ii(i) {
De(t, "x1", "1"), De(t, "y1", "9"), De(t, "x2", "9"), De(t, "y2", "1"), De(t, "stroke", "gray"), De(t, "stroke-width", "0.5"), De(n, "x1", "5"), De(n, "y1", "9"), De(n, "x2", "9"), De(n, "y2", "5"), De(n, "stroke", "gray"), De(n, "stroke-width", "0.5"), De(e, "class", "resize-handle svelte-239wnu"), De(e, "xmlns", "http://www.w3.org/2000/svg"), De(e, "viewBox", "0 0 10 10");
},
m(a, r) {
- an(a, e, r), Xn(e, t), Xn(e, n), l || (o = Jl(
+ an(a, e, r), Xn(e, t), Xn(e, n), l || (o = eo(
e,
"mousedown",
/*resize*/
i[27]
), l = !0);
},
- p: eo,
+ p: to,
d(a) {
a && tt(e), l = !1, o();
}
};
}
-function io(i) {
+function ao(i) {
var m;
let e, t, n, l, o;
const a = (
/*#slots*/
i[31].default
- ), r = Zl(
+ ), r = Yl(
a,
i,
/*$$scope*/
@@ -114,16 +114,16 @@ function io(i) {
}
], c = {};
for (let f = 0; f < u.length; f += 1)
- c = Vl(c, u[f]);
+ c = Wl(c, u[f]);
return {
c() {
- e = Wa(
+ e = Za(
/*tag*/
i[25]
- ), r && r.c(), t = Za(), s && s.c(), this.h();
+ ), r && r.c(), t = Ya(), s && s.c(), this.h();
},
l(f) {
- e = ja(
+ e = Va(
f,
/*tag*/
(i[25] || "null").toUpperCase(),
@@ -135,7 +135,7 @@ function io(i) {
}
);
var d = Qt(e);
- r && r.l(d), t = Va(d), s && s.l(d), d.forEach(tt), this.h();
+ r && r.l(d), t = Wa(d), s && s.l(d), d.forEach(tt), this.h();
},
h() {
Ri(
@@ -281,19 +281,19 @@ function io(i) {
p(f, d) {
var v;
r && r.p && (!o || d[0] & /*$$scope*/
- 1073741824) && no(
+ 1073741824) && io(
r,
a,
f,
/*$$scope*/
f[30],
- o ? Xl(
+ o ? Kl(
a,
/*$$scope*/
f[30],
d,
null
- ) : Yl(
+ ) : Xl(
/*$$scope*/
f[30]
),
@@ -302,7 +302,7 @@ function io(i) {
f[19] ? s ? s.p(f, d) : (s = Ii(f), s.c(), s.m(e, null)) : s && (s.d(1), s = null), Ri(
/*tag*/
f[25]
- )(e, c = Kl(u, [
+ )(e, c = Ql(u, [
(!o || d[0] & /*test_id*/
2048) && { "data-testid": (
/*test_id*/
@@ -466,10 +466,10 @@ function io(i) {
f[18]}px, 100%))`);
},
i(f) {
- o || (Ya(r, f), o = !0);
+ o || (Xa(r, f), o = !0);
},
o(f) {
- Xa(r, f), o = !1;
+ Ka(r, f), o = !1;
},
d(f) {
f && tt(e), r && r.d(f), s && s.d(), i[32](null);
@@ -480,10 +480,10 @@ function Li(i) {
let e;
return {
c() {
- e = Wa("div"), this.h();
+ e = Za("div"), this.h();
},
l(t) {
- e = ja(t, "DIV", { class: !0 }), Qt(e).forEach(tt), this.h();
+ e = Va(t, "DIV", { class: !0 }), Qt(e).forEach(tt), this.h();
},
h() {
De(e, "class", "placeholder svelte-239wnu"), V(
@@ -521,20 +521,20 @@ function Li(i) {
}
};
}
-function ao(i) {
+function lo(i) {
let e, t, n, l = (
/*tag*/
- i[25] && io(i)
+ i[25] && ao(i)
), o = (
/*fullscreen*/
i[0] && Li(i)
);
return {
c() {
- l && l.c(), e = Za(), o && o.c(), t = Bi();
+ l && l.c(), e = Ya(), o && o.c(), t = Bi();
},
l(a) {
- l && l.l(a), e = Va(a), o && o.l(a), t = Bi();
+ l && l.l(a), e = Wa(a), o && o.l(a), t = Bi();
},
m(a, r) {
l && l.m(a, r), an(a, e, r), o && o.m(a, r), an(a, t, r), n = !0;
@@ -545,18 +545,18 @@ function ao(i) {
a[0] ? o ? o.p(a, r) : (o = Li(a), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null);
},
i(a) {
- n || (Ya(l, a), n = !0);
+ n || (Xa(l, a), n = !0);
},
o(a) {
- Xa(l, a), n = !1;
+ Ka(l, a), n = !1;
},
d(a) {
a && (tt(e), tt(t)), l && l.d(a), o && o.d(a);
}
};
}
-function lo(i, e, t) {
- let { $$slots: n = {}, $$scope: l } = e, { height: o = void 0 } = e, { min_height: a = void 0 } = e, { max_height: r = void 0 } = e, { width: s = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: m = "solid" } = e, { border_mode: f = "base" } = e, { padding: d = !0 } = e, { type: v = "normal" } = e, { test_id: y = void 0 } = e, { explicit_call: w = !1 } = e, { container: C = !0 } = e, { visible: h = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: g = "auto" } = e, { scale: b = null } = e, { min_width: F = 0 } = e, { flex: A = !1 } = e, { resizable: T = !1 } = e, { rtl: S = !1 } = e, { fullscreen: x = !1 } = e, q = x, z, Ee = v === "fieldset" ? "fieldset" : "div", se = 0, be = 0, ce = null;
+function oo(i, e, t) {
+ let { $$slots: n = {}, $$scope: l } = e, { height: o = void 0 } = e, { min_height: a = void 0 } = e, { max_height: r = void 0 } = e, { width: s = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: m = "solid" } = e, { border_mode: f = "base" } = e, { padding: d = !0 } = e, { type: v = "normal" } = e, { test_id: y = void 0 } = e, { explicit_call: w = !1 } = e, { container: C = !0 } = e, { visible: h = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: g = "auto" } = e, { scale: b = null } = e, { min_width: F = 0 } = e, { flex: A = !1 } = e, { resizable: T = !1 } = e, { rtl: S = !1 } = e, { fullscreen: x = !1 } = e, q = x, z, be = v === "fieldset" ? "fieldset" : "div", se = 0, ye = 0, ce = null;
function le($) {
x && $.key === "Escape" && t(0, x = !1);
}
@@ -578,7 +578,7 @@ function lo(i, e, t) {
window.addEventListener("mousemove", K), window.addEventListener("mouseup", _e);
};
function he($) {
- Wl[$ ? "unshift" : "push"](() => {
+ Zl[$ ? "unshift" : "push"](() => {
z = $, t(21, z);
});
}
@@ -586,7 +586,7 @@ function lo(i, e, t) {
"height" in $ && t(2, o = $.height), "min_height" in $ && t(3, a = $.min_height), "max_height" in $ && t(4, r = $.max_height), "width" in $ && t(5, s = $.width), "elem_id" in $ && t(6, u = $.elem_id), "elem_classes" in $ && t(7, c = $.elem_classes), "variant" in $ && t(8, m = $.variant), "border_mode" in $ && t(9, f = $.border_mode), "padding" in $ && t(10, d = $.padding), "type" in $ && t(28, v = $.type), "test_id" in $ && t(11, y = $.test_id), "explicit_call" in $ && t(12, w = $.explicit_call), "container" in $ && t(13, C = $.container), "visible" in $ && t(14, h = $.visible), "allow_overflow" in $ && t(15, _ = $.allow_overflow), "overflow_behavior" in $ && t(16, g = $.overflow_behavior), "scale" in $ && t(17, b = $.scale), "min_width" in $ && t(18, F = $.min_width), "flex" in $ && t(1, A = $.flex), "resizable" in $ && t(19, T = $.resizable), "rtl" in $ && t(20, S = $.rtl), "fullscreen" in $ && t(0, x = $.fullscreen), "$$scope" in $ && t(30, l = $.$$scope);
}, i.$$.update = () => {
i.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/
- 538968065 && x !== q && (t(29, q = x), x ? (t(24, ce = z.getBoundingClientRect()), t(22, se = z.offsetHeight), t(23, be = z.offsetWidth), window.addEventListener("keydown", le)) : (t(24, ce = null), window.removeEventListener("keydown", le))), i.$$.dirty[0] & /*visible*/
+ 538968065 && x !== q && (t(29, q = x), x ? (t(24, ce = z.getBoundingClientRect()), t(22, se = z.offsetHeight), t(23, ye = z.offsetWidth), window.addEventListener("keydown", le)) : (t(24, ce = null), window.removeEventListener("keydown", le))), i.$$.dirty[0] & /*visible*/
16384 && (h || t(1, A = !1));
}, [
x,
@@ -612,9 +612,9 @@ function lo(i, e, t) {
S,
z,
se,
- be,
+ ye,
ce,
- Ee,
+ be,
X,
oe,
v,
@@ -624,14 +624,14 @@ function lo(i, e, t) {
he
];
}
-class oo extends jl {
+class ro extends Vl {
constructor(e) {
- super(), Ql(
+ super(), Jl(
this,
e,
+ oo,
lo,
- ao,
- to,
+ no,
{
height: 2,
min_height: 3,
@@ -676,36 +676,36 @@ function ui() {
};
}
let Tt = ui();
-function Ka(i) {
+function Qa(i) {
Tt = i;
}
-const Qa = /[&<>"']/, ro = new RegExp(Qa.source, "g"), Ja = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, so = new RegExp(Ja.source, "g"), uo = {
+const Ja = /[&<>"']/, so = new RegExp(Ja.source, "g"), el = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, uo = new RegExp(el.source, "g"), co = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
-}, Oi = (i) => uo[i];
+}, Oi = (i) => co[i];
function Re(i, e) {
if (e) {
- if (Qa.test(i))
- return i.replace(ro, Oi);
- } else if (Ja.test(i))
- return i.replace(so, Oi);
+ if (Ja.test(i))
+ return i.replace(so, Oi);
+ } else if (el.test(i))
+ return i.replace(uo, Oi);
return i;
}
-const co = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
-function _o(i) {
- return i.replace(co, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
+const _o = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
+function fo(i) {
+ return i.replace(_o, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
}
-const fo = /(^|[^\[])\^/g;
+const po = /(^|[^\[])\^/g;
function Z(i, e) {
let t = typeof i == "string" ? i : i.source;
e = e || "";
const n = {
replace: (l, o) => {
let a = typeof o == "string" ? o : o.source;
- return a = a.replace(fo, "$1"), t = t.replace(l, a), n;
+ return a = a.replace(po, "$1"), t = t.replace(l, a), n;
},
getRegex: () => new RegExp(t, e)
};
@@ -747,7 +747,7 @@ function pn(i, e, t) {
l++;
return i.slice(0, n - l);
}
-function po(i, e) {
+function ho(i, e) {
if (i.indexOf(e[1]) === -1)
return -1;
let t = 0;
@@ -782,7 +782,7 @@ function Ni(i, e, t, n) {
text: Re(a)
};
}
-function ho(i, e) {
+function mo(i, e) {
const t = i.match(/^(\s+)(?:```)/);
if (t === null)
return e;
@@ -830,7 +830,7 @@ class An {
fences(e) {
const t = this.rules.block.fences.exec(e);
if (t) {
- const n = t[0], l = ho(n, t[3] || "");
+ const n = t[0], l = mo(n, t[3] || "");
return {
type: "code",
raw: n,
@@ -1070,7 +1070,7 @@ class An {
if ((n.length - a.length) % 2 === 0)
return;
} else {
- const a = po(t[2], "()");
+ const a = ho(t[2], "()");
if (a > -1) {
const s = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + a;
t[2] = t[2].substring(0, a), t[0] = t[0].substring(0, s).trim(), t[3] = "";
@@ -1234,25 +1234,25 @@ class An {
}
}
}
-const mo = /^(?: *(?:\n|$))+/, go = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, vo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ln = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Do = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, el = /(?:[*+-]|\d{1,9}[.)])/, tl = Z(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, el).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), ci = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, bo = /^[^\n]+/, _i = /(?!\s*\])(?:\\.|[^\[\]\\])+/, yo = Z(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", _i).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), wo = Z(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, el).getRegex(), Rn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", di = /|$))/, Fo = Z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", di).replace("tag", Rn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), nl = Z(ci).replace("hr", ln).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rn).getRegex(), $o = Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", nl).getRegex(), fi = {
- blockquote: $o,
- code: go,
- def: yo,
- fences: vo,
- heading: Do,
+const go = /^(?: *(?:\n|$))+/, vo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Do = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ln = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, bo = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, tl = /(?:[*+-]|\d{1,9}[.)])/, nl = Z(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, tl).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), ci = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, yo = /^[^\n]+/, _i = /(?!\s*\])(?:\\.|[^\[\]\\])+/, wo = Z(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", _i).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Fo = Z(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, tl).getRegex(), Rn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", di = /|$))/, $o = Z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", di).replace("tag", Rn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), il = Z(ci).replace("hr", ln).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rn).getRegex(), ko = Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", il).getRegex(), fi = {
+ blockquote: ko,
+ code: vo,
+ def: wo,
+ fences: Do,
+ heading: bo,
hr: ln,
- html: Fo,
- lheading: tl,
- list: wo,
- newline: mo,
- paragraph: nl,
+ html: $o,
+ lheading: nl,
+ list: Fo,
+ newline: go,
+ paragraph: il,
table: Jt,
- text: bo
-}, Mi = Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ln).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rn).getRegex(), ko = {
+ text: yo
+}, Mi = Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ln).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rn).getRegex(), Eo = {
...fi,
table: Mi,
paragraph: Z(ci).replace("hr", ln).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Mi).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rn).getRegex()
-}, Eo = {
+}, Ao = {
...fi,
html: Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", di).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
def: /^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
@@ -1261,52 +1261,52 @@ const mo = /^(?: *(?:\n|$))+/, go = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, vo =
// fences not supported
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
paragraph: Z(ci).replace("hr", ln).replace("heading", ` *#{1,6} *[^
-]`).replace("lheading", tl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
-}, il = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ao = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, al = /^( {2,}|\\)\n(?!\s*$)/, Co = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, Bo = Z(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, on).getRegex(), Ro = Z("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, on).getRegex(), Io = Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, on).getRegex(), Lo = Z(/\\([punct])/, "gu").replace(/punct/g, on).getRegex(), Oo = Z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), qo = Z(di).replace("(?:-->|$)", "-->").getRegex(), xo = Z("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", qo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Cn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, No = Z(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Cn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ll = Z(/^!?\[(label)\]\[(ref)\]/).replace("label", Cn).replace("ref", _i).getRegex(), ol = Z(/^!?\[(ref)\](?:\[\])?/).replace("ref", _i).getRegex(), Mo = Z("reflink|nolink(?!\\()", "g").replace("reflink", ll).replace("nolink", ol).getRegex(), pi = {
+]`).replace("lheading", nl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
+}, al = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Co = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ll = /^( {2,}|\\)\n(?!\s*$)/, So = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, Ro = Z(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, on).getRegex(), Io = Z("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, on).getRegex(), Lo = Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, on).getRegex(), Oo = Z(/\\([punct])/, "gu").replace(/punct/g, on).getRegex(), qo = Z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), xo = Z(di).replace("(?:-->|$)", "-->").getRegex(), No = Z("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", xo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Cn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Mo = Z(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Cn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ol = Z(/^!?\[(label)\]\[(ref)\]/).replace("label", Cn).replace("ref", _i).getRegex(), rl = Z(/^!?\[(ref)\](?:\[\])?/).replace("ref", _i).getRegex(), Po = Z("reflink|nolink(?!\\()", "g").replace("reflink", ol).replace("nolink", rl).getRegex(), pi = {
_backpedal: Jt,
// only used for GFM url
- anyPunctuation: Lo,
- autolink: Oo,
- blockSkip: To,
- br: al,
- code: Ao,
+ anyPunctuation: Oo,
+ autolink: qo,
+ blockSkip: Bo,
+ br: ll,
+ code: Co,
del: Jt,
- emStrongLDelim: Bo,
- emStrongRDelimAst: Ro,
- emStrongRDelimUnd: Io,
- escape: il,
- link: No,
- nolink: ol,
- punctuation: So,
- reflink: ll,
- reflinkSearch: Mo,
- tag: xo,
- text: Co,
+ emStrongLDelim: Ro,
+ emStrongRDelimAst: Io,
+ emStrongRDelimUnd: Lo,
+ escape: al,
+ link: Mo,
+ nolink: rl,
+ punctuation: To,
+ reflink: ol,
+ reflinkSearch: Po,
+ tag: No,
+ text: So,
url: Jt
-}, Po = {
+}, zo = {
...pi,
link: Z(/^!?\[(label)\]\((.*?)\)/).replace("label", Cn).getRegex(),
reflink: Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Cn).getRegex()
}, Kn = {
...pi,
- escape: Z(il).replace("])", "~|])").getRegex(),
+ escape: Z(al).replace("])", "~|])").getRegex(),
url: Z(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ {
const o = { ...l }, a = { ...this.defaults, ...o };
this.defaults.async === !0 && o.async === !1 && (a.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), a.async = !0);
- const r = fn(this, St, rl).call(this, !!a.silent, !!a.async);
+ const r = fn(this, St, sl).call(this, !!a.silent, !!a.async);
if (typeof n > "u" || n === null)
return r(new Error("marked(): input parameter is undefined or null"));
if (typeof n != "string")
@@ -2045,7 +2045,7 @@ St = new WeakSet(), Qn = function(e, t) {
return r(s);
}
};
-}, rl = function(e, t) {
+}, sl = function(e, t) {
return (n) => {
if (n.message += `
Please report this to https://github.com/markedjs/marked.`, e) {
@@ -2057,17 +2057,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
throw n;
};
};
-const Ct = new Uo();
+const Ct = new Ho();
function W(i, e) {
return Ct.parse(i, e);
}
W.options = W.setOptions = function(i) {
- return Ct.setOptions(i), W.defaults = Ct.defaults, Ka(W.defaults), W;
+ return Ct.setOptions(i), W.defaults = Ct.defaults, Qa(W.defaults), W;
};
W.getDefaults = ui;
W.defaults = Tt;
W.use = function(...i) {
- return Ct.use(...i), W.defaults = Ct.defaults, Ka(W.defaults), W;
+ return Ct.use(...i), W.defaults = Ct.defaults, Qa(W.defaults), W;
};
W.walkTokens = function(i, e) {
return Ct.walkTokens(i, e);
@@ -2089,8 +2089,8 @@ W.walkTokens;
W.parseInline;
it.parse;
nt.lex;
-const Ho = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, Go = Object.hasOwnProperty;
-class sl {
+const Go = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, jo = Object.hasOwnProperty;
+class ul {
/**
* Create a new slug class.
*/
@@ -2113,9 +2113,9 @@ class sl {
*/
slug(e, t) {
const n = this;
- let l = jo(e, t === !0);
+ let l = Vo(e, t === !0);
const o = l;
- for (; Go.call(n.occurrences, l); )
+ for (; jo.call(n.occurrences, l); )
n.occurrences[o]++, l = o + "-" + n.occurrences[o];
return n.occurrences[l] = 0, l;
}
@@ -2128,11 +2128,11 @@ class sl {
this.occurrences = /* @__PURE__ */ Object.create(null);
}
}
-function jo(i, e) {
- return typeof i != "string" ? "" : (e || (i = i.toLowerCase()), i.replace(Ho, "").replace(/ /g, "-"));
+function Vo(i, e) {
+ return typeof i != "string" ? "" : (e || (i = i.toLowerCase()), i.replace(Go, "").replace(/ /g, "-"));
}
-new sl();
-var Pi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Vo = { exports: {} };
+new ul();
+var Pi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Wo = { exports: {} };
(function(i) {
var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
/**
@@ -2756,7 +2756,7 @@ var Pi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
for (var x = 0; x < S.length; ++x) {
if (A && A.cause == T + "," + x)
return;
- var q = S[x], z = q.inside, Ee = !!q.lookbehind, se = !!q.greedy, be = q.alias;
+ var q = S[x], z = q.inside, be = !!q.lookbehind, se = !!q.greedy, ye = q.alias;
if (se && !q.pattern.global) {
var ce = q.pattern.toString().match(/[imsuy]*$/)[0];
q.pattern = RegExp(q.pattern.source, ce + "g");
@@ -2768,7 +2768,7 @@ var Pi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
if (!(he instanceof s)) {
var $ = 1, ae;
if (se) {
- if (ae = u(le, oe, h, Ee), !ae || ae.index >= h.length)
+ if (ae = u(le, oe, h, be), !ae || ae.index >= h.length)
break;
var Ae = ae.index, K = ae.index + ae[0].length, _e = oe;
for (_e += X.value.length; Ae >= _e; )
@@ -2778,13 +2778,13 @@ var Pi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
for (var E = X; E !== _.tail && (_e < K || typeof E.value == "string"); E = E.next)
$++, _e += E.value.length;
$--, he = h.slice(oe, _e), ae.index -= oe;
- } else if (ae = u(le, 0, he, Ee), !ae)
+ } else if (ae = u(le, 0, he, be), !ae)
continue;
var Ae = ae.index, Ye = ae[0], Dt = he.slice(0, Ae), bt = he.slice(Ae + Ye.length), yt = oe + he.length;
A && yt > A.reach && (A.reach = yt);
var ct = X.prev;
Dt && (ct = f(_, ct, Dt), oe += Dt.length), d(_, ct, $);
- var Xe = new s(T, z ? r.tokenize(Ye, z) : Ye, be, Ye);
+ var Xe = new s(T, z ? r.tokenize(Ye, z) : Ye, ye, Ye);
if (X = f(_, ct, Xe), bt && f(_, X, bt), $ > 1) {
var Ke = {
cause: T + "," + x,
@@ -3288,7 +3288,7 @@ var Pi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
v || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), v = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
};
}();
-})(Vo);
+})(Wo);
Prism.languages.python = {
comment: {
pattern: /(^|[^\\])#.*/,
@@ -3630,8 +3630,8 @@ Prism.languages.py = Prism.languages.python;
o[l[a]] = i.languages.bash[l[a]];
i.languages.sh = i.languages.bash, i.languages.shell = i.languages.bash;
})(Prism);
-new sl();
-const Wo = (i) => {
+new ul();
+const Zo = (i) => {
const e = {};
for (let t = 0, n = i.length; t < n; t++) {
const l = i[t];
@@ -3639,7 +3639,7 @@ const Wo = (i) => {
e[o] ? e[o] = e[o].concat(l[o]) : e[o] = l[o];
}
return e;
-}, Zo = [
+}, Yo = [
"abbr",
"accept",
"accept-charset",
@@ -3848,7 +3848,7 @@ const Wo = (i) => {
"webkitdirectory",
"width",
"wrap"
-], Yo = [
+], Xo = [
"accent-height",
"accumulate",
"additive",
@@ -4032,7 +4032,7 @@ const Wo = (i) => {
"y2",
"z",
"zoomandpan"
-], Xo = [
+], Ko = [
"accent",
"accentunder",
"align",
@@ -4087,10 +4087,10 @@ const Wo = (i) => {
"width",
"xmlns"
];
-Wo([
- Object.fromEntries(Zo.map((i) => [i, ["*"]])),
- Object.fromEntries(Yo.map((i) => [i, ["svg:*"]])),
- Object.fromEntries(Xo.map((i) => [i, ["math:*"]]))
+Zo([
+ Object.fromEntries(Yo.map((i) => [i, ["*"]])),
+ Object.fromEntries(Xo.map((i) => [i, ["svg:*"]])),
+ Object.fromEntries(Ko.map((i) => [i, ["math:*"]]))
]);
const {
HtmlTagHydration: Zs,
@@ -4173,44 +4173,44 @@ const {
transition_in: gc,
transition_out: vc
} = window.__gradio__svelte__internal, {
- SvelteComponent: Ko,
+ SvelteComponent: Qo,
append_hydration: $n,
attr: ht,
- bubble: Qo,
- check_outros: Jo,
+ bubble: Jo,
+ check_outros: er,
children: Jn,
- claim_component: er,
+ claim_component: tr,
claim_element: ei,
claim_space: zi,
- claim_text: tr,
+ claim_text: nr,
construct_svelte_component: Ui,
create_component: Hi,
- create_slot: nr,
+ create_slot: ir,
destroy_component: Gi,
detach: tn,
element: ti,
- get_all_dirty_from_scope: ir,
- get_slot_changes: ar,
- group_outros: lr,
- init: or,
- insert_hydration: ul,
- listen: rr,
+ get_all_dirty_from_scope: ar,
+ get_slot_changes: lr,
+ group_outros: or,
+ init: rr,
+ insert_hydration: cl,
+ listen: sr,
mount_component: ji,
- safe_not_equal: sr,
- set_data: ur,
+ safe_not_equal: ur,
+ set_data: cr,
set_style: mn,
space: Vi,
- text: cr,
+ text: _r,
toggle_class: ve,
transition_in: Pn,
transition_out: zn,
- update_slot_base: _r
+ update_slot_base: dr
} = window.__gradio__svelte__internal;
function Wi(i) {
let e, t;
return {
c() {
- e = ti("span"), t = cr(
+ e = ti("span"), t = _r(
/*label*/
i[1]
), this.h();
@@ -4218,7 +4218,7 @@ function Wi(i) {
l(n) {
e = ei(n, "SPAN", { class: !0 });
var l = Jn(e);
- t = tr(
+ t = nr(
l,
/*label*/
i[1]
@@ -4228,11 +4228,11 @@ function Wi(i) {
ht(e, "class", "svelte-qgco6m");
},
m(n, l) {
- ul(n, e, l), $n(e, t);
+ cl(n, e, l), $n(e, t);
},
p(n, l) {
l & /*label*/
- 2 && ur(
+ 2 && cr(
t,
/*label*/
n[1]
@@ -4243,7 +4243,7 @@ function Wi(i) {
}
};
}
-function dr(i) {
+function fr(i) {
let e, t, n, l, o, a, r, s, u = (
/*show_label*/
i[2] && Wi(i)
@@ -4259,7 +4259,7 @@ function dr(i) {
const f = (
/*#slots*/
i[14].default
- ), d = nr(
+ ), d = ir(
f,
i,
/*$$scope*/
@@ -4280,7 +4280,7 @@ function dr(i) {
var y = Jn(e);
u && u.l(y), t = zi(y), n = ei(y, "DIV", { class: !0 });
var w = Jn(n);
- l && er(l.$$.fragment, w), o = zi(w), d && d.l(w), w.forEach(tn), y.forEach(tn), this.h();
+ l && tr(l.$$.fragment, w), o = zi(w), d && d.l(w), w.forEach(tn), y.forEach(tn), this.h();
},
h() {
ht(n, "class", "svelte-qgco6m"), ve(
@@ -4351,7 +4351,7 @@ function dr(i) {
));
},
m(v, y) {
- ul(v, e, y), u && u.m(e, null), $n(e, t), $n(e, n), l && ji(l, n, null), $n(n, o), d && d.m(n, null), a = !0, r || (s = rr(
+ cl(v, e, y), u && u.m(e, null), $n(e, t), $n(e, n), l && ji(l, n, null), $n(n, o), d && d.m(n, null), a = !0, r || (s = sr(
e,
"click",
/*click_handler*/
@@ -4364,28 +4364,28 @@ function dr(i) {
1 && c !== (c = /*Icon*/
v[0])) {
if (l) {
- lr();
+ or();
const w = l;
zn(w.$$.fragment, 1, 0, () => {
Gi(w, 1);
- }), Jo();
+ }), er();
}
c ? (l = Ui(c, m()), Hi(l.$$.fragment), Pn(l.$$.fragment, 1), ji(l, n, o)) : l = null;
}
d && d.p && (!a || y & /*$$scope*/
- 8192) && _r(
+ 8192) && dr(
d,
f,
v,
/*$$scope*/
v[13],
- a ? ar(
+ a ? lr(
f,
/*$$scope*/
v[13],
y,
null
- ) : ir(
+ ) : ar(
/*$$scope*/
v[13]
),
@@ -4482,10 +4482,10 @@ function dr(i) {
}
};
}
-function fr(i, e, t) {
+function pr(i, e, t) {
let n, { $$slots: l = {}, $$scope: o } = e, { Icon: a } = e, { label: r = "" } = e, { show_label: s = !1 } = e, { pending: u = !1 } = e, { size: c = "small" } = e, { padded: m = !0 } = e, { highlight: f = !1 } = e, { disabled: d = !1 } = e, { hasPopup: v = !1 } = e, { color: y = "var(--block-label-text-color)" } = e, { transparent: w = !1 } = e, { background: C = "var(--block-background-fill)" } = e;
function h(_) {
- Qo.call(this, i, _);
+ Jo.call(this, i, _);
}
return i.$$set = (_) => {
"Icon" in _ && t(0, a = _.Icon), "label" in _ && t(1, r = _.label), "show_label" in _ && t(2, s = _.show_label), "pending" in _ && t(3, u = _.pending), "size" in _ && t(4, c = _.size), "padded" in _ && t(5, m = _.padded), "highlight" in _ && t(6, f = _.highlight), "disabled" in _ && t(7, d = _.disabled), "hasPopup" in _ && t(8, v = _.hasPopup), "color" in _ && t(12, y = _.color), "transparent" in _ && t(9, w = _.transparent), "background" in _ && t(10, C = _.background), "$$scope" in _ && t(13, o = _.$$scope);
@@ -4511,9 +4511,9 @@ function fr(i, e, t) {
h
];
}
-class pr extends Ko {
+class hr extends Qo {
constructor(e) {
- super(), or(this, e, fr, dr, sr, {
+ super(), rr(this, e, pr, fr, ur, {
Icon: 0,
label: 1,
show_label: 2,
@@ -4693,20 +4693,20 @@ const {
safe_not_equal: of,
svg_element: rf
} = window.__gradio__svelte__internal, {
- SvelteComponent: hr,
+ SvelteComponent: mr,
append_hydration: Un,
attr: Ue,
children: gn,
claim_svg_element: vn,
detach: Vt,
- init: mr,
- insert_hydration: gr,
+ init: gr,
+ insert_hydration: vr,
noop: Hn,
- safe_not_equal: vr,
+ safe_not_equal: Dr,
set_style: et,
svg_element: Dn
} = window.__gradio__svelte__internal;
-function Dr(i) {
+function br(i) {
let e, t, n, l;
return {
c() {
@@ -4733,7 +4733,7 @@ function Dr(i) {
Ue(n, "d", "M18,6L6.087,17.913"), et(n, "fill", "none"), et(n, "fill-rule", "nonzero"), et(n, "stroke-width", "2px"), Ue(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Ue(l, "d", "M4.364,4.364L19.636,19.636"), et(l, "fill", "none"), et(l, "fill-rule", "nonzero"), et(l, "stroke-width", "2px"), Ue(e, "width", "100%"), Ue(e, "height", "100%"), Ue(e, "viewBox", "0 0 24 24"), Ue(e, "version", "1.1"), Ue(e, "xmlns", "http://www.w3.org/2000/svg"), Ue(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Ue(e, "xml:space", "preserve"), Ue(e, "stroke", "currentColor"), et(e, "fill-rule", "evenodd"), et(e, "clip-rule", "evenodd"), et(e, "stroke-linecap", "round"), et(e, "stroke-linejoin", "round");
},
m(o, a) {
- gr(o, e, a), Un(e, t), Un(t, n), Un(e, l);
+ vr(o, e, a), Un(e, t), Un(t, n), Un(e, l);
},
p: Hn,
i: Hn,
@@ -4743,9 +4743,9 @@ function Dr(i) {
}
};
}
-class br extends hr {
+class yr extends mr {
constructor(e) {
- super(), mr(this, e, null, Dr, vr, {});
+ super(), gr(this, e, null, br, Dr, {});
}
}
const {
@@ -5501,7 +5501,7 @@ const {
noop: ZF,
safe_not_equal: YF,
svg_element: XF
-} = window.__gradio__svelte__internal, yr = [
+} = window.__gradio__svelte__internal, wr = [
{ color: "red", primary: 600, secondary: 100 },
{ color: "green", primary: 600, secondary: 100 },
{ color: "blue", primary: 600, secondary: 100 },
@@ -5805,7 +5805,7 @@ const {
950: "#4c0519"
}
};
-yr.reduce(
+wr.reduce(
(i, { color: e, primary: t, secondary: n }) => ({
...i,
[e]: {
@@ -5935,24 +5935,24 @@ function xt(i) {
}
function kn() {
}
-const cl = typeof window < "u";
-let Yi = cl ? () => window.performance.now() : () => Date.now(), _l = cl ? (i) => requestAnimationFrame(i) : kn;
+const _l = typeof window < "u";
+let Yi = _l ? () => window.performance.now() : () => Date.now(), dl = _l ? (i) => requestAnimationFrame(i) : kn;
const Mt = /* @__PURE__ */ new Set();
-function dl(i) {
+function fl(i) {
Mt.forEach((e) => {
e.c(i) || (Mt.delete(e), e.f());
- }), Mt.size !== 0 && _l(dl);
+ }), Mt.size !== 0 && dl(fl);
}
-function wr(i) {
+function Fr(i) {
let e;
- return Mt.size === 0 && _l(dl), { promise: new Promise((t) => {
+ return Mt.size === 0 && dl(fl), { promise: new Promise((t) => {
Mt.add(e = { c: i, f: t });
}), abort() {
Mt.delete(e);
} };
}
const qt = [];
-function Fr(i, e = kn) {
+function $r(i, e = kn) {
let t;
const n = /* @__PURE__ */ new Set();
function l(a) {
@@ -5993,12 +5993,12 @@ function ni(i, e, t, n) {
throw new Error(`Cannot spring ${typeof t} values`);
}
function Ki(i, e = {}) {
- const t = Fr(i), { stiffness: n = 0.15, damping: l = 0.8, precision: o = 0.01 } = e;
+ const t = $r(i), { stiffness: n = 0.15, damping: l = 0.8, precision: o = 0.01 } = e;
let a, r, s, u = i, c = i, m = 1, f = 0, d = !1;
function v(w, C = {}) {
c = w;
const h = s = {};
- return i == null || C.hard || y.stiffness >= 1 && y.damping >= 1 ? (d = !0, a = Yi(), u = w, t.set(i = c), Promise.resolve()) : (C.soft && (f = 1 / (60 * (C.soft === !0 ? 0.5 : +C.soft)), m = 0), r || (a = Yi(), d = !1, r = wr((_) => {
+ return i == null || C.hard || y.stiffness >= 1 && y.damping >= 1 ? (d = !0, a = Yi(), u = w, t.set(i = c), Promise.resolve()) : (C.soft && (f = 1 / (60 * (C.soft === !0 ? 0.5 : +C.soft)), m = 0), r || (a = Yi(), d = !1, r = Fr((_) => {
if (d) return d = !1, r = null, !1;
m = Math.min(m + f, 1);
const g = { inv_mass: m, opts: y, settled: !0, dt: 60 * (_ - a) / 1e3 }, b = ni(g, u, i, c);
@@ -6013,31 +6013,31 @@ function Ki(i, e = {}) {
return y;
}
const {
- SvelteComponent: $r,
+ SvelteComponent: kr,
append_hydration: He,
attr: U,
children: Ie,
- claim_element: kr,
+ claim_element: Er,
claim_svg_element: Ge,
component_subscribe: Qi,
detach: Be,
- element: Er,
- init: Ar,
- insert_hydration: Cr,
+ element: Ar,
+ init: Cr,
+ insert_hydration: Sr,
noop: Ji,
- safe_not_equal: Sr,
+ safe_not_equal: Tr,
set_style: bn,
svg_element: je,
toggle_class: ea
-} = window.__gradio__svelte__internal, { onMount: Tr } = window.__gradio__svelte__internal;
-function Br(i) {
+} = window.__gradio__svelte__internal, { onMount: Br } = window.__gradio__svelte__internal;
+function Rr(i) {
let e, t, n, l, o, a, r, s, u, c, m, f;
return {
c() {
- e = Er("div"), t = je("svg"), n = je("g"), l = je("path"), o = je("path"), a = je("path"), r = je("path"), s = je("g"), u = je("path"), c = je("path"), m = je("path"), f = je("path"), this.h();
+ e = Ar("div"), t = je("svg"), n = je("g"), l = je("path"), o = je("path"), a = je("path"), r = je("path"), s = je("g"), u = je("path"), c = je("path"), m = je("path"), f = je("path"), this.h();
},
l(d) {
- e = kr(d, "DIV", { class: !0 });
+ e = Er(d, "DIV", { class: !0 });
var v = Ie(e);
t = Ge(v, "svg", {
viewBox: !0,
@@ -6085,7 +6085,7 @@ function Br(i) {
);
},
m(d, v) {
- Cr(d, e, v), He(e, t), He(t, n), He(n, l), He(n, o), He(n, a), He(n, r), He(t, s), He(s, u), He(s, c), He(s, m), He(s, f);
+ Sr(d, e, v), He(e, t), He(t, n), He(n, l), He(n, o), He(n, a), He(n, r), He(t, s), He(s, u), He(s, c), He(s, m), He(s, f);
},
p(d, [v]) {
v & /*$top*/
@@ -6109,7 +6109,7 @@ function Br(i) {
}
};
}
-function Rr(i, e, t) {
+function Ir(i, e, t) {
let n, l;
var o = this && this.__awaiter || function(d, v, y, w) {
function C(h) {
@@ -6159,42 +6159,42 @@ function Rr(i, e, t) {
yield Promise.all([r.set([125, 0]), s.set([-125, 0])]), m();
});
}
- return Tr(() => (f(), () => u = !0)), i.$$set = (d) => {
+ return Br(() => (f(), () => u = !0)), i.$$set = (d) => {
"margin" in d && t(0, a = d.margin);
}, [a, n, l, r, s];
}
-class Ir extends $r {
+class Lr extends kr {
constructor(e) {
- super(), Ar(this, e, Rr, Br, Sr, { margin: 0 });
+ super(), Cr(this, e, Ir, Rr, Tr, { margin: 0 });
}
}
const {
- SvelteComponent: Lr,
+ SvelteComponent: Or,
append_hydration: At,
attr: Ze,
binding_callbacks: ta,
check_outros: ii,
children: at,
- claim_component: fl,
+ claim_component: pl,
claim_element: lt,
claim_space: Oe,
claim_text: te,
- create_component: pl,
- create_slot: hl,
- destroy_component: ml,
- destroy_each: gl,
+ create_component: hl,
+ create_slot: ml,
+ destroy_component: gl,
+ destroy_each: vl,
detach: I,
element: ot,
empty: xe,
ensure_array_like: Tn,
- get_all_dirty_from_scope: vl,
- get_slot_changes: Dl,
+ get_all_dirty_from_scope: Dl,
+ get_slot_changes: bl,
group_outros: ai,
- init: Or,
+ init: qr,
insert_hydration: M,
- mount_component: bl,
+ mount_component: yl,
noop: li,
- safe_not_equal: qr,
+ safe_not_equal: xr,
set_data: Ne,
set_style: $t,
space: qe,
@@ -6202,8 +6202,8 @@ const {
toggle_class: Le,
transition_in: We,
transition_out: rt,
- update_slot_base: yl
-} = window.__gradio__svelte__internal, { tick: xr } = window.__gradio__svelte__internal, { onDestroy: Nr } = window.__gradio__svelte__internal, { createEventDispatcher: Mr } = window.__gradio__svelte__internal, Pr = (i) => ({}), na = (i) => ({}), zr = (i) => ({}), ia = (i) => ({});
+ update_slot_base: wl
+} = window.__gradio__svelte__internal, { tick: Nr } = window.__gradio__svelte__internal, { onDestroy: Mr } = window.__gradio__svelte__internal, { createEventDispatcher: Pr } = window.__gradio__svelte__internal, zr = (i) => ({}), na = (i) => ({}), Ur = (i) => ({}), ia = (i) => ({});
function aa(i, e, t) {
const n = i.slice();
return n[40] = e[t], n[42] = t, n;
@@ -6212,14 +6212,14 @@ function la(i, e, t) {
const n = i.slice();
return n[40] = e[t], n;
}
-function Ur(i) {
+function Hr(i) {
let e, t, n, l, o = (
/*i18n*/
i[1]("common.error") + ""
), a, r, s;
- t = new pr({
+ t = new hr({
props: {
- Icon: br,
+ Icon: yr,
label: (
/*i18n*/
i[1]("common.clear")
@@ -6234,7 +6234,7 @@ function Ur(i) {
const u = (
/*#slots*/
i[30].error
- ), c = hl(
+ ), c = ml(
u,
i,
/*$$scope*/
@@ -6243,12 +6243,12 @@ function Ur(i) {
);
return {
c() {
- e = ot("div"), pl(t.$$.fragment), n = qe(), l = ot("span"), a = ne(o), r = qe(), c && c.c(), this.h();
+ e = ot("div"), hl(t.$$.fragment), n = qe(), l = ot("span"), a = ne(o), r = qe(), c && c.c(), this.h();
},
l(m) {
e = lt(m, "DIV", { class: !0 });
var f = at(e);
- fl(t.$$.fragment, f), f.forEach(I), n = Oe(m), l = lt(m, "SPAN", { class: !0 });
+ pl(t.$$.fragment, f), f.forEach(I), n = Oe(m), l = lt(m, "SPAN", { class: !0 });
var d = at(l);
a = te(d, o), d.forEach(I), r = Oe(m), c && c.l(m), this.h();
},
@@ -6256,7 +6256,7 @@ function Ur(i) {
Ze(e, "class", "clear-status svelte-17v219f"), Ze(l, "class", "error svelte-17v219f");
},
m(m, f) {
- M(m, e, f), bl(t, e, null), M(m, n, f), M(m, l, f), At(l, a), M(m, r, f), c && c.m(m, f), s = !0;
+ M(m, e, f), yl(t, e, null), M(m, n, f), M(m, l, f), At(l, a), M(m, r, f), c && c.m(m, f), s = !0;
},
p(m, f) {
const d = {};
@@ -6265,19 +6265,19 @@ function Ur(i) {
m[1]("common.clear")), t.$set(d), (!s || f[0] & /*i18n*/
2) && o !== (o = /*i18n*/
m[1]("common.error") + "") && Ne(a, o), c && c.p && (!s || f[0] & /*$$scope*/
- 536870912) && yl(
+ 536870912) && wl(
c,
u,
m,
/*$$scope*/
m[29],
- s ? Dl(
+ s ? bl(
u,
/*$$scope*/
m[29],
f,
- Pr
- ) : vl(
+ zr
+ ) : Dl(
/*$$scope*/
m[29]
),
@@ -6291,11 +6291,11 @@ function Ur(i) {
rt(t.$$.fragment, m), rt(c, m), s = !1;
},
d(m) {
- m && (I(e), I(n), I(l), I(r)), ml(t), c && c.d(m);
+ m && (I(e), I(n), I(l), I(r)), gl(t), c && c.d(m);
}
};
}
-function Hr(i) {
+function Gr(i) {
let e, t, n, l, o, a, r, s, u, c = (
/*variant*/
i[8] === "default" && /*show_eta_bar*/
@@ -6306,23 +6306,23 @@ function Hr(i) {
if (
/*progress*/
_[7]
- ) return Vr;
+ ) return Wr;
if (
/*queue_position*/
_[2] !== null && /*queue_size*/
_[3] !== void 0 && /*queue_position*/
_[2] >= 0
- ) return jr;
+ ) return Vr;
if (
/*queue_position*/
_[2] === 0
- ) return Gr;
+ ) return jr;
}
let f = m(i), d = f && f(i), v = (
/*timer*/
i[5] && ua(i)
);
- const y = [Xr, Yr], w = [];
+ const y = [Kr, Xr], w = [];
function C(_, g) {
return (
/*last_progress_level*/
@@ -6424,7 +6424,7 @@ function oa(i) {
}
};
}
-function Gr(i) {
+function jr(i) {
let e;
return {
c() {
@@ -6442,7 +6442,7 @@ function Gr(i) {
}
};
}
-function jr(i) {
+function Vr(i) {
let e, t = (
/*queue_position*/
i[2] + 1 + ""
@@ -6479,7 +6479,7 @@ function jr(i) {
}
};
}
-function Vr(i) {
+function Wr(i) {
let e, t = Tn(
/*progress*/
i[7]
@@ -6520,7 +6520,7 @@ function Vr(i) {
}
},
d(l) {
- l && I(e), gl(n, l);
+ l && I(e), vl(n, l);
}
};
}
@@ -6532,7 +6532,7 @@ function ra(i) {
function r(c, m) {
return (
/*p*/
- c[40].length != null ? Zr : Wr
+ c[40].length != null ? Yr : Zr
);
}
let s = r(i), u = s(i);
@@ -6556,7 +6556,7 @@ function ra(i) {
}
};
}
-function Wr(i) {
+function Zr(i) {
let e = xt(
/*p*/
i[40].index || 0
@@ -6583,7 +6583,7 @@ function Wr(i) {
}
};
}
-function Zr(i) {
+function Yr(i) {
let e = xt(
/*p*/
i[40].index || 0
@@ -6680,22 +6680,22 @@ function ua(i) {
}
};
}
-function Yr(i) {
+function Xr(i) {
let e, t;
- return e = new Ir({
+ return e = new Lr({
props: { margin: (
/*variant*/
i[8] === "default"
) }
}), {
c() {
- pl(e.$$.fragment);
+ hl(e.$$.fragment);
},
l(n) {
- fl(e.$$.fragment, n);
+ pl(e.$$.fragment, n);
},
m(n, l) {
- bl(e, n, l), t = !0;
+ yl(e, n, l), t = !0;
},
p(n, l) {
const o = {};
@@ -6710,11 +6710,11 @@ function Yr(i) {
rt(e.$$.fragment, n), t = !1;
},
d(n) {
- ml(e, n);
+ gl(e, n);
}
};
}
-function Xr(i) {
+function Kr(i) {
let e, t, n, l, o, a = `${/*last_progress_level*/
i[15] * 100}%`, r = (
/*progress*/
@@ -6793,14 +6793,14 @@ function ca(i) {
}
},
d(l) {
- l && I(e), gl(n, l);
+ l && I(e), vl(n, l);
}
};
}
function _a(i) {
let e, t, n, l, o = (
/*i*/
- i[42] !== 0 && Kr()
+ i[42] !== 0 && Qr()
), a = (
/*p*/
i[40].desc != null && da(i)
@@ -6842,7 +6842,7 @@ function _a(i) {
}
};
}
-function Kr(i) {
+function Qr(i) {
let e;
return {
c() {
@@ -6969,7 +6969,7 @@ function ma(i) {
const o = (
/*#slots*/
i[30]["additional-loading-text"]
- ), a = hl(
+ ), a = ml(
o,
i,
/*$$scope*/
@@ -7005,19 +7005,19 @@ function ma(i) {
/*loading_text*/
r[9]
), a && a.p && (!l || s[0] & /*$$scope*/
- 536870912) && yl(
+ 536870912) && wl(
a,
o,
r,
/*$$scope*/
r[29],
- l ? Dl(
+ l ? bl(
o,
/*$$scope*/
r[29],
s,
- zr
- ) : vl(
+ Ur
+ ) : Dl(
/*$$scope*/
r[29]
),
@@ -7035,9 +7035,9 @@ function ma(i) {
}
};
}
-function Qr(i) {
+function Jr(i) {
let e, t, n, l, o;
- const a = [Hr, Ur], r = [];
+ const a = [Gr, Hr], r = [];
function s(u, c) {
return (
/*status*/
@@ -7158,7 +7158,7 @@ function Qr(i) {
}
};
}
-var Jr = function(i, e, t, n) {
+var es = function(i, e, t, n) {
function l(o) {
return o instanceof t ? o : new t(function(a) {
a(o);
@@ -7186,14 +7186,14 @@ var Jr = function(i, e, t, n) {
});
};
let yn = [], Gn = !1;
-const es = typeof window < "u", wl = es ? window.requestAnimationFrame : (i) => {
+const ts = typeof window < "u", Fl = ts ? window.requestAnimationFrame : (i) => {
};
-function ts(i) {
- return Jr(this, arguments, void 0, function* (e, t = !0) {
+function ns(i) {
+ return es(this, arguments, void 0, function* (e, t = !0) {
if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) {
if (yn.push(e), !Gn) Gn = !0;
else return;
- yield xr(), wl(() => {
+ yield Nr(), Fl(() => {
let n = [0, 0];
for (let l = 0; l < yn.length; l++) {
const a = yn[l].getBoundingClientRect();
@@ -7204,28 +7204,28 @@ function ts(i) {
}
});
}
-function ns(i, e, t) {
+function is(i, e, t) {
let n, { $$slots: l = {}, $$scope: o } = e;
- const a = Mr();
- let { i18n: r } = e, { eta: s = null } = e, { queue_position: u } = e, { queue_size: c } = e, { status: m } = e, { scroll_to_output: f = !1 } = e, { timer: d = !0 } = e, { show_progress: v = "full" } = e, { message: y = null } = e, { progress: w = null } = e, { variant: C = "default" } = e, { loading_text: h = "Loading..." } = e, { absolute: _ = !0 } = e, { translucent: g = !1 } = e, { border: b = !1 } = e, { autoscroll: F } = e, A, T = !1, S = 0, x = 0, q = null, z = null, Ee = 0, se = null, be, ce = null, le = !0;
+ const a = Pr();
+ let { i18n: r } = e, { eta: s = null } = e, { queue_position: u } = e, { queue_size: c } = e, { status: m } = e, { scroll_to_output: f = !1 } = e, { timer: d = !0 } = e, { show_progress: v = "full" } = e, { message: y = null } = e, { progress: w = null } = e, { variant: C = "default" } = e, { loading_text: h = "Loading..." } = e, { absolute: _ = !0 } = e, { translucent: g = !1 } = e, { border: b = !1 } = e, { autoscroll: F } = e, A, T = !1, S = 0, x = 0, q = null, z = null, be = 0, se = null, ye, ce = null, le = !0;
const X = () => {
t(0, s = t(27, q = t(19, $ = null))), t(25, S = performance.now()), t(26, x = 0), T = !0, oe();
};
function oe() {
- wl(() => {
+ Fl(() => {
t(26, x = (performance.now() - S) / 1e3), T && oe();
});
}
function he() {
t(26, x = 0), t(0, s = t(27, q = t(19, $ = null))), T && (T = !1);
}
- Nr(() => {
+ Mr(() => {
T && he();
});
let $ = null;
function ae(E) {
ta[E ? "unshift" : "push"](() => {
- ce = E, t(16, ce), t(7, w), t(14, se), t(15, be);
+ ce = E, t(16, ce), t(7, w), t(14, se), t(15, ye);
});
}
const K = () => {
@@ -7241,16 +7241,16 @@ function ns(i, e, t) {
}, i.$$.update = () => {
i.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
436207617 && (s === null && t(0, s = q), s != null && q !== s && (t(28, z = (performance.now() - S) / 1e3 + s), t(19, $ = z.toFixed(1)), t(27, q = s))), i.$$.dirty[0] & /*eta_from_start, timer_diff*/
- 335544320 && t(17, Ee = z === null || z <= 0 || !x ? null : Math.min(x / z, 1)), i.$$.dirty[0] & /*progress*/
+ 335544320 && t(17, be = z === null || z <= 0 || !x ? null : Math.min(x / z, 1)), i.$$.dirty[0] & /*progress*/
128 && w != null && t(18, le = !1), i.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
114816 && (w != null ? t(14, se = w.map((E) => {
if (E.index != null && E.length != null)
return E.index / E.length;
if (E.progress != null)
return E.progress;
- })) : t(14, se = null), se ? (t(15, be = se[se.length - 1]), ce && (be === 0 ? t(16, ce.style.transition = "0", ce) : t(16, ce.style.transition = "150ms", ce))) : t(15, be = void 0)), i.$$.dirty[0] & /*status*/
+ })) : t(14, se = null), se ? (t(15, ye = se[se.length - 1]), ce && (ye === 0 ? t(16, ce.style.transition = "0", ce) : t(16, ce.style.transition = "150ms", ce))) : t(15, ye = void 0)), i.$$.dirty[0] & /*status*/
16 && (m === "pending" ? X() : he()), i.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
- 20979728 && A && f && (m === "pending" || m === "complete") && ts(A, F), i.$$.dirty[0] & /*status, message*/
+ 20979728 && A && f && (m === "pending" || m === "complete") && ns(A, F), i.$$.dirty[0] & /*status, message*/
8388624, i.$$.dirty[0] & /*timer_diff*/
67108864 && t(20, n = x.toFixed(1));
}, [
@@ -7269,9 +7269,9 @@ function ns(i, e, t) {
b,
A,
se,
- be,
+ ye,
ce,
- Ee,
+ be,
le,
$,
n,
@@ -7290,14 +7290,14 @@ function ns(i, e, t) {
_e
];
}
-class is extends Lr {
+class as extends Or {
constructor(e) {
- super(), Or(
+ super(), qr(
this,
e,
- ns,
- Qr,
- qr,
+ is,
+ Jr,
+ xr,
{
i18n: 1,
eta: 0,
@@ -7323,21 +7323,21 @@ class is extends Lr {
}
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
const {
- entries: Fl,
+ entries: $l,
setPrototypeOf: ga,
- isFrozen: as,
- getPrototypeOf: ls,
- getOwnPropertyDescriptor: os
+ isFrozen: ls,
+ getPrototypeOf: os,
+ getOwnPropertyDescriptor: rs
} = Object;
let {
- freeze: $e,
+ freeze: ke,
seal: Me,
- create: $l
+ create: kl
} = Object, {
apply: oi,
construct: ri
} = typeof Reflect < "u" && Reflect;
-$e || ($e = function(e) {
+ke || (ke = function(e) {
return e;
});
Me || (Me = function(e) {
@@ -7349,8 +7349,8 @@ oi || (oi = function(e, t, n) {
ri || (ri = function(e, t) {
return new e(...t);
});
-const wn = ke(Array.prototype.forEach), rs = ke(Array.prototype.lastIndexOf), va = ke(Array.prototype.pop), Wt = ke(Array.prototype.push), ss = ke(Array.prototype.splice), En = ke(String.prototype.toLowerCase), jn = ke(String.prototype.toString), Da = ke(String.prototype.match), Zt = ke(String.prototype.replace), us = ke(String.prototype.indexOf), cs = ke(String.prototype.trim), Ve = ke(Object.prototype.hasOwnProperty), ye = ke(RegExp.prototype.test), Yt = _s(TypeError);
-function ke(i) {
+const wn = Ee(Array.prototype.forEach), ss = Ee(Array.prototype.lastIndexOf), va = Ee(Array.prototype.pop), Wt = Ee(Array.prototype.push), us = Ee(Array.prototype.splice), En = Ee(String.prototype.toLowerCase), jn = Ee(String.prototype.toString), Da = Ee(String.prototype.match), Zt = Ee(String.prototype.replace), cs = Ee(String.prototype.indexOf), _s = Ee(String.prototype.trim), Ve = Ee(Object.prototype.hasOwnProperty), we = Ee(RegExp.prototype.test), Yt = ds(TypeError);
+function Ee(i) {
return function(e) {
e instanceof RegExp && (e.lastIndex = 0);
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), l = 1; l < t; l++)
@@ -7358,7 +7358,7 @@ function ke(i) {
return oi(i, e, n);
};
}
-function _s(i) {
+function ds(i) {
return function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
@@ -7373,58 +7373,58 @@ function P(i, e) {
let l = e[n];
if (typeof l == "string") {
const o = t(l);
- o !== l && (as(e) || (e[n] = o), l = o);
+ o !== l && (ls(e) || (e[n] = o), l = o);
}
i[l] = !0;
}
return i;
}
-function ds(i) {
+function fs(i) {
for (let e = 0; e < i.length; e++)
Ve(i, e) || (i[e] = null);
return i;
}
function mt(i) {
- const e = $l(null);
- for (const [t, n] of Fl(i))
- Ve(i, t) && (Array.isArray(n) ? e[t] = ds(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = mt(n) : e[t] = n);
+ const e = kl(null);
+ for (const [t, n] of $l(i))
+ Ve(i, t) && (Array.isArray(n) ? e[t] = fs(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = mt(n) : e[t] = n);
return e;
}
function Xt(i, e) {
for (; i !== null; ) {
- const n = os(i, e);
+ const n = rs(i, e);
if (n) {
if (n.get)
- return ke(n.get);
+ return Ee(n.get);
if (typeof n.value == "function")
- return ke(n.value);
+ return Ee(n.value);
}
- i = ls(i);
+ i = os(i);
}
function t() {
return null;
}
return t;
}
-const ba = $e(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Vn = $e(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Wn = $e(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), fs = $e(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Zn = $e(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ps = $e(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ya = $e(["#text"]), wa = $e(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Yn = $e(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Fa = $e(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Fn = $e(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), hs = Me(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ms = Me(/<%[\w\W]*|[\w\W]*%>/gm), gs = Me(/\$\{[\w\W]*/gm), vs = Me(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ds = Me(/^aria-[\-\w]+$/), kl = Me(
+const ba = ke(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Vn = ke(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Wn = ke(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ps = ke(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Zn = ke(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), hs = ke(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ya = ke(["#text"]), wa = ke(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Yn = ke(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Fa = ke(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Fn = ke(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ms = Me(/\{\{[\w\W]*|[\w\W]*\}\}/gm), gs = Me(/<%[\w\W]*|[\w\W]*%>/gm), vs = Me(/\$\{[\w\W]*/gm), Ds = Me(/^data-[\-\w.\u00B7-\uFFFF]+$/), bs = Me(/^aria-[\-\w]+$/), El = Me(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
// eslint-disable-line no-useless-escape
-), bs = Me(/^(?:\w+script|data):/i), ys = Me(
+), ys = Me(/^(?:\w+script|data):/i), ws = Me(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
// eslint-disable-line no-control-regex
-), El = Me(/^html$/i), ws = Me(/^[a-z][.\w]*(-[.\w]+)+$/i);
+), Al = Me(/^html$/i), Fs = Me(/^[a-z][.\w]*(-[.\w]+)+$/i);
var $a = /* @__PURE__ */ Object.freeze({
__proto__: null,
- ARIA_ATTR: Ds,
- ATTR_WHITESPACE: ys,
- CUSTOM_ELEMENT: ws,
- DATA_ATTR: vs,
- DOCTYPE_NAME: El,
- ERB_EXPR: ms,
- IS_ALLOWED_URI: kl,
- IS_SCRIPT_OR_DATA: bs,
- MUSTACHE_EXPR: hs,
- TMPLIT_EXPR: gs
+ ARIA_ATTR: bs,
+ ATTR_WHITESPACE: ws,
+ CUSTOM_ELEMENT: Fs,
+ DATA_ATTR: Ds,
+ DOCTYPE_NAME: Al,
+ ERB_EXPR: gs,
+ IS_ALLOWED_URI: El,
+ IS_SCRIPT_OR_DATA: ys,
+ MUSTACHE_EXPR: ms,
+ TMPLIT_EXPR: vs
});
const Kt = {
element: 1,
@@ -7433,9 +7433,9 @@ const Kt = {
progressingInstruction: 7,
comment: 8,
document: 9
-}, Fs = function() {
+}, $s = function() {
return typeof window > "u" ? null : window;
-}, $s = function(e, t) {
+}, ks = function(e, t) {
if (typeof e != "object" || typeof e.createPolicy != "function")
return null;
let n = null;
@@ -7467,9 +7467,9 @@ const Kt = {
uponSanitizeShadowNode: []
};
};
-function Al() {
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fs();
- const e = (R) => Al(R);
+function Cl() {
+ let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $s();
+ const e = (R) => Cl(R);
if (e.version = "3.2.6", e.removed = [], !i || !i.document || i.document.nodeType !== Kt.document || !i.Element)
return e.isSupported = !1, e;
let {
@@ -7500,12 +7500,12 @@ function Al() {
importNode: x
} = n;
let q = ka();
- e.isSupported = typeof Fl == "function" && typeof _ == "function" && F && F.createHTMLDocument !== void 0;
+ e.isSupported = typeof $l == "function" && typeof _ == "function" && F && F.createHTMLDocument !== void 0;
const {
MUSTACHE_EXPR: z,
- ERB_EXPR: Ee,
+ ERB_EXPR: be,
TMPLIT_EXPR: se,
- DATA_ATTR: be,
+ DATA_ATTR: ye,
ARIA_ATTR: ce,
IS_SCRIPT_OR_DATA: le,
ATTR_WHITESPACE: X,
@@ -7517,7 +7517,7 @@ function Al() {
const ae = P({}, [...ba, ...Vn, ...Wn, ...Zn, ...ya]);
let K = null;
const _e = P({}, [...wa, ...Yn, ...Fa, ...Fn]);
- let E = Object.seal($l(null, {
+ let E = Object.seal(kl(null, {
tagNameCheck: {
writable: !0,
configurable: !1,
@@ -7545,36 +7545,36 @@ function Al() {
let Et = null;
const mi = P({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), un = "http://www.w3.org/1998/Math/MathML", cn = "http://www.w3.org/2000/svg", dt = "http://www.w3.org/1999/xhtml";
let It = dt, In = !1, Ln = null;
- const Ol = P({}, [un, cn, dt], jn);
+ const ql = P({}, [un, cn, dt], jn);
let _n = P({}, ["mi", "mo", "mn", "ms", "mtext"]), dn = P({}, ["annotation-xml"]);
- const ql = P({}, ["title", "style", "font", "a", "script"]);
+ const xl = P({}, ["title", "style", "font", "a", "script"]);
let Ht = null;
- const xl = ["application/xhtml+xml", "text/html"], Nl = "text/html";
+ const Nl = ["application/xhtml+xml", "text/html"], Ml = "text/html";
let de = null, Lt = null;
- const Ml = t.createElement("form"), gi = function(p) {
+ const Pl = t.createElement("form"), gi = function(p) {
return p instanceof RegExp || p instanceof Function;
}, On = function() {
let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
if (!(Lt && Lt === p)) {
if ((!p || typeof p != "object") && (p = {}), p = mt(p), Ht = // eslint-disable-next-line unicorn/prefer-includes
- xl.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? Nl : p.PARSER_MEDIA_TYPE, de = Ht === "application/xhtml+xml" ? jn : En, $ = Ve(p, "ALLOWED_TAGS") ? P({}, p.ALLOWED_TAGS, de) : ae, K = Ve(p, "ALLOWED_ATTR") ? P({}, p.ALLOWED_ATTR, de) : _e, Ln = Ve(p, "ALLOWED_NAMESPACES") ? P({}, p.ALLOWED_NAMESPACES, jn) : Ol, Et = Ve(p, "ADD_URI_SAFE_ATTR") ? P(mt(mi), p.ADD_URI_SAFE_ATTR, de) : mi, Rt = Ve(p, "ADD_DATA_URI_TAGS") ? P(mt(Qe), p.ADD_DATA_URI_TAGS, de) : Qe, Ft = Ve(p, "FORBID_CONTENTS") ? P({}, p.FORBID_CONTENTS, de) : sn, Ae = Ve(p, "FORBID_TAGS") ? P({}, p.FORBID_TAGS, de) : mt({}), Ye = Ve(p, "FORBID_ATTR") ? P({}, p.FORBID_ATTR, de) : mt({}), ze = Ve(p, "USE_PROFILES") ? p.USE_PROFILES : !1, Dt = p.ALLOW_ARIA_ATTR !== !1, bt = p.ALLOW_DATA_ATTR !== !1, yt = p.ALLOW_UNKNOWN_PROTOCOLS || !1, ct = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Xe = p.SAFE_FOR_TEMPLATES || !1, Ke = p.SAFE_FOR_XML !== !1, _t = p.WHOLE_DOCUMENT || !1, wt = p.RETURN_DOM || !1, Bt = p.RETURN_DOM_FRAGMENT || !1, D = p.RETURN_TRUSTED_TYPE || !1, Ut = p.FORCE_BODY || !1, L = p.SANITIZE_DOM !== !1, Q = p.SANITIZE_NAMED_PROPS || !1, Te = p.KEEP_CONTENT !== !1, Pe = p.IN_PLACE || !1, he = p.ALLOWED_URI_REGEXP || kl, It = p.NAMESPACE || dt, _n = p.MATHML_TEXT_INTEGRATION_POINTS || _n, dn = p.HTML_INTEGRATION_POINTS || dn, E = p.CUSTOM_ELEMENT_HANDLING || {}, p.CUSTOM_ELEMENT_HANDLING && gi(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (E.tagNameCheck = p.CUSTOM_ELEMENT_HANDLING.tagNameCheck), p.CUSTOM_ELEMENT_HANDLING && gi(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (E.attributeNameCheck = p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (E.allowCustomizedBuiltInElements = p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Xe && (bt = !1), Bt && (wt = !0), ze && ($ = P({}, ya), K = [], ze.html === !0 && (P($, ba), P(K, wa)), ze.svg === !0 && (P($, Vn), P(K, Yn), P(K, Fn)), ze.svgFilters === !0 && (P($, Wn), P(K, Yn), P(K, Fn)), ze.mathMl === !0 && (P($, Zn), P(K, Fa), P(K, Fn))), p.ADD_TAGS && ($ === ae && ($ = mt($)), P($, p.ADD_TAGS, de)), p.ADD_ATTR && (K === _e && (K = mt(K)), P(K, p.ADD_ATTR, de)), p.ADD_URI_SAFE_ATTR && P(Et, p.ADD_URI_SAFE_ATTR, de), p.FORBID_CONTENTS && (Ft === sn && (Ft = mt(Ft)), P(Ft, p.FORBID_CONTENTS, de)), Te && ($["#text"] = !0), _t && P($, ["html", "head", "body"]), $.table && (P($, ["tbody"]), delete Ae.tbody), p.TRUSTED_TYPES_POLICY) {
+ Nl.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? Ml : p.PARSER_MEDIA_TYPE, de = Ht === "application/xhtml+xml" ? jn : En, $ = Ve(p, "ALLOWED_TAGS") ? P({}, p.ALLOWED_TAGS, de) : ae, K = Ve(p, "ALLOWED_ATTR") ? P({}, p.ALLOWED_ATTR, de) : _e, Ln = Ve(p, "ALLOWED_NAMESPACES") ? P({}, p.ALLOWED_NAMESPACES, jn) : ql, Et = Ve(p, "ADD_URI_SAFE_ATTR") ? P(mt(mi), p.ADD_URI_SAFE_ATTR, de) : mi, Rt = Ve(p, "ADD_DATA_URI_TAGS") ? P(mt(Qe), p.ADD_DATA_URI_TAGS, de) : Qe, Ft = Ve(p, "FORBID_CONTENTS") ? P({}, p.FORBID_CONTENTS, de) : sn, Ae = Ve(p, "FORBID_TAGS") ? P({}, p.FORBID_TAGS, de) : mt({}), Ye = Ve(p, "FORBID_ATTR") ? P({}, p.FORBID_ATTR, de) : mt({}), ze = Ve(p, "USE_PROFILES") ? p.USE_PROFILES : !1, Dt = p.ALLOW_ARIA_ATTR !== !1, bt = p.ALLOW_DATA_ATTR !== !1, yt = p.ALLOW_UNKNOWN_PROTOCOLS || !1, ct = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Xe = p.SAFE_FOR_TEMPLATES || !1, Ke = p.SAFE_FOR_XML !== !1, _t = p.WHOLE_DOCUMENT || !1, wt = p.RETURN_DOM || !1, Bt = p.RETURN_DOM_FRAGMENT || !1, D = p.RETURN_TRUSTED_TYPE || !1, Ut = p.FORCE_BODY || !1, L = p.SANITIZE_DOM !== !1, Q = p.SANITIZE_NAMED_PROPS || !1, Te = p.KEEP_CONTENT !== !1, Pe = p.IN_PLACE || !1, he = p.ALLOWED_URI_REGEXP || El, It = p.NAMESPACE || dt, _n = p.MATHML_TEXT_INTEGRATION_POINTS || _n, dn = p.HTML_INTEGRATION_POINTS || dn, E = p.CUSTOM_ELEMENT_HANDLING || {}, p.CUSTOM_ELEMENT_HANDLING && gi(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (E.tagNameCheck = p.CUSTOM_ELEMENT_HANDLING.tagNameCheck), p.CUSTOM_ELEMENT_HANDLING && gi(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (E.attributeNameCheck = p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (E.allowCustomizedBuiltInElements = p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Xe && (bt = !1), Bt && (wt = !0), ze && ($ = P({}, ya), K = [], ze.html === !0 && (P($, ba), P(K, wa)), ze.svg === !0 && (P($, Vn), P(K, Yn), P(K, Fn)), ze.svgFilters === !0 && (P($, Wn), P(K, Yn), P(K, Fn)), ze.mathMl === !0 && (P($, Zn), P(K, Fa), P(K, Fn))), p.ADD_TAGS && ($ === ae && ($ = mt($)), P($, p.ADD_TAGS, de)), p.ADD_ATTR && (K === _e && (K = mt(K)), P(K, p.ADD_ATTR, de)), p.ADD_URI_SAFE_ATTR && P(Et, p.ADD_URI_SAFE_ATTR, de), p.FORBID_CONTENTS && (Ft === sn && (Ft = mt(Ft)), P(Ft, p.FORBID_CONTENTS, de)), Te && ($["#text"] = !0), _t && P($, ["html", "head", "body"]), $.table && (P($, ["tbody"]), delete Ae.tbody), p.TRUSTED_TYPES_POLICY) {
if (typeof p.TRUSTED_TYPES_POLICY.createHTML != "function")
throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
if (typeof p.TRUSTED_TYPES_POLICY.createScriptURL != "function")
throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
g = p.TRUSTED_TYPES_POLICY, b = g.createHTML("");
} else
- g === void 0 && (g = $s(d, l)), g !== null && typeof b == "string" && (b = g.createHTML(""));
- $e && $e(p), Lt = p;
+ g === void 0 && (g = ks(d, l)), g !== null && typeof b == "string" && (b = g.createHTML(""));
+ ke && ke(p), Lt = p;
}
- }, vi = P({}, [...Vn, ...Wn, ...fs]), Di = P({}, [...Zn, ...ps]), Pl = function(p) {
+ }, vi = P({}, [...Vn, ...Wn, ...ps]), Di = P({}, [...Zn, ...hs]), zl = function(p) {
let k = _(p);
(!k || !k.tagName) && (k = {
namespaceURI: It,
tagName: "template"
});
const B = En(p.tagName), ee = En(k.tagName);
- return Ln[p.namespaceURI] ? p.namespaceURI === cn ? k.namespaceURI === dt ? B === "svg" : k.namespaceURI === un ? B === "svg" && (ee === "annotation-xml" || _n[ee]) : !!vi[B] : p.namespaceURI === un ? k.namespaceURI === dt ? B === "math" : k.namespaceURI === cn ? B === "math" && dn[ee] : !!Di[B] : p.namespaceURI === dt ? k.namespaceURI === cn && !dn[ee] || k.namespaceURI === un && !_n[ee] ? !1 : !Di[B] && (ql[B] || !vi[B]) : !!(Ht === "application/xhtml+xml" && Ln[p.namespaceURI]) : !1;
+ return Ln[p.namespaceURI] ? p.namespaceURI === cn ? k.namespaceURI === dt ? B === "svg" : k.namespaceURI === un ? B === "svg" && (ee === "annotation-xml" || _n[ee]) : !!vi[B] : p.namespaceURI === un ? k.namespaceURI === dt ? B === "math" : k.namespaceURI === cn ? B === "math" && dn[ee] : !!Di[B] : p.namespaceURI === dt ? k.namespaceURI === cn && !dn[ee] || k.namespaceURI === un && !_n[ee] ? !1 : !Di[B] && (xl[B] || !vi[B]) : !!(Ht === "application/xhtml+xml" && Ln[p.namespaceURI]) : !1;
}, Je = function(p) {
Wt(e.removed, {
element: p
@@ -7657,10 +7657,10 @@ function Al() {
if (ft(q.uponSanitizeElement, p, {
tagName: B,
allowedTags: $
- }), Ke && p.hasChildNodes() && !wi(p.firstElementChild) && ye(/<[/\w!]/g, p.innerHTML) && ye(/<[/\w!]/g, p.textContent) || p.nodeType === Kt.progressingInstruction || Ke && p.nodeType === Kt.comment && ye(/<[/\w]/g, p.data))
+ }), Ke && p.hasChildNodes() && !wi(p.firstElementChild) && we(/<[/\w!]/g, p.innerHTML) && we(/<[/\w!]/g, p.textContent) || p.nodeType === Kt.progressingInstruction || Ke && p.nodeType === Kt.comment && we(/<[/\w]/g, p.data))
return Je(p), !0;
if (!$[B] || Ae[B]) {
- if (!Ae[B] && ki(B) && (E.tagNameCheck instanceof RegExp && ye(E.tagNameCheck, B) || E.tagNameCheck instanceof Function && E.tagNameCheck(B)))
+ if (!Ae[B] && ki(B) && (E.tagNameCheck instanceof RegExp && we(E.tagNameCheck, B) || E.tagNameCheck instanceof Function && E.tagNameCheck(B)))
return !1;
if (Te && !Ft[B]) {
const ee = _(p) || p.parentNode, me = h(p) || p.childNodes;
@@ -7674,29 +7674,29 @@ function Al() {
}
return Je(p), !0;
}
- return p instanceof s && !Pl(p) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, p.innerHTML) ? (Je(p), !0) : (Xe && p.nodeType === Kt.text && (k = p.textContent, wn([z, Ee, se], (ee) => {
+ return p instanceof s && !zl(p) || (B === "noscript" || B === "noembed" || B === "noframes") && we(/<\/no(script|embed|frames)/i, p.innerHTML) ? (Je(p), !0) : (Xe && p.nodeType === Kt.text && (k = p.textContent, wn([z, be, se], (ee) => {
k = Zt(k, ee, " ");
}), p.textContent !== k && (Wt(e.removed, {
element: p.cloneNode()
}), p.textContent = k)), ft(q.afterSanitizeElements, p, null), !1);
}, $i = function(p, k, B) {
- if (L && (k === "id" || k === "name") && (B in t || B in Ml))
+ if (L && (k === "id" || k === "name") && (B in t || B in Pl))
return !1;
- if (!(bt && !Ye[k] && ye(be, k))) {
- if (!(Dt && ye(ce, k))) {
+ if (!(bt && !Ye[k] && we(ye, k))) {
+ if (!(Dt && we(ce, k))) {
if (!K[k] || Ye[k]) {
if (
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
- !(ki(p) && (E.tagNameCheck instanceof RegExp && ye(E.tagNameCheck, p) || E.tagNameCheck instanceof Function && E.tagNameCheck(p)) && (E.attributeNameCheck instanceof RegExp && ye(E.attributeNameCheck, k) || E.attributeNameCheck instanceof Function && E.attributeNameCheck(k)) || // Alternative, second condition checks if it's an `is`-attribute, AND
+ !(ki(p) && (E.tagNameCheck instanceof RegExp && we(E.tagNameCheck, p) || E.tagNameCheck instanceof Function && E.tagNameCheck(p)) && (E.attributeNameCheck instanceof RegExp && we(E.attributeNameCheck, k) || E.attributeNameCheck instanceof Function && E.attributeNameCheck(k)) || // Alternative, second condition checks if it's an `is`-attribute, AND
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
- k === "is" && E.allowCustomizedBuiltInElements && (E.tagNameCheck instanceof RegExp && ye(E.tagNameCheck, B) || E.tagNameCheck instanceof Function && E.tagNameCheck(B)))
+ k === "is" && E.allowCustomizedBuiltInElements && (E.tagNameCheck instanceof RegExp && we(E.tagNameCheck, B) || E.tagNameCheck instanceof Function && E.tagNameCheck(B)))
) return !1;
} else if (!Et[k]) {
- if (!ye(he, Zt(B, X, ""))) {
- if (!((k === "src" || k === "xlink:href" || k === "href") && p !== "script" && us(B, "data:") === 0 && Rt[p])) {
- if (!(yt && !ye(le, Zt(B, X, "")))) {
+ if (!we(he, Zt(B, X, ""))) {
+ if (!((k === "src" || k === "xlink:href" || k === "href") && p !== "script" && cs(B, "data:") === 0 && Rt[p])) {
+ if (!(yt && !we(le, Zt(B, X, "")))) {
if (B)
return !1;
}
@@ -7729,8 +7729,8 @@ function Al() {
namespaceURI: Ce,
value: pt
} = me, Gt = de(ue), xn = pt;
- let ge = ue === "value" ? xn : cs(xn);
- if (B.attrName = Gt, B.attrValue = ge, B.keepAttr = !0, B.forceKeepAttr = void 0, ft(q.uponSanitizeAttribute, p, B), ge = B.attrValue, Q && (Gt === "id" || Gt === "name") && (Ot(ue, p), ge = re + ge), Ke && ye(/((--!?|])>)|<\/(style|title)/i, ge)) {
+ let ge = ue === "value" ? xn : _s(xn);
+ if (B.attrName = Gt, B.attrValue = ge, B.keepAttr = !0, B.forceKeepAttr = void 0, ft(q.uponSanitizeAttribute, p, B), ge = B.attrValue, Q && (Gt === "id" || Gt === "name") && (Ot(ue, p), ge = re + ge), Ke && we(/((--!?|])>)|<\/(style|title)/i, ge)) {
Ot(ue, p);
continue;
}
@@ -7740,11 +7740,11 @@ function Al() {
Ot(ue, p);
continue;
}
- if (!ct && ye(/\/>/i, ge)) {
+ if (!ct && we(/\/>/i, ge)) {
Ot(ue, p);
continue;
}
- Xe && wn([z, Ee, se], (Ci) => {
+ Xe && wn([z, be, se], (Ci) => {
ge = Zt(ge, Ci, " ");
});
const Ai = de(p.nodeName);
@@ -7771,7 +7771,7 @@ function Al() {
}
}
ft(q.afterSanitizeAttributes, p, null);
- }, zl = function R(p) {
+ }, Ul = function R(p) {
let k = null;
const B = yi(p);
for (ft(q.beforeSanitizeShadowDOM, p, null); k = B.nextNode(); )
@@ -7806,7 +7806,7 @@ function Al() {
k && Ut && Je(k.firstChild);
const ue = yi(Pe ? R : k);
for (; ee = ue.nextNode(); )
- Fi(ee), Ei(ee), ee.content instanceof o && zl(ee.content);
+ Fi(ee), Ei(ee), ee.content instanceof o && Ul(ee.content);
if (Pe)
return R;
if (wt) {
@@ -7818,8 +7818,8 @@ function Al() {
return (K.shadowroot || K.shadowrootmode) && (me = x.call(n, me, !0)), me;
}
let Ce = _t ? k.outerHTML : k.innerHTML;
- return _t && $["!doctype"] && k.ownerDocument && k.ownerDocument.doctype && k.ownerDocument.doctype.name && ye(El, k.ownerDocument.doctype.name) && (Ce = "
-` + Ce), Xe && wn([z, Ee, se], (pt) => {
+ return _t && $["!doctype"] && k.ownerDocument && k.ownerDocument.doctype && k.ownerDocument.doctype.name && we(Al, k.ownerDocument.doctype.name) && (Ce = "
+` + Ce), Xe && wn([z, be, se], (pt) => {
Ce = Zt(Ce, pt, " ");
}), g && D ? g.createHTML(Ce) : Ce;
}, e.setConfig = function() {
@@ -7835,8 +7835,8 @@ function Al() {
typeof p == "function" && Wt(q[R], p);
}, e.removeHook = function(R, p) {
if (p !== void 0) {
- const k = rs(q[R], p);
- return k === -1 ? void 0 : ss(q[R], k, 1)[0];
+ const k = ss(q[R], p);
+ return k === -1 ? void 0 : us(q[R], k, 1)[0];
}
return va(q[R]);
}, e.removeHooks = function(R) {
@@ -7845,7 +7845,7 @@ function Al() {
q = ka();
}, e;
}
-Al();
+Cl();
const {
HtmlTagHydration: Yk,
SvelteComponent: Xk,
@@ -7924,53 +7924,53 @@ const {
safe_not_equal: hA,
set_style: mA
} = window.__gradio__svelte__internal, {
- SvelteComponent: ks,
+ SvelteComponent: Es,
append_hydration: H,
- assign: Es,
+ assign: As,
attr: N,
- binding_callbacks: As,
- check_outros: Cs,
+ binding_callbacks: Cs,
+ check_outros: Ss,
children: ie,
- claim_component: Cl,
+ claim_component: Sl,
claim_element: G,
- claim_space: we,
+ claim_space: Fe,
claim_text: gt,
- create_component: Sl,
- destroy_block: Tl,
- destroy_component: Bl,
- destroy_each: Ss,
+ create_component: Tl,
+ destroy_block: Bl,
+ destroy_component: Rl,
+ destroy_each: Ts,
detach: O,
element: j,
empty: st,
ensure_array_like: Pt,
- get_spread_object: Ts,
- get_spread_update: Bs,
- get_svelte_dataset: Rl,
- group_outros: Rs,
- init: Is,
+ get_spread_object: Bs,
+ get_spread_update: Rs,
+ get_svelte_dataset: Il,
+ group_outros: Is,
+ init: Ls,
insert_hydration: Y,
listen: pe,
- mount_component: Il,
+ mount_component: Ll,
run_all: rn,
- safe_not_equal: Ls,
+ safe_not_equal: Os,
select_option: Ea,
set_data: kt,
set_input_value: ut,
set_style: Nt,
- space: Fe,
- stop_propagation: Os,
+ space: $e,
+ stop_propagation: qs,
text: vt,
to_number: si,
toggle_class: Se,
transition_in: nn,
transition_out: Bn,
- update_keyed_each: Ll
-} = window.__gradio__svelte__internal, { onMount: qs, tick: xs } = window.__gradio__svelte__internal;
-function Aa(i, e, t) {
+ update_keyed_each: Ol
+} = window.__gradio__svelte__internal, { onMount: xs, tick: Aa } = window.__gradio__svelte__internal;
+function Ca(i, e, t) {
const n = i.slice();
return n[53] = e[t], n;
}
-function Ca(i, e, t) {
+function Sa(i, e, t) {
const n = i.slice();
n[56] = e[t], n[58] = e, n[59] = t;
const l = (
@@ -7987,11 +7987,11 @@ function Ca(i, e, t) {
);
return n[57] = l, n;
}
-function Sa(i, e, t) {
+function Ta(i, e, t) {
const n = i.slice();
return n[60] = e[t], n;
}
-function Ta(i) {
+function Ba(i) {
let e, t;
const n = [
{
@@ -8009,24 +8009,24 @@ function Ta(i) {
];
let l = {};
for (let o = 0; o < n.length; o += 1)
- l = Es(l, n[o]);
- return e = new is({ props: l }), e.$on(
+ l = As(l, n[o]);
+ return e = new as({ props: l }), e.$on(
"clear_status",
/*clear_status_handler*/
i[30]
), {
c() {
- Sl(e.$$.fragment);
+ Tl(e.$$.fragment);
},
l(o) {
- Cl(e.$$.fragment, o);
+ Sl(e.$$.fragment, o);
},
m(o, a) {
- Il(e, o, a), t = !0;
+ Ll(e, o, a), t = !0;
},
p(o, a) {
const r = a[0] & /*gradio, loading_status*/
- 20480 ? Bs(n, [
+ 20480 ? Rs(n, [
a[0] & /*gradio*/
16384 && {
autoscroll: (
@@ -8040,7 +8040,7 @@ function Ta(i) {
o[14].i18n
) },
a[0] & /*loading_status*/
- 4096 && Ts(
+ 4096 && Bs(
/*loading_status*/
o[12]
)
@@ -8054,11 +8054,11 @@ function Ta(i) {
Bn(e.$$.fragment, o), t = !1;
},
d(o) {
- Bl(e, o);
+ Rl(e, o);
}
};
}
-function Ba(i) {
+function Ra(i) {
let e, t;
return {
c() {
@@ -8095,14 +8095,14 @@ function Ba(i) {
}
};
}
-function Ra(i) {
+function Ia(i) {
let e, t = "â–¼";
return {
c() {
e = j("span"), e.textContent = t, this.h();
},
l(n) {
- e = G(n, "SPAN", { class: !0, "data-svelte-h": !0 }), Rl(e) !== "svelte-zp2qne" && (e.textContent = t), this.h();
+ e = G(n, "SPAN", { class: !0, "data-svelte-h": !0 }), Il(e) !== "svelte-zp2qne" && (e.textContent = t), this.h();
},
h() {
N(e, "class", "accordion-icon svelte-1rrwwcf"), Nt(
@@ -8129,11 +8129,11 @@ function Ra(i) {
}
};
}
-function Ia(i) {
+function La(i) {
let e, t = Array.isArray(
/*value*/
i[0]
- ), n = t && La(i);
+ ), n = t && Oa(i);
return {
c() {
e = j("div"), n && n.c(), this.h();
@@ -8167,7 +8167,7 @@ function Ia(i) {
1 && (t = Array.isArray(
/*value*/
l[0]
- )), t ? n ? n.p(l, o) : (n = La(l), n.c(), n.m(e, null)) : n && (n.d(1), n = null), o[0] & /*value, show_group_name_only_one*/
+ )), t ? n ? n.p(l, o) : (n = Oa(l), n.c(), n.m(e, null)) : n && (n.d(1), n = null), o[0] & /*value, show_group_name_only_one*/
9 && Nt(
e,
"--show-group-name",
@@ -8189,7 +8189,7 @@ function Ia(i) {
}
};
}
-function La(i) {
+function Oa(i) {
let e = [], t = /* @__PURE__ */ new Map(), n, l = Pt(
/*value*/
i[0]
@@ -8199,8 +8199,8 @@ function La(i) {
a[53].group_name
);
for (let a = 0; a < l.length; a += 1) {
- let r = Aa(i, l, a), s = o(r);
- t.set(s, e[a] = Ha(s, r));
+ let r = Ca(i, l, a), s = o(r);
+ t.set(s, e[a] = Ga(s, r));
}
return {
c() {
@@ -8223,7 +8223,7 @@ function La(i) {
131571721 && (l = Pt(
/*value*/
a[0]
- ), e = Ll(e, r, o, 1, a, l, t, n.parentNode, Tl, Ha, n, Aa));
+ ), e = Ol(e, r, o, 1, a, l, t, n.parentNode, Bl, Ga, n, Ca));
},
d(a) {
a && O(n);
@@ -8232,7 +8232,7 @@ function La(i) {
}
};
}
-function Oa(i) {
+function qa(i) {
let e, t, n = (
/*group*/
i[53].group_name + ""
@@ -8254,14 +8254,14 @@ function Oa(i) {
}
return {
c() {
- e = j("button"), t = j("span"), l = vt(n), o = Fe(), a = j("span"), s = vt(r), this.h();
+ e = j("button"), t = j("span"), l = vt(n), o = $e(), a = j("span"), s = vt(r), this.h();
},
l(f) {
e = G(f, "BUTTON", { class: !0 });
var d = ie(e);
t = G(d, "SPAN", { class: !0 });
var v = ie(t);
- l = gt(v, n), v.forEach(O), o = we(d), a = G(d, "SPAN", { class: !0 });
+ l = gt(v, n), v.forEach(O), o = Fe(d), a = G(d, "SPAN", { class: !0 });
var y = ie(a);
s = gt(y, r), y.forEach(O), d.forEach(O), this.h();
},
@@ -8286,19 +8286,19 @@ function Oa(i) {
}
};
}
-function qa(i) {
+function xa(i) {
let e, t = Array.isArray(
/*group*/
i[53].properties
- ), n, l = t && xa(i);
+ ), n, l = t && Na(i);
return {
c() {
- e = j("div"), l && l.c(), n = Fe(), this.h();
+ e = j("div"), l && l.c(), n = $e(), this.h();
},
l(o) {
e = G(o, "DIV", { class: !0 });
var a = ie(e);
- l && l.l(a), n = we(a), a.forEach(O), this.h();
+ l && l.l(a), n = Fe(a), a.forEach(O), this.h();
},
h() {
N(e, "class", "properties-grid svelte-1rrwwcf");
@@ -8311,14 +8311,14 @@ function qa(i) {
1 && (t = Array.isArray(
/*group*/
o[53].properties
- )), t ? l ? l.p(o, a) : (l = xa(o), l.c(), l.m(e, n)) : l && (l.d(1), l = null);
+ )), t ? l ? l.p(o, a) : (l = Na(o), l.c(), l.m(e, n)) : l && (l.d(1), l = null);
},
d(o) {
o && O(e), l && l.d();
}
};
}
-function xa(i) {
+function Na(i) {
let e = [], t = /* @__PURE__ */ new Map(), n, l = Pt(
/*group*/
i[53].properties
@@ -8328,8 +8328,8 @@ function xa(i) {
a[56].name
);
for (let a = 0; a < l.length; a += 1) {
- let r = Ca(i, l, a), s = o(r);
- t.set(s, e[a] = Ua(s, r));
+ let r = Sa(i, l, a), s = o(r);
+ t.set(s, e[a] = Ha(s, r));
}
return {
c() {
@@ -8352,7 +8352,7 @@ function xa(i) {
127344641 && (l = Pt(
/*group*/
a[53].properties
- ), e = Ll(e, r, o, 1, a, l, t, n.parentNode, Tl, Ua, n, Ca));
+ ), e = Ol(e, r, o, 1, a, l, t, n.parentNode, Bl, Ha, n, Sa));
},
d(a) {
a && O(n);
@@ -8361,19 +8361,19 @@ function xa(i) {
}
};
}
-function Na(i) {
+function Ma(i) {
let e, t, n = "?", l, o, a = (
/*prop*/
i[56].help + ""
), r;
return {
c() {
- e = j("div"), t = j("span"), t.textContent = n, l = Fe(), o = j("span"), r = vt(a), this.h();
+ e = j("div"), t = j("span"), t.textContent = n, l = $e(), o = j("span"), r = vt(a), this.h();
},
l(s) {
e = G(s, "DIV", { class: !0 });
var u = ie(e);
- t = G(u, "SPAN", { class: !0, "data-svelte-h": !0 }), Rl(t) !== "svelte-fzek5l" && (t.textContent = n), l = we(u), o = G(u, "SPAN", { class: !0 });
+ t = G(u, "SPAN", { class: !0, "data-svelte-h": !0 }), Il(t) !== "svelte-fzek5l" && (t.textContent = n), l = Fe(u), o = G(u, "SPAN", { class: !0 });
var c = ie(o);
r = gt(c, a), c.forEach(O), u.forEach(O), this.h();
},
@@ -8397,7 +8397,7 @@ function Ns(i) {
let e, t, n = Array.isArray(
/*prop*/
i[56].choices
- ), l, o, a, r, s, u, c = n && Ma(i);
+ ), l, o, a, r, s, u, c = n && Pa(i);
function m(...f) {
return (
/*change_handler_5*/
@@ -8410,14 +8410,14 @@ function Ns(i) {
}
return {
c() {
- e = j("div"), t = j("select"), c && c.c(), a = Fe(), r = j("div"), this.h();
+ e = j("div"), t = j("select"), c && c.c(), a = $e(), r = j("div"), this.h();
},
l(f) {
e = G(f, "DIV", { class: !0 });
var d = ie(e);
t = G(d, "SELECT", { class: !0 });
var v = ie(t);
- c && c.l(v), v.forEach(O), a = we(d), r = G(d, "DIV", { class: !0 }), ie(r).forEach(O), d.forEach(O), this.h();
+ c && c.l(v), v.forEach(O), a = Fe(d), r = G(d, "DIV", { class: !0 }), ie(r).forEach(O), d.forEach(O), this.h();
},
h() {
t.disabled = l = !/*is_interactive*/
@@ -8436,7 +8436,7 @@ function Ns(i) {
1 && (n = Array.isArray(
/*prop*/
i[56].choices
- )), n ? c ? c.p(i, d) : (c = Ma(i), c.c(), c.m(t, null)) : c && (c.d(1), c = null), d[0] & /*interactive, value*/
+ )), n ? c ? c.p(i, d) : (c = Pa(i), c.c(), c.m(t, null)) : c && (c.d(1), c = null), d[0] & /*interactive, value*/
8193 && l !== (l = !/*is_interactive*/
i[57]) && (t.disabled = l), d[0] & /*value*/
1 && o !== (o = /*prop*/
@@ -8478,12 +8478,12 @@ function Ms(i) {
}
return {
c() {
- e = j("div"), t = j("input"), l = Fe(), o = j("span"), r = vt(a), this.h();
+ e = j("div"), t = j("input"), l = $e(), o = j("span"), r = vt(a), this.h();
},
l(f) {
e = G(f, "DIV", { class: !0 });
var d = ie(e);
- t = G(d, "INPUT", { type: !0, class: !0 }), l = we(d), o = G(d, "SPAN", { class: !0 });
+ t = G(d, "INPUT", { type: !0, class: !0 }), l = Fe(d), o = G(d, "SPAN", { class: !0 });
var v = ie(o);
r = gt(v, a), v.forEach(O), d.forEach(O), this.h();
},
@@ -8565,7 +8565,7 @@ function Ps(i) {
}
return {
c() {
- e = j("div"), t = j("input"), s = Fe(), u = j("span"), m = vt(c), this.h();
+ e = j("div"), t = j("input"), s = $e(), u = j("span"), m = vt(c), this.h();
},
l(_) {
e = G(_, "DIV", { class: !0 });
@@ -8576,7 +8576,7 @@ function Ps(i) {
max: !0,
step: !0,
class: !0
- }), s = we(g), u = G(g, "SPAN", { class: !0 });
+ }), s = Fe(g), u = G(g, "SPAN", { class: !0 });
var b = ie(u);
m = gt(b, c), b.forEach(O), g.forEach(O), this.h();
},
@@ -8834,13 +8834,13 @@ function Hs(i) {
}
};
}
-function Ma(i) {
+function Pa(i) {
let e, t = Pt(
/*prop*/
i[56].choices
), n = [];
for (let l = 0; l < t.length; l += 1)
- n[l] = Pa(Sa(i, t, l));
+ n[l] = za(Ta(i, t, l));
return {
c() {
for (let l = 0; l < n.length; l += 1)
@@ -8866,8 +8866,8 @@ function Ma(i) {
);
let a;
for (a = 0; a < t.length; a += 1) {
- const r = Sa(l, t, a);
- n[a] ? n[a].p(r, o) : (n[a] = Pa(r), n[a].c(), n[a].m(e.parentNode, e));
+ const r = Ta(l, t, a);
+ n[a] ? n[a].p(r, o) : (n[a] = za(r), n[a].c(), n[a].m(e.parentNode, e));
}
for (; a < n.length; a += 1)
n[a].d(1);
@@ -8875,23 +8875,23 @@ function Ma(i) {
}
},
d(l) {
- l && O(e), Ss(n, l);
+ l && O(e), Ts(n, l);
}
};
}
-function Pa(i) {
+function za(i) {
let e, t = (
/*choice*/
i[60] + ""
), n, l, o, a;
return {
c() {
- e = j("option"), n = vt(t), l = Fe(), this.h();
+ e = j("option"), n = vt(t), l = $e(), this.h();
},
l(r) {
e = G(r, "OPTION", { class: !0 });
var s = ie(e);
- n = gt(s, t), l = we(s), s.forEach(O), this.h();
+ n = gt(s, t), l = Fe(s), s.forEach(O), this.h();
},
h() {
e.__value = o = /*choice*/
@@ -8917,7 +8917,7 @@ function Pa(i) {
}
};
}
-function za(i) {
+function Ua(i) {
let e, t, n, l, o;
function a() {
return (
@@ -8951,7 +8951,7 @@ function za(i) {
);
},
m(r, s) {
- Y(r, e, s), H(e, t), l || (o = pe(e, "click", Os(a)), l = !0);
+ Y(r, e, s), H(e, t), l || (o = pe(e, "click", qs(a)), l = !0);
},
p(r, s) {
i = r, s[0] & /*interactive, value*/
@@ -8973,13 +8973,13 @@ function za(i) {
}
};
}
-function Ua(i, e) {
+function Ha(i, e) {
let t, n, l, o = (
/*prop*/
e[56].label + ""
), a, r, s, u, c, m, f, d = (
/*prop*/
- e[56].help && Na(e)
+ e[56].help && Ma(e)
);
function v(h, _) {
if (
@@ -9010,13 +9010,13 @@ function Ua(i, e) {
}
let y = v(e), w = y && y(e), C = (
/*prop*/
- e[56].component !== "checkbox" && za(e)
+ e[56].component !== "checkbox" && Ua(e)
);
return {
key: i,
first: null,
c() {
- t = j("label"), n = j("div"), l = j("span"), a = vt(o), r = Fe(), d && d.c(), u = Fe(), c = j("div"), w && w.c(), m = Fe(), C && C.c(), f = Fe(), this.h();
+ t = j("label"), n = j("div"), l = j("span"), a = vt(o), r = $e(), d && d.c(), u = $e(), c = j("div"), w && w.c(), m = $e(), C && C.c(), f = $e(), this.h();
},
l(h) {
t = G(h, "LABEL", { class: !0, for: !0 });
@@ -9025,9 +9025,9 @@ function Ua(i, e) {
var g = ie(n);
l = G(g, "SPAN", {});
var b = ie(l);
- a = gt(b, o), b.forEach(O), r = we(g), d && d.l(g), g.forEach(O), _.forEach(O), u = we(h), c = G(h, "DIV", { class: !0 });
+ a = gt(b, o), b.forEach(O), r = Fe(g), d && d.l(g), g.forEach(O), _.forEach(O), u = Fe(h), c = G(h, "DIV", { class: !0 });
var F = ie(c);
- w && w.l(F), m = we(F), C && C.l(F), f = we(F), F.forEach(O), this.h();
+ w && w.l(F), m = Fe(F), C && C.l(F), f = Fe(F), F.forEach(O), this.h();
},
h() {
N(n, "class", "prop-label-wrapper svelte-1rrwwcf"), N(t, "class", "prop-label svelte-1rrwwcf"), N(t, "for", s = /*prop*/
@@ -9040,37 +9040,37 @@ function Ua(i, e) {
e = h, _[0] & /*value*/
1 && o !== (o = /*prop*/
e[56].label + "") && kt(a, o), /*prop*/
- e[56].help ? d ? d.p(e, _) : (d = Na(e), d.c(), d.m(n, null)) : d && (d.d(1), d = null), _[0] & /*value*/
+ e[56].help ? d ? d.p(e, _) : (d = Ma(e), d.c(), d.m(n, null)) : d && (d.d(1), d = null), _[0] & /*value*/
1 && s !== (s = /*prop*/
e[56].name) && N(t, "for", s), y === (y = v(e)) && w ? w.p(e, _) : (w && w.d(1), w = y && y(e), w && (w.c(), w.m(c, m))), /*prop*/
- e[56].component !== "checkbox" ? C ? C.p(e, _) : (C = za(e), C.c(), C.m(c, f)) : C && (C.d(1), C = null);
+ e[56].component !== "checkbox" ? C ? C.p(e, _) : (C = Ua(e), C.c(), C.m(c, f)) : C && (C.d(1), C = null);
},
d(h) {
h && (O(t), O(u), O(c)), d && d.d(), w && w.d(), C && C.d();
}
};
}
-function Ha(i, e) {
+function Ga(i, e) {
let t, n, l, o = (
/*value*/
(e[0].length > 1 || /*show_group_name_only_one*/
e[3] && /*value*/
- e[0].length === 1) && Oa(e)
+ e[0].length === 1) && qa(e)
), a = (
/*groupVisibility*/
e[15][
/*group*/
e[53].group_name
- ] && qa(e)
+ ] && xa(e)
);
return {
key: i,
first: null,
c() {
- t = st(), o && o.c(), n = Fe(), a && a.c(), l = st(), this.h();
+ t = st(), o && o.c(), n = $e(), a && a.c(), l = st(), this.h();
},
l(r) {
- t = st(), o && o.l(r), n = we(r), a && a.l(r), l = st(), this.h();
+ t = st(), o && o.l(r), n = Fe(r), a && a.l(r), l = st(), this.h();
},
h() {
this.first = t;
@@ -9082,11 +9082,11 @@ function Ha(i, e) {
e = r, /*value*/
e[0].length > 1 || /*show_group_name_only_one*/
e[3] && /*value*/
- e[0].length === 1 ? o ? o.p(e, s) : (o = Oa(e), o.c(), o.m(n.parentNode, n)) : o && (o.d(1), o = null), /*groupVisibility*/
+ e[0].length === 1 ? o ? o.p(e, s) : (o = qa(e), o.c(), o.m(n.parentNode, n)) : o && (o.d(1), o = null), /*groupVisibility*/
e[15][
/*group*/
e[53].group_name
- ] ? a ? a.p(e, s) : (a = qa(e), a.c(), a.m(l.parentNode, l)) : a && (a.d(1), a = null);
+ ] ? a ? a.p(e, s) : (a = xa(e), a.c(), a.m(l.parentNode, l)) : a && (a.d(1), a = null);
},
d(r) {
r && (O(t), O(n), O(l)), o && o.d(r), a && a.d(r);
@@ -9096,23 +9096,23 @@ function Ha(i, e) {
function Gs(i) {
let e, t, n, l, o, a, r, s, u = (
/*loading_status*/
- i[12] && Ta(i)
+ i[12] && Ba(i)
), c = (
/*label*/
- i[2] && Ba(i)
+ i[2] && Ra(i)
), m = !/*disable_accordion*/
- i[4] && Ra(i), f = (
+ i[4] && Ia(i), f = (
/*open*/
- i[1] && Ia(i)
+ i[1] && La(i)
);
return {
c() {
- u && u.c(), e = Fe(), t = j("button"), c && c.c(), n = Fe(), m && m.c(), l = Fe(), o = j("div"), f && f.c(), this.h();
+ u && u.c(), e = $e(), t = j("button"), c && c.c(), n = $e(), m && m.c(), l = $e(), o = j("div"), f && f.c(), this.h();
},
l(d) {
- u && u.l(d), e = we(d), t = G(d, "BUTTON", { class: !0 });
+ u && u.l(d), e = Fe(d), t = G(d, "BUTTON", { class: !0 });
var v = ie(t);
- c && c.l(v), n = we(v), m && m.l(v), v.forEach(O), l = we(d), o = G(d, "DIV", { class: !0 });
+ c && c.l(v), n = Fe(v), m && m.l(v), v.forEach(O), l = Fe(d), o = G(d, "DIV", { class: !0 });
var y = ie(o);
f && f.l(y), y.forEach(O), this.h();
},
@@ -9132,14 +9132,14 @@ function Gs(i) {
p(d, v) {
/*loading_status*/
d[12] ? u ? (u.p(d, v), v[0] & /*loading_status*/
- 4096 && nn(u, 1)) : (u = Ta(d), u.c(), nn(u, 1), u.m(e.parentNode, e)) : u && (Rs(), Bn(u, 1, 1, () => {
+ 4096 && nn(u, 1)) : (u = Ba(d), u.c(), nn(u, 1), u.m(e.parentNode, e)) : u && (Is(), Bn(u, 1, 1, () => {
u = null;
- }), Cs()), /*label*/
- d[2] ? c ? c.p(d, v) : (c = Ba(d), c.c(), c.m(t, n)) : c && (c.d(1), c = null), /*disable_accordion*/
- d[4] ? m && (m.d(1), m = null) : m ? m.p(d, v) : (m = Ra(d), m.c(), m.m(t, null)), (!a || v[0] & /*disable_accordion*/
+ }), Ss()), /*label*/
+ d[2] ? c ? c.p(d, v) : (c = Ra(d), c.c(), c.m(t, n)) : c && (c.d(1), c = null), /*disable_accordion*/
+ d[4] ? m && (m.d(1), m = null) : m ? m.p(d, v) : (m = Ia(d), m.c(), m.m(t, null)), (!a || v[0] & /*disable_accordion*/
16) && (t.disabled = /*disable_accordion*/
d[4]), /*open*/
- d[1] ? f ? f.p(d, v) : (f = Ia(d), f.c(), f.m(o, null)) : f && (f.d(1), f = null), (!a || v[0] & /*open*/
+ d[1] ? f ? f.p(d, v) : (f = La(d), f.c(), f.m(o, null)) : f && (f.d(1), f = null), (!a || v[0] & /*open*/
2) && Se(o, "closed", !/*open*/
d[1]);
},
@@ -9156,7 +9156,7 @@ function Gs(i) {
}
function js(i) {
let e, t;
- return e = new oo({
+ return e = new ro({
props: {
visible: (
/*visible*/
@@ -9191,13 +9191,13 @@ function js(i) {
}
}), {
c() {
- Sl(e.$$.fragment);
+ Tl(e.$$.fragment);
},
l(n) {
- Cl(e.$$.fragment, n);
+ Sl(e.$$.fragment, n);
},
m(n, l) {
- Il(e, n, l), t = !0;
+ Ll(e, n, l), t = !0;
},
p(n, l) {
const o = {};
@@ -9226,11 +9226,11 @@ function js(i) {
Bn(e.$$.fragment, n), t = !1;
},
d(n) {
- Bl(e, n);
+ Rl(e, n);
}
};
}
-function Ga(i, e) {
+function ja(i, e) {
var t, n;
if (!e) return;
const l = (t = i.minimum) !== null && t !== void 0 ? t : 0, o = (n = i.maximum) !== null && n !== void 0 ? n : 100, a = Number(i.value), r = a <= l ? 0 : (a - l) * 100 / (o - l);
@@ -9275,18 +9275,18 @@ function Vs(i, e, t) {
let Q = !0;
D.minimum !== void 0 && L < D.minimum && (Q = !1), D.maximum !== void 0 && L > D.maximum && (Q = !1), T[D.name] !== Q && (t(17, T[D.name] = Q, T), t(17, T = Object.assign({}, T)));
}
- function Ee() {
+ function be() {
if (Array.isArray(a)) {
for (const D of a)
if (Array.isArray(D.properties))
for (const L of D.properties)
- L.component === "slider" && A[L.name] && Ga(L, A[L.name]);
+ L.component === "slider" && A[L.name] && ja(L, A[L.name]);
}
}
function se() {
t(1, m = !m), m ? b.dispatch("expand") : b.dispatch("collapse");
}
- function be(D) {
+ function ye(D) {
t(15, F[D] = !F[D], F);
}
function ce(D) {
@@ -9310,7 +9310,7 @@ function Vs(i, e, t) {
const Q = D.target.value;
t(0, a = a.map((re) => re.properties ? Object.assign(Object.assign({}, re), {
properties: re.properties.map((Te) => Te.name === L.name ? Object.assign(Object.assign({}, Te), { value: Q }) : Te)
- }) : re)), yield xs(), b.dispatch("change", a);
+ }) : re)), yield Aa(), b.dispatch("change", a);
});
}
function oe(D) {
@@ -9332,12 +9332,12 @@ function Vs(i, e, t) {
Array.isArray(D.properties) && D.properties.forEach((L) => {
t(18, q[L.name] = L.value, q);
});
- }), setTimeout(Ee, 50);
+ }), setTimeout(be, 50);
}
- qs(() => {
+ xs(() => {
he();
});
- const $ = () => b.dispatch("clear_status"), ae = (D) => be(D.group_name);
+ const $ = () => b.dispatch("clear_status"), ae = (D) => ye(D.group_name);
function K(D, L) {
D[L].value = this.value, t(0, a);
}
@@ -9356,12 +9356,12 @@ function Vs(i, e, t) {
D[L].value = si(this.value), t(0, a);
}
function Xe(D, L) {
- As[D ? "unshift" : "push"](() => {
+ Cs[D ? "unshift" : "push"](() => {
A[L.name] = D, t(16, A);
});
}
const Ke = (D) => {
- z(D), Ga(D, A[D.name]), le("input", D);
+ z(D), ja(D, A[D.name]), le("input", D);
}, _t = (D) => le("change", D);
function zt(D, L) {
D[L].value = this.value, t(0, a);
@@ -9379,8 +9379,10 @@ function Vs(i, e, t) {
if (F[D.group_name] === void 0 && t(15, F[D.group_name] = !0, F), Array.isArray(D.properties))
for (const L of D.properties)
(!(t(28, o = L.component) === null || o === void 0) && o.startsWith("number") || L.component === "slider") && z(L);
- Ee();
+ be();
}
+ i.$$.dirty[0] & /*open, groupVisibility*/
+ 32770 && m && F && Aa().then(be);
}, [
a,
m,
@@ -9404,7 +9406,7 @@ function Vs(i, e, t) {
n,
z,
se,
- be,
+ ye,
ce,
le,
X,
@@ -9432,14 +9434,14 @@ function Vs(i, e, t) {
Bt
];
}
-class gA extends ks {
+class gA extends Es {
constructor(e) {
- super(), Is(
+ super(), Ls(
this,
e,
Vs,
js,
- Ls,
+ Os,
{
value: 0,
label: 2,
diff --git a/src/frontend/Index.svelte b/src/frontend/Index.svelte
index bdde564f8a038c285c9151dab7e68273cc4eda75..0bf7b13ed08ae07599cdf8afe21ac8e6393e5869 100644
--- a/src/frontend/Index.svelte
+++ b/src/frontend/Index.svelte
@@ -274,6 +274,9 @@
onMount(() => {
storeInitialValues();
});
+ $: if (open && groupVisibility) {
+ tick().then(updateAllSliders);
+ }
diff --git a/src/pyproject.toml b/src/pyproject.toml
index 8de1572269ff802f464ce6a68cb9bce4104c61e5..0b54a3409080ce637a9702bf053a61062180bdb1 100644
--- a/src/pyproject.toml
+++ b/src/pyproject.toml
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
[project]
name = "gradio_propertysheet"
-version = "0.0.4"
+version = "0.0.5"
description = "Property sheet"
readme = "README.md"
license = "apache-2.0"
@@ -38,8 +38,8 @@ classifiers = [
# encounter your project in the wild.
# [project.urls]
-# repository = "your github repository"
-# space = "your space url"
+# repository = "https://github.com/DEVAIEXP/gradio_component_propertysheet"
+# space = "https://huggingface.co/spaces/elismasilva/gradio_propertysheet"
[project.optional-dependencies]
dev = ["build", "twine"]