diff --git "a/src/backend/gradio_fasta/templates/component/index.js" "b/src/backend/gradio_fasta/templates/component/index.js"
--- "a/src/backend/gradio_fasta/templates/component/index.js"
+++ "b/src/backend/gradio_fasta/templates/component/index.js"
@@ -1,28 +1,28 @@
const {
- SvelteComponent: Us,
- assign: xs,
- create_slot: Fs,
- detach: Gs,
- element: qs,
- get_all_dirty_from_scope: js,
- get_slot_changes: Vs,
- get_spread_update: zs,
- init: Xs,
- insert: Ws,
- safe_not_equal: Zs,
- set_dynamic_element_data: yr,
+ SvelteComponent: Rs,
+ assign: Us,
+ create_slot: xs,
+ detach: Fs,
+ element: Gs,
+ get_all_dirty_from_scope: qs,
+ get_slot_changes: js,
+ get_spread_update: Vs,
+ init: zs,
+ insert: Xs,
+ safe_not_equal: Ws,
+ set_dynamic_element_data: vr,
set_style: ie,
toggle_class: Me,
- transition_in: Ii,
- transition_out: Li,
- update_slot_base: Js
+ transition_in: Ni,
+ transition_out: Ii,
+ update_slot_base: Zs
} = window.__gradio__svelte__internal;
-function Qs(e) {
+function Js(e) {
let t, n, r;
const i = (
/*#slots*/
e[18].default
- ), s = Fs(
+ ), s = xs(
i,
e,
/*$$scope*/
@@ -42,18 +42,18 @@ function Qs(e) {
class: n = "block " + /*elem_classes*/
e[3].join(" ") + " svelte-1t38q2d"
}
- ], a = {};
+ ], u = {};
for (let o = 0; o < l.length; o += 1)
- a = xs(a, l[o]);
+ u = Us(u, l[o]);
return {
c() {
- t = qs(
+ t = Gs(
/*tag*/
e[14]
- ), s && s.c(), yr(
+ ), s && s.c(), vr(
/*tag*/
e[14]
- )(t, a), Me(
+ )(t, u), Me(
t,
"hidden",
/*visible*/
@@ -104,43 +104,43 @@ function Qs(e) {
), ie(t, "min-width", `calc(min(${/*min_width*/
e[13]}px, 100%))`), ie(t, "border-width", "var(--block-border-width)");
},
- m(o, u) {
- Ws(o, t, u), s && s.m(t, null), r = !0;
+ m(o, a) {
+ Xs(o, t, a), s && s.m(t, null), r = !0;
},
- p(o, u) {
- s && s.p && (!r || u & /*$$scope*/
- 131072) && Js(
+ p(o, a) {
+ s && s.p && (!r || a & /*$$scope*/
+ 131072) && Zs(
s,
i,
o,
/*$$scope*/
o[17],
- r ? Vs(
+ r ? js(
i,
/*$$scope*/
o[17],
- u,
+ a,
null
- ) : js(
+ ) : qs(
/*$$scope*/
o[17]
),
null
- ), yr(
+ ), vr(
/*tag*/
o[14]
- )(t, a = zs(l, [
- (!r || u & /*test_id*/
+ )(t, u = Vs(l, [
+ (!r || a & /*test_id*/
128) && { "data-testid": (
/*test_id*/
o[7]
) },
- (!r || u & /*elem_id*/
+ (!r || a & /*elem_id*/
4) && { id: (
/*elem_id*/
o[2]
) },
- (!r || u & /*elem_classes*/
+ (!r || a & /*elem_classes*/
8 && n !== (n = "block " + /*elem_classes*/
o[3].join(" ") + " svelte-1t38q2d")) && { class: n }
])), Me(
@@ -160,7 +160,7 @@ function Qs(e) {
o[5] === "focus"
), Me(t, "hide-container", !/*explicit_call*/
o[8] && !/*container*/
- o[9]), u & /*height*/
+ o[9]), a & /*height*/
1 && ie(
t,
"height",
@@ -169,7 +169,7 @@ function Qs(e) {
/*height*/
o[0]
)
- ), u & /*width*/
+ ), a & /*width*/
2 && ie(t, "width", typeof /*width*/
o[1] == "number" ? `calc(min(${/*width*/
o[1]}px, 100%))` : (
@@ -178,43 +178,43 @@ function Qs(e) {
/*width*/
o[1]
)
- )), u & /*variant*/
+ )), a & /*variant*/
16 && ie(
t,
"border-style",
/*variant*/
o[4]
- ), u & /*allow_overflow*/
+ ), a & /*allow_overflow*/
2048 && ie(
t,
"overflow",
/*allow_overflow*/
o[11] ? "visible" : "hidden"
- ), u & /*scale*/
+ ), a & /*scale*/
4096 && ie(
t,
"flex-grow",
/*scale*/
o[12]
- ), u & /*min_width*/
+ ), a & /*min_width*/
8192 && ie(t, "min-width", `calc(min(${/*min_width*/
o[13]}px, 100%))`);
},
i(o) {
- r || (Ii(s, o), r = !0);
+ r || (Ni(s, o), r = !0);
},
o(o) {
- Li(s, o), r = !1;
+ Ii(s, o), r = !1;
},
d(o) {
- o && Gs(t), s && s.d(o);
+ o && Fs(t), s && s.d(o);
}
};
}
-function Ys(e) {
+function Qs(e) {
let t, n = (
/*tag*/
- e[14] && Qs(e)
+ e[14] && Js(e)
);
return {
c() {
@@ -228,18 +228,18 @@ function Ys(e) {
r[14] && n.p(r, i);
},
i(r) {
- t || (Ii(n, r), t = !0);
+ t || (Ni(n, r), t = !0);
},
o(r) {
- Li(n, r), t = !1;
+ Ii(n, r), t = !1;
},
d(r) {
n && n.d(r);
}
};
}
-function Ks(e, t, n) {
- let { $$slots: r = {}, $$scope: i } = t, { height: s = void 0 } = t, { width: l = void 0 } = t, { elem_id: a = "" } = t, { elem_classes: o = [] } = t, { variant: u = "solid" } = t, { border_mode: f = "base" } = t, { padding: c = !0 } = t, { type: h = "normal" } = t, { test_id: _ = void 0 } = t, { explicit_call: d = !1 } = t, { container: p = !0 } = t, { visible: y = !0 } = t, { allow_overflow: v = !0 } = t, { scale: E = null } = t, { min_width: g = 0 } = t, A = h === "fieldset" ? "fieldset" : "div";
+function Ys(e, t, n) {
+ let { $$slots: r = {}, $$scope: i } = t, { height: s = void 0 } = t, { width: l = void 0 } = t, { elem_id: u = "" } = t, { elem_classes: o = [] } = t, { variant: a = "solid" } = t, { border_mode: f = "base" } = t, { padding: c = !0 } = t, { type: _ = "normal" } = t, { test_id: h = void 0 } = t, { explicit_call: d = !1 } = t, { container: b = !0 } = t, { visible: y = !0 } = t, { allow_overflow: v = !0 } = t, { scale: S = null } = t, { min_width: p = 0 } = t, A = _ === "fieldset" ? "fieldset" : "div";
const T = (w) => {
if (w !== void 0) {
if (typeof w == "number")
@@ -249,32 +249,32 @@ function Ks(e, t, n) {
}
};
return e.$$set = (w) => {
- "height" in w && n(0, s = w.height), "width" in w && n(1, l = w.width), "elem_id" in w && n(2, a = w.elem_id), "elem_classes" in w && n(3, o = w.elem_classes), "variant" in w && n(4, u = w.variant), "border_mode" in w && n(5, f = w.border_mode), "padding" in w && n(6, c = w.padding), "type" in w && n(16, h = w.type), "test_id" in w && n(7, _ = w.test_id), "explicit_call" in w && n(8, d = w.explicit_call), "container" in w && n(9, p = w.container), "visible" in w && n(10, y = w.visible), "allow_overflow" in w && n(11, v = w.allow_overflow), "scale" in w && n(12, E = w.scale), "min_width" in w && n(13, g = w.min_width), "$$scope" in w && n(17, i = w.$$scope);
+ "height" in w && n(0, s = w.height), "width" in w && n(1, l = w.width), "elem_id" in w && n(2, u = w.elem_id), "elem_classes" in w && n(3, o = w.elem_classes), "variant" in w && n(4, a = w.variant), "border_mode" in w && n(5, f = w.border_mode), "padding" in w && n(6, c = w.padding), "type" in w && n(16, _ = w.type), "test_id" in w && n(7, h = w.test_id), "explicit_call" in w && n(8, d = w.explicit_call), "container" in w && n(9, b = w.container), "visible" in w && n(10, y = w.visible), "allow_overflow" in w && n(11, v = w.allow_overflow), "scale" in w && n(12, S = w.scale), "min_width" in w && n(13, p = w.min_width), "$$scope" in w && n(17, i = w.$$scope);
}, [
s,
l,
- a,
- o,
u,
+ o,
+ a,
f,
c,
- _,
+ h,
d,
- p,
+ b,
y,
v,
- E,
- g,
+ S,
+ p,
A,
T,
- h,
+ _,
i,
r
];
}
-class Oi extends Us {
+class Li extends Rs {
constructor(t) {
- super(), Xs(this, t, Ks, Ys, Zs, {
+ super(), zs(this, t, Ys, Qs, Ws, {
height: 0,
width: 1,
elem_id: 2,
@@ -294,33 +294,33 @@ class Oi extends Us {
}
}
const {
- SvelteComponent: $s,
- append: _n,
- attr: Dt,
- create_component: el,
- destroy_component: tl,
- detach: nl,
- element: wr,
- init: rl,
- insert: il,
- mount_component: sl,
- safe_not_equal: ll,
- set_data: ol,
- space: al,
- text: ul,
+ SvelteComponent: Ks,
+ append: hn,
+ attr: Ut,
+ create_component: $s,
+ destroy_component: el,
+ detach: tl,
+ element: yr,
+ init: nl,
+ insert: rl,
+ mount_component: il,
+ safe_not_equal: sl,
+ set_data: ll,
+ space: ol,
+ text: al,
toggle_class: De,
- transition_in: fl,
- transition_out: cl
+ transition_in: ul,
+ transition_out: fl
} = window.__gradio__svelte__internal;
-function hl(e) {
+function cl(e) {
let t, n, r, i, s, l;
return r = new /*Icon*/
e[1]({}), {
c() {
- t = wr("label"), n = wr("span"), el(r.$$.fragment), i = al(), s = ul(
+ t = yr("label"), n = yr("span"), $s(r.$$.fragment), i = ol(), s = al(
/*label*/
e[0]
- ), Dt(n, "class", "svelte-9gxdi0"), Dt(t, "for", ""), Dt(t, "data-testid", "block-label"), Dt(t, "class", "svelte-9gxdi0"), De(t, "hide", !/*show_label*/
+ ), Ut(n, "class", "svelte-9gxdi0"), Ut(t, "for", ""), Ut(t, "data-testid", "block-label"), Ut(t, "class", "svelte-9gxdi0"), De(t, "hide", !/*show_label*/
e[2]), De(t, "sr-only", !/*show_label*/
e[2]), De(
t,
@@ -334,53 +334,53 @@ function hl(e) {
e[3]
);
},
- m(a, o) {
- il(a, t, o), _n(t, n), sl(r, n, null), _n(t, i), _n(t, s), l = !0;
+ m(u, o) {
+ rl(u, t, o), hn(t, n), il(r, n, null), hn(t, i), hn(t, s), l = !0;
},
- p(a, [o]) {
+ p(u, [o]) {
(!l || o & /*label*/
- 1) && ol(
+ 1) && ll(
s,
/*label*/
- a[0]
+ u[0]
), (!l || o & /*show_label*/
4) && De(t, "hide", !/*show_label*/
- a[2]), (!l || o & /*show_label*/
+ u[2]), (!l || o & /*show_label*/
4) && De(t, "sr-only", !/*show_label*/
- a[2]), (!l || o & /*float*/
+ u[2]), (!l || o & /*float*/
16) && De(
t,
"float",
/*float*/
- a[4]
+ u[4]
), (!l || o & /*disable*/
8) && De(
t,
"hide-label",
/*disable*/
- a[3]
+ u[3]
);
},
- i(a) {
- l || (fl(r.$$.fragment, a), l = !0);
+ i(u) {
+ l || (ul(r.$$.fragment, u), l = !0);
},
- o(a) {
- cl(r.$$.fragment, a), l = !1;
+ o(u) {
+ fl(r.$$.fragment, u), l = !1;
},
- d(a) {
- a && nl(t), tl(r);
+ d(u) {
+ u && tl(t), el(r);
}
};
}
-function _l(e, t, n) {
- let { label: r = null } = t, { Icon: i } = t, { show_label: s = !0 } = t, { disable: l = !1 } = t, { float: a = !0 } = t;
+function hl(e, t, n) {
+ let { label: r = null } = t, { Icon: i } = t, { show_label: s = !0 } = t, { disable: l = !1 } = t, { float: u = !0 } = t;
return e.$$set = (o) => {
- "label" in o && n(0, r = o.label), "Icon" in o && n(1, i = o.Icon), "show_label" in o && n(2, s = o.show_label), "disable" in o && n(3, l = o.disable), "float" in o && n(4, a = o.float);
- }, [r, i, s, l, a];
+ "label" in o && n(0, r = o.label), "Icon" in o && n(1, i = o.Icon), "show_label" in o && n(2, s = o.show_label), "disable" in o && n(3, l = o.disable), "float" in o && n(4, u = o.float);
+ }, [r, i, s, l, u];
}
-class Mi extends $s {
+class Oi extends Ks {
constructor(t) {
- super(), rl(this, t, _l, hl, ll, {
+ super(), nl(this, t, hl, cl, sl, {
label: 0,
Icon: 1,
show_label: 2,
@@ -390,61 +390,61 @@ class Mi extends $s {
}
}
const {
- SvelteComponent: dl,
- append: Ln,
+ SvelteComponent: _l,
+ append: In,
attr: ke,
- bubble: ml,
- create_component: pl,
- destroy_component: gl,
- detach: Di,
- element: On,
- init: bl,
- insert: Ri,
- listen: vl,
- mount_component: yl,
- safe_not_equal: wl,
- set_data: El,
- set_style: Rt,
- space: Sl,
- text: Tl,
+ bubble: dl,
+ create_component: ml,
+ destroy_component: pl,
+ detach: Mi,
+ element: Ln,
+ init: gl,
+ insert: Di,
+ listen: bl,
+ mount_component: vl,
+ safe_not_equal: yl,
+ set_data: wl,
+ set_style: xt,
+ space: El,
+ text: Sl,
toggle_class: ce,
- transition_in: Al,
- transition_out: Bl
+ transition_in: Tl,
+ transition_out: Al
} = window.__gradio__svelte__internal;
-function Er(e) {
+function wr(e) {
let t, n;
return {
c() {
- t = On("span"), n = Tl(
+ t = Ln("span"), n = Sl(
/*label*/
e[1]
), ke(t, "class", "svelte-lpi64a");
},
m(r, i) {
- Ri(r, t, i), Ln(t, n);
+ Di(r, t, i), In(t, n);
},
p(r, i) {
i & /*label*/
- 2 && El(
+ 2 && wl(
n,
/*label*/
r[1]
);
},
d(r) {
- r && Di(t);
+ r && Mi(t);
}
};
}
-function Hl(e) {
- let t, n, r, i, s, l, a, o = (
+function Bl(e) {
+ let t, n, r, i, s, l, u, o = (
/*show_label*/
- e[2] && Er(e)
+ e[2] && wr(e)
);
return i = new /*Icon*/
e[0]({}), {
c() {
- t = On("button"), o && o.c(), n = Sl(), r = On("div"), pl(i.$$.fragment), ke(r, "class", "svelte-lpi64a"), ce(
+ t = Ln("button"), o && o.c(), n = El(), r = Ln("div"), ml(i.$$.fragment), ke(r, "class", "svelte-lpi64a"), ce(
r,
"small",
/*size*/
@@ -490,137 +490,137 @@ function Hl(e) {
"transparent",
/*transparent*/
e[9]
- ), Rt(t, "color", !/*disabled*/
+ ), xt(t, "color", !/*disabled*/
e[7] && /*_color*/
e[11] ? (
/*_color*/
e[11]
- ) : "var(--block-label-text-color)"), Rt(t, "--bg-color", /*disabled*/
+ ) : "var(--block-label-text-color)"), xt(t, "--bg-color", /*disabled*/
e[7] ? "auto" : (
/*background*/
e[10]
));
},
- m(u, f) {
- Ri(u, t, f), o && o.m(t, null), Ln(t, n), Ln(t, r), yl(i, r, null), s = !0, l || (a = vl(
+ m(a, f) {
+ Di(a, t, f), o && o.m(t, null), In(t, n), In(t, r), vl(i, r, null), s = !0, l || (u = bl(
t,
"click",
/*click_handler*/
e[13]
), l = !0);
},
- p(u, [f]) {
+ p(a, [f]) {
/*show_label*/
- u[2] ? o ? o.p(u, f) : (o = Er(u), o.c(), o.m(t, n)) : o && (o.d(1), o = null), (!s || f & /*size*/
+ a[2] ? o ? o.p(a, f) : (o = wr(a), o.c(), o.m(t, n)) : o && (o.d(1), o = null), (!s || f & /*size*/
16) && ce(
r,
"small",
/*size*/
- u[4] === "small"
+ a[4] === "small"
), (!s || f & /*size*/
16) && ce(
r,
"large",
/*size*/
- u[4] === "large"
+ a[4] === "large"
), (!s || f & /*disabled*/
128) && (t.disabled = /*disabled*/
- u[7]), (!s || f & /*label*/
+ a[7]), (!s || f & /*label*/
2) && ke(
t,
"aria-label",
/*label*/
- u[1]
+ a[1]
), (!s || f & /*hasPopup*/
256) && ke(
t,
"aria-haspopup",
/*hasPopup*/
- u[8]
+ a[8]
), (!s || f & /*label*/
2) && ke(
t,
"title",
/*label*/
- u[1]
+ a[1]
), (!s || f & /*pending*/
8) && ce(
t,
"pending",
/*pending*/
- u[3]
+ a[3]
), (!s || f & /*padded*/
32) && ce(
t,
"padded",
/*padded*/
- u[5]
+ a[5]
), (!s || f & /*highlight*/
64) && ce(
t,
"highlight",
/*highlight*/
- u[6]
+ a[6]
), (!s || f & /*transparent*/
512) && ce(
t,
"transparent",
/*transparent*/
- u[9]
+ a[9]
), f & /*disabled, _color*/
- 2176 && Rt(t, "color", !/*disabled*/
- u[7] && /*_color*/
- u[11] ? (
+ 2176 && xt(t, "color", !/*disabled*/
+ a[7] && /*_color*/
+ a[11] ? (
/*_color*/
- u[11]
+ a[11]
) : "var(--block-label-text-color)"), f & /*disabled, background*/
- 1152 && Rt(t, "--bg-color", /*disabled*/
- u[7] ? "auto" : (
+ 1152 && xt(t, "--bg-color", /*disabled*/
+ a[7] ? "auto" : (
/*background*/
- u[10]
+ a[10]
));
},
- i(u) {
- s || (Al(i.$$.fragment, u), s = !0);
+ i(a) {
+ s || (Tl(i.$$.fragment, a), s = !0);
},
- o(u) {
- Bl(i.$$.fragment, u), s = !1;
+ o(a) {
+ Al(i.$$.fragment, a), s = !1;
},
- d(u) {
- u && Di(t), o && o.d(), gl(i), l = !1, a();
+ d(a) {
+ a && Mi(t), o && o.d(), pl(i), l = !1, u();
}
};
}
-function kl(e, t, n) {
- let r, { Icon: i } = t, { label: s = "" } = t, { show_label: l = !1 } = t, { pending: a = !1 } = t, { size: o = "small" } = t, { padded: u = !0 } = t, { highlight: f = !1 } = t, { disabled: c = !1 } = t, { hasPopup: h = !1 } = t, { color: _ = "var(--block-label-text-color)" } = t, { transparent: d = !1 } = t, { background: p = "var(--background-fill-primary)" } = t;
+function Hl(e, t, n) {
+ let r, { Icon: i } = t, { label: s = "" } = t, { show_label: l = !1 } = t, { pending: u = !1 } = t, { size: o = "small" } = t, { padded: a = !0 } = t, { highlight: f = !1 } = t, { disabled: c = !1 } = t, { hasPopup: _ = !1 } = t, { color: h = "var(--block-label-text-color)" } = t, { transparent: d = !1 } = t, { background: b = "var(--background-fill-primary)" } = t;
function y(v) {
- ml.call(this, e, v);
+ dl.call(this, e, v);
}
return e.$$set = (v) => {
- "Icon" in v && n(0, i = v.Icon), "label" in v && n(1, s = v.label), "show_label" in v && n(2, l = v.show_label), "pending" in v && n(3, a = v.pending), "size" in v && n(4, o = v.size), "padded" in v && n(5, u = v.padded), "highlight" in v && n(6, f = v.highlight), "disabled" in v && n(7, c = v.disabled), "hasPopup" in v && n(8, h = v.hasPopup), "color" in v && n(12, _ = v.color), "transparent" in v && n(9, d = v.transparent), "background" in v && n(10, p = v.background);
+ "Icon" in v && n(0, i = v.Icon), "label" in v && n(1, s = v.label), "show_label" in v && n(2, l = v.show_label), "pending" in v && n(3, u = v.pending), "size" in v && n(4, o = v.size), "padded" in v && n(5, a = v.padded), "highlight" in v && n(6, f = v.highlight), "disabled" in v && n(7, c = v.disabled), "hasPopup" in v && n(8, _ = v.hasPopup), "color" in v && n(12, h = v.color), "transparent" in v && n(9, d = v.transparent), "background" in v && n(10, b = v.background);
}, e.$$.update = () => {
e.$$.dirty & /*highlight, color*/
- 4160 && n(11, r = f ? "var(--color-accent)" : _);
+ 4160 && n(11, r = f ? "var(--color-accent)" : h);
}, [
i,
s,
l,
- a,
- o,
u,
+ o,
+ a,
f,
c,
- h,
+ _,
d,
- p,
+ b,
r,
- _,
+ h,
y
];
}
-class Cl extends dl {
+class kl extends _l {
constructor(t) {
- super(), bl(this, t, kl, Hl, wl, {
+ super(), gl(this, t, Hl, Bl, yl, {
Icon: 0,
label: 1,
show_label: 2,
@@ -637,29 +637,29 @@ class Cl extends dl {
}
}
const {
- SvelteComponent: Pl,
- append: Nl,
- attr: dn,
- binding_callbacks: Il,
- create_slot: Ll,
- detach: Ol,
- element: Sr,
- get_all_dirty_from_scope: Ml,
- get_slot_changes: Dl,
- init: Rl,
- insert: Ul,
- safe_not_equal: xl,
+ SvelteComponent: Cl,
+ append: Pl,
+ attr: _n,
+ binding_callbacks: Nl,
+ create_slot: Il,
+ detach: Ll,
+ element: Er,
+ get_all_dirty_from_scope: Ol,
+ get_slot_changes: Ml,
+ init: Dl,
+ insert: Rl,
+ safe_not_equal: Ul,
toggle_class: Re,
- transition_in: Fl,
- transition_out: Gl,
- update_slot_base: ql
+ transition_in: xl,
+ transition_out: Fl,
+ update_slot_base: Gl
} = window.__gradio__svelte__internal;
-function jl(e) {
+function ql(e) {
let t, n, r;
const i = (
/*#slots*/
e[5].default
- ), s = Ll(
+ ), s = Il(
i,
e,
/*$$scope*/
@@ -668,7 +668,7 @@ function jl(e) {
);
return {
c() {
- t = Sr("div"), n = Sr("div"), s && s.c(), dn(n, "class", "icon svelte-3w3rth"), dn(t, "class", "empty svelte-3w3rth"), dn(t, "aria-label", "Empty value"), Re(
+ t = Er("div"), n = Er("div"), s && s.c(), _n(n, "class", "icon svelte-3w3rth"), _n(t, "class", "empty svelte-3w3rth"), _n(t, "aria-label", "Empty value"), Re(
t,
"small",
/*size*/
@@ -690,47 +690,47 @@ function jl(e) {
e[3]
);
},
- m(l, a) {
- Ul(l, t, a), Nl(t, n), s && s.m(n, null), e[6](t), r = !0;
+ m(l, u) {
+ Rl(l, t, u), Pl(t, n), s && s.m(n, null), e[6](t), r = !0;
},
- p(l, [a]) {
- s && s.p && (!r || a & /*$$scope*/
- 16) && ql(
+ p(l, [u]) {
+ s && s.p && (!r || u & /*$$scope*/
+ 16) && Gl(
s,
i,
l,
/*$$scope*/
l[4],
- r ? Dl(
+ r ? Ml(
i,
/*$$scope*/
l[4],
- a,
+ u,
null
- ) : Ml(
+ ) : Ol(
/*$$scope*/
l[4]
),
null
- ), (!r || a & /*size*/
+ ), (!r || u & /*size*/
1) && Re(
t,
"small",
/*size*/
l[0] === "small"
- ), (!r || a & /*size*/
+ ), (!r || u & /*size*/
1) && Re(
t,
"large",
/*size*/
l[0] === "large"
- ), (!r || a & /*unpadded_box*/
+ ), (!r || u & /*unpadded_box*/
2) && Re(
t,
"unpadded_box",
/*unpadded_box*/
l[1]
- ), (!r || a & /*parent_height*/
+ ), (!r || u & /*parent_height*/
8) && Re(
t,
"small_parent",
@@ -739,17 +739,17 @@ function jl(e) {
);
},
i(l) {
- r || (Fl(s, l), r = !0);
+ r || (xl(s, l), r = !0);
},
o(l) {
- Gl(s, l), r = !1;
+ Fl(s, l), r = !1;
},
d(l) {
- l && Ol(t), s && s.d(l), e[6](null);
+ l && Ll(t), s && s.d(l), e[6](null);
}
};
}
-function Vl(e) {
+function jl(e) {
let t, n = e[0], r = 1;
for (; r < e.length; ) {
const i = e[r], s = e[r + 1];
@@ -759,12 +759,12 @@ function Vl(e) {
}
return n;
}
-function zl(e, t, n) {
- let r, { $$slots: i = {}, $$scope: s } = t, { size: l = "small" } = t, { unpadded_box: a = !1 } = t, o;
- function u(c) {
+function Vl(e, t, n) {
+ let r, { $$slots: i = {}, $$scope: s } = t, { size: l = "small" } = t, { unpadded_box: u = !1 } = t, o;
+ function a(c) {
if (!c)
return !1;
- const { height: h } = c.getBoundingClientRect(), { height: _ } = Vl([
+ const { height: _ } = c.getBoundingClientRect(), { height: h } = jl([
c,
"access",
(d) => d.parentElement,
@@ -772,160 +772,160 @@ function zl(e, t, n) {
(d) => d.getBoundingClientRect,
"call",
(d) => d()
- ]) || { height: h };
- return h > _ + 2;
+ ]) || { height: _ };
+ return _ > h + 2;
}
function f(c) {
- Il[c ? "unshift" : "push"](() => {
+ Nl[c ? "unshift" : "push"](() => {
o = c, n(2, o);
});
}
return e.$$set = (c) => {
- "size" in c && n(0, l = c.size), "unpadded_box" in c && n(1, a = c.unpadded_box), "$$scope" in c && n(4, s = c.$$scope);
+ "size" in c && n(0, l = c.size), "unpadded_box" in c && n(1, u = c.unpadded_box), "$$scope" in c && n(4, s = c.$$scope);
}, e.$$.update = () => {
e.$$.dirty & /*el*/
- 4 && n(3, r = u(o));
- }, [l, a, o, r, s, i, f];
+ 4 && n(3, r = a(o));
+ }, [l, u, o, r, s, i, f];
}
-class Xl extends Pl {
+class zl extends Cl {
constructor(t) {
- super(), Rl(this, t, zl, jl, xl, { size: 0, unpadded_box: 1 });
+ super(), Dl(this, t, Vl, ql, Ul, { size: 0, unpadded_box: 1 });
}
}
const {
- SvelteComponent: Wl,
- append: mn,
+ SvelteComponent: Xl,
+ append: dn,
attr: be,
- detach: Zl,
- init: Jl,
- insert: Ql,
- noop: pn,
- safe_not_equal: Yl,
+ detach: Wl,
+ init: Zl,
+ insert: Jl,
+ noop: mn,
+ safe_not_equal: Ql,
set_style: we,
- svg_element: Ut
+ svg_element: Ft
} = window.__gradio__svelte__internal;
-function Kl(e) {
+function Yl(e) {
let t, n, r, i;
return {
c() {
- t = Ut("svg"), n = Ut("g"), r = Ut("path"), i = Ut("path"), be(r, "d", "M18,6L6.087,17.913"), we(r, "fill", "none"), we(r, "fill-rule", "nonzero"), we(r, "stroke-width", "2px"), be(n, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), be(i, "d", "M4.364,4.364L19.636,19.636"), we(i, "fill", "none"), we(i, "fill-rule", "nonzero"), we(i, "stroke-width", "2px"), be(t, "width", "100%"), be(t, "height", "100%"), be(t, "viewBox", "0 0 24 24"), be(t, "version", "1.1"), be(t, "xmlns", "http://www.w3.org/2000/svg"), be(t, "xmlns:xlink", "http://www.w3.org/1999/xlink"), be(t, "xml:space", "preserve"), be(t, "stroke", "currentColor"), we(t, "fill-rule", "evenodd"), we(t, "clip-rule", "evenodd"), we(t, "stroke-linecap", "round"), we(t, "stroke-linejoin", "round");
+ t = Ft("svg"), n = Ft("g"), r = Ft("path"), i = Ft("path"), be(r, "d", "M18,6L6.087,17.913"), we(r, "fill", "none"), we(r, "fill-rule", "nonzero"), we(r, "stroke-width", "2px"), be(n, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), be(i, "d", "M4.364,4.364L19.636,19.636"), we(i, "fill", "none"), we(i, "fill-rule", "nonzero"), we(i, "stroke-width", "2px"), be(t, "width", "100%"), be(t, "height", "100%"), be(t, "viewBox", "0 0 24 24"), be(t, "version", "1.1"), be(t, "xmlns", "http://www.w3.org/2000/svg"), be(t, "xmlns:xlink", "http://www.w3.org/1999/xlink"), be(t, "xml:space", "preserve"), be(t, "stroke", "currentColor"), we(t, "fill-rule", "evenodd"), we(t, "clip-rule", "evenodd"), we(t, "stroke-linecap", "round"), we(t, "stroke-linejoin", "round");
},
m(s, l) {
- Ql(s, t, l), mn(t, n), mn(n, r), mn(t, i);
+ Jl(s, t, l), dn(t, n), dn(n, r), dn(t, i);
},
- p: pn,
- i: pn,
- o: pn,
+ p: mn,
+ i: mn,
+ o: mn,
d(s) {
- s && Zl(t);
+ s && Wl(t);
}
};
}
-class $l extends Wl {
+class Kl extends Xl {
constructor(t) {
- super(), Jl(this, t, null, Kl, Yl, {});
+ super(), Zl(this, t, null, Yl, Ql, {});
}
}
const {
- SvelteComponent: eo,
- append: Tr,
+ SvelteComponent: $l,
+ append: Sr,
attr: he,
- detach: to,
- init: no,
- insert: ro,
- noop: gn,
- safe_not_equal: io,
- svg_element: bn
+ detach: eo,
+ init: to,
+ insert: no,
+ noop: pn,
+ safe_not_equal: ro,
+ svg_element: gn
} = window.__gradio__svelte__internal;
-function so(e) {
+function io(e) {
let t, n, r;
return {
c() {
- t = bn("svg"), n = bn("path"), r = bn("polyline"), he(n, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), he(r, "points", "13 2 13 9 20 9"), he(t, "xmlns", "http://www.w3.org/2000/svg"), he(t, "width", "100%"), he(t, "height", "100%"), he(t, "viewBox", "0 0 24 24"), he(t, "fill", "none"), he(t, "stroke", "currentColor"), he(t, "stroke-width", "1.5"), he(t, "stroke-linecap", "round"), he(t, "stroke-linejoin", "round"), he(t, "class", "feather feather-file");
+ t = gn("svg"), n = gn("path"), r = gn("polyline"), he(n, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), he(r, "points", "13 2 13 9 20 9"), he(t, "xmlns", "http://www.w3.org/2000/svg"), he(t, "width", "100%"), he(t, "height", "100%"), he(t, "viewBox", "0 0 24 24"), he(t, "fill", "none"), he(t, "stroke", "currentColor"), he(t, "stroke-width", "1.5"), he(t, "stroke-linecap", "round"), he(t, "stroke-linejoin", "round"), he(t, "class", "feather feather-file");
},
m(i, s) {
- ro(i, t, s), Tr(t, n), Tr(t, r);
+ no(i, t, s), Sr(t, n), Sr(t, r);
},
- p: gn,
- i: gn,
- o: gn,
+ p: pn,
+ i: pn,
+ o: pn,
d(i) {
- i && to(t);
+ i && eo(t);
}
};
}
-let or = class extends eo {
+let sr = class extends $l {
constructor(t) {
- super(), no(this, t, null, so, io, {});
+ super(), to(this, t, null, io, ro, {});
}
};
const {
- SvelteComponent: lo,
- append: oo,
+ SvelteComponent: so,
+ append: lo,
attr: st,
- detach: ao,
- init: uo,
- insert: fo,
- noop: vn,
- safe_not_equal: co,
- svg_element: Ar
+ detach: oo,
+ init: ao,
+ insert: uo,
+ noop: bn,
+ safe_not_equal: fo,
+ svg_element: Tr
} = window.__gradio__svelte__internal;
-function ho(e) {
+function co(e) {
let t, n;
return {
c() {
- t = Ar("svg"), n = Ar("path"), st(n, "fill", "currentColor"), st(n, "d", "M13.75 2a2.25 2.25 0 0 1 2.236 2.002V4h1.764A2.25 2.25 0 0 1 20 6.25V11h-1.5V6.25a.75.75 0 0 0-.75-.75h-2.129c-.404.603-1.091 1-1.871 1h-3.5c-.78 0-1.467-.397-1.871-1H6.25a.75.75 0 0 0-.75.75v13.5c0 .414.336.75.75.75h4.78a3.99 3.99 0 0 0 .505 1.5H6.25A2.25 2.25 0 0 1 4 19.75V6.25A2.25 2.25 0 0 1 6.25 4h1.764a2.25 2.25 0 0 1 2.236-2h3.5Zm2.245 2.096L16 4.25c0-.052-.002-.103-.005-.154ZM13.75 3.5h-3.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5ZM15 12a3 3 0 0 0-3 3v5c0 .556.151 1.077.415 1.524l3.494-3.494a2.25 2.25 0 0 1 3.182 0l3.494 3.494c.264-.447.415-.968.415-1.524v-5a3 3 0 0 0-3-3h-5Zm0 11a2.985 2.985 0 0 1-1.524-.415l3.494-3.494a.75.75 0 0 1 1.06 0l3.494 3.494A2.985 2.985 0 0 1 20 23h-5Zm5-7a1 1 0 1 1 0-2a1 1 0 0 1 0 2Z"), st(t, "xmlns", "http://www.w3.org/2000/svg"), st(t, "width", "100%"), st(t, "height", "100%"), st(t, "viewBox", "0 0 24 24");
+ t = Tr("svg"), n = Tr("path"), st(n, "fill", "currentColor"), st(n, "d", "M13.75 2a2.25 2.25 0 0 1 2.236 2.002V4h1.764A2.25 2.25 0 0 1 20 6.25V11h-1.5V6.25a.75.75 0 0 0-.75-.75h-2.129c-.404.603-1.091 1-1.871 1h-3.5c-.78 0-1.467-.397-1.871-1H6.25a.75.75 0 0 0-.75.75v13.5c0 .414.336.75.75.75h4.78a3.99 3.99 0 0 0 .505 1.5H6.25A2.25 2.25 0 0 1 4 19.75V6.25A2.25 2.25 0 0 1 6.25 4h1.764a2.25 2.25 0 0 1 2.236-2h3.5Zm2.245 2.096L16 4.25c0-.052-.002-.103-.005-.154ZM13.75 3.5h-3.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5ZM15 12a3 3 0 0 0-3 3v5c0 .556.151 1.077.415 1.524l3.494-3.494a2.25 2.25 0 0 1 3.182 0l3.494 3.494c.264-.447.415-.968.415-1.524v-5a3 3 0 0 0-3-3h-5Zm0 11a2.985 2.985 0 0 1-1.524-.415l3.494-3.494a.75.75 0 0 1 1.06 0l3.494 3.494A2.985 2.985 0 0 1 20 23h-5Zm5-7a1 1 0 1 1 0-2a1 1 0 0 1 0 2Z"), st(t, "xmlns", "http://www.w3.org/2000/svg"), st(t, "width", "100%"), st(t, "height", "100%"), st(t, "viewBox", "0 0 24 24");
},
m(r, i) {
- fo(r, t, i), oo(t, n);
+ uo(r, t, i), lo(t, n);
},
- p: vn,
- i: vn,
- o: vn,
+ p: bn,
+ i: bn,
+ o: bn,
d(r) {
- r && ao(t);
+ r && oo(t);
}
};
}
-class _o extends lo {
+class ho extends so {
constructor(t) {
- super(), uo(this, t, null, ho, co, {});
+ super(), ao(this, t, null, co, fo, {});
}
}
const {
- SvelteComponent: mo,
- append: yn,
+ SvelteComponent: _o,
+ append: vn,
attr: Q,
- detach: po,
- init: go,
- insert: bo,
- noop: wn,
- safe_not_equal: vo,
- svg_element: xt
+ detach: mo,
+ init: po,
+ insert: go,
+ noop: yn,
+ safe_not_equal: bo,
+ svg_element: Gt
} = window.__gradio__svelte__internal;
-function yo(e) {
+function vo(e) {
let t, n, r, i;
return {
c() {
- t = xt("svg"), n = xt("path"), r = xt("polyline"), i = xt("line"), Q(n, "d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"), Q(r, "points", "17 8 12 3 7 8"), Q(i, "x1", "12"), Q(i, "y1", "3"), Q(i, "x2", "12"), Q(i, "y2", "15"), Q(t, "xmlns", "http://www.w3.org/2000/svg"), Q(t, "width", "90%"), Q(t, "height", "90%"), Q(t, "viewBox", "0 0 24 24"), Q(t, "fill", "none"), Q(t, "stroke", "currentColor"), Q(t, "stroke-width", "2"), Q(t, "stroke-linecap", "round"), Q(t, "stroke-linejoin", "round"), Q(t, "class", "feather feather-upload");
+ t = Gt("svg"), n = Gt("path"), r = Gt("polyline"), i = Gt("line"), Q(n, "d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"), Q(r, "points", "17 8 12 3 7 8"), Q(i, "x1", "12"), Q(i, "y1", "3"), Q(i, "x2", "12"), Q(i, "y2", "15"), Q(t, "xmlns", "http://www.w3.org/2000/svg"), Q(t, "width", "90%"), Q(t, "height", "90%"), Q(t, "viewBox", "0 0 24 24"), Q(t, "fill", "none"), Q(t, "stroke", "currentColor"), Q(t, "stroke-width", "2"), Q(t, "stroke-linecap", "round"), Q(t, "stroke-linejoin", "round"), Q(t, "class", "feather feather-upload");
},
m(s, l) {
- bo(s, t, l), yn(t, n), yn(t, r), yn(t, i);
+ go(s, t, l), vn(t, n), vn(t, r), vn(t, i);
},
- p: wn,
- i: wn,
- o: wn,
+ p: yn,
+ i: yn,
+ o: yn,
d(s) {
- s && po(t);
+ s && mo(t);
}
};
}
-let wo = class extends mo {
+let yo = class extends _o {
constructor(t) {
- super(), go(this, t, null, yo, vo, {});
+ super(), po(this, t, null, vo, bo, {});
}
};
-const Eo = [
+const wo = [
{ color: "red", primary: 600, secondary: 100 },
{ color: "green", primary: 600, secondary: 100 },
{ color: "blue", primary: 600, secondary: 100 },
@@ -936,7 +936,7 @@ const Eo = [
{ color: "cyan", primary: 600, secondary: 100 },
{ color: "lime", primary: 500, secondary: 100 },
{ color: "pink", primary: 600, secondary: 100 }
-], Br = {
+], Ar = {
inherit: "inherit",
current: "currentColor",
transparent: "transparent",
@@ -1229,107 +1229,107 @@ const Eo = [
950: "#4c0519"
}
};
-Eo.reduce(
+wo.reduce(
(e, { color: t, primary: n, secondary: r }) => ({
...e,
[t]: {
- primary: Br[t][n],
- secondary: Br[t][r]
+ primary: Ar[t][n],
+ secondary: Ar[t][r]
}
}),
{}
);
const {
- SvelteComponent: So,
+ SvelteComponent: Eo,
append: Je,
- attr: Mn,
- check_outros: To,
- create_component: Ui,
- destroy_component: xi,
- detach: Vt,
- element: Dn,
- group_outros: Ao,
- init: Bo,
- insert: zt,
- mount_component: Fi,
- safe_not_equal: Ho,
- set_data: Rn,
- space: Un,
- text: Bt,
- toggle_class: Hr,
- transition_in: Zt,
- transition_out: Jt
+ attr: On,
+ check_outros: So,
+ create_component: Ri,
+ destroy_component: Ui,
+ detach: Xt,
+ element: Mn,
+ group_outros: To,
+ init: Ao,
+ insert: Wt,
+ mount_component: xi,
+ safe_not_equal: Bo,
+ set_data: Dn,
+ space: Rn,
+ text: At,
+ toggle_class: Br,
+ transition_in: Qt,
+ transition_out: Yt
} = window.__gradio__svelte__internal;
-function ko(e) {
+function Ho(e) {
let t, n;
- return t = new wo({}), {
+ return t = new yo({}), {
c() {
- Ui(t.$$.fragment);
+ Ri(t.$$.fragment);
},
m(r, i) {
- Fi(t, r, i), n = !0;
+ xi(t, r, i), n = !0;
},
i(r) {
- n || (Zt(t.$$.fragment, r), n = !0);
+ n || (Qt(t.$$.fragment, r), n = !0);
},
o(r) {
- Jt(t.$$.fragment, r), n = !1;
+ Yt(t.$$.fragment, r), n = !1;
},
d(r) {
- xi(t, r);
+ Ui(t, r);
}
};
}
-function Co(e) {
+function ko(e) {
let t, n;
- return t = new _o({}), {
+ return t = new ho({}), {
c() {
- Ui(t.$$.fragment);
+ Ri(t.$$.fragment);
},
m(r, i) {
- Fi(t, r, i), n = !0;
+ xi(t, r, i), n = !0;
},
i(r) {
- n || (Zt(t.$$.fragment, r), n = !0);
+ n || (Qt(t.$$.fragment, r), n = !0);
},
o(r) {
- Jt(t.$$.fragment, r), n = !1;
+ Yt(t.$$.fragment, r), n = !1;
},
d(r) {
- xi(t, r);
+ Ui(t, r);
}
};
}
-function kr(e) {
+function Hr(e) {
let t, n, r = (
/*i18n*/
e[1]("common.or") + ""
- ), i, s, l, a = (
+ ), i, s, l, u = (
/*message*/
(e[2] || /*i18n*/
e[1]("upload_text.click_to_upload")) + ""
), o;
return {
c() {
- t = Dn("span"), n = Bt("- "), i = Bt(r), s = Bt(" -"), l = Un(), o = Bt(a), Mn(t, "class", "or svelte-kzcjhc");
+ t = Mn("span"), n = At("- "), i = At(r), s = At(" -"), l = Rn(), o = At(u), On(t, "class", "or svelte-kzcjhc");
},
- m(u, f) {
- zt(u, t, f), Je(t, n), Je(t, i), Je(t, s), zt(u, l, f), zt(u, o, f);
+ m(a, f) {
+ Wt(a, t, f), Je(t, n), Je(t, i), Je(t, s), Wt(a, l, f), Wt(a, o, f);
},
- p(u, f) {
+ p(a, f) {
f & /*i18n*/
2 && r !== (r = /*i18n*/
- u[1]("common.or") + "") && Rn(i, r), f & /*message, i18n*/
- 6 && a !== (a = /*message*/
- (u[2] || /*i18n*/
- u[1]("upload_text.click_to_upload")) + "") && Rn(o, a);
+ a[1]("common.or") + "") && Dn(i, r), f & /*message, i18n*/
+ 6 && u !== (u = /*message*/
+ (a[2] || /*i18n*/
+ a[1]("upload_text.click_to_upload")) + "") && Dn(o, u);
},
- d(u) {
- u && (Vt(t), Vt(l), Vt(o));
+ d(a) {
+ a && (Xt(t), Xt(l), Xt(o));
}
};
}
-function Po(e) {
+function Co(e) {
let t, n, r, i, s, l = (
/*i18n*/
e[1](
@@ -1340,42 +1340,42 @@ function Po(e) {
] || /*defs*/
e[5].file
) + ""
- ), a, o, u;
- const f = [Co, ko], c = [];
- function h(d, p) {
+ ), u, o, a;
+ const f = [ko, Ho], c = [];
+ function _(d, b) {
return (
/*type*/
d[0] === "clipboard" ? 0 : 1
);
}
- r = h(e), i = c[r] = f[r](e);
- let _ = (
+ r = _(e), i = c[r] = f[r](e);
+ let h = (
/*mode*/
- e[3] !== "short" && kr(e)
+ e[3] !== "short" && Hr(e)
);
return {
c() {
- t = Dn("div"), n = Dn("span"), i.c(), s = Un(), a = Bt(l), o = Un(), _ && _.c(), Mn(n, "class", "icon-wrap svelte-kzcjhc"), Hr(
+ t = Mn("div"), n = Mn("span"), i.c(), s = Rn(), u = At(l), o = Rn(), h && h.c(), On(n, "class", "icon-wrap svelte-kzcjhc"), Br(
n,
"hovered",
/*hovered*/
e[4]
- ), Mn(t, "class", "wrap svelte-kzcjhc");
+ ), On(t, "class", "wrap svelte-kzcjhc");
},
- m(d, p) {
- zt(d, t, p), Je(t, n), c[r].m(n, null), Je(t, s), Je(t, a), Je(t, o), _ && _.m(t, null), u = !0;
+ m(d, b) {
+ Wt(d, t, b), Je(t, n), c[r].m(n, null), Je(t, s), Je(t, u), Je(t, o), h && h.m(t, null), a = !0;
},
- p(d, [p]) {
+ p(d, [b]) {
let y = r;
- r = h(d), r !== y && (Ao(), Jt(c[y], 1, 1, () => {
+ r = _(d), r !== y && (To(), Yt(c[y], 1, 1, () => {
c[y] = null;
- }), To(), i = c[r], i || (i = c[r] = f[r](d), i.c()), Zt(i, 1), i.m(n, null)), (!u || p & /*hovered*/
- 16) && Hr(
+ }), So(), i = c[r], i || (i = c[r] = f[r](d), i.c()), Qt(i, 1), i.m(n, null)), (!a || b & /*hovered*/
+ 16) && Br(
n,
"hovered",
/*hovered*/
d[4]
- ), (!u || p & /*i18n, type*/
+ ), (!a || b & /*i18n, type*/
3) && l !== (l = /*i18n*/
d[1](
/*defs*/
@@ -1384,22 +1384,22 @@ function Po(e) {
d[0]
] || /*defs*/
d[5].file
- ) + "") && Rn(a, l), /*mode*/
- d[3] !== "short" ? _ ? _.p(d, p) : (_ = kr(d), _.c(), _.m(t, null)) : _ && (_.d(1), _ = null);
+ ) + "") && Dn(u, l), /*mode*/
+ d[3] !== "short" ? h ? h.p(d, b) : (h = Hr(d), h.c(), h.m(t, null)) : h && (h.d(1), h = null);
},
i(d) {
- u || (Zt(i), u = !0);
+ a || (Qt(i), a = !0);
},
o(d) {
- Jt(i), u = !1;
+ Yt(i), a = !1;
},
d(d) {
- d && Vt(t), c[r].d(), _ && _.d();
+ d && Xt(t), c[r].d(), h && h.d();
}
};
}
-function No(e, t, n) {
- let { type: r = "file" } = t, { i18n: i } = t, { message: s = void 0 } = t, { mode: l = "full" } = t, { hovered: a = !1 } = t;
+function Po(e, t, n) {
+ let { type: r = "file" } = t, { i18n: i } = t, { message: s = void 0 } = t, { mode: l = "full" } = t, { hovered: u = !1 } = t;
const o = {
image: "upload_text.drop_image",
video: "upload_text.drop_video",
@@ -1409,13 +1409,13 @@ function No(e, t, n) {
gallery: "upload_text.drop_gallery",
clipboard: "upload_text.paste_clipboard"
};
- return e.$$set = (u) => {
- "type" in u && n(0, r = u.type), "i18n" in u && n(1, i = u.i18n), "message" in u && n(2, s = u.message), "mode" in u && n(3, l = u.mode), "hovered" in u && n(4, a = u.hovered);
- }, [r, i, s, l, a, o];
+ return e.$$set = (a) => {
+ "type" in a && n(0, r = a.type), "i18n" in a && n(1, i = a.i18n), "message" in a && n(2, s = a.message), "mode" in a && n(3, l = a.mode), "hovered" in a && n(4, u = a.hovered);
+ }, [r, i, s, l, u, o];
}
-class Io extends So {
+class No extends Eo {
constructor(t) {
- super(), Bo(this, t, No, Po, Ho, {
+ super(), Ao(this, t, Po, Co, Bo, {
type: 0,
i18n: 1,
message: 2,
@@ -1424,14 +1424,14 @@ class Io extends So {
});
}
}
-var En = new Intl.Collator(0, { numeric: 1 }).compare;
-function Cr(e, t, n) {
- return e = e.split("."), t = t.split("."), En(e[0], t[0]) || En(e[1], t[1]) || (t[2] = t.slice(2).join("."), n = /[.-]/.test(e[2] = e.slice(2).join(".")), n == /[.-]/.test(t[2]) ? En(e[2], t[2]) : n ? -1 : 1);
+var wn = new Intl.Collator(0, { numeric: 1 }).compare;
+function kr(e, t, n) {
+ return e = e.split("."), t = t.split("."), wn(e[0], t[0]) || wn(e[1], t[1]) || (t[2] = t.slice(2).join("."), n = /[.-]/.test(e[2] = e.slice(2).join(".")), n == /[.-]/.test(t[2]) ? wn(e[2], t[2]) : n ? -1 : 1);
}
-function Gi(e, t, n) {
+function Fi(e, t, n) {
return t.startsWith("http://") || t.startsWith("https://") ? n ? e : t : e + t;
}
-function Sn(e) {
+function En(e) {
if (e.startsWith("http")) {
const { protocol: t, host: n } = new URL(e);
return n.endsWith("hf.space") ? {
@@ -1456,12 +1456,12 @@ function Sn(e) {
host: e
};
}
-const qi = /^[^\/]*\/[^\/]*$/, Lo = /.*hf\.space\/{0,1}$/;
-async function Oo(e, t) {
+const Gi = /^[^\/]*\/[^\/]*$/, Io = /.*hf\.space\/{0,1}$/;
+async function Lo(e, t) {
const n = {};
t && (n.Authorization = `Bearer ${t}`);
const r = e.trim();
- if (qi.test(r))
+ if (Gi.test(r))
try {
const i = await fetch(
`https://huggingface.co/api/spaces/${r}/host`,
@@ -1472,13 +1472,13 @@ async function Oo(e, t) {
const s = (await i.json()).host;
return {
space_id: e,
- ...Sn(s)
+ ...En(s)
};
} catch (i) {
throw new Error("Space metadata could not be loaded." + i.message);
}
- if (Lo.test(r)) {
- const { ws_protocol: i, http_protocol: s, host: l } = Sn(r);
+ if (Io.test(r)) {
+ const { ws_protocol: i, http_protocol: s, host: l } = En(r);
return {
space_id: l.replace(".hf.space", ""),
ws_protocol: i,
@@ -1488,17 +1488,17 @@ async function Oo(e, t) {
}
return {
space_id: !1,
- ...Sn(r)
+ ...En(r)
};
}
-function Mo(e) {
+function Oo(e) {
let t = {};
return e.forEach(({ api_name: n }, r) => {
n && (t[n] = r);
}), t;
}
-const Do = /^(?=[^]*\b[dD]iscussions{0,1}\b)(?=[^]*\b[dD]isabled\b)[^]*$/;
-async function Pr(e) {
+const Mo = /^(?=[^]*\b[dD]iscussions{0,1}\b)(?=[^]*\b[dD]isabled\b)[^]*$/;
+async function Cr(e) {
try {
const n = (await fetch(
`https://huggingface.co/api/spaces/${e}/discussions`,
@@ -1506,7 +1506,7 @@ async function Pr(e) {
method: "HEAD"
}
)).headers.get("x-error-message");
- return !(n && Do.test(n));
+ return !(n && Mo.test(n));
} catch {
return !1;
}
@@ -1528,10 +1528,10 @@ function Ce(e, t, n) {
url: "/proxy=" + n + "stream/" + e.path
}) : new ft({
...e,
- url: Uo(e.path, t, n)
+ url: Ro(e.path, t, n)
});
}
-function Ro(e) {
+function Do(e) {
try {
const t = new URL(e);
return t.protocol === "http:" || t.protocol === "https:";
@@ -1539,10 +1539,10 @@ function Ro(e) {
return !1;
}
}
-function Uo(e, t, n) {
- return e == null ? n ? `/proxy=${n}file=` : `${t}/file=` : Ro(e) ? e : n ? `/proxy=${n}file=${e}` : `${t}/file=${e}`;
+function Ro(e, t, n) {
+ return e == null ? n ? `/proxy=${n}file=` : `${t}/file=` : Do(e) ? e : n ? `/proxy=${n}file=${e}` : `${t}/file=${e}`;
}
-async function xo(e, t, n, r = qo) {
+async function Uo(e, t, n, r = Go) {
let i = (Array.isArray(e) ? e : [e]).map(
(s) => s.blob
);
@@ -1551,15 +1551,15 @@ async function xo(e, t, n, r = qo) {
async (s) => {
if (s.error)
throw new Error(s.error);
- return s.files ? s.files.map((l, a) => {
- const o = new ft({ ...e[a], path: l });
+ return s.files ? s.files.map((l, u) => {
+ const o = new ft({ ...e[u], path: l });
return Ce(o, t, null);
}) : [];
}
)
);
}
-async function Fo(e, t) {
+async function xo(e, t) {
return e.map(
(n, r) => new ft({
path: n.name,
@@ -1579,48 +1579,48 @@ class ft {
size: i,
blob: s,
is_stream: l,
- mime_type: a,
+ mime_type: u,
alt_text: o
}) {
- this.path = t, this.url = n, this.orig_name = r, this.size = i, this.blob = n ? void 0 : s, this.is_stream = l, this.mime_type = a, this.alt_text = o;
+ this.path = t, this.url = n, this.orig_name = r, this.size = i, this.blob = n ? void 0 : s, this.is_stream = l, this.mime_type = u, this.alt_text = o;
}
}
-const ji = "This application is too busy. Keep trying!", je = "Connection errored out.";
-let Vi;
-function Go(e, t) {
+const qi = "This application is too busy. Keep trying!", je = "Connection errored out.";
+let ji;
+function Fo(e, t) {
return { post_data: n, upload_files: r, client: i, handle_blob: s };
- async function n(l, a, o) {
- const u = { "Content-Type": "application/json" };
- o && (u.Authorization = `Bearer ${o}`);
+ async function n(l, u, o) {
+ const a = { "Content-Type": "application/json" };
+ o && (a.Authorization = `Bearer ${o}`);
try {
var f = await e(l, {
method: "POST",
- body: JSON.stringify(a),
- headers: u
+ body: JSON.stringify(u),
+ headers: a
});
} catch {
return [{ error: je }, 500];
}
- let c, h;
+ let c, _;
try {
- c = await f.json(), h = f.status;
- } catch (_) {
- c = { error: `Could not parse server response: ${_}` }, h = 500;
+ c = await f.json(), _ = f.status;
+ } catch (h) {
+ c = { error: `Could not parse server response: ${h}` }, _ = 500;
}
- return [c, h];
+ return [c, _];
}
- async function r(l, a, o, u) {
+ async function r(l, u, o, a) {
const f = {};
o && (f.Authorization = `Bearer ${o}`);
- const c = 1e3, h = [];
- for (let d = 0; d < a.length; d += c) {
- const p = a.slice(d, d + c), y = new FormData();
- p.forEach((E) => {
- y.append("files", E);
+ const c = 1e3, _ = [];
+ for (let d = 0; d < u.length; d += c) {
+ const b = u.slice(d, d + c), y = new FormData();
+ b.forEach((S) => {
+ y.append("files", S);
});
try {
- const E = u ? `${l}/upload?upload_id=${u}` : `${l}/upload`;
- var _ = await e(E, {
+ const S = a ? `${l}/upload?upload_id=${a}` : `${l}/upload`;
+ var h = await e(S, {
method: "POST",
body: y,
headers: f
@@ -1628,33 +1628,33 @@ function Go(e, t) {
} catch {
return { error: je };
}
- const v = await _.json();
- h.push(...v);
+ const v = await h.json();
+ _.push(...v);
}
- return { files: h };
+ return { files: _ };
}
- async function i(l, a = { normalise_files: !0 }) {
+ async function i(l, u = { normalise_files: !0 }) {
return new Promise(async (o) => {
- const { status_callback: u, hf_token: f, normalise_files: c } = a, h = {
+ const { status_callback: a, hf_token: f, normalise_files: c } = u, _ = {
predict: oe,
submit: qe,
view_api: Be,
component_server: rt
- }, _ = c ?? !0;
+ }, h = c ?? !0;
if ((typeof window > "u" || !("WebSocket" in window)) && !global.Websocket) {
const m = await import("./wrapper-6f348d45-f837cf34.js");
- Vi = (await import("./__vite-browser-external-2447137e.js")).Blob, global.WebSocket = m.WebSocket;
+ ji = (await import("./__vite-browser-external-2447137e.js")).Blob, global.WebSocket = m.WebSocket;
}
- const { ws_protocol: d, http_protocol: p, host: y, space_id: v } = await Oo(l, f), E = Math.random().toString(36).substring(2), g = {};
+ const { ws_protocol: d, http_protocol: b, host: y, space_id: v } = await Lo(l, f), S = Math.random().toString(36).substring(2), p = {};
let A = !1, T = {}, w = null;
const j = {}, B = /* @__PURE__ */ new Set();
let H, Z = {}, le = !1;
- f && v && (le = await Vo(v, f));
+ f && v && (le = await jo(v, f));
async function Ge(m) {
- if (H = m, Z = Mo((m == null ? void 0 : m.dependencies) || []), H.auth_required)
+ if (H = m, Z = Oo((m == null ? void 0 : m.dependencies) || []), H.auth_required)
return {
config: H,
- ...h
+ ..._
};
try {
$ = await Be(H);
@@ -1663,22 +1663,22 @@ function Go(e, t) {
}
return {
config: H,
- ...h
+ ..._
};
}
let $;
async function Ae(m) {
- if (u && u(m), m.status === "running")
+ if (a && a(m), m.status === "running")
try {
- H = await Or(
+ H = await Lr(
e,
- `${p}//${y}`,
+ `${b}//${y}`,
f
);
const N = await Ge(H);
o(N);
} catch (N) {
- console.error(N), u && u({
+ console.error(N), a && a({
status: "error",
message: "Could not load this space.",
load_status: "error",
@@ -1687,27 +1687,27 @@ function Go(e, t) {
}
}
try {
- H = await Or(
+ H = await Lr(
e,
- `${p}//${y}`,
+ `${b}//${y}`,
f
);
const m = await Ge(H);
o(m);
} catch (m) {
- console.error(m), v ? Fn(
+ console.error(m), v ? xn(
v,
- qi.test(v) ? "space_name" : "subdomain",
+ Gi.test(v) ? "space_name" : "subdomain",
Ae
- ) : u && u({
+ ) : a && a({
status: "error",
message: "Could not load this space.",
load_status: "error",
detail: "NOT_FOUND"
});
}
- function oe(m, N, b) {
- let M = !1, S = !1, X;
+ function oe(m, N, g) {
+ let M = !1, E = !1, X;
if (typeof m == "number")
X = H.dependencies[m];
else {
@@ -1719,56 +1719,56 @@ function Go(e, t) {
"Cannot call predict on this function as it may run forever. Use submit instead"
);
return new Promise((V, ae) => {
- const He = qe(m, N, b);
+ const He = qe(m, N, g);
let P;
He.on("data", (ue) => {
- S && (He.destroy(), V(ue)), M = !0, P = ue;
+ E && (He.destroy(), V(ue)), M = !0, P = ue;
}).on("status", (ue) => {
- ue.stage === "error" && ae(ue), ue.stage === "complete" && (S = !0, M && (He.destroy(), V(P)));
+ ue.stage === "error" && ae(ue), ue.stage === "complete" && (E = !0, M && (He.destroy(), V(P)));
});
});
}
- function qe(m, N, b, M = null) {
- let S, X;
+ function qe(m, N, g, M = null) {
+ let E, X;
if (typeof m == "number")
- S = m, X = $.unnamed_endpoints[S];
+ E = m, X = $.unnamed_endpoints[E];
else {
const W = m.replace(/^\//, "");
- S = Z[W], X = $.named_endpoints[m.trim()];
+ E = Z[W], X = $.named_endpoints[m.trim()];
}
- if (typeof S != "number")
+ if (typeof E != "number")
throw new Error(
"There is no endpoint matching that name of fn_index matching that number."
);
let V, ae, He = H.protocol ?? "ws";
const P = typeof m == "number" ? "/predict" : m;
let ue, pe = null, re = !1;
- const St = {};
+ const Et = {};
let Oe = "";
typeof window < "u" && (Oe = new URLSearchParams(window.location.search).toString()), s(`${H.root}`, N, X, f).then(
(W) => {
if (ue = {
data: W || [],
- event_data: b,
- fn_index: S,
+ event_data: g,
+ fn_index: E,
trigger_id: M
- }, zo(S, H))
+ }, Vo(E, H))
D({
type: "status",
endpoint: P,
stage: "pending",
queue: !1,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
}), n(
`${H.root}/run${P.startsWith("/") ? P : `/${P}`}${Oe ? "?" + Oe : ""}`,
{
...ue,
- session_hash: E
+ session_hash: S
},
f
).then(([G, z]) => {
- const ge = _ ? Ft(
+ const ge = h ? qt(
G.data,
X,
H.root,
@@ -1777,13 +1777,13 @@ function Go(e, t) {
z == 200 ? (D({
type: "data",
endpoint: P,
- fn_index: S,
+ fn_index: E,
data: ge,
time: /* @__PURE__ */ new Date()
}), D({
type: "status",
endpoint: P,
- fn_index: S,
+ fn_index: E,
stage: "complete",
eta: G.average_duration,
queue: !1,
@@ -1792,7 +1792,7 @@ function Go(e, t) {
type: "status",
stage: "error",
endpoint: P,
- fn_index: S,
+ fn_index: E,
message: G.error,
queue: !1,
time: /* @__PURE__ */ new Date()
@@ -1803,7 +1803,7 @@ function Go(e, t) {
stage: "error",
message: G.message,
endpoint: P,
- fn_index: S,
+ fn_index: E,
queue: !1,
time: /* @__PURE__ */ new Date()
});
@@ -1814,10 +1814,10 @@ function Go(e, t) {
stage: "pending",
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
});
- let G = new URL(`${d}://${Gi(
+ let G = new URL(`${d}://${Fi(
y,
H.path,
!0
@@ -1831,32 +1831,32 @@ function Go(e, t) {
message: je,
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
});
}, V.onmessage = function(z) {
- const ge = JSON.parse(z.data), { type: J, status: U, data: x } = Tn(
+ const ge = JSON.parse(z.data), { type: J, status: U, data: x } = Sn(
ge,
- g[S]
+ p[E]
);
if (J === "update" && U && !re)
D({
type: "status",
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date(),
...U
}), U.stage === "error" && V.close();
else if (J === "hash") {
- V.send(JSON.stringify({ fn_index: S, session_hash: E }));
+ V.send(JSON.stringify({ fn_index: E, session_hash: S }));
return;
} else
- J === "data" ? V.send(JSON.stringify({ ...ue, session_hash: E })) : J === "complete" ? re = U : J === "log" ? D({
+ J === "data" ? V.send(JSON.stringify({ ...ue, session_hash: S })) : J === "complete" ? re = U : J === "log" ? D({
type: "log",
log: x.log,
level: x.level,
endpoint: P,
- fn_index: S
+ fn_index: E
}) : J === "generating" && D({
type: "status",
time: /* @__PURE__ */ new Date(),
@@ -1864,19 +1864,19 @@ function Go(e, t) {
stage: U == null ? void 0 : U.stage,
queue: !0,
endpoint: P,
- fn_index: S
+ fn_index: E
});
x && (D({
type: "data",
time: /* @__PURE__ */ new Date(),
- data: _ ? Ft(
+ data: h ? qt(
x.data,
X,
H.root,
H.root_url
) : x.data,
endpoint: P,
- fn_index: S
+ fn_index: E
}), re && (D({
type: "status",
time: /* @__PURE__ */ new Date(),
@@ -1884,11 +1884,11 @@ function Go(e, t) {
stage: U == null ? void 0 : U.stage,
queue: !0,
endpoint: P,
- fn_index: S
+ fn_index: E
}), V.close()));
- }, Cr(H.version || "2.0.0", "3.6") < 0 && addEventListener(
+ }, kr(H.version || "2.0.0", "3.6") < 0 && addEventListener(
"open",
- () => V.send(JSON.stringify({ hash: E }))
+ () => V.send(JSON.stringify({ hash: S }))
);
} else if (He == "sse") {
D({
@@ -1896,47 +1896,47 @@ function Go(e, t) {
stage: "pending",
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
});
var fe = new URLSearchParams({
- fn_index: S.toString(),
- session_hash: E
+ fn_index: E.toString(),
+ session_hash: S
}).toString();
let G = new URL(
`${H.root}/queue/join?${Oe ? Oe + "&" : ""}${fe}`
);
ae = t(G), ae.onmessage = async function(z) {
- const ge = JSON.parse(z.data), { type: J, status: U, data: x } = Tn(
+ const ge = JSON.parse(z.data), { type: J, status: U, data: x } = Sn(
ge,
- g[S]
+ p[E]
);
if (J === "update" && U && !re)
D({
type: "status",
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date(),
...U
}), U.stage === "error" && ae.close();
else if (J === "data") {
pe = ge.event_id;
- let [it, Rs] = await n(
+ let [it, Ds] = await n(
`${H.root}/queue/data`,
{
...ue,
- session_hash: E,
+ session_hash: S,
event_id: pe
},
f
);
- Rs !== 200 && (D({
+ Ds !== 200 && (D({
type: "status",
stage: "error",
message: je,
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
}), ae.close());
} else
@@ -1945,7 +1945,7 @@ function Go(e, t) {
log: x.log,
level: x.level,
endpoint: P,
- fn_index: S
+ fn_index: E
}) : J === "generating" && D({
type: "status",
time: /* @__PURE__ */ new Date(),
@@ -1953,19 +1953,19 @@ function Go(e, t) {
stage: U == null ? void 0 : U.stage,
queue: !0,
endpoint: P,
- fn_index: S
+ fn_index: E
});
x && (D({
type: "data",
time: /* @__PURE__ */ new Date(),
- data: _ ? Ft(
+ data: h ? qt(
x.data,
X,
H.root,
H.root_url
) : x.data,
endpoint: P,
- fn_index: S
+ fn_index: E
}), re && (D({
type: "status",
time: /* @__PURE__ */ new Date(),
@@ -1973,7 +1973,7 @@ function Go(e, t) {
stage: U == null ? void 0 : U.stage,
queue: !0,
endpoint: P,
- fn_index: S
+ fn_index: E
}), ae.close()));
};
} else
@@ -1982,13 +1982,13 @@ function Go(e, t) {
stage: "pending",
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
}), n(
`${H.root}/queue/join?${Oe}`,
{
...ue,
- session_hash: E
+ session_hash: S
},
f
).then(([G, z]) => {
@@ -1996,10 +1996,10 @@ function Go(e, t) {
D({
type: "status",
stage: "error",
- message: ji,
+ message: qi,
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
});
else if (z !== 200)
@@ -2009,16 +2009,16 @@ function Go(e, t) {
message: je,
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
});
else {
pe = G.event_id;
let ge = async function(J) {
try {
- const { type: U, status: x, data: it } = Tn(
+ const { type: U, status: x, data: it } = Sn(
J,
- g[S]
+ p[E]
);
if (U == "heartbeat")
return;
@@ -2026,7 +2026,7 @@ function Go(e, t) {
D({
type: "status",
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date(),
...x
});
@@ -2039,7 +2039,7 @@ function Go(e, t) {
message: (x == null ? void 0 : x.message) || "An Unexpected Error Occurred!",
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
});
else if (U === "log") {
@@ -2048,7 +2048,7 @@ function Go(e, t) {
log: it.log,
level: it.level,
endpoint: P,
- fn_index: S
+ fn_index: E
});
return;
} else
@@ -2059,19 +2059,19 @@ function Go(e, t) {
stage: x == null ? void 0 : x.stage,
queue: !0,
endpoint: P,
- fn_index: S
+ fn_index: E
});
it && (D({
type: "data",
time: /* @__PURE__ */ new Date(),
- data: _ ? Ft(
+ data: h ? qt(
it.data,
X,
H.root,
H.root_url
) : it.data,
endpoint: P,
- fn_index: S
+ fn_index: E
}), re && D({
type: "status",
time: /* @__PURE__ */ new Date(),
@@ -2079,7 +2079,7 @@ function Go(e, t) {
stage: x == null ? void 0 : x.stage,
queue: !0,
endpoint: P,
- fn_index: S
+ fn_index: E
})), ((x == null ? void 0 : x.stage) === "complete" || (x == null ? void 0 : x.stage) === "error") && j[pe] && delete j[pe];
} catch (U) {
console.error("Unexpected client exception", U), D({
@@ -2088,32 +2088,32 @@ function Go(e, t) {
message: "An Unexpected Error Occurred!",
queue: !0,
endpoint: P,
- fn_index: S,
+ fn_index: E,
time: /* @__PURE__ */ new Date()
}), Le();
}
};
pe in T && (T[pe].forEach(
(J) => ge(J)
- ), delete T[pe]), j[pe] = ge, B.add(pe), A || Et();
+ ), delete T[pe]), j[pe] = ge, B.add(pe), A || wt();
}
}));
}
);
function D(W) {
- const G = St[W.type] || [];
+ const G = Et[W.type] || [];
G == null || G.forEach((z) => z(W));
}
- function fn(W, fe) {
- const G = St, z = G[W] || [];
- return G[W] = z, z == null || z.push(fe), { on: fn, off: Mt, cancel: cn, destroy: hn };
+ function un(W, fe) {
+ const G = Et, z = G[W] || [];
+ return G[W] = z, z == null || z.push(fe), { on: un, off: Rt, cancel: fn, destroy: cn };
}
- function Mt(W, fe) {
- const G = St;
+ function Rt(W, fe) {
+ const G = Et;
let z = G[W] || [];
- return z = z == null ? void 0 : z.filter((ge) => ge !== fe), G[W] = z, { on: fn, off: Mt, cancel: cn, destroy: hn };
+ return z = z == null ? void 0 : z.filter((ge) => ge !== fe), G[W] = z, { on: un, off: Rt, cancel: fn, destroy: cn };
}
- async function cn() {
+ async function fn() {
const W = {
stage: "complete",
queue: !1,
@@ -2123,12 +2123,12 @@ function Go(e, t) {
...W,
type: "status",
endpoint: P,
- fn_index: S
+ fn_index: E
});
let fe = {};
He === "ws" ? (V && V.readyState === 0 ? V.addEventListener("open", () => {
V.close();
- }) : V.close(), fe = { fn_index: S, session_hash: E }) : (ae.close(), fe = { event_id: pe });
+ }) : V.close(), fe = { fn_index: E, session_hash: S }) : (ae.close(), fe = { event_id: pe });
try {
await e(`${H.root}/reset`, {
headers: { "Content-Type": "application/json" },
@@ -2141,40 +2141,40 @@ function Go(e, t) {
);
}
}
- function hn() {
- for (const W in St)
- St[W].forEach((fe) => {
- Mt(W, fe);
+ function cn() {
+ for (const W in Et)
+ Et[W].forEach((fe) => {
+ Rt(W, fe);
});
}
return {
- on: fn,
- off: Mt,
- cancel: cn,
- destroy: hn
+ on: un,
+ off: Rt,
+ cancel: fn,
+ destroy: cn
};
}
- function Et() {
+ function wt() {
A = !0;
let m = new URLSearchParams({
- session_hash: E
+ session_hash: S
}).toString(), N = new URL(`${H.root}/queue/data?${m}`);
- w = t(N), w.onmessage = async function(b) {
- let M = JSON.parse(b.data);
- const S = M.event_id;
- if (!S)
+ w = t(N), w.onmessage = async function(g) {
+ let M = JSON.parse(g.data);
+ const E = M.event_id;
+ if (!E)
await Promise.all(
Object.keys(j).map(
(X) => j[X](M)
)
);
- else if (j[S]) {
- M.msg === "process_completed" && (B.delete(S), B.size === 0 && Le());
- let X = j[S];
+ else if (j[E]) {
+ M.msg === "process_completed" && (B.delete(E), B.size === 0 && Le());
+ let X = j[E];
window.setTimeout(X, 0, M);
} else
- T[S] || (T[S] = []), T[S].push(M);
- }, w.onerror = async function(b) {
+ T[E] || (T[E] = []), T[E].push(M);
+ }, w.onerror = async function(g) {
await Promise.all(
Object.keys(j).map(
(M) => j[M]({
@@ -2188,10 +2188,10 @@ function Go(e, t) {
function Le() {
A = !1, w == null || w.close();
}
- async function rt(m, N, b) {
+ async function rt(m, N, g) {
var M;
- const S = { "Content-Type": "application/json" };
- f && (S.Authorization = `Bearer ${f}`);
+ const E = { "Content-Type": "application/json" };
+ f && (E.Authorization = `Bearer ${f}`);
let X, V = H.components.find(
(P) => P.id === m
);
@@ -2201,12 +2201,12 @@ function Go(e, t) {
{
method: "POST",
body: JSON.stringify({
- data: b,
+ data: g,
component_id: m,
fn_name: N,
- session_hash: E
+ session_hash: S
}),
- headers: S
+ headers: E
}
);
if (!ae.ok)
@@ -2220,8 +2220,8 @@ function Go(e, t) {
return $;
const N = { "Content-Type": "application/json" };
f && (N.Authorization = `Bearer ${f}`);
- let b;
- if (Cr(m.version || "2.0.0", "3.30") < 0 ? b = await e(
+ let g;
+ if (kr(m.version || "2.0.0", "3.30") < 0 ? g = await e(
"https://gradio-space-api-fetcher-v2.hf.space/api",
{
method: "POST",
@@ -2231,52 +2231,52 @@ function Go(e, t) {
}),
headers: N
}
- ) : b = await e(`${m.root}/info`, {
+ ) : g = await e(`${m.root}/info`, {
headers: N
- }), !b.ok)
+ }), !g.ok)
throw new Error(je);
- let M = await b.json();
- return "api" in M && (M = M.api), M.named_endpoints["/predict"] && !M.unnamed_endpoints[0] && (M.unnamed_endpoints[0] = M.named_endpoints["/predict"]), jo(M, m, Z);
+ let M = await g.json();
+ return "api" in M && (M = M.api), M.named_endpoints["/predict"] && !M.unnamed_endpoints[0] && (M.unnamed_endpoints[0] = M.named_endpoints["/predict"]), qo(M, m, Z);
}
});
}
- async function s(l, a, o, u) {
- const f = await xn(
- a,
+ async function s(l, u, o, a) {
+ const f = await Un(
+ u,
void 0,
[],
!0,
o
);
return Promise.all(
- f.map(async ({ path: c, blob: h, type: _ }) => {
- if (h) {
- const d = (await r(l, [h], u)).files[0];
- return { path: c, file_url: d, type: _, name: h == null ? void 0 : h.name };
+ f.map(async ({ path: c, blob: _, type: h }) => {
+ if (_) {
+ const d = (await r(l, [_], a)).files[0];
+ return { path: c, file_url: d, type: h, name: _ == null ? void 0 : _.name };
}
- return { path: c, type: _ };
+ return { path: c, type: h };
})
- ).then((c) => (c.forEach(({ path: h, file_url: _, type: d, name: p }) => {
+ ).then((c) => (c.forEach(({ path: _, file_url: h, type: d, name: b }) => {
if (d === "Gallery")
- Lr(a, _, h);
- else if (_) {
- const y = new ft({ path: _, orig_name: p });
- Lr(a, y, h);
+ Ir(u, h, _);
+ else if (h) {
+ const y = new ft({ path: h, orig_name: b });
+ Ir(u, y, _);
}
- }), a));
+ }), u));
}
}
-const { post_data: m0, upload_files: qo, client: p0, handle_blob: g0 } = Go(
+const { post_data: m0, upload_files: Go, client: p0, handle_blob: g0 } = Fo(
fetch,
(...e) => new EventSource(...e)
);
-function Ft(e, t, n, r) {
+function qt(e, t, n, r) {
return e.map((i, s) => {
- var l, a, o, u;
- return ((a = (l = t == null ? void 0 : t.returns) == null ? void 0 : l[s]) == null ? void 0 : a.component) === "File" ? Ce(i, n, r) : ((u = (o = t == null ? void 0 : t.returns) == null ? void 0 : o[s]) == null ? void 0 : u.component) === "Gallery" ? i.map((f) => Array.isArray(f) ? [Ce(f[0], n, r), f[1]] : [Ce(f, n, r), null]) : typeof i == "object" && i.path ? Ce(i, n, r) : i;
+ var l, u, o, a;
+ return ((u = (l = t == null ? void 0 : t.returns) == null ? void 0 : l[s]) == null ? void 0 : u.component) === "File" ? Ce(i, n, r) : ((a = (o = t == null ? void 0 : t.returns) == null ? void 0 : o[s]) == null ? void 0 : a.component) === "Gallery" ? i.map((f) => Array.isArray(f) ? [Ce(f[0], n, r), f[1]] : [Ce(f, n, r), null]) : typeof i == "object" && i.path ? Ce(i, n, r) : i;
});
}
-function Nr(e, t, n, r) {
+function Pr(e, t, n, r) {
switch (e.type) {
case "string":
return "string";
@@ -2296,10 +2296,10 @@ function Nr(e, t, n, r) {
if (n === "GallerySerializable")
return r === "parameter" ? "[(Blob | File | Buffer), (string | null)][]" : "[{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}, (string | null))][]";
}
-function Ir(e, t) {
+function Nr(e, t) {
return t === "GallerySerializable" ? "array of [file, label] tuples" : t === "ListStringSerializable" ? "array of strings" : t === "FileSerializable" ? "array of files or single file" : e.description;
}
-function jo(e, t, n) {
+function qo(e, t, n) {
const r = {
named_endpoints: {},
unnamed_endpoints: {}
@@ -2307,27 +2307,27 @@ function jo(e, t, n) {
for (const i in e) {
const s = e[i];
for (const l in s) {
- const a = t.dependencies[l] ? l : n[l.replace("/", "")], o = s[l];
- r[i][l] = {}, r[i][l].parameters = {}, r[i][l].returns = {}, r[i][l].type = t.dependencies[a].types, r[i][l].parameters = o.parameters.map(
- ({ label: u, component: f, type: c, serializer: h }) => ({
- label: u,
+ const u = t.dependencies[l] ? l : n[l.replace("/", "")], o = s[l];
+ r[i][l] = {}, r[i][l].parameters = {}, r[i][l].returns = {}, r[i][l].type = t.dependencies[u].types, r[i][l].parameters = o.parameters.map(
+ ({ label: a, component: f, type: c, serializer: _ }) => ({
+ label: a,
component: f,
- type: Nr(c, f, h, "parameter"),
- description: Ir(c, h)
+ type: Pr(c, f, _, "parameter"),
+ description: Nr(c, _)
})
), r[i][l].returns = o.returns.map(
- ({ label: u, component: f, type: c, serializer: h }) => ({
- label: u,
+ ({ label: a, component: f, type: c, serializer: _ }) => ({
+ label: a,
component: f,
- type: Nr(c, f, h, "return"),
- description: Ir(c, h)
+ type: Pr(c, f, _, "return"),
+ description: Nr(c, _)
})
);
}
}
return r;
}
-async function Vo(e, t) {
+async function jo(e, t) {
try {
return (await (await fetch(`https://huggingface.co/api/spaces/${e}/jwt`, {
headers: {
@@ -2338,23 +2338,23 @@ async function Vo(e, t) {
return console.error(n), !1;
}
}
-function Lr(e, t, n) {
+function Ir(e, t, n) {
for (; n.length > 1; )
e = e[n.shift()];
e[n.shift()] = t;
}
-async function xn(e, t = void 0, n = [], r = !1, i = void 0) {
+async function Un(e, t = void 0, n = [], r = !1, i = void 0) {
if (Array.isArray(e)) {
let s = [];
return await Promise.all(
- e.map(async (l, a) => {
+ e.map(async (l, u) => {
var o;
- let u = n.slice();
- u.push(a);
- const f = await xn(
- e[a],
- r ? ((o = i == null ? void 0 : i.parameters[a]) == null ? void 0 : o.component) || void 0 : t,
- u,
+ let a = n.slice();
+ a.push(u);
+ const f = await Un(
+ e[u],
+ r ? ((o = i == null ? void 0 : i.parameters[u]) == null ? void 0 : o.component) || void 0 : t,
+ a,
!1,
i
);
@@ -2366,7 +2366,7 @@ async function xn(e, t = void 0, n = [], r = !1, i = void 0) {
return [
{
path: n,
- blob: t === "Image" ? !1 : new Vi([e]),
+ blob: t === "Image" ? !1 : new ji([e]),
type: t
}
];
@@ -2374,12 +2374,12 @@ async function xn(e, t = void 0, n = [], r = !1, i = void 0) {
let s = [];
for (let l in e)
if (e.hasOwnProperty(l)) {
- let a = n.slice();
- a.push(l), s = s.concat(
- await xn(
+ let u = n.slice();
+ u.push(l), s = s.concat(
+ await Un(
e[l],
void 0,
- a,
+ u,
!1,
i
)
@@ -2390,15 +2390,15 @@ async function xn(e, t = void 0, n = [], r = !1, i = void 0) {
}
return [];
}
-function zo(e, t) {
+function Vo(e, t) {
var n, r, i, s;
return !(((r = (n = t == null ? void 0 : t.dependencies) == null ? void 0 : n[e]) == null ? void 0 : r.queue) === null ? t.enable_queue : (s = (i = t == null ? void 0 : t.dependencies) == null ? void 0 : i[e]) != null && s.queue) || !1;
}
-async function Or(e, t, n) {
+async function Lr(e, t, n) {
const r = {};
if (n && (r.Authorization = `Bearer ${n}`), typeof window < "u" && window.gradio_config && location.origin !== "http://localhost:9876" && !window.gradio_config.dev_mode) {
const i = window.gradio_config.root, s = window.gradio_config;
- return s.root = Gi(t, s.root, !1), { ...s, path: i };
+ return s.root = Fi(t, s.root, !1), { ...s, path: i };
} else if (t) {
let i = await e(`${t}/config`, {
headers: r
@@ -2411,7 +2411,7 @@ async function Or(e, t, n) {
}
throw new Error("No config or app endpoint found");
}
-async function Fn(e, t, n) {
+async function xn(e, t, n) {
let r = t === "subdomain" ? `https://huggingface.co/api/spaces/by-subdomain/${e}` : `https://huggingface.co/api/spaces/${e}`, i, s;
try {
if (i = await fetch(r), s = i.status, s !== 200)
@@ -2430,7 +2430,7 @@ async function Fn(e, t, n) {
return;
const {
runtime: { stage: l },
- id: a
+ id: u
} = i;
switch (l) {
case "STOPPED":
@@ -2441,7 +2441,7 @@ async function Fn(e, t, n) {
message: "Space is asleep. Waking it up...",
detail: l
}), setTimeout(() => {
- Fn(e, t, n);
+ xn(e, t, n);
}, 1e3);
break;
case "PAUSED":
@@ -2450,7 +2450,7 @@ async function Fn(e, t, n) {
load_status: "error",
message: "This space has been paused by the author. If you would like to try this demo, consider duplicating the space.",
detail: l,
- discussions_enabled: await Pr(a)
+ discussions_enabled: await Cr(u)
});
break;
case "RUNNING":
@@ -2469,7 +2469,7 @@ async function Fn(e, t, n) {
message: "Space is building...",
detail: l
}), setTimeout(() => {
- Fn(e, t, n);
+ xn(e, t, n);
}, 1e3);
break;
default:
@@ -2478,12 +2478,12 @@ async function Fn(e, t, n) {
load_status: "error",
message: "This space is experiencing an issue.",
detail: l,
- discussions_enabled: await Pr(a)
+ discussions_enabled: await Cr(u)
});
break;
}
}
-function Tn(e, t) {
+function Sn(e, t) {
switch (e.msg) {
case "send_data":
return { type: "data" };
@@ -2494,7 +2494,7 @@ function Tn(e, t) {
type: "update",
status: {
queue: !0,
- message: ji,
+ message: qi,
stage: "error",
code: e.code,
success: e.success
@@ -2591,32 +2591,32 @@ function Tn(e, t) {
return { type: "none", status: { stage: "error", queue: !0 } };
}
const {
- SvelteComponent: Xo,
- attr: Mr,
- check_outros: Wo,
- create_component: ar,
- destroy_component: ur,
- detach: Gn,
- element: Zo,
- empty: Jo,
- group_outros: Qo,
- init: Yo,
- insert: qn,
- mount_component: fr,
- noop: Dr,
- safe_not_equal: Ko,
- space: $o,
- transition_in: kt,
- transition_out: Ct
+ SvelteComponent: zo,
+ attr: Or,
+ check_outros: Xo,
+ create_component: lr,
+ destroy_component: or,
+ detach: Fn,
+ element: Wo,
+ empty: Zo,
+ group_outros: Jo,
+ init: Qo,
+ insert: Gn,
+ mount_component: ar,
+ noop: Mr,
+ safe_not_equal: Yo,
+ space: Ko,
+ transition_in: Ht,
+ transition_out: kt
} = window.__gradio__svelte__internal;
-function ea(e) {
+function $o(e) {
let t;
return {
c() {
- t = Zo("div"), Mr(t, "id", "fasta_content"), Mr(t, "class", "svelte-1r6bt2i");
+ t = Wo("div"), Or(t, "id", "fasta_content"), Or(t, "class", "svelte-1r6bt2i");
},
m(n, r) {
- qn(n, t, r), t.innerHTML = /*fasta_text*/
+ Gn(n, t, r), t.innerHTML = /*fasta_text*/
e[4];
},
p(n, r) {
@@ -2624,28 +2624,28 @@ function ea(e) {
16 && (t.innerHTML = /*fasta_text*/
n[4]);
},
- i: Dr,
- o: Dr,
+ i: Mr,
+ o: Mr,
d(n) {
- n && Gn(t);
+ n && Fn(t);
}
};
}
-function ta(e) {
+function ea(e) {
let t, n;
- return t = new Xl({
+ return t = new zl({
props: {
unpadded_box: !0,
size: "large",
- $$slots: { default: [na] },
+ $$slots: { default: [ta] },
$$scope: { ctx: e }
}
}), {
c() {
- ar(t.$$.fragment);
+ lr(t.$$.fragment);
},
m(r, i) {
- fr(t, r, i), n = !0;
+ ar(t, r, i), n = !0;
},
p(r, i) {
const s = {};
@@ -2653,45 +2653,45 @@ function ta(e) {
256 && (s.$$scope = { dirty: i, ctx: r }), t.$set(s);
},
i(r) {
- n || (kt(t.$$.fragment, r), n = !0);
+ n || (Ht(t.$$.fragment, r), n = !0);
},
o(r) {
- Ct(t.$$.fragment, r), n = !1;
+ kt(t.$$.fragment, r), n = !1;
},
d(r) {
- ur(t, r);
+ or(t, r);
}
};
}
-function na(e) {
+function ta(e) {
let t, n;
- return t = new or({}), {
+ return t = new sr({}), {
c() {
- ar(t.$$.fragment);
+ lr(t.$$.fragment);
},
m(r, i) {
- fr(t, r, i), n = !0;
+ ar(t, r, i), n = !0;
},
i(r) {
- n || (kt(t.$$.fragment, r), n = !0);
+ n || (Ht(t.$$.fragment, r), n = !0);
},
o(r) {
- Ct(t.$$.fragment, r), n = !1;
+ kt(t.$$.fragment, r), n = !1;
},
d(r) {
- ur(t, r);
+ or(t, r);
}
};
}
-function ra(e) {
+function na(e) {
let t, n, r, i, s, l;
- t = new Mi({
+ t = new Oi({
props: {
show_label: (
/*show_label*/
e[2]
),
- Icon: or,
+ Icon: sr,
label: (
/*label*/
e[1] || /*i18n*/
@@ -2699,61 +2699,61 @@ function ra(e) {
)
}
});
- const a = [ta, ea], o = [];
- function u(f, c) {
+ const u = [ea, $o], o = [];
+ function a(f, c) {
return (
/*value*/
f[0] === null || !/*value*/
f[0].url ? 0 : 1
);
}
- return r = u(e), i = o[r] = a[r](e), {
+ return r = a(e), i = o[r] = u[r](e), {
c() {
- ar(t.$$.fragment), n = $o(), i.c(), s = Jo();
+ lr(t.$$.fragment), n = Ko(), i.c(), s = Zo();
},
m(f, c) {
- fr(t, f, c), qn(f, n, c), o[r].m(f, c), qn(f, s, c), l = !0;
+ ar(t, f, c), Gn(f, n, c), o[r].m(f, c), Gn(f, s, c), l = !0;
},
p(f, [c]) {
- const h = {};
+ const _ = {};
c & /*show_label*/
- 4 && (h.show_label = /*show_label*/
+ 4 && (_.show_label = /*show_label*/
f[2]), c & /*label, i18n*/
- 10 && (h.label = /*label*/
+ 10 && (_.label = /*label*/
f[1] || /*i18n*/
- f[3]("image.image")), t.$set(h);
- let _ = r;
- r = u(f), r === _ ? o[r].p(f, c) : (Qo(), Ct(o[_], 1, 1, () => {
- o[_] = null;
- }), Wo(), i = o[r], i ? i.p(f, c) : (i = o[r] = a[r](f), i.c()), kt(i, 1), i.m(s.parentNode, s));
+ f[3]("image.image")), t.$set(_);
+ let h = r;
+ r = a(f), r === h ? o[r].p(f, c) : (Jo(), kt(o[h], 1, 1, () => {
+ o[h] = null;
+ }), Xo(), i = o[r], i ? i.p(f, c) : (i = o[r] = u[r](f), i.c()), Ht(i, 1), i.m(s.parentNode, s));
},
i(f) {
- l || (kt(t.$$.fragment, f), kt(i), l = !0);
+ l || (Ht(t.$$.fragment, f), Ht(i), l = !0);
},
o(f) {
- Ct(t.$$.fragment, f), Ct(i), l = !1;
+ kt(t.$$.fragment, f), kt(i), l = !1;
},
d(f) {
- f && (Gn(n), Gn(s)), ur(t, f), o[r].d(f);
+ f && (Fn(n), Fn(s)), or(t, f), o[r].d(f);
}
};
}
-function ia(e, t, n) {
- let { value: r } = t, { label: i = void 0 } = t, { show_label: s } = t, { show_download_button: l = !0 } = t, { selectable: a = !1 } = t, { i18n: o } = t, u = "";
+function ra(e, t, n) {
+ let { value: r } = t, { label: i = void 0 } = t, { show_label: s } = t, { show_download_button: l = !0 } = t, { selectable: u = !1 } = t, { i18n: o } = t, a = "";
async function f(c) {
- const h = await fetch(c);
- n(4, u = await h.text()), n(4, u = u.replaceAll("G", "G")), n(4, u = u.replaceAll("A", "A")), n(4, u = u.replaceAll("T", "T")), n(4, u = u.replaceAll("C", "C")), n(4, u = u.replaceAll(/^(>.*)$/gm, "$1"));
+ const _ = await fetch(c);
+ n(4, a = await _.text()), n(4, a = a.replaceAll("G", "G")), n(4, a = a.replaceAll("A", "A")), n(4, a = a.replaceAll("T", "T")), n(4, a = a.replaceAll("C", "C")), n(4, a = a.replaceAll(/^(>.*)$/gm, "$1"));
}
return e.$$set = (c) => {
- "value" in c && n(0, r = c.value), "label" in c && n(1, i = c.label), "show_label" in c && n(2, s = c.show_label), "show_download_button" in c && n(5, l = c.show_download_button), "selectable" in c && n(6, a = c.selectable), "i18n" in c && n(3, o = c.i18n);
+ "value" in c && n(0, r = c.value), "label" in c && n(1, i = c.label), "show_label" in c && n(2, s = c.show_label), "show_download_button" in c && n(5, l = c.show_download_button), "selectable" in c && n(6, u = c.selectable), "i18n" in c && n(3, o = c.i18n);
}, e.$$.update = () => {
e.$$.dirty & /*value*/
1 && r && r.url && f(r.url);
- }, [r, i, s, o, u, l, a];
+ }, [r, i, s, o, a, l, u];
}
-class sa extends Xo {
+class ia extends zo {
constructor(t) {
- super(), Yo(this, t, ia, ra, Ko, {
+ super(), Qo(this, t, ra, na, Yo, {
value: 0,
label: 1,
show_label: 2,
@@ -2765,19 +2765,19 @@ class sa extends Xo {
}
function Ye() {
}
-function la(e) {
+function sa(e) {
return e();
}
-function oa(e) {
- e.forEach(la);
+function la(e) {
+ e.forEach(sa);
}
-function aa(e) {
+function oa(e) {
return typeof e == "function";
}
-function ua(e, t) {
+function aa(e, t) {
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
}
-function fa(e, ...t) {
+function ua(e, ...t) {
if (e == null) {
for (const r of t)
r(void 0);
@@ -2786,17 +2786,17 @@ function fa(e, ...t) {
const n = e.subscribe(...t);
return n.unsubscribe ? () => n.unsubscribe() : n;
}
-const zi = typeof window < "u";
-let Rr = zi ? () => window.performance.now() : () => Date.now(), Xi = zi ? (e) => requestAnimationFrame(e) : Ye;
+const Vi = typeof window < "u";
+let Dr = Vi ? () => window.performance.now() : () => Date.now(), zi = Vi ? (e) => requestAnimationFrame(e) : Ye;
const ct = /* @__PURE__ */ new Set();
-function Wi(e) {
+function Xi(e) {
ct.forEach((t) => {
t.c(e) || (ct.delete(t), t.f());
- }), ct.size !== 0 && Xi(Wi);
+ }), ct.size !== 0 && zi(Xi);
}
-function ca(e) {
+function fa(e) {
let t;
- return ct.size === 0 && Xi(Wi), {
+ return ct.size === 0 && zi(Xi), {
promise: new Promise((n) => {
ct.add(t = { c: e, f: n });
}),
@@ -2806,113 +2806,113 @@ function ca(e) {
};
}
const lt = [];
-function ha(e, t) {
+function ca(e, t) {
return {
- subscribe: It(e, t).subscribe
+ subscribe: Ot(e, t).subscribe
};
}
-function It(e, t = Ye) {
+function Ot(e, t = Ye) {
let n;
const r = /* @__PURE__ */ new Set();
- function i(a) {
- if (ua(e, a) && (e = a, n)) {
+ function i(u) {
+ if (aa(e, u) && (e = u, n)) {
const o = !lt.length;
- for (const u of r)
- u[1](), lt.push(u, e);
+ for (const a of r)
+ a[1](), lt.push(a, e);
if (o) {
- for (let u = 0; u < lt.length; u += 2)
- lt[u][0](lt[u + 1]);
+ for (let a = 0; a < lt.length; a += 2)
+ lt[a][0](lt[a + 1]);
lt.length = 0;
}
}
}
- function s(a) {
- i(a(e));
+ function s(u) {
+ i(u(e));
}
- function l(a, o = Ye) {
- const u = [a, o];
- return r.add(u), r.size === 1 && (n = t(i, s) || Ye), a(e), () => {
- r.delete(u), r.size === 0 && n && (n(), n = null);
+ function l(u, o = Ye) {
+ const a = [u, o];
+ return r.add(a), r.size === 1 && (n = t(i, s) || Ye), u(e), () => {
+ r.delete(a), r.size === 0 && n && (n(), n = null);
};
}
return { set: i, update: s, subscribe: l };
}
-function vt(e, t, n) {
+function bt(e, t, n) {
const r = !Array.isArray(e), i = r ? [e] : e;
if (!i.every(Boolean))
throw new Error("derived() expects stores as input, got a falsy value");
const s = t.length < 2;
- return ha(n, (l, a) => {
+ return ca(n, (l, u) => {
let o = !1;
- const u = [];
+ const a = [];
let f = 0, c = Ye;
- const h = () => {
+ const _ = () => {
if (f)
return;
c();
- const d = t(r ? u[0] : u, l, a);
- s ? l(d) : c = aa(d) ? d : Ye;
- }, _ = i.map(
- (d, p) => fa(
+ const d = t(r ? a[0] : a, l, u);
+ s ? l(d) : c = oa(d) ? d : Ye;
+ }, h = i.map(
+ (d, b) => ua(
d,
(y) => {
- u[p] = y, f &= ~(1 << p), o && h();
+ a[b] = y, f &= ~(1 << b), o && _();
},
() => {
- f |= 1 << p;
+ f |= 1 << b;
}
)
);
- return o = !0, h(), function() {
- oa(_), c(), o = !1;
+ return o = !0, _(), function() {
+ la(h), c(), o = !1;
};
});
}
-function Ur(e) {
+function Rr(e) {
return Object.prototype.toString.call(e) === "[object Date]";
}
-function jn(e, t, n, r) {
- if (typeof n == "number" || Ur(n)) {
- const i = r - n, s = (n - t) / (e.dt || 1 / 60), l = e.opts.stiffness * i, a = e.opts.damping * s, o = (l - a) * e.inv_mass, u = (s + o) * e.dt;
- return Math.abs(u) < e.opts.precision && Math.abs(i) < e.opts.precision ? r : (e.settled = !1, Ur(n) ? new Date(n.getTime() + u) : n + u);
+function qn(e, t, n, r) {
+ if (typeof n == "number" || Rr(n)) {
+ const i = r - n, s = (n - t) / (e.dt || 1 / 60), l = e.opts.stiffness * i, u = e.opts.damping * s, o = (l - u) * e.inv_mass, a = (s + o) * e.dt;
+ return Math.abs(a) < e.opts.precision && Math.abs(i) < e.opts.precision ? r : (e.settled = !1, Rr(n) ? new Date(n.getTime() + a) : n + a);
} else {
if (Array.isArray(n))
return n.map(
- (i, s) => jn(e, t[s], n[s], r[s])
+ (i, s) => qn(e, t[s], n[s], r[s])
);
if (typeof n == "object") {
const i = {};
for (const s in n)
- i[s] = jn(e, t[s], n[s], r[s]);
+ i[s] = qn(e, t[s], n[s], r[s]);
return i;
} else
throw new Error(`Cannot spring ${typeof n} values`);
}
}
-function xr(e, t = {}) {
- const n = It(e), { stiffness: r = 0.15, damping: i = 0.8, precision: s = 0.01 } = t;
- let l, a, o, u = e, f = e, c = 1, h = 0, _ = !1;
+function Ur(e, t = {}) {
+ const n = Ot(e), { stiffness: r = 0.15, damping: i = 0.8, precision: s = 0.01 } = t;
+ let l, u, o, a = e, f = e, c = 1, _ = 0, h = !1;
function d(y, v = {}) {
f = y;
- const E = o = {};
- return e == null || v.hard || p.stiffness >= 1 && p.damping >= 1 ? (_ = !0, l = Rr(), u = y, n.set(e = f), Promise.resolve()) : (v.soft && (h = 1 / ((v.soft === !0 ? 0.5 : +v.soft) * 60), c = 0), a || (l = Rr(), _ = !1, a = ca((g) => {
- if (_)
- return _ = !1, a = null, !1;
- c = Math.min(c + h, 1);
+ const S = o = {};
+ return e == null || v.hard || b.stiffness >= 1 && b.damping >= 1 ? (h = !0, l = Dr(), a = y, n.set(e = f), Promise.resolve()) : (v.soft && (_ = 1 / ((v.soft === !0 ? 0.5 : +v.soft) * 60), c = 0), u || (l = Dr(), h = !1, u = fa((p) => {
+ if (h)
+ return h = !1, u = null, !1;
+ c = Math.min(c + _, 1);
const A = {
inv_mass: c,
- opts: p,
+ opts: b,
settled: !0,
- dt: (g - l) * 60 / 1e3
- }, T = jn(A, u, e, f);
- return l = g, u = e, n.set(e = T), A.settled && (a = null), !A.settled;
- })), new Promise((g) => {
- a.promise.then(() => {
- E === o && g();
+ dt: (p - l) * 60 / 1e3
+ }, T = qn(A, a, e, f);
+ return l = p, a = e, n.set(e = T), A.settled && (u = null), !A.settled;
+ })), new Promise((p) => {
+ u.promise.then(() => {
+ S === o && p();
});
}));
}
- const p = {
+ const b = {
set: d,
update: (y, v) => d(y(f, e), v),
subscribe: n.subscribe,
@@ -2920,94 +2920,94 @@ function xr(e, t = {}) {
damping: i,
precision: s
};
- return p;
+ return b;
}
-function _a(e) {
+function ha(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
-var da = function(t) {
- return ma(t) && !pa(t);
+var _a = function(t) {
+ return da(t) && !ma(t);
};
-function ma(e) {
+function da(e) {
return !!e && typeof e == "object";
}
-function pa(e) {
+function ma(e) {
var t = Object.prototype.toString.call(e);
- return t === "[object RegExp]" || t === "[object Date]" || va(e);
+ return t === "[object RegExp]" || t === "[object Date]" || ba(e);
}
-var ga = typeof Symbol == "function" && Symbol.for, ba = ga ? Symbol.for("react.element") : 60103;
-function va(e) {
- return e.$$typeof === ba;
+var pa = typeof Symbol == "function" && Symbol.for, ga = pa ? Symbol.for("react.element") : 60103;
+function ba(e) {
+ return e.$$typeof === ga;
}
-function ya(e) {
+function va(e) {
return Array.isArray(e) ? [] : {};
}
-function Pt(e, t) {
- return t.clone !== !1 && t.isMergeableObject(e) ? _t(ya(e), e, t) : e;
+function Ct(e, t) {
+ return t.clone !== !1 && t.isMergeableObject(e) ? ht(va(e), e, t) : e;
}
-function wa(e, t, n) {
+function ya(e, t, n) {
return e.concat(t).map(function(r) {
- return Pt(r, n);
+ return Ct(r, n);
});
}
-function Ea(e, t) {
+function wa(e, t) {
if (!t.customMerge)
- return _t;
+ return ht;
var n = t.customMerge(e);
- return typeof n == "function" ? n : _t;
+ return typeof n == "function" ? n : ht;
}
-function Sa(e) {
+function Ea(e) {
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function(t) {
return Object.propertyIsEnumerable.call(e, t);
}) : [];
}
-function Fr(e) {
- return Object.keys(e).concat(Sa(e));
+function xr(e) {
+ return Object.keys(e).concat(Ea(e));
}
-function Zi(e, t) {
+function Wi(e, t) {
try {
return t in e;
} catch {
return !1;
}
}
-function Ta(e, t) {
- return Zi(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t));
+function Sa(e, t) {
+ return Wi(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t));
}
-function Aa(e, t, n) {
+function Ta(e, t, n) {
var r = {};
- return n.isMergeableObject(e) && Fr(e).forEach(function(i) {
- r[i] = Pt(e[i], n);
- }), Fr(t).forEach(function(i) {
- Ta(e, i) || (Zi(e, i) && n.isMergeableObject(t[i]) ? r[i] = Ea(i, n)(e[i], t[i], n) : r[i] = Pt(t[i], n));
+ return n.isMergeableObject(e) && xr(e).forEach(function(i) {
+ r[i] = Ct(e[i], n);
+ }), xr(t).forEach(function(i) {
+ Sa(e, i) || (Wi(e, i) && n.isMergeableObject(t[i]) ? r[i] = wa(i, n)(e[i], t[i], n) : r[i] = Ct(t[i], n));
}), r;
}
-function _t(e, t, n) {
- n = n || {}, n.arrayMerge = n.arrayMerge || wa, n.isMergeableObject = n.isMergeableObject || da, n.cloneUnlessOtherwiseSpecified = Pt;
+function ht(e, t, n) {
+ n = n || {}, n.arrayMerge = n.arrayMerge || ya, n.isMergeableObject = n.isMergeableObject || _a, n.cloneUnlessOtherwiseSpecified = Ct;
var r = Array.isArray(t), i = Array.isArray(e), s = r === i;
- return s ? r ? n.arrayMerge(e, t, n) : Aa(e, t, n) : Pt(t, n);
+ return s ? r ? n.arrayMerge(e, t, n) : Ta(e, t, n) : Ct(t, n);
}
-_t.all = function(t, n) {
+ht.all = function(t, n) {
if (!Array.isArray(t))
throw new Error("first argument should be an array");
return t.reduce(function(r, i) {
- return _t(r, i, n);
+ return ht(r, i, n);
}, {});
};
-var Ba = _t, Ha = Ba;
-const ka = /* @__PURE__ */ _a(Ha);
-var Vn = function(e, t) {
- return Vn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
+var Aa = ht, Ba = Aa;
+const Ha = /* @__PURE__ */ ha(Ba);
+var jn = function(e, t) {
+ return jn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
n.__proto__ = r;
} || function(n, r) {
for (var i in r)
Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
- }, Vn(e, t);
+ }, jn(e, t);
};
-function rn(e, t) {
+function nn(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
- Vn(e, t);
+ jn(e, t);
function n() {
this.constructor = e;
}
@@ -3023,7 +3023,7 @@ var R = function() {
return t;
}, R.apply(this, arguments);
};
-function An(e, t, n) {
+function Tn(e, t, n) {
if (n || arguments.length === 2)
for (var r = 0, i = t.length, s; r < i; r++)
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
@@ -3037,47 +3037,47 @@ var F;
(function(e) {
e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
})(F || (F = {}));
-var dt;
+var _t;
(function(e) {
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
-})(dt || (dt = {}));
-function Gr(e) {
+})(_t || (_t = {}));
+function Fr(e) {
return e.type === F.literal;
}
-function Ca(e) {
+function ka(e) {
return e.type === F.argument;
}
-function Ji(e) {
+function Zi(e) {
return e.type === F.number;
}
-function Qi(e) {
+function Ji(e) {
return e.type === F.date;
}
-function Yi(e) {
+function Qi(e) {
return e.type === F.time;
}
-function Ki(e) {
+function Yi(e) {
return e.type === F.select;
}
-function $i(e) {
+function Ki(e) {
return e.type === F.plural;
}
-function Pa(e) {
+function Ca(e) {
return e.type === F.pound;
}
-function es(e) {
+function $i(e) {
return e.type === F.tag;
}
-function ts(e) {
- return !!(e && typeof e == "object" && e.type === dt.number);
+function es(e) {
+ return !!(e && typeof e == "object" && e.type === _t.number);
}
-function zn(e) {
- return !!(e && typeof e == "object" && e.type === dt.dateTime);
+function Vn(e) {
+ return !!(e && typeof e == "object" && e.type === _t.dateTime);
}
-var ns = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, Na = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
-function Ia(e) {
+var ts = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, Pa = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
+function Na(e) {
var t = {};
- return e.replace(Na, function(n) {
+ return e.replace(Pa, function(n) {
var r = n.length;
switch (n[0]) {
case "G":
@@ -3166,36 +3166,36 @@ function Ia(e) {
return "";
}), t;
}
-var La = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
-function Oa(e) {
+var Ia = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
+function La(e) {
if (e.length === 0)
throw new Error("Number skeleton cannot be empty");
- for (var t = e.split(La).filter(function(h) {
- return h.length > 0;
+ for (var t = e.split(Ia).filter(function(_) {
+ return _.length > 0;
}), n = [], r = 0, i = t; r < i.length; r++) {
var s = i[r], l = s.split("/");
if (l.length === 0)
throw new Error("Invalid number skeleton");
- for (var a = l[0], o = l.slice(1), u = 0, f = o; u < f.length; u++) {
- var c = f[u];
+ for (var u = l[0], o = l.slice(1), a = 0, f = o; a < f.length; a++) {
+ var c = f[a];
if (c.length === 0)
throw new Error("Invalid number skeleton");
}
- n.push({ stem: a, options: o });
+ n.push({ stem: u, options: o });
}
return n;
}
-function Ma(e) {
+function Oa(e) {
return e.replace(/^(.*?)-/, "");
}
-var qr = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, rs = /^(@+)?(\+|#+)?[rs]?$/g, Da = /(\*)(0+)|(#+)(0+)|(0+)/g, is = /^(0+)$/;
-function jr(e) {
+var Gr = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, ns = /^(@+)?(\+|#+)?[rs]?$/g, Ma = /(\*)(0+)|(#+)(0+)|(0+)/g, rs = /^(0+)$/;
+function qr(e) {
var t = {};
- return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(rs, function(n, r, i) {
+ return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(ns, function(n, r, i) {
return typeof i != "string" ? (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length) : i === "+" ? t.minimumSignificantDigits = r.length : r[0] === "#" ? t.maximumSignificantDigits = r.length : (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length + (typeof i == "string" ? i.length : 0)), "";
}), t;
}
-function ss(e) {
+function is(e) {
switch (e) {
case "sign-auto":
return {
@@ -3235,7 +3235,7 @@ function ss(e) {
};
}
}
-function Ra(e) {
+function Da(e) {
var t;
if (e[0] === "E" && e[1] === "E" ? (t = {
notation: "engineering"
@@ -3243,17 +3243,17 @@ function Ra(e) {
notation: "scientific"
}, e = e.slice(1)), t) {
var n = e.slice(0, 2);
- if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !is.test(e))
+ if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !rs.test(e))
throw new Error("Malformed concise eng/scientific notation");
t.minimumIntegerDigits = e.length;
}
return t;
}
-function Vr(e) {
- var t = {}, n = ss(e);
+function jr(e) {
+ var t = {}, n = is(e);
return n || t;
}
-function Ua(e) {
+function Ra(e) {
for (var t = {}, n = 0, r = e; n < r.length; n++) {
var i = r[n];
switch (i.stem) {
@@ -3277,7 +3277,7 @@ function Ua(e) {
continue;
case "measure-unit":
case "unit":
- t.style = "unit", t.unit = Ma(i.options[0]);
+ t.style = "unit", t.unit = Oa(i.options[0]);
continue;
case "compact-short":
case "K":
@@ -3288,13 +3288,13 @@ function Ua(e) {
t.notation = "compact", t.compactDisplay = "long";
continue;
case "scientific":
- t = R(R(R({}, t), { notation: "scientific" }), i.options.reduce(function(o, u) {
- return R(R({}, o), Vr(u));
+ t = R(R(R({}, t), { notation: "scientific" }), i.options.reduce(function(o, a) {
+ return R(R({}, o), jr(a));
}, {}));
continue;
case "engineering":
- t = R(R(R({}, t), { notation: "engineering" }), i.options.reduce(function(o, u) {
- return R(R({}, o), Vr(u));
+ t = R(R(R({}, t), { notation: "engineering" }), i.options.reduce(function(o, a) {
+ return R(R({}, o), jr(a));
}, {}));
continue;
case "notation-simple":
@@ -3318,45 +3318,45 @@ function Ua(e) {
case "integer-width":
if (i.options.length > 1)
throw new RangeError("integer-width stems only accept a single optional option");
- i.options[0].replace(Da, function(o, u, f, c, h, _) {
- if (u)
+ i.options[0].replace(Ma, function(o, a, f, c, _, h) {
+ if (a)
t.minimumIntegerDigits = f.length;
else {
- if (c && h)
+ if (c && _)
throw new Error("We currently do not support maximum integer digits");
- if (_)
+ if (h)
throw new Error("We currently do not support exact integer digits");
}
return "";
});
continue;
}
- if (is.test(i.stem)) {
+ if (rs.test(i.stem)) {
t.minimumIntegerDigits = i.stem.length;
continue;
}
- if (qr.test(i.stem)) {
+ if (Gr.test(i.stem)) {
if (i.options.length > 1)
throw new RangeError("Fraction-precision stems only accept a single optional option");
- i.stem.replace(qr, function(o, u, f, c, h, _) {
- return f === "*" ? t.minimumFractionDigits = u.length : c && c[0] === "#" ? t.maximumFractionDigits = c.length : h && _ ? (t.minimumFractionDigits = h.length, t.maximumFractionDigits = h.length + _.length) : (t.minimumFractionDigits = u.length, t.maximumFractionDigits = u.length), "";
+ i.stem.replace(Gr, function(o, a, f, c, _, h) {
+ return f === "*" ? t.minimumFractionDigits = a.length : c && c[0] === "#" ? t.maximumFractionDigits = c.length : _ && h ? (t.minimumFractionDigits = _.length, t.maximumFractionDigits = _.length + h.length) : (t.minimumFractionDigits = a.length, t.maximumFractionDigits = a.length), "";
});
var s = i.options[0];
- s === "w" ? t = R(R({}, t), { trailingZeroDisplay: "stripIfInteger" }) : s && (t = R(R({}, t), jr(s)));
+ s === "w" ? t = R(R({}, t), { trailingZeroDisplay: "stripIfInteger" }) : s && (t = R(R({}, t), qr(s)));
continue;
}
- if (rs.test(i.stem)) {
- t = R(R({}, t), jr(i.stem));
+ if (ns.test(i.stem)) {
+ t = R(R({}, t), qr(i.stem));
continue;
}
- var l = ss(i.stem);
+ var l = is(i.stem);
l && (t = R(R({}, t), l));
- var a = Ra(i.stem);
- a && (t = R(R({}, t), a));
+ var u = Da(i.stem);
+ u && (t = R(R({}, t), u));
}
return t;
}
-var Gt = {
+var jt = {
AX: [
"H"
],
@@ -4693,23 +4693,23 @@ var Gt = {
"h"
]
};
-function xa(e, t) {
+function Ua(e, t) {
for (var n = "", r = 0; r < e.length; r++) {
var i = e.charAt(r);
if (i === "j") {
for (var s = 0; r + 1 < e.length && e.charAt(r + 1) === i; )
s++, r++;
- var l = 1 + (s & 1), a = s < 2 ? 1 : 3 + (s >> 1), o = "a", u = Fa(t);
- for ((u == "H" || u == "k") && (a = 0); a-- > 0; )
+ var l = 1 + (s & 1), u = s < 2 ? 1 : 3 + (s >> 1), o = "a", a = xa(t);
+ for ((a == "H" || a == "k") && (u = 0); u-- > 0; )
n += o;
for (; l-- > 0; )
- n = u + n;
+ n = a + n;
} else
i === "J" ? n += "H" : n += i;
}
return n;
}
-function Fa(e) {
+function xa(e) {
var t = e.hourCycle;
if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
e.hourCycles && // @ts-ignore
@@ -4728,23 +4728,23 @@ function Fa(e) {
}
var n = e.language, r;
n !== "root" && (r = e.maximize().region);
- var i = Gt[r || ""] || Gt[n || ""] || Gt["".concat(n, "-001")] || Gt["001"];
+ var i = jt[r || ""] || jt[n || ""] || jt["".concat(n, "-001")] || jt["001"];
return i[0];
}
-var Bn, Ga = new RegExp("^".concat(ns.source, "*")), qa = new RegExp("".concat(ns.source, "*$"));
+var An, Fa = new RegExp("^".concat(ts.source, "*")), Ga = new RegExp("".concat(ts.source, "*$"));
function L(e, t) {
return { start: e, end: t };
}
-var ja = !!String.prototype.startsWith, Va = !!String.fromCodePoint, za = !!Object.fromEntries, Xa = !!String.prototype.codePointAt, Wa = !!String.prototype.trimStart, Za = !!String.prototype.trimEnd, Ja = !!Number.isSafeInteger, Qa = Ja ? Number.isSafeInteger : function(e) {
+var qa = !!String.prototype.startsWith, ja = !!String.fromCodePoint, Va = !!Object.fromEntries, za = !!String.prototype.codePointAt, Xa = !!String.prototype.trimStart, Wa = !!String.prototype.trimEnd, Za = !!Number.isSafeInteger, Ja = Za ? Number.isSafeInteger : function(e) {
return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
-}, Xn = !0;
+}, zn = !0;
try {
- var Ya = os("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
- Xn = ((Bn = Ya.exec("a")) === null || Bn === void 0 ? void 0 : Bn[0]) === "a";
+ var Qa = ls("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
+ zn = ((An = Qa.exec("a")) === null || An === void 0 ? void 0 : An[0]) === "a";
} catch {
- Xn = !1;
+ zn = !1;
}
-var zr = ja ? (
+var Vr = qa ? (
// Native
function(t, n, r) {
return t.startsWith(n, r);
@@ -4754,7 +4754,7 @@ var zr = ja ? (
function(t, n, r) {
return t.slice(r, r + n.length) === n;
}
-), Wn = Va ? String.fromCodePoint : (
+), Xn = ja ? String.fromCodePoint : (
// IE11
function() {
for (var t = [], n = 0; n < arguments.length; n++)
@@ -4766,19 +4766,19 @@ var zr = ja ? (
}
return r;
}
-), Xr = (
+), zr = (
// native
- za ? Object.fromEntries : (
+ Va ? Object.fromEntries : (
// Ponyfill
function(t) {
for (var n = {}, r = 0, i = t; r < i.length; r++) {
- var s = i[r], l = s[0], a = s[1];
- n[l] = a;
+ var s = i[r], l = s[0], u = s[1];
+ n[l] = u;
}
return n;
}
)
-), ls = Xa ? (
+), ss = za ? (
// Native
function(t, n) {
return t.codePointAt(n);
@@ -4792,7 +4792,7 @@ var zr = ja ? (
return i < 55296 || i > 56319 || n + 1 === r || (s = t.charCodeAt(n + 1)) < 56320 || s > 57343 ? i : (i - 55296 << 10) + (s - 56320) + 65536;
}
}
-), Ka = Wa ? (
+), Ya = Xa ? (
// Native
function(t) {
return t.trimStart();
@@ -4800,9 +4800,9 @@ var zr = ja ? (
) : (
// Ponyfill
function(t) {
- return t.replace(Ga, "");
+ return t.replace(Fa, "");
}
-), $a = Za ? (
+), Ka = Wa ? (
// Native
function(t) {
return t.trimEnd();
@@ -4810,32 +4810,32 @@ var zr = ja ? (
) : (
// Ponyfill
function(t) {
- return t.replace(qa, "");
+ return t.replace(Ga, "");
}
);
-function os(e, t) {
+function ls(e, t) {
return new RegExp(e, t);
}
-var Zn;
-if (Xn) {
- var Wr = os("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
- Zn = function(t, n) {
+var Wn;
+if (zn) {
+ var Xr = ls("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
+ Wn = function(t, n) {
var r;
- Wr.lastIndex = n;
- var i = Wr.exec(t);
+ Xr.lastIndex = n;
+ var i = Xr.exec(t);
return (r = i[1]) !== null && r !== void 0 ? r : "";
};
} else
- Zn = function(t, n) {
+ Wn = function(t, n) {
for (var r = []; ; ) {
- var i = ls(t, n);
- if (i === void 0 || as(i) || ru(i))
+ var i = ss(t, n);
+ if (i === void 0 || os(i) || nu(i))
break;
r.push(i), n += i >= 65536 ? 2 : 1;
}
- return Wn.apply(void 0, r);
+ return Xn.apply(void 0, r);
};
-var eu = (
+var $a = (
/** @class */
function() {
function e(t, n) {
@@ -4857,16 +4857,16 @@ var eu = (
if (s === 125 && t > 0)
break;
if (s === 35 && (n === "plural" || n === "selectordinal")) {
- var a = this.clonePosition();
+ var u = this.clonePosition();
this.bump(), i.push({
type: F.pound,
- location: L(a, this.clonePosition())
+ location: L(u, this.clonePosition())
});
} else if (s === 60 && !this.ignoreTag && this.peek() === 47) {
if (r)
break;
return this.error(I.UNMATCHED_CLOSING_TAG, L(this.clonePosition(), this.clonePosition()));
- } else if (s === 60 && !this.ignoreTag && Jn(this.peek() || 0)) {
+ } else if (s === 60 && !this.ignoreTag && Zn(this.peek() || 0)) {
var l = this.parseTag(t, n);
if (l.err)
return l;
@@ -4897,12 +4897,12 @@ var eu = (
var s = this.parseMessage(t + 1, n, !0);
if (s.err)
return s;
- var l = s.val, a = this.clonePosition();
+ var l = s.val, u = this.clonePosition();
if (this.bumpIf("")) {
- if (this.isEOF() || !Jn(this.char()))
- return this.error(I.INVALID_TAG, L(a, this.clonePosition()));
- var o = this.clonePosition(), u = this.parseTagName();
- return i !== u ? this.error(I.UNMATCHED_CLOSING_TAG, L(o, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
+ if (this.isEOF() || !Zn(this.char()))
+ return this.error(I.INVALID_TAG, L(u, this.clonePosition()));
+ var o = this.clonePosition(), a = this.parseTagName();
+ return i !== a ? this.error(I.UNMATCHED_CLOSING_TAG, L(o, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
val: {
type: F.tag,
value: i,
@@ -4910,14 +4910,14 @@ var eu = (
location: L(r, this.clonePosition())
},
err: null
- } : this.error(I.INVALID_TAG, L(a, this.clonePosition())));
+ } : this.error(I.INVALID_TAG, L(u, this.clonePosition())));
} else
return this.error(I.UNCLOSED_TAG, L(r, this.clonePosition()));
} else
return this.error(I.INVALID_TAG, L(r, this.clonePosition()));
}, e.prototype.parseTagName = function() {
var t = this.offset();
- for (this.bump(); !this.isEOF() && nu(this.char()); )
+ for (this.bump(); !this.isEOF() && tu(this.char()); )
this.bump();
return this.message.slice(t, this.offset());
}, e.prototype.parseLiteral = function(t, n) {
@@ -4932,9 +4932,9 @@ var eu = (
i += l;
continue;
}
- var a = this.tryParseLeftAngleBracket();
- if (a) {
- i += a;
+ var u = this.tryParseLeftAngleBracket();
+ if (u) {
+ i += u;
continue;
}
break;
@@ -4946,7 +4946,7 @@ var eu = (
};
}, e.prototype.tryParseLeftAngleBracket = function() {
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
- !tu(this.peek() || 0)) ? (this.bump(), "<") : null;
+ !eu(this.peek() || 0)) ? (this.bump(), "<") : null;
}, e.prototype.tryParseQuote = function(t) {
if (this.isEOF() || this.char() !== 39)
return null;
@@ -4980,12 +4980,12 @@ var eu = (
n.push(r);
this.bump();
}
- return Wn.apply(void 0, n);
+ return Xn.apply(void 0, n);
}, e.prototype.tryParseUnquoted = function(t, n) {
if (this.isEOF())
return null;
var r = this.char();
- return r === 60 || r === 123 || r === 35 && (n === "plural" || n === "selectordinal") || r === 125 && t > 0 ? null : (this.bump(), Wn(r));
+ return r === 60 || r === 123 || r === 35 && (n === "plural" || n === "selectordinal") || r === 125 && t > 0 ? null : (this.bump(), Xn(r));
}, e.prototype.parseArgument = function(t, n) {
var r = this.clonePosition();
if (this.bump(), this.bumpSpace(), this.isEOF())
@@ -5014,66 +5014,66 @@ var eu = (
return this.error(I.MALFORMED_ARGUMENT, L(r, this.clonePosition()));
}
}, e.prototype.parseIdentifierIfPossible = function() {
- var t = this.clonePosition(), n = this.offset(), r = Zn(this.message, n), i = n + r.length;
+ var t = this.clonePosition(), n = this.offset(), r = Wn(this.message, n), i = n + r.length;
this.bumpTo(i);
var s = this.clonePosition(), l = L(t, s);
return { value: r, location: l };
}, e.prototype.parseArgumentOptions = function(t, n, r, i) {
- var s, l = this.clonePosition(), a = this.parseIdentifierIfPossible().value, o = this.clonePosition();
- switch (a) {
+ var s, l = this.clonePosition(), u = this.parseIdentifierIfPossible().value, o = this.clonePosition();
+ switch (u) {
case "":
return this.error(I.EXPECT_ARGUMENT_TYPE, L(l, o));
case "number":
case "date":
case "time": {
this.bumpSpace();
- var u = null;
+ var a = null;
if (this.bumpIf(",")) {
this.bumpSpace();
var f = this.clonePosition(), c = this.parseSimpleArgStyleIfPossible();
if (c.err)
return c;
- var h = $a(c.val);
- if (h.length === 0)
+ var _ = Ka(c.val);
+ if (_.length === 0)
return this.error(I.EXPECT_ARGUMENT_STYLE, L(this.clonePosition(), this.clonePosition()));
- var _ = L(f, this.clonePosition());
- u = { style: h, styleLocation: _ };
+ var h = L(f, this.clonePosition());
+ a = { style: _, styleLocation: h };
}
var d = this.tryParseArgumentClose(i);
if (d.err)
return d;
- var p = L(i, this.clonePosition());
- if (u && zr(u == null ? void 0 : u.style, "::", 0)) {
- var y = Ka(u.style.slice(2));
- if (a === "number") {
- var c = this.parseNumberSkeletonFromString(y, u.styleLocation);
+ var b = L(i, this.clonePosition());
+ if (a && Vr(a == null ? void 0 : a.style, "::", 0)) {
+ var y = Ya(a.style.slice(2));
+ if (u === "number") {
+ var c = this.parseNumberSkeletonFromString(y, a.styleLocation);
return c.err ? c : {
- val: { type: F.number, value: r, location: p, style: c.val },
+ val: { type: F.number, value: r, location: b, style: c.val },
err: null
};
} else {
if (y.length === 0)
- return this.error(I.EXPECT_DATE_TIME_SKELETON, p);
+ return this.error(I.EXPECT_DATE_TIME_SKELETON, b);
var v = y;
- this.locale && (v = xa(y, this.locale));
- var h = {
- type: dt.dateTime,
+ this.locale && (v = Ua(y, this.locale));
+ var _ = {
+ type: _t.dateTime,
pattern: v,
- location: u.styleLocation,
- parsedOptions: this.shouldParseSkeletons ? Ia(v) : {}
- }, E = a === "date" ? F.date : F.time;
+ location: a.styleLocation,
+ parsedOptions: this.shouldParseSkeletons ? Na(v) : {}
+ }, S = u === "date" ? F.date : F.time;
return {
- val: { type: E, value: r, location: p, style: h },
+ val: { type: S, value: r, location: b, style: _ },
err: null
};
}
}
return {
val: {
- type: a === "number" ? F.number : a === "date" ? F.date : F.time,
+ type: u === "number" ? F.number : u === "date" ? F.date : F.time,
value: r,
- location: p,
- style: (s = u == null ? void 0 : u.style) !== null && s !== void 0 ? s : null
+ location: b,
+ style: (s = a == null ? void 0 : a.style) !== null && s !== void 0 ? s : null
},
err: null
};
@@ -5081,12 +5081,12 @@ var eu = (
case "plural":
case "selectordinal":
case "select": {
- var g = this.clonePosition();
+ var p = this.clonePosition();
if (this.bumpSpace(), !this.bumpIf(","))
- return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS, L(g, R({}, g)));
+ return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS, L(p, R({}, p)));
this.bumpSpace();
var A = this.parseIdentifierIfPossible(), T = 0;
- if (a !== "select" && A.value === "offset") {
+ if (u !== "select" && A.value === "offset") {
if (!this.bumpIf(":"))
return this.error(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, L(this.clonePosition(), this.clonePosition()));
this.bumpSpace();
@@ -5095,18 +5095,18 @@ var eu = (
return c;
this.bumpSpace(), A = this.parseIdentifierIfPossible(), T = c.val;
}
- var w = this.tryParsePluralOrSelectOptions(t, a, n, A);
+ var w = this.tryParsePluralOrSelectOptions(t, u, n, A);
if (w.err)
return w;
var d = this.tryParseArgumentClose(i);
if (d.err)
return d;
var j = L(i, this.clonePosition());
- return a === "select" ? {
+ return u === "select" ? {
val: {
type: F.select,
value: r,
- options: Xr(w.val),
+ options: zr(w.val),
location: j
},
err: null
@@ -5114,9 +5114,9 @@ var eu = (
val: {
type: F.plural,
value: r,
- options: Xr(w.val),
+ options: zr(w.val),
offset: T,
- pluralType: a === "plural" ? "cardinal" : "ordinal",
+ pluralType: u === "plural" ? "cardinal" : "ordinal",
location: j
},
err: null
@@ -5165,64 +5165,64 @@ var eu = (
}, e.prototype.parseNumberSkeletonFromString = function(t, n) {
var r = [];
try {
- r = Oa(t);
+ r = La(t);
} catch {
return this.error(I.INVALID_NUMBER_SKELETON, n);
}
return {
val: {
- type: dt.number,
+ type: _t.number,
tokens: r,
location: n,
- parsedOptions: this.shouldParseSkeletons ? Ua(r) : {}
+ parsedOptions: this.shouldParseSkeletons ? Ra(r) : {}
},
err: null
};
}, e.prototype.tryParsePluralOrSelectOptions = function(t, n, r, i) {
- for (var s, l = !1, a = [], o = /* @__PURE__ */ new Set(), u = i.value, f = i.location; ; ) {
- if (u.length === 0) {
+ for (var s, l = !1, u = [], o = /* @__PURE__ */ new Set(), a = i.value, f = i.location; ; ) {
+ if (a.length === 0) {
var c = this.clonePosition();
if (n !== "select" && this.bumpIf("=")) {
- var h = this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR, I.INVALID_PLURAL_ARGUMENT_SELECTOR);
- if (h.err)
- return h;
- f = L(c, this.clonePosition()), u = this.message.slice(c.offset, this.offset());
+ var _ = this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR, I.INVALID_PLURAL_ARGUMENT_SELECTOR);
+ if (_.err)
+ return _;
+ f = L(c, this.clonePosition()), a = this.message.slice(c.offset, this.offset());
} else
break;
}
- if (o.has(u))
+ if (o.has(a))
return this.error(n === "select" ? I.DUPLICATE_SELECT_ARGUMENT_SELECTOR : I.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f);
- u === "other" && (l = !0), this.bumpSpace();
- var _ = this.clonePosition();
+ a === "other" && (l = !0), this.bumpSpace();
+ var h = this.clonePosition();
if (!this.bumpIf("{"))
return this.error(n === "select" ? I.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : I.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, L(this.clonePosition(), this.clonePosition()));
var d = this.parseMessage(t + 1, n, r);
if (d.err)
return d;
- var p = this.tryParseArgumentClose(_);
- if (p.err)
- return p;
- a.push([
- u,
+ var b = this.tryParseArgumentClose(h);
+ if (b.err)
+ return b;
+ u.push([
+ a,
{
value: d.val,
- location: L(_, this.clonePosition())
+ location: L(h, this.clonePosition())
}
- ]), o.add(u), this.bumpSpace(), s = this.parseIdentifierIfPossible(), u = s.value, f = s.location;
+ ]), o.add(a), this.bumpSpace(), s = this.parseIdentifierIfPossible(), a = s.value, f = s.location;
}
- return a.length === 0 ? this.error(n === "select" ? I.EXPECT_SELECT_ARGUMENT_SELECTOR : I.EXPECT_PLURAL_ARGUMENT_SELECTOR, L(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !l ? this.error(I.MISSING_OTHER_CLAUSE, L(this.clonePosition(), this.clonePosition())) : { val: a, err: null };
+ return u.length === 0 ? this.error(n === "select" ? I.EXPECT_SELECT_ARGUMENT_SELECTOR : I.EXPECT_PLURAL_ARGUMENT_SELECTOR, L(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !l ? this.error(I.MISSING_OTHER_CLAUSE, L(this.clonePosition(), this.clonePosition())) : { val: u, err: null };
}, e.prototype.tryParseDecimalInteger = function(t, n) {
var r = 1, i = this.clonePosition();
this.bumpIf("+") || this.bumpIf("-") && (r = -1);
for (var s = !1, l = 0; !this.isEOF(); ) {
- var a = this.char();
- if (a >= 48 && a <= 57)
- s = !0, l = l * 10 + (a - 48), this.bump();
+ var u = this.char();
+ if (u >= 48 && u <= 57)
+ s = !0, l = l * 10 + (u - 48), this.bump();
else
break;
}
var o = L(i, this.clonePosition());
- return s ? (l *= r, Qa(l) ? { val: l, err: null } : this.error(n, o)) : this.error(t, o);
+ return s ? (l *= r, Ja(l) ? { val: l, err: null } : this.error(n, o)) : this.error(t, o);
}, e.prototype.offset = function() {
return this.position.offset;
}, e.prototype.isEOF = function() {
@@ -5237,7 +5237,7 @@ var eu = (
var t = this.position.offset;
if (t >= this.message.length)
throw Error("out of bound");
- var n = ls(this.message, t);
+ var n = ss(this.message, t);
if (n === void 0)
throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
return n;
@@ -5256,7 +5256,7 @@ var eu = (
t === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2);
}
}, e.prototype.bumpIf = function(t) {
- if (zr(this.message, t, this.offset())) {
+ if (Vr(this.message, t, this.offset())) {
for (var n = 0; n < t.length; n++)
this.bump();
return !0;
@@ -5278,7 +5278,7 @@ var eu = (
break;
}
}, e.prototype.bumpSpace = function() {
- for (; !this.isEOF() && as(this.char()); )
+ for (; !this.isEOF() && os(this.char()); )
this.bump();
}, e.prototype.peek = function() {
if (this.isEOF())
@@ -5288,97 +5288,97 @@ var eu = (
}, e;
}()
);
-function Jn(e) {
+function Zn(e) {
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
}
-function tu(e) {
- return Jn(e) || e === 47;
+function eu(e) {
+ return Zn(e) || e === 47;
}
-function nu(e) {
+function tu(e) {
return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
}
-function as(e) {
+function os(e) {
return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
}
-function ru(e) {
+function nu(e) {
return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
}
-function Qn(e) {
+function Jn(e) {
e.forEach(function(t) {
- if (delete t.location, Ki(t) || $i(t))
+ if (delete t.location, Yi(t) || Ki(t))
for (var n in t.options)
- delete t.options[n].location, Qn(t.options[n].value);
+ delete t.options[n].location, Jn(t.options[n].value);
else
- Ji(t) && ts(t.style) || (Qi(t) || Yi(t)) && zn(t.style) ? delete t.style.location : es(t) && Qn(t.children);
+ Zi(t) && es(t.style) || (Ji(t) || Qi(t)) && Vn(t.style) ? delete t.style.location : $i(t) && Jn(t.children);
});
}
-function iu(e, t) {
+function ru(e, t) {
t === void 0 && (t = {}), t = R({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
- var n = new eu(e, t).parse();
+ var n = new $a(e, t).parse();
if (n.err) {
var r = SyntaxError(I[n.err.kind]);
throw r.location = n.err.location, r.originalMessage = n.err.message, r;
}
- return t != null && t.captureLocation || Qn(n.val), n.val;
+ return t != null && t.captureLocation || Jn(n.val), n.val;
}
-function Hn(e, t) {
- var n = t && t.cache ? t.cache : fu, r = t && t.serializer ? t.serializer : uu, i = t && t.strategy ? t.strategy : lu;
+function Bn(e, t) {
+ var n = t && t.cache ? t.cache : uu, r = t && t.serializer ? t.serializer : au, i = t && t.strategy ? t.strategy : su;
return i(e, {
cache: n,
serializer: r
});
}
-function su(e) {
+function iu(e) {
return e == null || typeof e == "number" || typeof e == "boolean";
}
-function us(e, t, n, r) {
- var i = su(r) ? r : n(r), s = t.get(i);
+function as(e, t, n, r) {
+ var i = iu(r) ? r : n(r), s = t.get(i);
return typeof s > "u" && (s = e.call(this, r), t.set(i, s)), s;
}
-function fs(e, t, n) {
+function us(e, t, n) {
var r = Array.prototype.slice.call(arguments, 3), i = n(r), s = t.get(i);
return typeof s > "u" && (s = e.apply(this, r), t.set(i, s)), s;
}
-function cr(e, t, n, r, i) {
+function ur(e, t, n, r, i) {
return n.bind(t, e, r, i);
}
+function su(e, t) {
+ var n = e.length === 1 ? as : us;
+ return ur(e, this, n, t.cache.create(), t.serializer);
+}
function lu(e, t) {
- var n = e.length === 1 ? us : fs;
- return cr(e, this, n, t.cache.create(), t.serializer);
+ return ur(e, this, us, t.cache.create(), t.serializer);
}
function ou(e, t) {
- return cr(e, this, fs, t.cache.create(), t.serializer);
+ return ur(e, this, as, t.cache.create(), t.serializer);
}
-function au(e, t) {
- return cr(e, this, us, t.cache.create(), t.serializer);
-}
-var uu = function() {
+var au = function() {
return JSON.stringify(arguments);
};
-function hr() {
+function fr() {
this.cache = /* @__PURE__ */ Object.create(null);
}
-hr.prototype.get = function(e) {
+fr.prototype.get = function(e) {
return this.cache[e];
};
-hr.prototype.set = function(e, t) {
+fr.prototype.set = function(e, t) {
this.cache[e] = t;
};
-var fu = {
+var uu = {
create: function() {
- return new hr();
+ return new fr();
}
-}, kn = {
- variadic: ou,
- monadic: au
-}, mt;
+}, Hn = {
+ variadic: lu,
+ monadic: ou
+}, dt;
(function(e) {
e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
-})(mt || (mt = {}));
-var sn = (
+})(dt || (dt = {}));
+var rn = (
/** @class */
function(e) {
- rn(t, e);
+ nn(t, e);
function t(n, r, i) {
var s = e.call(this, n) || this;
return s.code = r, s.originalMessage = i, s;
@@ -5387,65 +5387,65 @@ var sn = (
return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
}, t;
}(Error)
-), Zr = (
+), Wr = (
/** @class */
function(e) {
- rn(t, e);
+ nn(t, e);
function t(n, r, i, s) {
- return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(i).join('", "'), '"'), mt.INVALID_VALUE, s) || this;
+ return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(i).join('", "'), '"'), dt.INVALID_VALUE, s) || this;
}
return t;
- }(sn)
-), cu = (
+ }(rn)
+), fu = (
/** @class */
function(e) {
- rn(t, e);
+ nn(t, e);
function t(n, r, i) {
- return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), mt.INVALID_VALUE, i) || this;
+ return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), dt.INVALID_VALUE, i) || this;
}
return t;
- }(sn)
-), hu = (
+ }(rn)
+), cu = (
/** @class */
function(e) {
- rn(t, e);
+ nn(t, e);
function t(n, r) {
- return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), mt.MISSING_VALUE, r) || this;
+ return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), dt.MISSING_VALUE, r) || this;
}
return t;
- }(sn)
+ }(rn)
), ee;
(function(e) {
e[e.literal = 0] = "literal", e[e.object = 1] = "object";
})(ee || (ee = {}));
-function _u(e) {
+function hu(e) {
return e.length < 2 ? e : e.reduce(function(t, n) {
var r = t[t.length - 1];
return !r || r.type !== ee.literal || n.type !== ee.literal ? t.push(n) : r.value += n.value, t;
}, []);
}
-function du(e) {
+function _u(e) {
return typeof e == "function";
}
-function Xt(e, t, n, r, i, s, l) {
- if (e.length === 1 && Gr(e[0]))
+function Zt(e, t, n, r, i, s, l) {
+ if (e.length === 1 && Fr(e[0]))
return [
{
type: ee.literal,
value: e[0].value
}
];
- for (var a = [], o = 0, u = e; o < u.length; o++) {
- var f = u[o];
- if (Gr(f)) {
- a.push({
+ for (var u = [], o = 0, a = e; o < a.length; o++) {
+ var f = a[o];
+ if (Fr(f)) {
+ u.push({
type: ee.literal,
value: f.value
});
continue;
}
- if (Pa(f)) {
- typeof s == "number" && a.push({
+ if (Ca(f)) {
+ typeof s == "number" && u.push({
type: ee.literal,
value: n.getNumberFormat(t).format(s)
});
@@ -5453,89 +5453,89 @@ function Xt(e, t, n, r, i, s, l) {
}
var c = f.value;
if (!(i && c in i))
- throw new hu(c, l);
- var h = i[c];
- if (Ca(f)) {
- (!h || typeof h == "string" || typeof h == "number") && (h = typeof h == "string" || typeof h == "number" ? String(h) : ""), a.push({
- type: typeof h == "string" ? ee.literal : ee.object,
- value: h
+ throw new cu(c, l);
+ var _ = i[c];
+ if (ka(f)) {
+ (!_ || typeof _ == "string" || typeof _ == "number") && (_ = typeof _ == "string" || typeof _ == "number" ? String(_) : ""), u.push({
+ type: typeof _ == "string" ? ee.literal : ee.object,
+ value: _
});
continue;
}
- if (Qi(f)) {
- var _ = typeof f.style == "string" ? r.date[f.style] : zn(f.style) ? f.style.parsedOptions : void 0;
- a.push({
+ if (Ji(f)) {
+ var h = typeof f.style == "string" ? r.date[f.style] : Vn(f.style) ? f.style.parsedOptions : void 0;
+ u.push({
type: ee.literal,
- value: n.getDateTimeFormat(t, _).format(h)
+ value: n.getDateTimeFormat(t, h).format(_)
});
continue;
}
- if (Yi(f)) {
- var _ = typeof f.style == "string" ? r.time[f.style] : zn(f.style) ? f.style.parsedOptions : r.time.medium;
- a.push({
+ if (Qi(f)) {
+ var h = typeof f.style == "string" ? r.time[f.style] : Vn(f.style) ? f.style.parsedOptions : r.time.medium;
+ u.push({
type: ee.literal,
- value: n.getDateTimeFormat(t, _).format(h)
+ value: n.getDateTimeFormat(t, h).format(_)
});
continue;
}
- if (Ji(f)) {
- var _ = typeof f.style == "string" ? r.number[f.style] : ts(f.style) ? f.style.parsedOptions : void 0;
- _ && _.scale && (h = h * (_.scale || 1)), a.push({
+ if (Zi(f)) {
+ var h = typeof f.style == "string" ? r.number[f.style] : es(f.style) ? f.style.parsedOptions : void 0;
+ h && h.scale && (_ = _ * (h.scale || 1)), u.push({
type: ee.literal,
- value: n.getNumberFormat(t, _).format(h)
+ value: n.getNumberFormat(t, h).format(_)
});
continue;
}
- if (es(f)) {
- var d = f.children, p = f.value, y = i[p];
- if (!du(y))
- throw new cu(p, "function", l);
- var v = Xt(d, t, n, r, i, s), E = y(v.map(function(T) {
+ if ($i(f)) {
+ var d = f.children, b = f.value, y = i[b];
+ if (!_u(y))
+ throw new fu(b, "function", l);
+ var v = Zt(d, t, n, r, i, s), S = y(v.map(function(T) {
return T.value;
}));
- Array.isArray(E) || (E = [E]), a.push.apply(a, E.map(function(T) {
+ Array.isArray(S) || (S = [S]), u.push.apply(u, S.map(function(T) {
return {
type: typeof T == "string" ? ee.literal : ee.object,
value: T
};
}));
}
- if (Ki(f)) {
- var g = f.options[h] || f.options.other;
- if (!g)
- throw new Zr(f.value, h, Object.keys(f.options), l);
- a.push.apply(a, Xt(g.value, t, n, r, i));
+ if (Yi(f)) {
+ var p = f.options[_] || f.options.other;
+ if (!p)
+ throw new Wr(f.value, _, Object.keys(f.options), l);
+ u.push.apply(u, Zt(p.value, t, n, r, i));
continue;
}
- if ($i(f)) {
- var g = f.options["=".concat(h)];
- if (!g) {
+ if (Ki(f)) {
+ var p = f.options["=".concat(_)];
+ if (!p) {
if (!Intl.PluralRules)
- throw new sn(`Intl.PluralRules is not available in this environment.
+ throw new rn(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
-`, mt.MISSING_INTL_API, l);
- var A = n.getPluralRules(t, { type: f.pluralType }).select(h - (f.offset || 0));
- g = f.options[A] || f.options.other;
+`, dt.MISSING_INTL_API, l);
+ var A = n.getPluralRules(t, { type: f.pluralType }).select(_ - (f.offset || 0));
+ p = f.options[A] || f.options.other;
}
- if (!g)
- throw new Zr(f.value, h, Object.keys(f.options), l);
- a.push.apply(a, Xt(g.value, t, n, r, i, h - (f.offset || 0)));
+ if (!p)
+ throw new Wr(f.value, _, Object.keys(f.options), l);
+ u.push.apply(u, Zt(p.value, t, n, r, i, _ - (f.offset || 0)));
continue;
}
}
- return _u(a);
+ return hu(u);
}
-function mu(e, t) {
+function du(e, t) {
return t ? R(R(R({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) {
return n[r] = R(R({}, e[r]), t[r] || {}), n;
}, {})) : e;
}
-function pu(e, t) {
+function mu(e, t) {
return t ? Object.keys(e).reduce(function(n, r) {
- return n[r] = mu(e[r], t[r]), n;
+ return n[r] = du(e[r], t[r]), n;
}, R({}, e)) : e;
}
-function Cn(e) {
+function kn(e) {
return {
create: function() {
return {
@@ -5549,39 +5549,39 @@ function Cn(e) {
}
};
}
-function gu(e) {
+function pu(e) {
return e === void 0 && (e = {
number: {},
dateTime: {},
pluralRules: {}
}), {
- getNumberFormat: Hn(function() {
+ getNumberFormat: Bn(function() {
for (var t, n = [], r = 0; r < arguments.length; r++)
n[r] = arguments[r];
- return new ((t = Intl.NumberFormat).bind.apply(t, An([void 0], n, !1)))();
+ return new ((t = Intl.NumberFormat).bind.apply(t, Tn([void 0], n, !1)))();
}, {
- cache: Cn(e.number),
- strategy: kn.variadic
+ cache: kn(e.number),
+ strategy: Hn.variadic
}),
- getDateTimeFormat: Hn(function() {
+ getDateTimeFormat: Bn(function() {
for (var t, n = [], r = 0; r < arguments.length; r++)
n[r] = arguments[r];
- return new ((t = Intl.DateTimeFormat).bind.apply(t, An([void 0], n, !1)))();
+ return new ((t = Intl.DateTimeFormat).bind.apply(t, Tn([void 0], n, !1)))();
}, {
- cache: Cn(e.dateTime),
- strategy: kn.variadic
+ cache: kn(e.dateTime),
+ strategy: Hn.variadic
}),
- getPluralRules: Hn(function() {
+ getPluralRules: Bn(function() {
for (var t, n = [], r = 0; r < arguments.length; r++)
n[r] = arguments[r];
- return new ((t = Intl.PluralRules).bind.apply(t, An([void 0], n, !1)))();
+ return new ((t = Intl.PluralRules).bind.apply(t, Tn([void 0], n, !1)))();
}, {
- cache: Cn(e.pluralRules),
- strategy: kn.variadic
+ cache: kn(e.pluralRules),
+ strategy: Hn.variadic
})
};
}
-var bu = (
+var gu = (
/** @class */
function() {
function e(t, n, r, i) {
@@ -5591,15 +5591,15 @@ var bu = (
dateTime: {},
pluralRules: {}
}, this.format = function(l) {
- var a = s.formatToParts(l);
- if (a.length === 1)
- return a[0].value;
- var o = a.reduce(function(u, f) {
- return !u.length || f.type !== ee.literal || typeof u[u.length - 1] != "string" ? u.push(f.value) : u[u.length - 1] += f.value, u;
+ var u = s.formatToParts(l);
+ if (u.length === 1)
+ return u[0].value;
+ var o = u.reduce(function(a, f) {
+ return !a.length || f.type !== ee.literal || typeof a[a.length - 1] != "string" ? a.push(f.value) : a[a.length - 1] += f.value, a;
}, []);
return o.length <= 1 ? o[0] || "" : o;
}, this.formatToParts = function(l) {
- return Xt(s.ast, s.locales, s.formatters, s.formats, l, void 0, s.message);
+ return Zt(s.ast, s.locales, s.formatters, s.formats, l, void 0, s.message);
}, this.resolvedOptions = function() {
return {
locale: s.resolvedLocale.toString()
@@ -5617,7 +5617,7 @@ var bu = (
this.ast = t;
if (!Array.isArray(this.ast))
throw new TypeError("A message must be provided as a String or AST.");
- this.formats = pu(e.formats, r), this.formatters = i && i.formatters || gu(this.formatterCache);
+ this.formats = mu(e.formats, r), this.formatters = i && i.formatters || pu(this.formatterCache);
}
return Object.defineProperty(e, "defaultLocale", {
get: function() {
@@ -5628,7 +5628,7 @@ var bu = (
}), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
var n = Intl.NumberFormat.supportedLocalesOf(t);
return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
- }, e.__parse = iu, e.formats = {
+ }, e.__parse = ru, e.formats = {
number: {
integer: {
maximumFractionDigits: 0
@@ -5689,7 +5689,7 @@ var bu = (
}, e;
}()
);
-function vu(e, t) {
+function bu(e, t) {
if (t == null)
return;
if (t in e)
@@ -5710,92 +5710,92 @@ function vu(e, t) {
r = void 0;
return r;
}
-const Ue = {}, yu = (e, t, n) => n && (t in Ue || (Ue[t] = {}), e in Ue[t] || (Ue[t][e] = n), n), cs = (e, t) => {
+const Ue = {}, vu = (e, t, n) => n && (t in Ue || (Ue[t] = {}), e in Ue[t] || (Ue[t][e] = n), n), fs = (e, t) => {
if (t == null)
return;
if (t in Ue && e in Ue[t])
return Ue[t][e];
- const n = ln(t);
+ const n = sn(t);
for (let r = 0; r < n.length; r++) {
- const i = n[r], s = Eu(i, e);
+ const i = n[r], s = wu(i, e);
if (s)
- return yu(e, t, s);
+ return vu(e, t, s);
}
};
-let _r;
-const Lt = It({});
-function wu(e) {
- return _r[e] || null;
+let cr;
+const Mt = Ot({});
+function yu(e) {
+ return cr[e] || null;
}
-function hs(e) {
- return e in _r;
+function cs(e) {
+ return e in cr;
}
-function Eu(e, t) {
- if (!hs(e))
+function wu(e, t) {
+ if (!cs(e))
return null;
- const n = wu(e);
- return vu(n, t);
+ const n = yu(e);
+ return bu(n, t);
}
-function Su(e) {
+function Eu(e) {
if (e == null)
return;
- const t = ln(e);
+ const t = sn(e);
for (let n = 0; n < t.length; n++) {
const r = t[n];
- if (hs(r))
+ if (cs(r))
return r;
}
}
-function Tu(e, ...t) {
- delete Ue[e], Lt.update((n) => (n[e] = ka.all([n[e] || {}, ...t]), n));
+function Su(e, ...t) {
+ delete Ue[e], Mt.update((n) => (n[e] = Ha.all([n[e] || {}, ...t]), n));
}
-vt(
- [Lt],
+bt(
+ [Mt],
([e]) => Object.keys(e)
);
-Lt.subscribe((e) => _r = e);
-const Wt = {};
-function Au(e, t) {
- Wt[e].delete(t), Wt[e].size === 0 && delete Wt[e];
+Mt.subscribe((e) => cr = e);
+const Jt = {};
+function Tu(e, t) {
+ Jt[e].delete(t), Jt[e].size === 0 && delete Jt[e];
}
-function _s(e) {
- return Wt[e];
+function hs(e) {
+ return Jt[e];
}
-function Bu(e) {
- return ln(e).map((t) => {
- const n = _s(t);
+function Au(e) {
+ return sn(e).map((t) => {
+ const n = hs(t);
return [t, n ? [...n] : []];
}).filter(([, t]) => t.length > 0);
}
-function Yn(e) {
- return e == null ? !1 : ln(e).some(
+function Qn(e) {
+ return e == null ? !1 : sn(e).some(
(t) => {
var n;
- return (n = _s(t)) == null ? void 0 : n.size;
+ return (n = hs(t)) == null ? void 0 : n.size;
}
);
}
-function Hu(e, t) {
+function Bu(e, t) {
return Promise.all(
- t.map((r) => (Au(e, r), r().then((i) => i.default || i)))
- ).then((r) => Tu(e, ...r));
-}
-const Tt = {};
-function ds(e) {
- if (!Yn(e))
- return e in Tt ? Tt[e] : Promise.resolve();
- const t = Bu(e);
- return Tt[e] = Promise.all(
+ t.map((r) => (Tu(e, r), r().then((i) => i.default || i)))
+ ).then((r) => Su(e, ...r));
+}
+const St = {};
+function _s(e) {
+ if (!Qn(e))
+ return e in St ? St[e] : Promise.resolve();
+ const t = Au(e);
+ return St[e] = Promise.all(
t.map(
- ([n, r]) => Hu(n, r)
+ ([n, r]) => Bu(n, r)
)
).then(() => {
- if (Yn(e))
- return ds(e);
- delete Tt[e];
- }), Tt[e];
+ if (Qn(e))
+ return _s(e);
+ delete St[e];
+ }), St[e];
}
-const ku = {
+const Hu = {
number: {
scientific: { notation: "scientific" },
engineering: { notation: "engineering" },
@@ -5824,347 +5824,347 @@ const ku = {
timeZoneName: "short"
}
}
-}, Cu = {
+}, ku = {
fallbackLocale: null,
loadingDelay: 200,
- formats: ku,
+ formats: Hu,
warnOnMissingMessages: !0,
handleMissingMessage: void 0,
ignoreTag: !0
-}, Pu = Cu;
-function pt() {
- return Pu;
+}, Cu = ku;
+function mt() {
+ return Cu;
}
-const Pn = It(!1);
-var Nu = Object.defineProperty, Iu = Object.defineProperties, Lu = Object.getOwnPropertyDescriptors, Jr = Object.getOwnPropertySymbols, Ou = Object.prototype.hasOwnProperty, Mu = Object.prototype.propertyIsEnumerable, Qr = (e, t, n) => t in e ? Nu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Du = (e, t) => {
+const Cn = Ot(!1);
+var Pu = Object.defineProperty, Nu = Object.defineProperties, Iu = Object.getOwnPropertyDescriptors, Zr = Object.getOwnPropertySymbols, Lu = Object.prototype.hasOwnProperty, Ou = Object.prototype.propertyIsEnumerable, Jr = (e, t, n) => t in e ? Pu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Mu = (e, t) => {
for (var n in t || (t = {}))
- Ou.call(t, n) && Qr(e, n, t[n]);
- if (Jr)
- for (var n of Jr(t))
- Mu.call(t, n) && Qr(e, n, t[n]);
+ Lu.call(t, n) && Jr(e, n, t[n]);
+ if (Zr)
+ for (var n of Zr(t))
+ Ou.call(t, n) && Jr(e, n, t[n]);
return e;
-}, Ru = (e, t) => Iu(e, Lu(t));
-let Kn;
-const Qt = It(null);
-function Yr(e) {
+}, Du = (e, t) => Nu(e, Iu(t));
+let Yn;
+const Kt = Ot(null);
+function Qr(e) {
return e.split("-").map((t, n, r) => r.slice(0, n + 1).join("-")).reverse();
}
-function ln(e, t = pt().fallbackLocale) {
- const n = Yr(e);
- return t ? [.../* @__PURE__ */ new Set([...n, ...Yr(t)])] : n;
+function sn(e, t = mt().fallbackLocale) {
+ const n = Qr(e);
+ return t ? [.../* @__PURE__ */ new Set([...n, ...Qr(t)])] : n;
}
function nt() {
- return Kn ?? void 0;
+ return Yn ?? void 0;
}
-Qt.subscribe((e) => {
- Kn = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e);
+Kt.subscribe((e) => {
+ Yn = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e);
});
-const Uu = (e) => {
- if (e && Su(e) && Yn(e)) {
- const { loadingDelay: t } = pt();
+const Ru = (e) => {
+ if (e && Eu(e) && Qn(e)) {
+ const { loadingDelay: t } = mt();
let n;
return typeof window < "u" && nt() != null && t ? n = window.setTimeout(
- () => Pn.set(!0),
+ () => Cn.set(!0),
t
- ) : Pn.set(!0), ds(e).then(() => {
- Qt.set(e);
+ ) : Cn.set(!0), _s(e).then(() => {
+ Kt.set(e);
}).finally(() => {
- clearTimeout(n), Pn.set(!1);
+ clearTimeout(n), Cn.set(!1);
});
}
- return Qt.set(e);
-}, Ot = Ru(Du({}, Qt), {
- set: Uu
-}), on = (e) => {
+ return Kt.set(e);
+}, Dt = Du(Mu({}, Kt), {
+ set: Ru
+}), ln = (e) => {
const t = /* @__PURE__ */ Object.create(null);
return (r) => {
const i = JSON.stringify(r);
return i in t ? t[i] : t[i] = e(r);
};
};
-var xu = Object.defineProperty, Yt = Object.getOwnPropertySymbols, ms = Object.prototype.hasOwnProperty, ps = Object.prototype.propertyIsEnumerable, Kr = (e, t, n) => t in e ? xu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, dr = (e, t) => {
+var Uu = Object.defineProperty, $t = Object.getOwnPropertySymbols, ds = Object.prototype.hasOwnProperty, ms = Object.prototype.propertyIsEnumerable, Yr = (e, t, n) => t in e ? Uu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, hr = (e, t) => {
for (var n in t || (t = {}))
- ms.call(t, n) && Kr(e, n, t[n]);
- if (Yt)
- for (var n of Yt(t))
- ps.call(t, n) && Kr(e, n, t[n]);
+ ds.call(t, n) && Yr(e, n, t[n]);
+ if ($t)
+ for (var n of $t(t))
+ ms.call(t, n) && Yr(e, n, t[n]);
return e;
-}, yt = (e, t) => {
+}, vt = (e, t) => {
var n = {};
for (var r in e)
- ms.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
- if (e != null && Yt)
- for (var r of Yt(e))
- t.indexOf(r) < 0 && ps.call(e, r) && (n[r] = e[r]);
+ ds.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && $t)
+ for (var r of $t(e))
+ t.indexOf(r) < 0 && ms.call(e, r) && (n[r] = e[r]);
return n;
};
-const Nt = (e, t) => {
- const { formats: n } = pt();
+const Pt = (e, t) => {
+ const { formats: n } = mt();
if (e in n && t in n[e])
return n[e][t];
throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`);
-}, Fu = on(
+}, xu = ln(
(e) => {
- var t = e, { locale: n, format: r } = t, i = yt(t, ["locale", "format"]);
+ var t = e, { locale: n, format: r } = t, i = vt(t, ["locale", "format"]);
if (n == null)
throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
- return r && (i = Nt("number", r)), new Intl.NumberFormat(n, i);
+ return r && (i = Pt("number", r)), new Intl.NumberFormat(n, i);
}
-), Gu = on(
+), Fu = ln(
(e) => {
- var t = e, { locale: n, format: r } = t, i = yt(t, ["locale", "format"]);
+ var t = e, { locale: n, format: r } = t, i = vt(t, ["locale", "format"]);
if (n == null)
throw new Error('[svelte-i18n] A "locale" must be set to format dates');
- return r ? i = Nt("date", r) : Object.keys(i).length === 0 && (i = Nt("date", "short")), new Intl.DateTimeFormat(n, i);
+ return r ? i = Pt("date", r) : Object.keys(i).length === 0 && (i = Pt("date", "short")), new Intl.DateTimeFormat(n, i);
}
-), qu = on(
+), Gu = ln(
(e) => {
- var t = e, { locale: n, format: r } = t, i = yt(t, ["locale", "format"]);
+ var t = e, { locale: n, format: r } = t, i = vt(t, ["locale", "format"]);
if (n == null)
throw new Error(
'[svelte-i18n] A "locale" must be set to format time values'
);
- return r ? i = Nt("time", r) : Object.keys(i).length === 0 && (i = Nt("time", "short")), new Intl.DateTimeFormat(n, i);
+ return r ? i = Pt("time", r) : Object.keys(i).length === 0 && (i = Pt("time", "short")), new Intl.DateTimeFormat(n, i);
}
-), ju = (e = {}) => {
+), qu = (e = {}) => {
var t = e, {
locale: n = nt()
- } = t, r = yt(t, [
+ } = t, r = vt(t, [
"locale"
]);
- return Fu(dr({ locale: n }, r));
-}, Vu = (e = {}) => {
+ return xu(hr({ locale: n }, r));
+}, ju = (e = {}) => {
var t = e, {
locale: n = nt()
- } = t, r = yt(t, [
+ } = t, r = vt(t, [
"locale"
]);
- return Gu(dr({ locale: n }, r));
-}, zu = (e = {}) => {
+ return Fu(hr({ locale: n }, r));
+}, Vu = (e = {}) => {
var t = e, {
locale: n = nt()
- } = t, r = yt(t, [
+ } = t, r = vt(t, [
"locale"
]);
- return qu(dr({ locale: n }, r));
-}, Xu = on(
+ return Gu(hr({ locale: n }, r));
+}, zu = ln(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- (e, t = nt()) => new bu(e, t, pt().formats, {
- ignoreTag: pt().ignoreTag
+ (e, t = nt()) => new gu(e, t, mt().formats, {
+ ignoreTag: mt().ignoreTag
})
-), Wu = (e, t = {}) => {
+), Xu = (e, t = {}) => {
var n, r, i, s;
let l = t;
typeof e == "object" && (l = e, e = l.id);
const {
- values: a,
+ values: u,
locale: o = nt(),
- default: u
+ default: a
} = l;
if (o == null)
throw new Error(
"[svelte-i18n] Cannot format a message without first setting the initial locale."
);
- let f = cs(e, o);
+ let f = fs(e, o);
if (!f)
- f = (s = (i = (r = (n = pt()).handleMissingMessage) == null ? void 0 : r.call(n, { locale: o, id: e, defaultValue: u })) != null ? i : u) != null ? s : e;
+ f = (s = (i = (r = (n = mt()).handleMissingMessage) == null ? void 0 : r.call(n, { locale: o, id: e, defaultValue: a })) != null ? i : a) != null ? s : e;
else if (typeof f != "string")
return console.warn(
`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
), f;
- if (!a)
+ if (!u)
return f;
let c = f;
try {
- c = Xu(f, o).format(a);
- } catch (h) {
- h instanceof Error && console.warn(
+ c = zu(f, o).format(u);
+ } catch (_) {
+ _ instanceof Error && console.warn(
`[svelte-i18n] Message "${e}" has syntax error:`,
- h.message
+ _.message
);
}
return c;
-}, Zu = (e, t) => zu(t).format(e), Ju = (e, t) => Vu(t).format(e), Qu = (e, t) => ju(t).format(e), Yu = (e, t = nt()) => cs(e, t);
-vt([Ot, Lt], () => Wu);
-vt([Ot], () => Zu);
-vt([Ot], () => Ju);
-vt([Ot], () => Qu);
-vt([Ot, Lt], () => Yu);
+}, Wu = (e, t) => Vu(t).format(e), Zu = (e, t) => ju(t).format(e), Ju = (e, t) => qu(t).format(e), Qu = (e, t = nt()) => fs(e, t);
+bt([Dt, Mt], () => Xu);
+bt([Dt], () => Wu);
+bt([Dt], () => Zu);
+bt([Dt], () => Ju);
+bt([Dt, Mt], () => Qu);
const {
- SvelteComponent: Ku,
+ SvelteComponent: Yu,
append: ne,
attr: We,
- detach: gs,
+ detach: ps,
element: Ze,
- init: $u,
- insert: bs,
- noop: $r,
- safe_not_equal: ef,
- set_data: Kt,
- set_style: Nn,
- space: $n,
+ init: Ku,
+ insert: gs,
+ noop: Kr,
+ safe_not_equal: $u,
+ set_data: en,
+ set_style: Pn,
+ space: Kn,
text: at,
- toggle_class: ei
-} = window.__gradio__svelte__internal, { onMount: tf, createEventDispatcher: nf, getContext: rf } = window.__gradio__svelte__internal;
-function ti(e) {
- let t, n, r, i, s = Ht(
+ toggle_class: $r
+} = window.__gradio__svelte__internal, { onMount: ef, createEventDispatcher: tf, getContext: nf } = window.__gradio__svelte__internal;
+function ei(e) {
+ let t, n, r, i, s = Bt(
/*file_to_display*/
e[2]
- ) + "", l, a, o, u, f = (
+ ) + "", l, u, o, a, f = (
/*file_to_display*/
e[2].orig_name + ""
), c;
return {
c() {
- t = Ze("div"), n = Ze("span"), r = Ze("div"), i = Ze("progress"), l = at(s), o = $n(), u = Ze("span"), c = at(f), Nn(i, "visibility", "hidden"), Nn(i, "height", "0"), Nn(i, "width", "0"), i.value = a = Ht(
+ t = Ze("div"), n = Ze("span"), r = Ze("div"), i = Ze("progress"), l = at(s), o = Kn(), a = Ze("span"), c = at(f), Pn(i, "visibility", "hidden"), Pn(i, "height", "0"), Pn(i, "width", "0"), i.value = u = Bt(
/*file_to_display*/
e[2]
- ), We(i, "max", "100"), We(i, "class", "svelte-12ckl9l"), We(r, "class", "progress-bar svelte-12ckl9l"), We(u, "class", "file-name svelte-12ckl9l"), We(t, "class", "file svelte-12ckl9l");
+ ), We(i, "max", "100"), We(i, "class", "svelte-12ckl9l"), We(r, "class", "progress-bar svelte-12ckl9l"), We(a, "class", "file-name svelte-12ckl9l"), We(t, "class", "file svelte-12ckl9l");
},
- m(h, _) {
- bs(h, t, _), ne(t, n), ne(n, r), ne(r, i), ne(i, l), ne(t, o), ne(t, u), ne(u, c);
+ m(_, h) {
+ gs(_, t, h), ne(t, n), ne(n, r), ne(r, i), ne(i, l), ne(t, o), ne(t, a), ne(a, c);
},
- p(h, _) {
- _ & /*file_to_display*/
- 4 && s !== (s = Ht(
+ p(_, h) {
+ h & /*file_to_display*/
+ 4 && s !== (s = Bt(
/*file_to_display*/
- h[2]
- ) + "") && Kt(l, s), _ & /*file_to_display*/
- 4 && a !== (a = Ht(
+ _[2]
+ ) + "") && en(l, s), h & /*file_to_display*/
+ 4 && u !== (u = Bt(
/*file_to_display*/
- h[2]
- )) && (i.value = a), _ & /*file_to_display*/
+ _[2]
+ )) && (i.value = u), h & /*file_to_display*/
4 && f !== (f = /*file_to_display*/
- h[2].orig_name + "") && Kt(c, f);
+ _[2].orig_name + "") && en(c, f);
},
- d(h) {
- h && gs(t);
+ d(_) {
+ _ && ps(t);
}
};
}
-function sf(e) {
+function rf(e) {
let t, n, r, i = (
/*files_with_progress*/
e[0].length + ""
- ), s, l, a = (
+ ), s, l, u = (
/*files_with_progress*/
e[0].length > 1 ? "files" : "file"
- ), o, u, f, c = (
+ ), o, a, f, c = (
/*file_to_display*/
- e[2] && ti(e)
+ e[2] && ei(e)
);
return {
c() {
- t = Ze("div"), n = Ze("span"), r = at("Uploading "), s = at(i), l = $n(), o = at(a), u = at("..."), f = $n(), c && c.c(), We(n, "class", "uploading svelte-12ckl9l"), We(t, "class", "wrap svelte-12ckl9l"), ei(
+ t = Ze("div"), n = Ze("span"), r = at("Uploading "), s = at(i), l = Kn(), o = at(u), a = at("..."), f = Kn(), c && c.c(), We(n, "class", "uploading svelte-12ckl9l"), We(t, "class", "wrap svelte-12ckl9l"), $r(
t,
"progress",
/*progress*/
e[1]
);
},
- m(h, _) {
- bs(h, t, _), ne(t, n), ne(n, r), ne(n, s), ne(n, l), ne(n, o), ne(n, u), ne(t, f), c && c.m(t, null);
+ m(_, h) {
+ gs(_, t, h), ne(t, n), ne(n, r), ne(n, s), ne(n, l), ne(n, o), ne(n, a), ne(t, f), c && c.m(t, null);
},
- p(h, [_]) {
- _ & /*files_with_progress*/
+ p(_, [h]) {
+ h & /*files_with_progress*/
1 && i !== (i = /*files_with_progress*/
- h[0].length + "") && Kt(s, i), _ & /*files_with_progress*/
- 1 && a !== (a = /*files_with_progress*/
- h[0].length > 1 ? "files" : "file") && Kt(o, a), /*file_to_display*/
- h[2] ? c ? c.p(h, _) : (c = ti(h), c.c(), c.m(t, null)) : c && (c.d(1), c = null), _ & /*progress*/
- 2 && ei(
+ _[0].length + "") && en(s, i), h & /*files_with_progress*/
+ 1 && u !== (u = /*files_with_progress*/
+ _[0].length > 1 ? "files" : "file") && en(o, u), /*file_to_display*/
+ _[2] ? c ? c.p(_, h) : (c = ei(_), c.c(), c.m(t, null)) : c && (c.d(1), c = null), h & /*progress*/
+ 2 && $r(
t,
"progress",
/*progress*/
- h[1]
+ _[1]
);
},
- i: $r,
- o: $r,
- d(h) {
- h && gs(t), c && c.d();
+ i: Kr,
+ o: Kr,
+ d(_) {
+ _ && ps(t), c && c.d();
}
};
}
-function Ht(e) {
+function Bt(e) {
return e.progress * 100 / (e.size || 0) || 0;
}
-function lf(e) {
+function sf(e) {
let t = 0;
return e.forEach((n) => {
- t += Ht(n);
+ t += Bt(n);
}), document.documentElement.style.setProperty("--upload-progress-width", (t / e.length).toFixed(2) + "%"), t / e.length;
}
-function of(e, t, n) {
- let { upload_id: r } = t, { root: i } = t, { files: s } = t, l, a = !1, o, u, f = s.map((d) => ({ ...d, progress: 0 }));
- const c = nf();
- function h(d, p) {
- n(0, f = f.map((y) => (y.orig_name === d && (y.progress += p), y)));
- }
- const _ = rf("EventSource_factory");
- return tf(() => {
- l = _(new URL(`${i}/upload_progress?upload_id=${r}`)), l.onmessage = async function(d) {
- const p = JSON.parse(d.data);
- a || n(1, a = !0), p.msg === "done" ? (l.close(), c("done")) : (n(6, o = p), h(p.orig_name, p.chunk_size));
+function lf(e, t, n) {
+ let { upload_id: r } = t, { root: i } = t, { files: s } = t, l, u = !1, o, a, f = s.map((d) => ({ ...d, progress: 0 }));
+ const c = tf();
+ function _(d, b) {
+ n(0, f = f.map((y) => (y.orig_name === d && (y.progress += b), y)));
+ }
+ const h = nf("EventSource_factory");
+ return ef(() => {
+ l = h(new URL(`${i}/upload_progress?upload_id=${r}`)), l.onmessage = async function(d) {
+ const b = JSON.parse(d.data);
+ u || n(1, u = !0), b.msg === "done" ? (l.close(), c("done")) : (n(6, o = b), _(b.orig_name, b.chunk_size));
};
}), e.$$set = (d) => {
"upload_id" in d && n(3, r = d.upload_id), "root" in d && n(4, i = d.root), "files" in d && n(5, s = d.files);
}, e.$$.update = () => {
e.$$.dirty & /*files_with_progress*/
- 1 && lf(f), e.$$.dirty & /*current_file_upload, files_with_progress*/
- 65 && n(2, u = o || f[0]);
+ 1 && sf(f), e.$$.dirty & /*current_file_upload, files_with_progress*/
+ 65 && n(2, a = o || f[0]);
}, [
f,
- a,
u,
+ a,
r,
i,
s,
o
];
}
-class af extends Ku {
+class of extends Yu {
constructor(t) {
- super(), $u(this, t, of, sf, ef, { upload_id: 3, root: 4, files: 5 });
+ super(), Ku(this, t, lf, rf, $u, { upload_id: 3, root: 4, files: 5 });
}
}
const {
- SvelteComponent: uf,
- append: ni,
+ SvelteComponent: af,
+ append: ti,
attr: Y,
- binding_callbacks: ff,
+ binding_callbacks: uf,
bubble: Ve,
- check_outros: vs,
- create_component: cf,
- create_slot: ys,
- destroy_component: hf,
- detach: an,
- element: er,
- empty: ws,
- get_all_dirty_from_scope: Es,
- get_slot_changes: Ss,
- group_outros: Ts,
- init: _f,
- insert: un,
+ check_outros: bs,
+ create_component: ff,
+ create_slot: vs,
+ destroy_component: cf,
+ detach: on,
+ element: $n,
+ empty: ys,
+ get_all_dirty_from_scope: ws,
+ get_slot_changes: Es,
+ group_outros: Ss,
+ init: hf,
+ insert: an,
listen: se,
- mount_component: df,
+ mount_component: _f,
prevent_default: ze,
- run_all: mf,
- safe_not_equal: pf,
- set_style: As,
- space: gf,
+ run_all: df,
+ safe_not_equal: mf,
+ set_style: Ts,
+ space: pf,
stop_propagation: Xe,
toggle_class: K,
transition_in: Fe,
transition_out: Ke,
- update_slot_base: Bs
-} = window.__gradio__svelte__internal, { createEventDispatcher: bf, tick: vf, getContext: yf } = window.__gradio__svelte__internal;
-function wf(e) {
- let t, n, r, i, s, l, a, o, u, f;
+ update_slot_base: As
+} = window.__gradio__svelte__internal, { createEventDispatcher: gf, tick: bf, getContext: vf } = window.__gradio__svelte__internal;
+function yf(e) {
+ let t, n, r, i, s, l, u, o, a, f;
const c = (
/*#slots*/
e[22].default
- ), h = ys(
+ ), _ = vs(
c,
e,
/*$$scope*/
@@ -6173,7 +6173,7 @@ function wf(e) {
);
return {
c() {
- t = er("button"), h && h.c(), n = gf(), r = er("input"), Y(r, "aria-label", "file upload"), Y(r, "data-testid", "file-upload"), Y(r, "type", "file"), Y(
+ t = $n("button"), _ && _.c(), n = pf(), r = $n("input"), Y(r, "aria-label", "file upload"), Y(r, "data-testid", "file-upload"), Y(r, "type", "file"), Y(
r,
"accept",
/*accept_file_types*/
@@ -6181,7 +6181,7 @@ function wf(e) {
), r.multiple = i = /*file_count*/
e[5] === "multiple" || void 0, Y(r, "webkitdirectory", s = /*file_count*/
e[5] === "directory" || void 0), Y(r, "mozdirectory", l = /*file_count*/
- e[5] === "directory" || void 0), Y(r, "class", "svelte-1aq8tno"), Y(t, "tabindex", a = /*hidden*/
+ e[5] === "directory" || void 0), Y(r, "class", "svelte-1aq8tno"), Y(t, "tabindex", u = /*hidden*/
e[7] ? -1 : 0), Y(t, "class", "svelte-1aq8tno"), K(
t,
"hidden",
@@ -6202,10 +6202,10 @@ function wf(e) {
"flex",
/*flex*/
e[4]
- ), As(t, "height", "100%");
+ ), Ts(t, "height", "100%");
},
- m(_, d) {
- un(_, t, d), h && h.m(t, null), ni(t, n), ni(t, r), e[30](r), o = !0, u || (f = [
+ m(h, d) {
+ an(h, t, d), _ && _.m(t, null), ti(t, n), ti(t, r), e[30](r), o = !0, a || (f = [
se(
r,
"change",
@@ -6264,25 +6264,25 @@ function wf(e) {
/*updateDragging*/
e[14]
)
- ], u = !0);
+ ], a = !0);
},
- p(_, d) {
- h && h.p && (!o || d[0] & /*$$scope*/
- 2097152) && Bs(
- h,
- c,
+ p(h, d) {
+ _ && _.p && (!o || d[0] & /*$$scope*/
+ 2097152) && As(
_,
+ c,
+ h,
/*$$scope*/
- _[21],
- o ? Ss(
+ h[21],
+ o ? Es(
c,
/*$$scope*/
- _[21],
+ h[21],
d,
null
- ) : Es(
+ ) : ws(
/*$$scope*/
- _[21]
+ h[21]
),
null
), (!o || d[0] & /*accept_file_types*/
@@ -6290,68 +6290,68 @@ function wf(e) {
r,
"accept",
/*accept_file_types*/
- _[12]
+ h[12]
), (!o || d[0] & /*file_count*/
32 && i !== (i = /*file_count*/
- _[5] === "multiple" || void 0)) && (r.multiple = i), (!o || d[0] & /*file_count*/
+ h[5] === "multiple" || void 0)) && (r.multiple = i), (!o || d[0] & /*file_count*/
32 && s !== (s = /*file_count*/
- _[5] === "directory" || void 0)) && Y(r, "webkitdirectory", s), (!o || d[0] & /*file_count*/
+ h[5] === "directory" || void 0)) && Y(r, "webkitdirectory", s), (!o || d[0] & /*file_count*/
32 && l !== (l = /*file_count*/
- _[5] === "directory" || void 0)) && Y(r, "mozdirectory", l), (!o || d[0] & /*hidden*/
- 128 && a !== (a = /*hidden*/
- _[7] ? -1 : 0)) && Y(t, "tabindex", a), (!o || d[0] & /*hidden*/
+ h[5] === "directory" || void 0)) && Y(r, "mozdirectory", l), (!o || d[0] & /*hidden*/
+ 128 && u !== (u = /*hidden*/
+ h[7] ? -1 : 0)) && Y(t, "tabindex", u), (!o || d[0] & /*hidden*/
128) && K(
t,
"hidden",
/*hidden*/
- _[7]
+ h[7]
), (!o || d[0] & /*center*/
8) && K(
t,
"center",
/*center*/
- _[3]
+ h[3]
), (!o || d[0] & /*boundedheight*/
4) && K(
t,
"boundedheight",
/*boundedheight*/
- _[2]
+ h[2]
), (!o || d[0] & /*flex*/
16) && K(
t,
"flex",
/*flex*/
- _[4]
+ h[4]
);
},
- i(_) {
- o || (Fe(h, _), o = !0);
+ i(h) {
+ o || (Fe(_, h), o = !0);
},
- o(_) {
- Ke(h, _), o = !1;
+ o(h) {
+ Ke(_, h), o = !1;
},
- d(_) {
- _ && an(t), h && h.d(_), e[30](null), u = !1, mf(f);
+ d(h) {
+ h && on(t), _ && _.d(h), e[30](null), a = !1, df(f);
}
};
}
-function Ef(e) {
+function wf(e) {
let t, n, r = !/*hidden*/
- e[7] && ri(e);
+ e[7] && ni(e);
return {
c() {
- r && r.c(), t = ws();
+ r && r.c(), t = ys();
},
m(i, s) {
- r && r.m(i, s), un(i, t, s), n = !0;
+ r && r.m(i, s), an(i, t, s), n = !0;
},
p(i, s) {
/*hidden*/
- i[7] ? r && (Ts(), Ke(r, 1, 1, () => {
+ i[7] ? r && (Ss(), Ke(r, 1, 1, () => {
r = null;
- }), vs()) : r ? (r.p(i, s), s[0] & /*hidden*/
- 128 && Fe(r, 1)) : (r = ri(i), r.c(), Fe(r, 1), r.m(t.parentNode, t));
+ }), bs()) : r ? (r.p(i, s), s[0] & /*hidden*/
+ 128 && Fe(r, 1)) : (r = ni(i), r.c(), Fe(r, 1), r.m(t.parentNode, t));
},
i(i) {
n || (Fe(r), n = !0);
@@ -6360,16 +6360,16 @@ function Ef(e) {
Ke(r), n = !1;
},
d(i) {
- i && an(t), r && r.d(i);
+ i && on(t), r && r.d(i);
}
};
}
-function Sf(e) {
+function Ef(e) {
let t, n, r, i, s;
const l = (
/*#slots*/
e[22].default
- ), a = ys(
+ ), u = vs(
l,
e,
/*$$scope*/
@@ -6378,7 +6378,7 @@ function Sf(e) {
);
return {
c() {
- t = er("button"), a && a.c(), Y(t, "tabindex", n = /*hidden*/
+ t = $n("button"), u && u.c(), Y(t, "tabindex", n = /*hidden*/
e[7] ? -1 : 0), Y(t, "class", "svelte-1aq8tno"), K(
t,
"hidden",
@@ -6399,56 +6399,56 @@ function Sf(e) {
"flex",
/*flex*/
e[4]
- ), As(t, "height", "100%");
+ ), Ts(t, "height", "100%");
},
- m(o, u) {
- un(o, t, u), a && a.m(t, null), r = !0, i || (s = se(
+ m(o, a) {
+ an(o, t, a), u && u.m(t, null), r = !0, i || (s = se(
t,
"click",
/*paste_clipboard*/
e[8]
), i = !0);
},
- p(o, u) {
- a && a.p && (!r || u[0] & /*$$scope*/
- 2097152) && Bs(
- a,
+ p(o, a) {
+ u && u.p && (!r || a[0] & /*$$scope*/
+ 2097152) && As(
+ u,
l,
o,
/*$$scope*/
o[21],
- r ? Ss(
+ r ? Es(
l,
/*$$scope*/
o[21],
- u,
+ a,
null
- ) : Es(
+ ) : ws(
/*$$scope*/
o[21]
),
null
- ), (!r || u[0] & /*hidden*/
+ ), (!r || a[0] & /*hidden*/
128 && n !== (n = /*hidden*/
- o[7] ? -1 : 0)) && Y(t, "tabindex", n), (!r || u[0] & /*hidden*/
+ o[7] ? -1 : 0)) && Y(t, "tabindex", n), (!r || a[0] & /*hidden*/
128) && K(
t,
"hidden",
/*hidden*/
o[7]
- ), (!r || u[0] & /*center*/
+ ), (!r || a[0] & /*center*/
8) && K(
t,
"center",
/*center*/
o[3]
- ), (!r || u[0] & /*boundedheight*/
+ ), (!r || a[0] & /*boundedheight*/
4) && K(
t,
"boundedheight",
/*boundedheight*/
o[2]
- ), (!r || u[0] & /*flex*/
+ ), (!r || a[0] & /*flex*/
16) && K(
t,
"flex",
@@ -6457,19 +6457,19 @@ function Sf(e) {
);
},
i(o) {
- r || (Fe(a, o), r = !0);
+ r || (Fe(u, o), r = !0);
},
o(o) {
- Ke(a, o), r = !1;
+ Ke(u, o), r = !1;
},
d(o) {
- o && an(t), a && a.d(o), i = !1, s();
+ o && on(t), u && u.d(o), i = !1, s();
}
};
}
-function ri(e) {
+function ni(e) {
let t, n;
- return t = new af({
+ return t = new of({
props: {
root: (
/*root*/
@@ -6486,10 +6486,10 @@ function ri(e) {
}
}), {
c() {
- cf(t.$$.fragment);
+ ff(t.$$.fragment);
},
m(r, i) {
- df(t, r, i), n = !0;
+ _f(t, r, i), n = !0;
},
p(r, i) {
const s = {};
@@ -6508,14 +6508,14 @@ function ri(e) {
Ke(t.$$.fragment, r), n = !1;
},
d(r) {
- hf(t, r);
+ cf(t, r);
}
};
}
-function Tf(e) {
+function Sf(e) {
let t, n, r, i;
- const s = [Sf, Ef, wf], l = [];
- function a(o, u) {
+ const s = [Ef, wf, yf], l = [];
+ function u(o, a) {
return (
/*filetype*/
o[0] === "clipboard" ? 0 : (
@@ -6524,18 +6524,18 @@ function Tf(e) {
)
);
}
- return t = a(e), n = l[t] = s[t](e), {
+ return t = u(e), n = l[t] = s[t](e), {
c() {
- n.c(), r = ws();
+ n.c(), r = ys();
},
- m(o, u) {
- l[t].m(o, u), un(o, r, u), i = !0;
+ m(o, a) {
+ l[t].m(o, a), an(o, r, a), i = !0;
},
- p(o, u) {
+ p(o, a) {
let f = t;
- t = a(o), t === f ? l[t].p(o, u) : (Ts(), Ke(l[f], 1, 1, () => {
+ t = u(o), t === f ? l[t].p(o, a) : (Ss(), Ke(l[f], 1, 1, () => {
l[f] = null;
- }), vs(), n = l[t], n ? n.p(o, u) : (n = l[t] = s[t](o), n.c()), Fe(n, 1), n.m(r.parentNode, r));
+ }), bs(), n = l[t], n ? n.p(o, a) : (n = l[t] = s[t](o), n.c()), Fe(n, 1), n.m(r.parentNode, r));
},
i(o) {
i || (Fe(n), i = !0);
@@ -6544,11 +6544,11 @@ function Tf(e) {
Ke(n), i = !1;
},
d(o) {
- o && an(r), l[t].d(o);
+ o && on(r), l[t].d(o);
}
};
}
-function ii(e) {
+function ri(e) {
let t, n = e[0], r = 1;
for (; r < e.length; ) {
const i = e[r], s = e[r + 1];
@@ -6558,28 +6558,28 @@ function ii(e) {
}
return n;
}
-function Af(e, t) {
+function Tf(e, t) {
return !e || e === "*" || e === "file/*" ? !0 : (typeof e == "string" && e.endsWith("/*") && (e = e.split(",")), Array.isArray(e) ? e.includes(t) || e.some((n) => {
const [r] = n.split("/");
return n.endsWith("/*") && t.startsWith(r + "/");
}) : e === t);
}
-function Bf(e, t, n) {
- let { $$slots: r = {}, $$scope: i } = t, { filetype: s = null } = t, { dragging: l = !1 } = t, { boundedheight: a = !0 } = t, { center: o = !0 } = t, { flex: u = !0 } = t, { file_count: f = "single" } = t, { disable_click: c = !1 } = t, { root: h } = t, { hidden: _ = !1 } = t, { format: d = "file" } = t, { uploading: p = !1 } = t, y, v, E;
- const g = yf("upload_files");
+function Af(e, t, n) {
+ let { $$slots: r = {}, $$scope: i } = t, { filetype: s = null } = t, { dragging: l = !1 } = t, { boundedheight: u = !0 } = t, { center: o = !0 } = t, { flex: a = !0 } = t, { file_count: f = "single" } = t, { disable_click: c = !1 } = t, { root: _ } = t, { hidden: h = !1 } = t, { format: d = "file" } = t, { uploading: b = !1 } = t, y, v, S;
+ const p = vf("upload_files");
let A;
- const T = bf();
+ const T = gf();
function w() {
n(17, l = !l);
}
function j() {
navigator.clipboard.read().then(async (m) => {
for (let N = 0; N < m.length; N++) {
- const b = m[N].types.find((M) => M.startsWith("image/"));
- if (b) {
- m[N].getType(b).then(async (M) => {
- const S = new File([M], `clipboard.${b.replace("image/", "")}`);
- await Z([S]);
+ const g = m[N].types.find((M) => M.startsWith("image/"));
+ if (g) {
+ m[N].getType(g).then(async (M) => {
+ const E = new File([M], `clipboard.${g.replace("image/", "")}`);
+ await Z([E]);
});
break;
}
@@ -6590,15 +6590,15 @@ function Bf(e, t, n) {
c || (n(13, A.value = "", A), A.click());
}
async function H(m) {
- await vf(), n(10, y = Math.random().toString(36).substring(2, 15)), n(1, p = !0);
- const N = await xo(m, h, y, g);
- return T("load", f === "single" ? ii([N, "optionalAccess", (b) => b[0]]) : N), n(1, p = !1), N || [];
+ await bf(), n(10, y = Math.random().toString(36).substring(2, 15)), n(1, b = !0);
+ const N = await Uo(m, _, y, p);
+ return T("load", f === "single" ? ri([N, "optionalAccess", (g) => g[0]]) : N), n(1, b = !1), N || [];
}
async function Z(m) {
if (!m.length)
return;
- let N = m.map((b) => new File([b], b.name));
- return n(11, v = await Fo(N)), await H(v);
+ let N = m.map((g) => new File([g], g.name));
+ return n(11, v = await xo(N)), await H(v);
}
async function le(m) {
const N = m.target;
@@ -6614,11 +6614,11 @@ function Bf(e, t, n) {
}
}
async function Ge(m) {
- if (n(17, l = !1), !ii([m, "access", (b) => b.dataTransfer, "optionalAccess", (b) => b.files]))
+ if (n(17, l = !1), !ri([m, "access", (g) => g.dataTransfer, "optionalAccess", (g) => g.files]))
return;
- const N = Array.from(m.dataTransfer.files).filter((b) => {
- const M = "." + b.name.split(".").pop();
- return b.type && Af(s, b.type) || (M && Array.isArray(s) ? s.includes(M) : M === s) ? !0 : (T("error", `Invalid file type only ${s} allowed.`), !1);
+ const N = Array.from(m.dataTransfer.files).filter((g) => {
+ const M = "." + g.name.split(".").pop();
+ return g.type && Tf(s, g.type) || (M && Array.isArray(s) ? s.includes(M) : M === s) ? !0 : (T("error", `Invalid file type only ${s} allowed.`), !1);
});
await Z(N);
}
@@ -6634,7 +6634,7 @@ function Bf(e, t, n) {
function qe(m) {
Ve.call(this, e, m);
}
- function Et(m) {
+ function wt(m) {
Ve.call(this, e, m);
}
function Le(m) {
@@ -6644,29 +6644,29 @@ function Bf(e, t, n) {
Ve.call(this, e, m);
}
function Be(m) {
- ff[m ? "unshift" : "push"](() => {
+ uf[m ? "unshift" : "push"](() => {
A = m, n(13, A);
});
}
return e.$$set = (m) => {
- "filetype" in m && n(0, s = m.filetype), "dragging" in m && n(17, l = m.dragging), "boundedheight" in m && n(2, a = m.boundedheight), "center" in m && n(3, o = m.center), "flex" in m && n(4, u = m.flex), "file_count" in m && n(5, f = m.file_count), "disable_click" in m && n(18, c = m.disable_click), "root" in m && n(6, h = m.root), "hidden" in m && n(7, _ = m.hidden), "format" in m && n(19, d = m.format), "uploading" in m && n(1, p = m.uploading), "$$scope" in m && n(21, i = m.$$scope);
+ "filetype" in m && n(0, s = m.filetype), "dragging" in m && n(17, l = m.dragging), "boundedheight" in m && n(2, u = m.boundedheight), "center" in m && n(3, o = m.center), "flex" in m && n(4, a = m.flex), "file_count" in m && n(5, f = m.file_count), "disable_click" in m && n(18, c = m.disable_click), "root" in m && n(6, _ = m.root), "hidden" in m && n(7, h = m.hidden), "format" in m && n(19, d = m.format), "uploading" in m && n(1, b = m.uploading), "$$scope" in m && n(21, i = m.$$scope);
}, e.$$.update = () => {
e.$$.dirty[0] & /*filetype*/
- 1 && (s == null || typeof s == "string" ? n(12, E = s) : (n(0, s = s.map((m) => m.startsWith(".") ? m : m + "/*")), n(12, E = s.join(", "))));
+ 1 && (s == null || typeof s == "string" ? n(12, S = s) : (n(0, s = s.map((m) => m.startsWith(".") ? m : m + "/*")), n(12, S = s.join(", "))));
}, [
s,
- p,
- a,
- o,
+ b,
u,
+ o,
+ a,
f,
- h,
_,
+ h,
j,
B,
y,
v,
- E,
+ S,
A,
w,
le,
@@ -6681,20 +6681,20 @@ function Bf(e, t, n) {
Ae,
oe,
qe,
- Et,
+ wt,
Le,
rt,
Be
];
}
-class Hf extends uf {
+class Bf extends af {
constructor(t) {
- super(), _f(
+ super(), hf(
this,
t,
- Bf,
- Tf,
- pf,
+ Af,
+ Sf,
+ mf,
{
filetype: 0,
dragging: 17,
@@ -6726,100 +6726,100 @@ class Hf extends uf {
}
}
const {
- SvelteComponent: kf,
- attr: Cf,
- create_component: Pf,
- destroy_component: Nf,
- detach: If,
- element: Lf,
- init: Of,
- insert: Mf,
- mount_component: Df,
- noop: Rf,
- safe_not_equal: Uf,
- transition_in: xf,
- transition_out: Ff
-} = window.__gradio__svelte__internal, { createEventDispatcher: Gf } = window.__gradio__svelte__internal;
-function qf(e) {
+ SvelteComponent: Hf,
+ attr: kf,
+ create_component: Cf,
+ destroy_component: Pf,
+ detach: Nf,
+ element: If,
+ init: Lf,
+ insert: Of,
+ mount_component: Mf,
+ noop: Df,
+ safe_not_equal: Rf,
+ transition_in: Uf,
+ transition_out: xf
+} = window.__gradio__svelte__internal, { createEventDispatcher: Ff } = window.__gradio__svelte__internal;
+function Gf(e) {
let t, n, r;
- return n = new Cl({
- props: { Icon: $l, label: "Remove Image" }
+ return n = new kl({
+ props: { Icon: Kl, label: "Remove Image" }
}), n.$on(
"click",
/*click_handler*/
e[1]
), {
c() {
- t = Lf("div"), Pf(n.$$.fragment), Cf(t, "class", "svelte-1g74h68");
+ t = If("div"), Cf(n.$$.fragment), kf(t, "class", "svelte-1g74h68");
},
m(i, s) {
- Mf(i, t, s), Df(n, t, null), r = !0;
+ Of(i, t, s), Mf(n, t, null), r = !0;
},
- p: Rf,
+ p: Df,
i(i) {
- r || (xf(n.$$.fragment, i), r = !0);
+ r || (Uf(n.$$.fragment, i), r = !0);
},
o(i) {
- Ff(n.$$.fragment, i), r = !1;
+ xf(n.$$.fragment, i), r = !1;
},
d(i) {
- i && If(t), Nf(n);
+ i && Nf(t), Pf(n);
}
};
}
-function jf(e) {
- const t = Gf();
+function qf(e) {
+ const t = Ff();
return [t, (r) => {
t("remove_image"), r.stopPropagation();
}];
}
-class Vf extends kf {
+class jf extends Hf {
constructor(t) {
- super(), Of(this, t, jf, qf, Uf, {});
+ super(), Lf(this, t, qf, Gf, Rf, {});
}
}
const {
- SvelteComponent: zf,
- add_flush_callback: si,
- append: tr,
- attr: ht,
- bind: li,
- binding_callbacks: nr,
+ SvelteComponent: Vf,
+ add_flush_callback: ii,
+ append: zf,
+ attr: Nt,
+ bind: si,
+ binding_callbacks: er,
bubble: Xf,
- check_outros: rr,
- create_component: mr,
+ check_outros: tr,
+ create_component: _r,
create_slot: Wf,
- destroy_component: pr,
- detach: $t,
- element: en,
+ destroy_component: dr,
+ detach: It,
+ element: mr,
empty: Zf,
get_all_dirty_from_scope: Jf,
get_slot_changes: Qf,
- group_outros: ir,
+ group_outros: nr,
init: Yf,
- insert: tn,
- mount_component: gr,
- noop: sr,
+ insert: Lt,
+ mount_component: pr,
+ noop: rr,
safe_not_equal: Kf,
- space: oi,
+ space: li,
transition_in: de,
transition_out: Ee,
update_slot_base: $f
} = window.__gradio__svelte__internal, { createEventDispatcher: ec } = window.__gradio__svelte__internal;
-function ai(e) {
+function oi(e) {
let t, n;
- return t = new Vf({}), t.$on(
+ return t = new jf({}), t.$on(
"remove_image",
/*remove_image_handler*/
e[11]
), {
c() {
- mr(t.$$.fragment);
+ _r(t.$$.fragment);
},
m(r, i) {
- gr(t, r, i), n = !0;
+ pr(t, r, i), n = !0;
},
- p: sr,
+ p: rr,
i(r) {
n || (de(t.$$.fragment, r), n = !0);
},
@@ -6827,41 +6827,41 @@ function ai(e) {
Ee(t.$$.fragment, r), n = !1;
},
d(r) {
- pr(t, r);
+ dr(t, r);
}
};
}
function tc(e) {
- let t, n;
+ let t;
return {
c() {
- t = en("div"), n = en("div"), ht(n, "id", "fasta_content"), ht(n, "class", "svelte-9fc1fs"), ht(t, "class", "image-frame svelte-9fc1fs");
+ t = mr("div"), Nt(t, "id", "fasta_content"), Nt(t, "class", "svelte-1c5d8s");
},
- m(r, i) {
- tn(r, t, i), tr(t, n), n.innerHTML = /*fasta_text*/
+ m(n, r) {
+ Lt(n, t, r), t.innerHTML = /*fasta_text*/
e[7];
},
- p(r, i) {
- i & /*fasta_text*/
- 128 && (n.innerHTML = /*fasta_text*/
- r[7]);
+ p(n, r) {
+ r & /*fasta_text*/
+ 128 && (t.innerHTML = /*fasta_text*/
+ n[7]);
},
- i: sr,
- o: sr,
- d(r) {
- r && $t(t);
+ i: rr,
+ o: rr,
+ d(n) {
+ n && It(t);
}
};
}
function nc(e) {
- let t, n, r, i;
- function s(o) {
- e[13](o);
+ let t, n, r, i, s;
+ function l(a) {
+ e[13](a);
}
- function l(o) {
- e[14](o);
+ function u(a) {
+ e[14](a);
}
- let a = {
+ let o = {
hidden: (
/*value*/
e[0] !== null
@@ -6876,50 +6876,50 @@ function nc(e) {
};
return (
/*uploading*/
- e[4] !== void 0 && (a.uploading = /*uploading*/
+ e[4] !== void 0 && (o.uploading = /*uploading*/
e[4]), /*dragging*/
- e[5] !== void 0 && (a.dragging = /*dragging*/
- e[5]), t = new Hf({ props: a }), e[12](t), nr.push(() => li(t, "uploading", s)), nr.push(() => li(t, "dragging", l)), t.$on(
+ e[5] !== void 0 && (o.dragging = /*dragging*/
+ e[5]), n = new Bf({ props: o }), e[12](n), er.push(() => si(n, "uploading", l)), er.push(() => si(n, "dragging", u)), n.$on(
"load",
/*handle_upload*/
e[8]
- ), t.$on(
+ ), n.$on(
"error",
/*error_handler*/
e[15]
), {
c() {
- mr(t.$$.fragment);
+ t = mr("div"), _r(n.$$.fragment), Nt(t, "class", "upload-container svelte-1c5d8s");
},
- m(o, u) {
- gr(t, o, u), i = !0;
+ m(a, f) {
+ Lt(a, t, f), pr(n, t, null), s = !0;
},
- p(o, u) {
- const f = {};
- u & /*value*/
- 1 && (f.hidden = /*value*/
- o[0] !== null), u & /*root*/
- 8 && (f.root = /*root*/
- o[3]), u & /*$$scope, value*/
- 65537 && (f.$$scope = { dirty: u, ctx: o }), !n && u & /*uploading*/
- 16 && (n = !0, f.uploading = /*uploading*/
- o[4], si(() => n = !1)), !r && u & /*dragging*/
- 32 && (r = !0, f.dragging = /*dragging*/
- o[5], si(() => r = !1)), t.$set(f);
+ p(a, f) {
+ const c = {};
+ f & /*value*/
+ 1 && (c.hidden = /*value*/
+ a[0] !== null), f & /*root*/
+ 8 && (c.root = /*root*/
+ a[3]), f & /*$$scope, value*/
+ 65537 && (c.$$scope = { dirty: f, ctx: a }), !r && f & /*uploading*/
+ 16 && (r = !0, c.uploading = /*uploading*/
+ a[4], ii(() => r = !1)), !i && f & /*dragging*/
+ 32 && (i = !0, c.dragging = /*dragging*/
+ a[5], ii(() => i = !1)), n.$set(c);
},
- i(o) {
- i || (de(t.$$.fragment, o), i = !0);
+ i(a) {
+ s || (de(n.$$.fragment, a), s = !0);
},
- o(o) {
- Ee(t.$$.fragment, o), i = !1;
+ o(a) {
+ Ee(n.$$.fragment, a), s = !1;
},
- d(o) {
- e[12](null), pr(t, o);
+ d(a) {
+ a && It(t), e[12](null), dr(n);
}
}
);
}
-function ui(e) {
+function ai(e) {
let t;
const n = (
/*#slots*/
@@ -6973,21 +6973,21 @@ function ui(e) {
function rc(e) {
let t, n, r = (
/*value*/
- e[0] === null && ui(e)
+ e[0] === null && ai(e)
);
return {
c() {
r && r.c(), t = Zf();
},
m(i, s) {
- r && r.m(i, s), tn(i, t, s), n = !0;
+ r && r.m(i, s), Lt(i, t, s), n = !0;
},
p(i, s) {
/*value*/
i[0] === null ? r ? (r.p(i, s), s & /*value*/
- 1 && de(r, 1)) : (r = ui(i), r.c(), de(r, 1), r.m(t.parentNode, t)) : r && (ir(), Ee(r, 1, 1, () => {
+ 1 && de(r, 1)) : (r = ai(i), r.c(), de(r, 1), r.m(t.parentNode, t)) : r && (nr(), Ee(r, 1, 1, () => {
r = null;
- }), rr());
+ }), tr());
},
i(i) {
n || (de(r), n = !0);
@@ -6996,128 +6996,128 @@ function rc(e) {
Ee(r), n = !1;
},
d(i) {
- i && $t(t), r && r.d(i);
+ i && It(t), r && r.d(i);
}
};
}
function ic(e) {
var _;
- let t, n, r, i, s, l, a, o;
- t = new Mi({
+ let t, n, r, i, s, l, u;
+ t = new Oi({
props: {
show_label: (
/*show_label*/
e[2]
),
- Icon: or,
+ Icon: sr,
label: (
/*label*/
e[1] || "Image"
)
}
});
- let u = (
+ let o = (
/*value*/
- ((_ = e[0]) == null ? void 0 : _.url) && ai(e)
+ ((_ = e[0]) == null ? void 0 : _.url) && oi(e)
);
- const f = [nc, tc], c = [];
- function h(d, p) {
+ const a = [nc, tc], f = [];
+ function c(h, d) {
return (
/*value*/
- d[0] === null ? 0 : 1
+ h[0] === null ? 0 : 1
);
}
- return l = h(e), a = c[l] = f[l](e), {
+ return s = c(e), l = f[s] = a[s](e), {
c() {
- mr(t.$$.fragment), n = oi(), r = en("div"), u && u.c(), i = oi(), s = en("div"), a.c(), ht(s, "class", "upload-container svelte-9fc1fs"), ht(r, "data-testid", "image"), ht(r, "class", "image-container svelte-9fc1fs");
- },
- m(d, p) {
- gr(t, d, p), tn(d, n, p), tn(d, r, p), u && u.m(r, null), tr(r, i), tr(r, s), c[l].m(s, null), o = !0;
- },
- p(d, [p]) {
- var E;
- const y = {};
- p & /*show_label*/
- 4 && (y.show_label = /*show_label*/
- d[2]), p & /*label*/
- 2 && (y.label = /*label*/
- d[1] || "Image"), t.$set(y), /*value*/
- (E = d[0]) != null && E.url ? u ? (u.p(d, p), p & /*value*/
- 1 && de(u, 1)) : (u = ai(d), u.c(), de(u, 1), u.m(r, i)) : u && (ir(), Ee(u, 1, 1, () => {
- u = null;
- }), rr());
- let v = l;
- l = h(d), l === v ? c[l].p(d, p) : (ir(), Ee(c[v], 1, 1, () => {
- c[v] = null;
- }), rr(), a = c[l], a ? a.p(d, p) : (a = c[l] = f[l](d), a.c()), de(a, 1), a.m(s, null));
+ _r(t.$$.fragment), n = li(), r = mr("div"), o && o.c(), i = li(), l.c(), Nt(r, "data-testid", "image"), Nt(r, "class", "image-container svelte-1c5d8s");
+ },
+ m(h, d) {
+ pr(t, h, d), Lt(h, n, d), Lt(h, r, d), o && o.m(r, null), zf(r, i), f[s].m(r, null), u = !0;
+ },
+ p(h, [d]) {
+ var v;
+ const b = {};
+ d & /*show_label*/
+ 4 && (b.show_label = /*show_label*/
+ h[2]), d & /*label*/
+ 2 && (b.label = /*label*/
+ h[1] || "Image"), t.$set(b), /*value*/
+ (v = h[0]) != null && v.url ? o ? (o.p(h, d), d & /*value*/
+ 1 && de(o, 1)) : (o = oi(h), o.c(), de(o, 1), o.m(r, i)) : o && (nr(), Ee(o, 1, 1, () => {
+ o = null;
+ }), tr());
+ let y = s;
+ s = c(h), s === y ? f[s].p(h, d) : (nr(), Ee(f[y], 1, 1, () => {
+ f[y] = null;
+ }), tr(), l = f[s], l ? l.p(h, d) : (l = f[s] = a[s](h), l.c()), de(l, 1), l.m(r, null));
+ },
+ i(h) {
+ u || (de(t.$$.fragment, h), de(o), de(l), u = !0);
+ },
+ o(h) {
+ Ee(t.$$.fragment, h), Ee(o), Ee(l), u = !1;
},
- i(d) {
- o || (de(t.$$.fragment, d), de(u), de(a), o = !0);
- },
- o(d) {
- Ee(t.$$.fragment, d), Ee(u), Ee(a), o = !1;
- },
- d(d) {
- d && ($t(n), $t(r)), pr(t, d), u && u.d(), c[l].d();
+ d(h) {
+ h && (It(n), It(r)), dr(t, h), o && o.d(), f[s].d();
}
};
}
function sc(e, t, n) {
- let { $$slots: r = {}, $$scope: i } = t, { value: s } = t, { label: l = void 0 } = t, { show_label: a } = t, { root: o } = t, u, f = !1, c = "";
- async function h(T) {
+ let { $$slots: r = {}, $$scope: i } = t, { value: s } = t, { label: l = void 0 } = t, { show_label: u } = t, { root: o } = t, a, f = !1, c = "";
+ async function _(T) {
const w = await fetch(T);
n(7, c = await w.text()), n(7, c = c.replaceAll("G", "G")), n(7, c = c.replaceAll("A", "A")), n(7, c = c.replaceAll("T", "T")), n(7, c = c.replaceAll("C", "C")), n(7, c = c.replaceAll(/^(>.*)$/gm, "$1"));
}
- function _({ detail: T }) {
- n(0, s = Ce(T, o, null)), d("upload"), h(s.url);
+ function h({ detail: T }) {
+ n(0, s = Ce(T, o, null)), d("upload"), _(s.url);
}
const d = ec();
- let p = !1;
+ let b = !1;
const y = () => {
n(0, s = null), d("clear");
};
function v(T) {
- nr[T ? "unshift" : "push"](() => {
- u = T, n(6, u);
+ er[T ? "unshift" : "push"](() => {
+ a = T, n(6, a);
});
}
- function E(T) {
+ function S(T) {
f = T, n(4, f);
}
- function g(T) {
- p = T, n(5, p);
+ function p(T) {
+ b = T, n(5, b);
}
function A(T) {
Xf.call(this, e, T);
}
return e.$$set = (T) => {
- "value" in T && n(0, s = T.value), "label" in T && n(1, l = T.label), "show_label" in T && n(2, a = T.show_label), "root" in T && n(3, o = T.root), "$$scope" in T && n(16, i = T.$$scope);
+ "value" in T && n(0, s = T.value), "label" in T && n(1, l = T.label), "show_label" in T && n(2, u = T.show_label), "root" in T && n(3, o = T.root), "$$scope" in T && n(16, i = T.$$scope);
}, e.$$.update = () => {
e.$$.dirty & /*uploading*/
16 && f && n(0, s = null), e.$$.dirty & /*value, root*/
9 && s && !s.url && n(0, s = Ce(s, o, null)), e.$$.dirty & /*dragging*/
- 32 && d("drag", p);
+ 32 && d("drag", b);
}, [
s,
l,
- a,
+ u,
o,
f,
- p,
- u,
+ b,
+ a,
c,
- _,
+ h,
d,
r,
y,
v,
- E,
- g,
+ S,
+ p,
A,
i
];
}
-class lc extends zf {
+class lc extends Vf {
constructor(t) {
super(), Yf(this, t, sc, ic, Kf, {
value: 0,
@@ -7138,76 +7138,76 @@ const {
SvelteComponent: oc,
append: ve,
attr: O,
- component_subscribe: fi,
+ component_subscribe: ui,
detach: ac,
element: uc,
init: fc,
insert: cc,
- noop: ci,
+ noop: fi,
safe_not_equal: hc,
- set_style: qt,
+ set_style: Vt,
svg_element: ye,
- toggle_class: hi
+ toggle_class: ci
} = window.__gradio__svelte__internal, { onMount: _c } = window.__gradio__svelte__internal;
function dc(e) {
- let t, n, r, i, s, l, a, o, u, f, c, h;
+ let t, n, r, i, s, l, u, o, a, f, c, _;
return {
c() {
- t = uc("div"), n = ye("svg"), r = ye("g"), i = ye("path"), s = ye("path"), l = ye("path"), a = ye("path"), o = ye("g"), u = ye("path"), f = ye("path"), c = ye("path"), h = ye("path"), O(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), O(i, "fill", "#FF7C00"), O(i, "fill-opacity", "0.4"), O(i, "class", "svelte-43sxxs"), O(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), O(s, "fill", "#FF7C00"), O(s, "class", "svelte-43sxxs"), O(l, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), O(l, "fill", "#FF7C00"), O(l, "fill-opacity", "0.4"), O(l, "class", "svelte-43sxxs"), O(a, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), O(a, "fill", "#FF7C00"), O(a, "class", "svelte-43sxxs"), qt(r, "transform", "translate(" + /*$top*/
+ t = uc("div"), n = ye("svg"), r = ye("g"), i = ye("path"), s = ye("path"), l = ye("path"), u = ye("path"), o = ye("g"), a = ye("path"), f = ye("path"), c = ye("path"), _ = ye("path"), O(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), O(i, "fill", "#FF7C00"), O(i, "fill-opacity", "0.4"), O(i, "class", "svelte-43sxxs"), O(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), O(s, "fill", "#FF7C00"), O(s, "class", "svelte-43sxxs"), O(l, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), O(l, "fill", "#FF7C00"), O(l, "fill-opacity", "0.4"), O(l, "class", "svelte-43sxxs"), O(u, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), O(u, "fill", "#FF7C00"), O(u, "class", "svelte-43sxxs"), Vt(r, "transform", "translate(" + /*$top*/
e[1][0] + "px, " + /*$top*/
- e[1][1] + "px)"), O(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), O(u, "fill", "#FF7C00"), O(u, "fill-opacity", "0.4"), O(u, "class", "svelte-43sxxs"), O(f, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), O(f, "fill", "#FF7C00"), O(f, "class", "svelte-43sxxs"), O(c, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), O(c, "fill", "#FF7C00"), O(c, "fill-opacity", "0.4"), O(c, "class", "svelte-43sxxs"), O(h, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), O(h, "fill", "#FF7C00"), O(h, "class", "svelte-43sxxs"), qt(o, "transform", "translate(" + /*$bottom*/
+ e[1][1] + "px)"), O(a, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), O(a, "fill", "#FF7C00"), O(a, "fill-opacity", "0.4"), O(a, "class", "svelte-43sxxs"), O(f, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), O(f, "fill", "#FF7C00"), O(f, "class", "svelte-43sxxs"), O(c, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), O(c, "fill", "#FF7C00"), O(c, "fill-opacity", "0.4"), O(c, "class", "svelte-43sxxs"), O(_, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), O(_, "fill", "#FF7C00"), O(_, "class", "svelte-43sxxs"), Vt(o, "transform", "translate(" + /*$bottom*/
e[2][0] + "px, " + /*$bottom*/
- e[2][1] + "px)"), O(n, "viewBox", "-1200 -1200 3000 3000"), O(n, "fill", "none"), O(n, "xmlns", "http://www.w3.org/2000/svg"), O(n, "class", "svelte-43sxxs"), O(t, "class", "svelte-43sxxs"), hi(
+ e[2][1] + "px)"), O(n, "viewBox", "-1200 -1200 3000 3000"), O(n, "fill", "none"), O(n, "xmlns", "http://www.w3.org/2000/svg"), O(n, "class", "svelte-43sxxs"), O(t, "class", "svelte-43sxxs"), ci(
t,
"margin",
/*margin*/
e[0]
);
},
- m(_, d) {
- cc(_, t, d), ve(t, n), ve(n, r), ve(r, i), ve(r, s), ve(r, l), ve(r, a), ve(n, o), ve(o, u), ve(o, f), ve(o, c), ve(o, h);
+ m(h, d) {
+ cc(h, t, d), ve(t, n), ve(n, r), ve(r, i), ve(r, s), ve(r, l), ve(r, u), ve(n, o), ve(o, a), ve(o, f), ve(o, c), ve(o, _);
},
- p(_, [d]) {
+ p(h, [d]) {
d & /*$top*/
- 2 && qt(r, "transform", "translate(" + /*$top*/
- _[1][0] + "px, " + /*$top*/
- _[1][1] + "px)"), d & /*$bottom*/
- 4 && qt(o, "transform", "translate(" + /*$bottom*/
- _[2][0] + "px, " + /*$bottom*/
- _[2][1] + "px)"), d & /*margin*/
- 1 && hi(
+ 2 && Vt(r, "transform", "translate(" + /*$top*/
+ h[1][0] + "px, " + /*$top*/
+ h[1][1] + "px)"), d & /*$bottom*/
+ 4 && Vt(o, "transform", "translate(" + /*$bottom*/
+ h[2][0] + "px, " + /*$bottom*/
+ h[2][1] + "px)"), d & /*margin*/
+ 1 && ci(
t,
"margin",
/*margin*/
- _[0]
+ h[0]
);
},
- i: ci,
- o: ci,
- d(_) {
- _ && ac(t);
+ i: fi,
+ o: fi,
+ d(h) {
+ h && ac(t);
}
};
}
function mc(e, t, n) {
let r, i, { margin: s = !0 } = t;
- const l = xr([0, 0]);
- fi(e, l, (h) => n(1, r = h));
- const a = xr([0, 0]);
- fi(e, a, (h) => n(2, i = h));
+ const l = Ur([0, 0]);
+ ui(e, l, (_) => n(1, r = _));
+ const u = Ur([0, 0]);
+ ui(e, u, (_) => n(2, i = _));
let o;
- async function u() {
- await Promise.all([l.set([125, 140]), a.set([-125, -140])]), await Promise.all([l.set([-125, 140]), a.set([125, -140])]), await Promise.all([l.set([-125, 0]), a.set([125, -0])]), await Promise.all([l.set([125, 0]), a.set([-125, 0])]);
+ async function a() {
+ await Promise.all([l.set([125, 140]), u.set([-125, -140])]), await Promise.all([l.set([-125, 140]), u.set([125, -140])]), await Promise.all([l.set([-125, 0]), u.set([125, -0])]), await Promise.all([l.set([125, 0]), u.set([-125, 0])]);
}
async function f() {
- await u(), o || f();
+ await a(), o || f();
}
async function c() {
- await Promise.all([l.set([125, 0]), a.set([-125, 0])]), f();
+ await Promise.all([l.set([125, 0]), u.set([-125, 0])]), f();
}
- return _c(() => (c(), () => o = !0)), e.$$set = (h) => {
- "margin" in h && n(0, s = h.margin);
- }, [s, r, i, l, a];
+ return _c(() => (c(), () => o = !0)), e.$$set = (_) => {
+ "margin" in _ && n(0, s = _.margin);
+ }, [s, r, i, l, u];
}
class pc extends oc {
constructor(t) {
@@ -7218,38 +7218,38 @@ const {
SvelteComponent: gc,
append: Qe,
attr: Se,
- binding_callbacks: _i,
- check_outros: Hs,
+ binding_callbacks: hi,
+ check_outros: Bs,
create_component: bc,
create_slot: vc,
destroy_component: yc,
- destroy_each: ks,
+ destroy_each: Hs,
detach: k,
element: Pe,
- empty: wt,
- ensure_array_like: nn,
+ empty: yt,
+ ensure_array_like: tn,
get_all_dirty_from_scope: wc,
get_slot_changes: Ec,
- group_outros: Cs,
+ group_outros: ks,
init: Sc,
insert: C,
mount_component: Tc,
- noop: lr,
+ noop: ir,
safe_not_equal: Ac,
set_data: me,
set_style: xe,
space: Te,
text: q,
toggle_class: _e,
- transition_in: gt,
- transition_out: bt,
+ transition_in: pt,
+ transition_out: gt,
update_slot_base: Bc
-} = window.__gradio__svelte__internal, { tick: Hc } = window.__gradio__svelte__internal, { onDestroy: kc } = window.__gradio__svelte__internal, Cc = (e) => ({}), di = (e) => ({});
-function mi(e, t, n) {
+} = window.__gradio__svelte__internal, { tick: Hc } = window.__gradio__svelte__internal, { onDestroy: kc } = window.__gradio__svelte__internal, Cc = (e) => ({}), _i = (e) => ({});
+function di(e, t, n) {
const r = e.slice();
return r[38] = t[n], r[40] = n, r;
}
-function pi(e, t, n) {
+function mi(e, t, n) {
const r = e.slice();
return r[38] = t[n], r;
}
@@ -7261,26 +7261,26 @@ function Pc(e) {
const l = (
/*#slots*/
e[29].error
- ), a = vc(
+ ), u = vc(
l,
e,
/*$$scope*/
e[28],
- di
+ _i
);
return {
c() {
- t = Pe("span"), r = q(n), i = Te(), a && a.c(), Se(t, "class", "error svelte-1txqlrd");
+ t = Pe("span"), r = q(n), i = Te(), u && u.c(), Se(t, "class", "error svelte-1txqlrd");
},
- m(o, u) {
- C(o, t, u), Qe(t, r), C(o, i, u), a && a.m(o, u), s = !0;
+ m(o, a) {
+ C(o, t, a), Qe(t, r), C(o, i, a), u && u.m(o, a), s = !0;
},
- p(o, u) {
- (!s || u[0] & /*i18n*/
+ p(o, a) {
+ (!s || a[0] & /*i18n*/
2) && n !== (n = /*i18n*/
- o[1]("common.error") + "") && me(r, n), a && a.p && (!s || u[0] & /*$$scope*/
+ o[1]("common.error") + "") && me(r, n), u && u.p && (!s || a[0] & /*$$scope*/
268435456) && Bc(
- a,
+ u,
l,
o,
/*$$scope*/
@@ -7289,72 +7289,72 @@ function Pc(e) {
l,
/*$$scope*/
o[28],
- u,
+ a,
Cc
) : wc(
/*$$scope*/
o[28]
),
- di
+ _i
);
},
i(o) {
- s || (gt(a, o), s = !0);
+ s || (pt(u, o), s = !0);
},
o(o) {
- bt(a, o), s = !1;
+ gt(u, o), s = !1;
},
d(o) {
- o && (k(t), k(i)), a && a.d(o);
+ o && (k(t), k(i)), u && u.d(o);
}
};
}
function Nc(e) {
- let t, n, r, i, s, l, a, o, u, f = (
+ let t, n, r, i, s, l, u, o, a, f = (
/*variant*/
e[8] === "default" && /*show_eta_bar*/
e[18] && /*show_progress*/
- e[6] === "full" && gi(e)
+ e[6] === "full" && pi(e)
);
- function c(g, A) {
+ function c(p, A) {
if (
/*progress*/
- g[7]
+ p[7]
)
return Oc;
if (
/*queue_position*/
- g[2] !== null && /*queue_size*/
- g[3] !== void 0 && /*queue_position*/
- g[2] >= 0
+ p[2] !== null && /*queue_size*/
+ p[3] !== void 0 && /*queue_position*/
+ p[2] >= 0
)
return Lc;
if (
/*queue_position*/
- g[2] === 0
+ p[2] === 0
)
return Ic;
}
- let h = c(e), _ = h && h(e), d = (
+ let _ = c(e), h = _ && _(e), d = (
/*timer*/
- e[5] && yi(e)
+ e[5] && vi(e)
);
- const p = [Uc, Rc], y = [];
- function v(g, A) {
+ const b = [Uc, Rc], y = [];
+ function v(p, A) {
return (
/*last_progress_level*/
- g[15] != null ? 0 : (
+ p[15] != null ? 0 : (
/*show_progress*/
- g[6] === "full" ? 1 : -1
+ p[6] === "full" ? 1 : -1
)
);
}
- ~(s = v(e)) && (l = y[s] = p[s](e));
- let E = !/*timer*/
- e[5] && Hi(e);
+ ~(s = v(e)) && (l = y[s] = b[s](e));
+ let S = !/*timer*/
+ e[5] && Bi(e);
return {
c() {
- f && f.c(), t = Te(), n = Pe("div"), _ && _.c(), r = Te(), d && d.c(), i = Te(), l && l.c(), a = Te(), E && E.c(), o = wt(), Se(n, "class", "progress-text svelte-1txqlrd"), _e(
+ f && f.c(), t = Te(), n = Pe("div"), h && h.c(), r = Te(), d && d.c(), i = Te(), l && l.c(), u = Te(), S && S.c(), o = yt(), Se(n, "class", "progress-text svelte-1txqlrd"), _e(
n,
"meta-text-center",
/*variant*/
@@ -7366,45 +7366,45 @@ function Nc(e) {
e[8] === "default"
);
},
- m(g, A) {
- f && f.m(g, A), C(g, t, A), C(g, n, A), _ && _.m(n, null), Qe(n, r), d && d.m(n, null), C(g, i, A), ~s && y[s].m(g, A), C(g, a, A), E && E.m(g, A), C(g, o, A), u = !0;
+ m(p, A) {
+ f && f.m(p, A), C(p, t, A), C(p, n, A), h && h.m(n, null), Qe(n, r), d && d.m(n, null), C(p, i, A), ~s && y[s].m(p, A), C(p, u, A), S && S.m(p, A), C(p, o, A), a = !0;
},
- p(g, A) {
+ p(p, A) {
/*variant*/
- g[8] === "default" && /*show_eta_bar*/
- g[18] && /*show_progress*/
- g[6] === "full" ? f ? f.p(g, A) : (f = gi(g), f.c(), f.m(t.parentNode, t)) : f && (f.d(1), f = null), h === (h = c(g)) && _ ? _.p(g, A) : (_ && _.d(1), _ = h && h(g), _ && (_.c(), _.m(n, r))), /*timer*/
- g[5] ? d ? d.p(g, A) : (d = yi(g), d.c(), d.m(n, null)) : d && (d.d(1), d = null), (!u || A[0] & /*variant*/
+ p[8] === "default" && /*show_eta_bar*/
+ p[18] && /*show_progress*/
+ p[6] === "full" ? f ? f.p(p, A) : (f = pi(p), f.c(), f.m(t.parentNode, t)) : f && (f.d(1), f = null), _ === (_ = c(p)) && h ? h.p(p, A) : (h && h.d(1), h = _ && _(p), h && (h.c(), h.m(n, r))), /*timer*/
+ p[5] ? d ? d.p(p, A) : (d = vi(p), d.c(), d.m(n, null)) : d && (d.d(1), d = null), (!a || A[0] & /*variant*/
256) && _e(
n,
"meta-text-center",
/*variant*/
- g[8] === "center"
- ), (!u || A[0] & /*variant*/
+ p[8] === "center"
+ ), (!a || A[0] & /*variant*/
256) && _e(
n,
"meta-text",
/*variant*/
- g[8] === "default"
+ p[8] === "default"
);
let T = s;
- s = v(g), s === T ? ~s && y[s].p(g, A) : (l && (Cs(), bt(y[T], 1, 1, () => {
+ s = v(p), s === T ? ~s && y[s].p(p, A) : (l && (ks(), gt(y[T], 1, 1, () => {
y[T] = null;
- }), Hs()), ~s ? (l = y[s], l ? l.p(g, A) : (l = y[s] = p[s](g), l.c()), gt(l, 1), l.m(a.parentNode, a)) : l = null), /*timer*/
- g[5] ? E && (E.d(1), E = null) : E ? E.p(g, A) : (E = Hi(g), E.c(), E.m(o.parentNode, o));
+ }), Bs()), ~s ? (l = y[s], l ? l.p(p, A) : (l = y[s] = b[s](p), l.c()), pt(l, 1), l.m(u.parentNode, u)) : l = null), /*timer*/
+ p[5] ? S && (S.d(1), S = null) : S ? S.p(p, A) : (S = Bi(p), S.c(), S.m(o.parentNode, o));
},
- i(g) {
- u || (gt(l), u = !0);
+ i(p) {
+ a || (pt(l), a = !0);
},
- o(g) {
- bt(l), u = !1;
+ o(p) {
+ gt(l), a = !1;
},
- d(g) {
- g && (k(t), k(n), k(i), k(a), k(o)), f && f.d(g), _ && _.d(), d && d.d(), ~s && y[s].d(g), E && E.d(g);
+ d(p) {
+ p && (k(t), k(n), k(i), k(u), k(o)), f && f.d(p), h && h.d(), d && d.d(), ~s && y[s].d(p), S && S.d(p);
}
};
}
-function gi(e) {
+function pi(e) {
let t, n = `translateX(${/*eta_level*/
(e[17] || 0) * 100 - 100}%)`;
return {
@@ -7433,7 +7433,7 @@ function Ic(e) {
m(n, r) {
C(n, t, r);
},
- p: lr,
+ p: ir,
d(n) {
n && k(t);
}
@@ -7451,36 +7451,36 @@ function Lc(e) {
e[3]
), l = q(" |");
},
- m(a, o) {
- C(a, t, o), C(a, r, o), C(a, i, o), C(a, s, o), C(a, l, o);
+ m(u, o) {
+ C(u, t, o), C(u, r, o), C(u, i, o), C(u, s, o), C(u, l, o);
},
- p(a, o) {
+ p(u, o) {
o[0] & /*queue_position*/
4 && n !== (n = /*queue_position*/
- a[2] + 1 + "") && me(r, n), o[0] & /*queue_size*/
+ u[2] + 1 + "") && me(r, n), o[0] & /*queue_size*/
8 && me(
s,
/*queue_size*/
- a[3]
+ u[3]
);
},
- d(a) {
- a && (k(t), k(r), k(i), k(s), k(l));
+ d(u) {
+ u && (k(t), k(r), k(i), k(s), k(l));
}
};
}
function Oc(e) {
- let t, n = nn(
+ let t, n = tn(
/*progress*/
e[7]
), r = [];
for (let i = 0; i < n.length; i += 1)
- r[i] = vi(pi(e, n, i));
+ r[i] = bi(mi(e, n, i));
return {
c() {
for (let i = 0; i < r.length; i += 1)
r[i].c();
- t = wt();
+ t = yt();
},
m(i, s) {
for (let l = 0; l < r.length; l += 1)
@@ -7490,14 +7490,14 @@ function Oc(e) {
p(i, s) {
if (s[0] & /*progress*/
128) {
- n = nn(
+ n = tn(
/*progress*/
i[7]
);
let l;
for (l = 0; l < n.length; l += 1) {
- const a = pi(i, n, l);
- r[l] ? r[l].p(a, s) : (r[l] = vi(a), r[l].c(), r[l].m(t.parentNode, t));
+ const u = mi(i, n, l);
+ r[l] ? r[l].p(u, s) : (r[l] = bi(u), r[l].c(), r[l].m(t.parentNode, t));
}
for (; l < r.length; l += 1)
r[l].d(1);
@@ -7505,36 +7505,36 @@ function Oc(e) {
}
},
d(i) {
- i && k(t), ks(r, i);
+ i && k(t), Hs(r, i);
}
};
}
-function bi(e) {
+function gi(e) {
let t, n = (
/*p*/
e[38].unit + ""
), r, i, s = " ", l;
- function a(f, c) {
+ function u(f, c) {
return (
/*p*/
f[38].length != null ? Dc : Mc
);
}
- let o = a(e), u = o(e);
+ let o = u(e), a = o(e);
return {
c() {
- u.c(), t = Te(), r = q(n), i = q(" | "), l = q(s);
+ a.c(), t = Te(), r = q(n), i = q(" | "), l = q(s);
},
m(f, c) {
- u.m(f, c), C(f, t, c), C(f, r, c), C(f, i, c), C(f, l, c);
+ a.m(f, c), C(f, t, c), C(f, r, c), C(f, i, c), C(f, l, c);
},
p(f, c) {
- o === (o = a(f)) && u ? u.p(f, c) : (u.d(1), u = o(f), u && (u.c(), u.m(t.parentNode, t))), c[0] & /*progress*/
+ o === (o = u(f)) && a ? a.p(f, c) : (a.d(1), a = o(f), a && (a.c(), a.m(t.parentNode, t))), c[0] & /*progress*/
128 && n !== (n = /*p*/
f[38].unit + "") && me(r, n);
},
d(f) {
- f && (k(t), k(r), k(i), k(l)), u.d(f);
+ f && (k(t), k(r), k(i), k(l)), a.d(f);
}
};
}
@@ -7574,15 +7574,15 @@ function Dc(e) {
c() {
n = q(t), r = q("/"), s = q(i);
},
- m(l, a) {
- C(l, n, a), C(l, r, a), C(l, s, a);
+ m(l, u) {
+ C(l, n, u), C(l, r, u), C(l, s, u);
},
- p(l, a) {
- a[0] & /*progress*/
+ p(l, u) {
+ u[0] & /*progress*/
128 && t !== (t = ut(
/*p*/
l[38].index || 0
- ) + "") && me(n, t), a[0] & /*progress*/
+ ) + "") && me(n, t), u[0] & /*progress*/
128 && i !== (i = ut(
/*p*/
l[38].length
@@ -7593,28 +7593,28 @@ function Dc(e) {
}
};
}
-function vi(e) {
+function bi(e) {
let t, n = (
/*p*/
- e[38].index != null && bi(e)
+ e[38].index != null && gi(e)
);
return {
c() {
- n && n.c(), t = wt();
+ n && n.c(), t = yt();
},
m(r, i) {
n && n.m(r, i), C(r, t, i);
},
p(r, i) {
/*p*/
- r[38].index != null ? n ? n.p(r, i) : (n = bi(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
+ r[38].index != null ? n ? n.p(r, i) : (n = gi(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
},
d(r) {
r && k(t), n && n.d(r);
}
};
}
-function yi(e) {
+function vi(e) {
let t, n = (
/*eta*/
e[0] ? `/${/*formatted_eta*/
@@ -7667,10 +7667,10 @@ function Rc(e) {
r[8] === "default"), t.$set(s);
},
i(r) {
- n || (gt(t.$$.fragment, r), n = !0);
+ n || (pt(t.$$.fragment, r), n = !0);
},
o(r) {
- bt(t.$$.fragment, r), n = !1;
+ gt(t.$$.fragment, r), n = !1;
},
d(r) {
yc(t, r);
@@ -7679,42 +7679,42 @@ function Rc(e) {
}
function Uc(e) {
let t, n, r, i, s, l = `${/*last_progress_level*/
- e[15] * 100}%`, a = (
+ e[15] * 100}%`, u = (
/*progress*/
- e[7] != null && wi(e)
+ e[7] != null && yi(e)
);
return {
c() {
- t = Pe("div"), n = Pe("div"), a && a.c(), r = Te(), i = Pe("div"), s = Pe("div"), Se(n, "class", "progress-level-inner svelte-1txqlrd"), Se(s, "class", "progress-bar svelte-1txqlrd"), xe(s, "width", l), Se(i, "class", "progress-bar-wrap svelte-1txqlrd"), Se(t, "class", "progress-level svelte-1txqlrd");
+ t = Pe("div"), n = Pe("div"), u && u.c(), r = Te(), i = Pe("div"), s = Pe("div"), Se(n, "class", "progress-level-inner svelte-1txqlrd"), Se(s, "class", "progress-bar svelte-1txqlrd"), xe(s, "width", l), Se(i, "class", "progress-bar-wrap svelte-1txqlrd"), Se(t, "class", "progress-level svelte-1txqlrd");
},
- m(o, u) {
- C(o, t, u), Qe(t, n), a && a.m(n, null), Qe(t, r), Qe(t, i), Qe(i, s), e[30](s);
+ m(o, a) {
+ C(o, t, a), Qe(t, n), u && u.m(n, null), Qe(t, r), Qe(t, i), Qe(i, s), e[30](s);
},
- p(o, u) {
+ p(o, a) {
/*progress*/
- o[7] != null ? a ? a.p(o, u) : (a = wi(o), a.c(), a.m(n, null)) : a && (a.d(1), a = null), u[0] & /*last_progress_level*/
+ o[7] != null ? u ? u.p(o, a) : (u = yi(o), u.c(), u.m(n, null)) : u && (u.d(1), u = null), a[0] & /*last_progress_level*/
32768 && l !== (l = `${/*last_progress_level*/
o[15] * 100}%`) && xe(s, "width", l);
},
- i: lr,
- o: lr,
+ i: ir,
+ o: ir,
d(o) {
- o && k(t), a && a.d(), e[30](null);
+ o && k(t), u && u.d(), e[30](null);
}
};
}
-function wi(e) {
- let t, n = nn(
+function yi(e) {
+ let t, n = tn(
/*progress*/
e[7]
), r = [];
for (let i = 0; i < n.length; i += 1)
- r[i] = Bi(mi(e, n, i));
+ r[i] = Ai(di(e, n, i));
return {
c() {
for (let i = 0; i < r.length; i += 1)
r[i].c();
- t = wt();
+ t = yt();
},
m(i, s) {
for (let l = 0; l < r.length; l += 1)
@@ -7724,14 +7724,14 @@ function wi(e) {
p(i, s) {
if (s[0] & /*progress_level, progress*/
16512) {
- n = nn(
+ n = tn(
/*progress*/
i[7]
);
let l;
for (l = 0; l < n.length; l += 1) {
- const a = mi(i, n, l);
- r[l] ? r[l].p(a, s) : (r[l] = Bi(a), r[l].c(), r[l].m(t.parentNode, t));
+ const u = di(i, n, l);
+ r[l] ? r[l].p(u, s) : (r[l] = Ai(u), r[l].c(), r[l].m(t.parentNode, t));
}
for (; l < r.length; l += 1)
r[l].d(1);
@@ -7739,49 +7739,49 @@ function wi(e) {
}
},
d(i) {
- i && k(t), ks(r, i);
+ i && k(t), Hs(r, i);
}
};
}
-function Ei(e) {
+function wi(e) {
let t, n, r, i, s = (
/*i*/
e[40] !== 0 && xc()
), l = (
/*p*/
- e[38].desc != null && Si(e)
- ), a = (
+ e[38].desc != null && Ei(e)
+ ), u = (
/*p*/
e[38].desc != null && /*progress_level*/
e[14] && /*progress_level*/
e[14][
/*i*/
e[40]
- ] != null && Ti()
+ ] != null && Si()
), o = (
/*progress_level*/
- e[14] != null && Ai(e)
+ e[14] != null && Ti(e)
);
return {
c() {
- s && s.c(), t = Te(), l && l.c(), n = Te(), a && a.c(), r = Te(), o && o.c(), i = wt();
+ s && s.c(), t = Te(), l && l.c(), n = Te(), u && u.c(), r = Te(), o && o.c(), i = yt();
},
- m(u, f) {
- s && s.m(u, f), C(u, t, f), l && l.m(u, f), C(u, n, f), a && a.m(u, f), C(u, r, f), o && o.m(u, f), C(u, i, f);
+ m(a, f) {
+ s && s.m(a, f), C(a, t, f), l && l.m(a, f), C(a, n, f), u && u.m(a, f), C(a, r, f), o && o.m(a, f), C(a, i, f);
},
- p(u, f) {
+ p(a, f) {
/*p*/
- u[38].desc != null ? l ? l.p(u, f) : (l = Si(u), l.c(), l.m(n.parentNode, n)) : l && (l.d(1), l = null), /*p*/
- u[38].desc != null && /*progress_level*/
- u[14] && /*progress_level*/
- u[14][
+ a[38].desc != null ? l ? l.p(a, f) : (l = Ei(a), l.c(), l.m(n.parentNode, n)) : l && (l.d(1), l = null), /*p*/
+ a[38].desc != null && /*progress_level*/
+ a[14] && /*progress_level*/
+ a[14][
/*i*/
- u[40]
- ] != null ? a || (a = Ti(), a.c(), a.m(r.parentNode, r)) : a && (a.d(1), a = null), /*progress_level*/
- u[14] != null ? o ? o.p(u, f) : (o = Ai(u), o.c(), o.m(i.parentNode, i)) : o && (o.d(1), o = null);
+ a[40]
+ ] != null ? u || (u = Si(), u.c(), u.m(r.parentNode, r)) : u && (u.d(1), u = null), /*progress_level*/
+ a[14] != null ? o ? o.p(a, f) : (o = Ti(a), o.c(), o.m(i.parentNode, i)) : o && (o.d(1), o = null);
},
- d(u) {
- u && (k(t), k(n), k(r), k(i)), s && s.d(u), l && l.d(u), a && a.d(u), o && o.d(u);
+ d(a) {
+ a && (k(t), k(n), k(r), k(i)), s && s.d(a), l && l.d(a), u && u.d(a), o && o.d(a);
}
};
}
@@ -7799,7 +7799,7 @@ function xc(e) {
}
};
}
-function Si(e) {
+function Ei(e) {
let t = (
/*p*/
e[38].desc + ""
@@ -7821,7 +7821,7 @@ function Si(e) {
}
};
}
-function Ti(e) {
+function Si(e) {
let t;
return {
c() {
@@ -7835,7 +7835,7 @@ function Ti(e) {
}
};
}
-function Ai(e) {
+function Ti(e) {
let t = (100 * /*progress_level*/
(e[14][
/*i*/
@@ -7861,7 +7861,7 @@ function Ai(e) {
}
};
}
-function Bi(e) {
+function Ai(e) {
let t, n = (
/*p*/
(e[38].desc != null || /*progress_level*/
@@ -7869,11 +7869,11 @@ function Bi(e) {
e[14][
/*i*/
e[40]
- ] != null) && Ei(e)
+ ] != null) && wi(e)
);
return {
c() {
- n && n.c(), t = wt();
+ n && n.c(), t = yt();
},
m(r, i) {
n && n.m(r, i), C(r, t, i);
@@ -7885,14 +7885,14 @@ function Bi(e) {
r[14][
/*i*/
r[40]
- ] != null ? n ? n.p(r, i) : (n = Ei(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
+ ] != null ? n ? n.p(r, i) : (n = wi(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
},
d(r) {
r && k(t), n && n.d(r);
}
};
}
-function Hi(e) {
+function Bi(e) {
let t, n;
return {
c() {
@@ -7919,17 +7919,17 @@ function Hi(e) {
}
function Fc(e) {
let t, n, r, i, s;
- const l = [Nc, Pc], a = [];
- function o(u, f) {
+ const l = [Nc, Pc], u = [];
+ function o(a, f) {
return (
/*status*/
- u[4] === "pending" ? 0 : (
+ a[4] === "pending" ? 0 : (
/*status*/
- u[4] === "error" ? 1 : -1
+ a[4] === "error" ? 1 : -1
)
);
}
- return ~(n = o(e)) && (r = a[n] = l[n](e)), {
+ return ~(n = o(e)) && (r = u[n] = l[n](e)), {
c() {
t = Pe("div"), r && r.c(), Se(t, "class", i = "wrap " + /*variant*/
e[8] + " " + /*show_progress*/
@@ -7967,88 +7967,88 @@ function Fc(e) {
e[10] ? "0" : "var(--size-8) 0"
);
},
- m(u, f) {
- C(u, t, f), ~n && a[n].m(t, null), e[31](t), s = !0;
+ m(a, f) {
+ C(a, t, f), ~n && u[n].m(t, null), e[31](t), s = !0;
},
- p(u, f) {
+ p(a, f) {
let c = n;
- n = o(u), n === c ? ~n && a[n].p(u, f) : (r && (Cs(), bt(a[c], 1, 1, () => {
- a[c] = null;
- }), Hs()), ~n ? (r = a[n], r ? r.p(u, f) : (r = a[n] = l[n](u), r.c()), gt(r, 1), r.m(t, null)) : r = null), (!s || f[0] & /*variant, show_progress*/
+ n = o(a), n === c ? ~n && u[n].p(a, f) : (r && (ks(), gt(u[c], 1, 1, () => {
+ u[c] = null;
+ }), Bs()), ~n ? (r = u[n], r ? r.p(a, f) : (r = u[n] = l[n](a), r.c()), pt(r, 1), r.m(t, null)) : r = null), (!s || f[0] & /*variant, show_progress*/
320 && i !== (i = "wrap " + /*variant*/
- u[8] + " " + /*show_progress*/
- u[6] + " svelte-1txqlrd")) && Se(t, "class", i), (!s || f[0] & /*variant, show_progress, status, show_progress*/
+ a[8] + " " + /*show_progress*/
+ a[6] + " svelte-1txqlrd")) && Se(t, "class", i), (!s || f[0] & /*variant, show_progress, status, show_progress*/
336) && _e(t, "hide", !/*status*/
- u[4] || /*status*/
- u[4] === "complete" || /*show_progress*/
- u[6] === "hidden"), (!s || f[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
+ a[4] || /*status*/
+ a[4] === "complete" || /*show_progress*/
+ a[6] === "hidden"), (!s || f[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
2384) && _e(
t,
"translucent",
/*variant*/
- u[8] === "center" && /*status*/
- (u[4] === "pending" || /*status*/
- u[4] === "error") || /*translucent*/
- u[11] || /*show_progress*/
- u[6] === "minimal"
+ a[8] === "center" && /*status*/
+ (a[4] === "pending" || /*status*/
+ a[4] === "error") || /*translucent*/
+ a[11] || /*show_progress*/
+ a[6] === "minimal"
), (!s || f[0] & /*variant, show_progress, status*/
336) && _e(
t,
"generating",
/*status*/
- u[4] === "generating"
+ a[4] === "generating"
), (!s || f[0] & /*variant, show_progress, border*/
4416) && _e(
t,
"border",
/*border*/
- u[12]
+ a[12]
), f[0] & /*absolute*/
1024 && xe(
t,
"position",
/*absolute*/
- u[10] ? "absolute" : "static"
+ a[10] ? "absolute" : "static"
), f[0] & /*absolute*/
1024 && xe(
t,
"padding",
/*absolute*/
- u[10] ? "0" : "var(--size-8) 0"
+ a[10] ? "0" : "var(--size-8) 0"
);
},
- i(u) {
- s || (gt(r), s = !0);
+ i(a) {
+ s || (pt(r), s = !0);
},
- o(u) {
- bt(r), s = !1;
+ o(a) {
+ gt(r), s = !1;
},
- d(u) {
- u && k(t), ~n && a[n].d(), e[31](null);
+ d(a) {
+ a && k(t), ~n && u[n].d(), e[31](null);
}
};
}
-let jt = [], In = !1;
+let zt = [], Nn = !1;
async function Gc(e, t = !0) {
if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) {
- if (jt.push(e), !In)
- In = !0;
+ if (zt.push(e), !Nn)
+ Nn = !0;
else
return;
await Hc(), requestAnimationFrame(() => {
let n = [0, 0];
- for (let r = 0; r < jt.length; r++) {
- const s = jt[r].getBoundingClientRect();
+ for (let r = 0; r < zt.length; r++) {
+ const s = zt[r].getBoundingClientRect();
(r === 0 || s.top + window.scrollY <= n[0]) && (n[0] = s.top + window.scrollY, n[1] = r);
}
- window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), In = !1, jt = [];
+ window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), Nn = !1, zt = [];
});
}
}
function qc(e, t, n) {
- let r, { $$slots: i = {}, $$scope: s } = t, { i18n: l } = t, { eta: a = null } = t, { queue_position: o } = t, { queue_size: u } = t, { status: f } = t, { scroll_to_output: c = !1 } = t, { timer: h = !0 } = t, { show_progress: _ = "full" } = t, { message: d = null } = t, { progress: p = null } = t, { variant: y = "default" } = t, { loading_text: v = "Loading..." } = t, { absolute: E = !0 } = t, { translucent: g = !1 } = t, { border: A = !1 } = t, { autoscroll: T } = t, w, j = !1, B = 0, H = 0, Z = null, le = null, Ge = 0, $ = null, Ae, oe = null, qe = !0;
- const Et = () => {
- n(0, a = n(26, Z = n(19, Be = null))), n(24, B = performance.now()), n(25, H = 0), j = !0, Le();
+ let r, { $$slots: i = {}, $$scope: s } = t, { i18n: l } = t, { eta: u = null } = t, { queue_position: o } = t, { queue_size: a } = t, { status: f } = t, { scroll_to_output: c = !1 } = t, { timer: _ = !0 } = t, { show_progress: h = "full" } = t, { message: d = null } = t, { progress: b = null } = t, { variant: y = "default" } = t, { loading_text: v = "Loading..." } = t, { absolute: S = !0 } = t, { translucent: p = !1 } = t, { border: A = !1 } = t, { autoscroll: T } = t, w, j = !1, B = 0, H = 0, Z = null, le = null, Ge = 0, $ = null, Ae, oe = null, qe = !0;
+ const wt = () => {
+ n(0, u = n(26, Z = n(19, Be = null))), n(24, B = performance.now()), n(25, H = 0), j = !0, Le();
};
function Le() {
requestAnimationFrame(() => {
@@ -8056,52 +8056,52 @@ function qc(e, t, n) {
});
}
function rt() {
- n(25, H = 0), n(0, a = n(26, Z = n(19, Be = null))), j && (j = !1);
+ n(25, H = 0), n(0, u = n(26, Z = n(19, Be = null))), j && (j = !1);
}
kc(() => {
j && rt();
});
let Be = null;
- function m(b) {
- _i[b ? "unshift" : "push"](() => {
- oe = b, n(16, oe), n(7, p), n(14, $), n(15, Ae);
+ function m(g) {
+ hi[g ? "unshift" : "push"](() => {
+ oe = g, n(16, oe), n(7, b), n(14, $), n(15, Ae);
});
}
- function N(b) {
- _i[b ? "unshift" : "push"](() => {
- w = b, n(13, w);
+ function N(g) {
+ hi[g ? "unshift" : "push"](() => {
+ w = g, n(13, w);
});
}
- return e.$$set = (b) => {
- "i18n" in b && n(1, l = b.i18n), "eta" in b && n(0, a = b.eta), "queue_position" in b && n(2, o = b.queue_position), "queue_size" in b && n(3, u = b.queue_size), "status" in b && n(4, f = b.status), "scroll_to_output" in b && n(21, c = b.scroll_to_output), "timer" in b && n(5, h = b.timer), "show_progress" in b && n(6, _ = b.show_progress), "message" in b && n(22, d = b.message), "progress" in b && n(7, p = b.progress), "variant" in b && n(8, y = b.variant), "loading_text" in b && n(9, v = b.loading_text), "absolute" in b && n(10, E = b.absolute), "translucent" in b && n(11, g = b.translucent), "border" in b && n(12, A = b.border), "autoscroll" in b && n(23, T = b.autoscroll), "$$scope" in b && n(28, s = b.$$scope);
+ return e.$$set = (g) => {
+ "i18n" in g && n(1, l = g.i18n), "eta" in g && n(0, u = g.eta), "queue_position" in g && n(2, o = g.queue_position), "queue_size" in g && n(3, a = g.queue_size), "status" in g && n(4, f = g.status), "scroll_to_output" in g && n(21, c = g.scroll_to_output), "timer" in g && n(5, _ = g.timer), "show_progress" in g && n(6, h = g.show_progress), "message" in g && n(22, d = g.message), "progress" in g && n(7, b = g.progress), "variant" in g && n(8, y = g.variant), "loading_text" in g && n(9, v = g.loading_text), "absolute" in g && n(10, S = g.absolute), "translucent" in g && n(11, p = g.translucent), "border" in g && n(12, A = g.border), "autoscroll" in g && n(23, T = g.autoscroll), "$$scope" in g && n(28, s = g.$$scope);
}, e.$$.update = () => {
e.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
- 218103809 && (a === null && n(0, a = Z), a != null && Z !== a && (n(27, le = (performance.now() - B) / 1e3 + a), n(19, Be = le.toFixed(1)), n(26, Z = a))), e.$$.dirty[0] & /*eta_from_start, timer_diff*/
+ 218103809 && (u === null && n(0, u = Z), u != null && Z !== u && (n(27, le = (performance.now() - B) / 1e3 + u), n(19, Be = le.toFixed(1)), n(26, Z = u))), e.$$.dirty[0] & /*eta_from_start, timer_diff*/
167772160 && n(17, Ge = le === null || le <= 0 || !H ? null : Math.min(H / le, 1)), e.$$.dirty[0] & /*progress*/
- 128 && p != null && n(18, qe = !1), e.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
- 114816 && (p != null ? n(14, $ = p.map((b) => {
- if (b.index != null && b.length != null)
- return b.index / b.length;
- if (b.progress != null)
- return b.progress;
+ 128 && b != null && n(18, qe = !1), e.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
+ 114816 && (b != null ? n(14, $ = b.map((g) => {
+ if (g.index != null && g.length != null)
+ return g.index / g.length;
+ if (g.progress != null)
+ return g.progress;
})) : n(14, $ = null), $ ? (n(15, Ae = $[$.length - 1]), oe && (Ae === 0 ? n(16, oe.style.transition = "0", oe) : n(16, oe.style.transition = "150ms", oe))) : n(15, Ae = void 0)), e.$$.dirty[0] & /*status*/
- 16 && (f === "pending" ? Et() : rt()), e.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
+ 16 && (f === "pending" ? wt() : rt()), e.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
10493968 && w && c && (f === "pending" || f === "complete") && Gc(w, T), e.$$.dirty[0] & /*status, message*/
4194320, e.$$.dirty[0] & /*timer_diff*/
33554432 && n(20, r = H.toFixed(1));
}, [
- a,
+ u,
l,
o,
- u,
+ a,
f,
- h,
_,
- p,
+ h,
+ b,
y,
v,
- E,
- g,
+ S,
+ p,
A,
w,
$,
@@ -8124,7 +8124,7 @@ function qc(e, t, n) {
N
];
}
-class Ps extends gc {
+class Cs extends gc {
constructor(t) {
super(), Sc(
this,
@@ -8158,24 +8158,24 @@ class Ps extends gc {
const {
SvelteComponent: jc,
append: Vc,
- attr: At,
- detach: Ns,
- element: ki,
+ attr: Tt,
+ detach: Ps,
+ element: Hi,
empty: zc,
init: Xc,
- insert: Is,
- noop: Ci,
+ insert: Ns,
+ noop: ki,
safe_not_equal: Wc,
- src_url_equal: Pi,
+ src_url_equal: Ci,
toggle_class: ot
} = window.__gradio__svelte__internal;
-function Ni(e) {
+function Pi(e) {
let t, n, r;
return {
c() {
- t = ki("div"), n = ki("img"), Pi(n.src, r = /*samples_dir*/
+ t = Hi("div"), n = Hi("img"), Ci(n.src, r = /*samples_dir*/
e[1] + /*value*/
- e[0].path) || At(n, "src", r), At(n, "alt", ""), At(n, "class", "svelte-giydt1"), At(t, "class", "container svelte-giydt1"), ot(
+ e[0].path) || Tt(n, "src", r), Tt(n, "alt", ""), Tt(n, "class", "svelte-giydt1"), Tt(t, "class", "container svelte-giydt1"), ot(
t,
"table",
/*type*/
@@ -8193,13 +8193,13 @@ function Ni(e) {
);
},
m(i, s) {
- Is(i, t, s), Vc(t, n);
+ Ns(i, t, s), Vc(t, n);
},
p(i, s) {
s & /*samples_dir, value*/
- 3 && !Pi(n.src, r = /*samples_dir*/
+ 3 && !Ci(n.src, r = /*samples_dir*/
i[1] + /*value*/
- i[0].path) && At(n, "src", r), s & /*type*/
+ i[0].path) && Tt(n, "src", r), s & /*type*/
4 && ot(
t,
"table",
@@ -8220,37 +8220,37 @@ function Ni(e) {
);
},
d(i) {
- i && Ns(t);
+ i && Ps(t);
}
};
}
function Zc(e) {
let t, n = (
/*value*/
- e[0] && Ni(e)
+ e[0] && Pi(e)
);
return {
c() {
n && n.c(), t = zc();
},
m(r, i) {
- n && n.m(r, i), Is(r, t, i);
+ n && n.m(r, i), Ns(r, t, i);
},
p(r, [i]) {
/*value*/
- r[0] ? n ? n.p(r, i) : (n = Ni(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
+ r[0] ? n ? n.p(r, i) : (n = Pi(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
},
- i: Ci,
- o: Ci,
+ i: ki,
+ o: ki,
d(r) {
- r && Ns(t), n && n.d(r);
+ r && Ps(t), n && n.d(r);
}
};
}
function Jc(e, t, n) {
let { value: r } = t, { samples_dir: i } = t, { type: s } = t, { selected: l = !1 } = t;
- return e.$$set = (a) => {
- "value" in a && n(0, r = a.value), "samples_dir" in a && n(1, i = a.samples_dir), "type" in a && n(2, s = a.type), "selected" in a && n(3, l = a.selected);
+ return e.$$set = (u) => {
+ "value" in u && n(0, r = u.value), "samples_dir" in u && n(1, i = u.samples_dir), "type" in u && n(2, s = u.type), "selected" in u && n(3, l = u.selected);
}, [r, i, s, l];
}
class b0 extends jc {
@@ -8266,29 +8266,29 @@ class b0 extends jc {
const {
SvelteComponent: Qc,
add_flush_callback: Yc,
- assign: Ls,
+ assign: Is,
bind: Kc,
binding_callbacks: $c,
check_outros: e0,
create_component: $e,
destroy_component: et,
- detach: br,
+ detach: gr,
empty: t0,
flush: te,
- get_spread_object: Os,
- get_spread_update: Ms,
+ get_spread_object: Ls,
+ get_spread_update: Os,
group_outros: n0,
init: r0,
- insert: vr,
+ insert: br,
mount_component: tt,
safe_not_equal: i0,
- space: Ds,
+ space: Ms,
transition_in: Ne,
transition_out: Ie
} = window.__gradio__svelte__internal;
function s0(e) {
let t, n;
- return t = new Oi({
+ return t = new Li({
props: {
visible: (
/*visible*/
@@ -8368,7 +8368,7 @@ function s0(e) {
}
function l0(e) {
let t, n;
- return t = new Oi({
+ return t = new Li({
props: {
visible: (
/*visible*/
@@ -8443,7 +8443,7 @@ function l0(e) {
}
function o0(e) {
let t, n;
- return t = new Io({
+ return t = new No({
props: {
i18n: (
/*gradio*/
@@ -8491,14 +8491,14 @@ function a0(e) {
/*loading_status*/
e[10]
];
- let a = {};
+ let u = {};
for (let f = 0; f < l.length; f += 1)
- a = Ls(a, l[f]);
- t = new Ps({ props: a });
+ u = Is(u, l[f]);
+ t = new Cs({ props: u });
function o(f) {
e[17](f);
}
- let u = {
+ let a = {
root: (
/*root*/
e[4]
@@ -8520,8 +8520,8 @@ function a0(e) {
};
return (
/*value*/
- e[0] !== void 0 && (u.value = /*value*/
- e[0]), r = new lc({ props: u }), $c.push(() => Kc(r, "value", o)), r.$on(
+ e[0] !== void 0 && (a.value = /*value*/
+ e[0]), r = new lc({ props: a }), $c.push(() => Kc(r, "value", o)), r.$on(
"clear",
/*clear_handler*/
e[18]
@@ -8535,14 +8535,14 @@ function a0(e) {
e[20]
), {
c() {
- $e(t.$$.fragment), n = Ds(), $e(r.$$.fragment);
+ $e(t.$$.fragment), n = Ms(), $e(r.$$.fragment);
},
m(f, c) {
- tt(t, f, c), vr(f, n, c), tt(r, f, c), s = !0;
+ tt(t, f, c), br(f, n, c), tt(r, f, c), s = !0;
},
p(f, c) {
- const h = c & /*gradio, loading_status*/
- 5120 ? Ms(l, [
+ const _ = c & /*gradio, loading_status*/
+ 5120 ? Os(l, [
c & /*gradio*/
4096 && {
autoscroll: (
@@ -8556,25 +8556,25 @@ function a0(e) {
f[12].i18n
) },
c & /*loading_status*/
- 1024 && Os(
+ 1024 && Ls(
/*loading_status*/
f[10]
)
]) : {};
- t.$set(h);
- const _ = {};
+ t.$set(_);
+ const h = {};
c & /*root*/
- 16 && (_.root = /*root*/
+ 16 && (h.root = /*root*/
f[4]), c & /*label*/
- 32 && (_.label = /*label*/
+ 32 && (h.label = /*label*/
f[5]), c & /*show_label*/
- 64 && (_.show_label = /*show_label*/
+ 64 && (h.show_label = /*show_label*/
f[6]), c & /*gradio*/
- 4096 && (_.i18n = /*gradio*/
+ 4096 && (h.i18n = /*gradio*/
f[12].i18n), c & /*$$scope, gradio*/
- 2101248 && (_.$$scope = { dirty: c, ctx: f }), !i && c & /*value*/
- 1 && (i = !0, _.value = /*value*/
- f[0], Yc(() => i = !1)), r.$set(_);
+ 2101248 && (h.$$scope = { dirty: c, ctx: f }), !i && c & /*value*/
+ 1 && (i = !0, h.value = /*value*/
+ f[0], Yc(() => i = !1)), r.$set(h);
},
i(f) {
s || (Ne(t.$$.fragment, f), Ne(r.$$.fragment, f), s = !0);
@@ -8583,7 +8583,7 @@ function a0(e) {
Ie(t.$$.fragment, f), Ie(r.$$.fragment, f), s = !1;
},
d(f) {
- f && br(n), et(t, f), et(r, f);
+ f && gr(n), et(t, f), et(r, f);
}
}
);
@@ -8605,9 +8605,9 @@ function u0(e) {
e[10]
];
let l = {};
- for (let a = 0; a < s.length; a += 1)
- l = Ls(l, s[a]);
- return t = new Ps({ props: l }), r = new sa({
+ for (let u = 0; u < s.length; u += 1)
+ l = Is(l, s[u]);
+ return t = new Cs({ props: l }), r = new ia({
props: {
value: (
/*_value*/
@@ -8628,76 +8628,76 @@ function u0(e) {
}
}), {
c() {
- $e(t.$$.fragment), n = Ds(), $e(r.$$.fragment);
+ $e(t.$$.fragment), n = Ms(), $e(r.$$.fragment);
},
- m(a, o) {
- tt(t, a, o), vr(a, n, o), tt(r, a, o), i = !0;
+ m(u, o) {
+ tt(t, u, o), br(u, n, o), tt(r, u, o), i = !0;
},
- p(a, o) {
- const u = o & /*gradio, loading_status*/
- 5120 ? Ms(s, [
+ p(u, o) {
+ const a = o & /*gradio, loading_status*/
+ 5120 ? Os(s, [
o & /*gradio*/
4096 && {
autoscroll: (
/*gradio*/
- a[12].autoscroll
+ u[12].autoscroll
)
},
o & /*gradio*/
4096 && { i18n: (
/*gradio*/
- a[12].i18n
+ u[12].i18n
) },
o & /*loading_status*/
- 1024 && Os(
+ 1024 && Ls(
/*loading_status*/
- a[10]
+ u[10]
)
]) : {};
- t.$set(u);
+ t.$set(a);
const f = {};
o & /*_value*/
8192 && (f.value = /*_value*/
- a[13]), o & /*label*/
+ u[13]), o & /*label*/
32 && (f.label = /*label*/
- a[5]), o & /*show_label*/
+ u[5]), o & /*show_label*/
64 && (f.show_label = /*show_label*/
- a[6]), o & /*gradio*/
+ u[6]), o & /*gradio*/
4096 && (f.i18n = /*gradio*/
- a[12].i18n), r.$set(f);
+ u[12].i18n), r.$set(f);
},
- i(a) {
- i || (Ne(t.$$.fragment, a), Ne(r.$$.fragment, a), i = !0);
+ i(u) {
+ i || (Ne(t.$$.fragment, u), Ne(r.$$.fragment, u), i = !0);
},
- o(a) {
- Ie(t.$$.fragment, a), Ie(r.$$.fragment, a), i = !1;
+ o(u) {
+ Ie(t.$$.fragment, u), Ie(r.$$.fragment, u), i = !1;
},
- d(a) {
- a && br(n), et(t, a), et(r, a);
+ d(u) {
+ u && gr(n), et(t, u), et(r, u);
}
};
}
function f0(e) {
let t, n, r, i;
const s = [l0, s0], l = [];
- function a(o, u) {
+ function u(o, a) {
return (
/*interactive*/
o[11] ? 1 : 0
);
}
- return t = a(e), n = l[t] = s[t](e), {
+ return t = u(e), n = l[t] = s[t](e), {
c() {
n.c(), r = t0();
},
- m(o, u) {
- l[t].m(o, u), vr(o, r, u), i = !0;
+ m(o, a) {
+ l[t].m(o, a), br(o, r, a), i = !0;
},
- p(o, [u]) {
+ p(o, [a]) {
let f = t;
- t = a(o), t === f ? l[t].p(o, u) : (n0(), Ie(l[f], 1, 1, () => {
+ t = u(o), t === f ? l[t].p(o, a) : (n0(), Ie(l[f], 1, 1, () => {
l[f] = null;
- }), e0(), n = l[t], n ? n.p(o, u) : (n = l[t] = s[t](o), n.c()), Ne(n, 1), n.m(r.parentNode, r));
+ }), e0(), n = l[t], n ? n.p(o, a) : (n = l[t] = s[t](o), n.c()), Ne(n, 1), n.m(r.parentNode, r));
},
i(o) {
i || (Ne(n), i = !0);
@@ -8706,7 +8706,7 @@ function f0(e) {
Ie(n), i = !1;
},
d(o) {
- o && br(r), l[t].d(o);
+ o && gr(r), l[t].d(o);
}
};
}
@@ -8721,34 +8721,34 @@ function c0(e) {
return n;
}
function h0(e, t, n) {
- let r, i, { elem_id: s = "" } = t, { elem_classes: l = [] } = t, { visible: a = !0 } = t, { value: o = null } = t, { root: u } = t, { proxy_url: f } = t, { label: c } = t, { show_label: h } = t, { container: _ = !0 } = t, { scale: d = null } = t, { min_width: p = void 0 } = t, { loading_status: y } = t, { interactive: v } = t, { gradio: E } = t, g;
+ let r, i, { elem_id: s = "" } = t, { elem_classes: l = [] } = t, { visible: u = !0 } = t, { value: o = null } = t, { root: a } = t, { proxy_url: f } = t, { label: c } = t, { show_label: _ } = t, { container: h = !0 } = t, { scale: d = null } = t, { min_width: b = void 0 } = t, { loading_status: y } = t, { interactive: v } = t, { gradio: S } = t, p;
function A(B) {
o = B, n(0, o);
}
- const T = () => E.dispatch("clear"), w = ({ detail: B }) => n(14, g = B), j = () => E.dispatch("upload");
+ const T = () => S.dispatch("clear"), w = ({ detail: B }) => n(14, p = B), j = () => S.dispatch("upload");
return e.$$set = (B) => {
- "elem_id" in B && n(1, s = B.elem_id), "elem_classes" in B && n(2, l = B.elem_classes), "visible" in B && n(3, a = B.visible), "value" in B && n(0, o = B.value), "root" in B && n(4, u = B.root), "proxy_url" in B && n(15, f = B.proxy_url), "label" in B && n(5, c = B.label), "show_label" in B && n(6, h = B.show_label), "container" in B && n(7, _ = B.container), "scale" in B && n(8, d = B.scale), "min_width" in B && n(9, p = B.min_width), "loading_status" in B && n(10, y = B.loading_status), "interactive" in B && n(11, v = B.interactive), "gradio" in B && n(12, E = B.gradio);
+ "elem_id" in B && n(1, s = B.elem_id), "elem_classes" in B && n(2, l = B.elem_classes), "visible" in B && n(3, u = B.visible), "value" in B && n(0, o = B.value), "root" in B && n(4, a = B.root), "proxy_url" in B && n(15, f = B.proxy_url), "label" in B && n(5, c = B.label), "show_label" in B && n(6, _ = B.show_label), "container" in B && n(7, h = B.container), "scale" in B && n(8, d = B.scale), "min_width" in B && n(9, b = B.min_width), "loading_status" in B && n(10, y = B.loading_status), "interactive" in B && n(11, v = B.interactive), "gradio" in B && n(12, S = B.gradio);
}, e.$$.update = () => {
e.$$.dirty & /*value, root, proxy_url*/
- 32785 && n(13, r = Ce(o, u, f)), e.$$.dirty & /*_value*/
+ 32785 && n(13, r = Ce(o, a, f)), e.$$.dirty & /*_value*/
8192 && n(16, i = c0([r, "optionalAccess", (B) => B.url])), e.$$.dirty & /*url, gradio*/
- 69632 && E.dispatch("change");
+ 69632 && S.dispatch("change");
}, [
o,
s,
l,
- a,
u,
+ a,
c,
- h,
_,
+ h,
d,
- p,
+ b,
y,
v,
- E,
+ S,
r,
- g,
+ p,
f,
i,
A,
@@ -8864,6 +8864,6 @@ class v0 extends Qc {
export {
b0 as BaseExample,
lc as BaseImageUploader,
- sa as BaseStaticImage,
+ ia as BaseStaticImage,
v0 as default
};