Upload folder using huggingface_hub
Browse files
src/backend/gradio_codeanalysisviewer/templates/component/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
var
|
| 2 |
-
var
|
| 3 |
-
var v = (n, e, t) =>
|
| 4 |
function V() {
|
| 5 |
}
|
| 6 |
V.prototype = {
|
|
@@ -28,19 +28,19 @@ V.prototype = {
|
|
| 28 |
var g = -1 / 0, I = 1 / 0;
|
| 29 |
function E() {
|
| 30 |
for (var R = Math.max(g, -o); R <= Math.min(I, o); R += 2) {
|
| 31 |
-
var q = void 0, $ = f[R - 1],
|
| 32 |
$ && (f[R - 1] = void 0);
|
| 33 |
var j = !1;
|
| 34 |
-
if (
|
| 35 |
-
var W =
|
| 36 |
-
j =
|
| 37 |
}
|
| 38 |
var H = $ && $.oldPos + 1 < a;
|
| 39 |
if (!j && !H) {
|
| 40 |
f[R] = void 0;
|
| 41 |
continue;
|
| 42 |
}
|
| 43 |
-
if (!H || j && $.oldPos + 1 <
|
| 44 |
return l(wt(c, q.lastComponent, t, e, c.useLongestToken));
|
| 45 |
f[R] = q, q.oldPos + 1 >= a && (I = Math.min(I, R - 1)), k + 1 >= u && (g = Math.max(g, R + 1));
|
| 46 |
}
|
|
@@ -174,28 +174,28 @@ function ke(n) {
|
|
| 174 |
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
| 175 |
}, ke(n);
|
| 176 |
}
|
| 177 |
-
var
|
| 178 |
oe.useLongestToken = !0;
|
| 179 |
oe.tokenize = lt.tokenize;
|
| 180 |
oe.castInput = function(n) {
|
| 181 |
var e = this.options, t = e.undefinedReplacement, s = e.stringifyReplacer, i = s === void 0 ? function(r, c) {
|
| 182 |
return typeof c > "u" ? t : c;
|
| 183 |
} : s;
|
| 184 |
-
return typeof n == "string" ? n : JSON.stringify(
|
| 185 |
};
|
| 186 |
oe.equals = function(n, e) {
|
| 187 |
return V.prototype.equals.call(oe, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
|
| 188 |
};
|
| 189 |
-
function
|
| 190 |
e = e || [], t = t || [], s && (n = s(i, n));
|
| 191 |
var r;
|
| 192 |
for (r = 0; r < e.length; r += 1)
|
| 193 |
if (e[r] === n)
|
| 194 |
return t[r];
|
| 195 |
var c;
|
| 196 |
-
if (
|
| 197 |
for (e.push(n), c = new Array(n.length), t.push(c), r = 0; r < n.length; r += 1)
|
| 198 |
-
c[r] =
|
| 199 |
return e.pop(), t.pop(), c;
|
| 200 |
}
|
| 201 |
if (n && n.toJSON && (n = n.toJSON()), ke(n) === "object" && n !== null) {
|
|
@@ -204,17 +204,17 @@ function Ce(n, e, t, s, i) {
|
|
| 204 |
for (u in n)
|
| 205 |
n.hasOwnProperty(u) && l.push(u);
|
| 206 |
for (l.sort(), r = 0; r < l.length; r += 1)
|
| 207 |
-
u = l[r], c[u] =
|
| 208 |
e.pop(), t.pop();
|
| 209 |
} else
|
| 210 |
c = n;
|
| 211 |
return c;
|
| 212 |
}
|
| 213 |
-
var
|
| 214 |
-
|
| 215 |
return n.slice();
|
| 216 |
};
|
| 217 |
-
|
| 218 |
return n;
|
| 219 |
};
|
| 220 |
function Le() {
|
|
@@ -304,20 +304,20 @@ var P = {
|
|
| 304 |
fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`),
|
| 305 |
headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`),
|
| 306 |
htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i")
|
| 307 |
-
},
|
| 308 |
"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
|
| 309 |
"i"
|
| 310 |
).replace("comment", De).replace("tag", ve).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ut = w(Ee).replace("hr", ce).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ve).getRegex(), Dt = w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ut).getRegex(), Be = {
|
| 311 |
blockquote: Dt,
|
| 312 |
-
code:
|
| 313 |
def: It,
|
| 314 |
-
fences:
|
| 315 |
heading: $t,
|
| 316 |
hr: ce,
|
| 317 |
html: Pt,
|
| 318 |
lheading: ct,
|
| 319 |
list: Et,
|
| 320 |
-
newline:
|
| 321 |
paragraph: ut,
|
| 322 |
table: ae,
|
| 323 |
text: Lt
|
|
@@ -345,7 +345,7 @@ var P = {
|
|
| 345 |
"gu"
|
| 346 |
).replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, _e).getRegex(), Xt = w(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), Jt = w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Yt = w(De).replace("(?:-->|$)", "-->").getRegex(), Kt = w(
|
| 347 |
"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
|
| 348 |
-
).replace("comment", Yt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),
|
| 349 |
_backpedal: ae,
|
| 350 |
// only used for GFM url
|
| 351 |
anyPunctuation: Xt,
|
|
@@ -368,9 +368,9 @@ var P = {
|
|
| 368 |
url: ae
|
| 369 |
}, nn = {
|
| 370 |
...Ne,
|
| 371 |
-
link: w(/^!?\[(label)\]\((.*?)\)/).replace("label",
|
| 372 |
-
reflink: w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",
|
| 373 |
-
},
|
| 374 |
...Ne,
|
| 375 |
emStrongRDelimAst: Wt,
|
| 376 |
emStrongLDelim: Vt,
|
|
@@ -379,16 +379,16 @@ var P = {
|
|
| 379 |
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
| 380 |
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
| 381 |
}, sn = {
|
| 382 |
-
...
|
| 383 |
br: w(ht).replace("{2,}", "*").getRegex(),
|
| 384 |
-
text: w(
|
| 385 |
}, de = {
|
| 386 |
normal: Be,
|
| 387 |
gfm: Bt,
|
| 388 |
pedantic: qt
|
| 389 |
}, re = {
|
| 390 |
normal: Ne,
|
| 391 |
-
gfm:
|
| 392 |
breaks: sn,
|
| 393 |
pedantic: nn
|
| 394 |
}, rn = {
|
|
@@ -481,7 +481,7 @@ function an(n, e, t) {
|
|
| 481 |
}).join(`
|
| 482 |
`);
|
| 483 |
}
|
| 484 |
-
var
|
| 485 |
// set by the lexer
|
| 486 |
constructor(n) {
|
| 487 |
v(this, "options");
|
|
@@ -632,12 +632,12 @@ ${o}` : o;
|
|
| 632 |
for (; n; ) {
|
| 633 |
const $ = n.split(`
|
| 634 |
`, 1)[0];
|
| 635 |
-
let
|
| 636 |
-
if (h = $, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "),
|
| 637 |
break;
|
| 638 |
-
if (
|
| 639 |
o += `
|
| 640 |
-
` +
|
| 641 |
else {
|
| 642 |
if (d || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || B.test(p) || R.test(p) || E.test(p))
|
| 643 |
break;
|
|
@@ -645,7 +645,7 @@ ${o}` : o;
|
|
| 645 |
` + h;
|
| 646 |
}
|
| 647 |
!d && !h.trim() && (d = !0), a += $ + `
|
| 648 |
-
`, n = n.substring($.length + 1), p =
|
| 649 |
}
|
| 650 |
}
|
| 651 |
i.loose || (c ? i.loose = !0 : this.rules.other.doubleBlankLine.test(a) && (c = !0));
|
|
@@ -963,14 +963,14 @@ ${o}` : o;
|
|
| 963 |
};
|
| 964 |
}
|
| 965 |
}
|
| 966 |
-
}, F = class
|
| 967 |
constructor(e) {
|
| 968 |
v(this, "tokens");
|
| 969 |
v(this, "options");
|
| 970 |
v(this, "state");
|
| 971 |
v(this, "tokenizer");
|
| 972 |
v(this, "inlineQueue");
|
| 973 |
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || X, this.options.tokenizer = this.options.tokenizer || new
|
| 974 |
inLink: !1,
|
| 975 |
inRawBlock: !1,
|
| 976 |
top: !0
|
|
@@ -995,13 +995,13 @@ ${o}` : o;
|
|
| 995 |
* Static Lex Method
|
| 996 |
*/
|
| 997 |
static lex(e, t) {
|
| 998 |
-
return new
|
| 999 |
}
|
| 1000 |
/**
|
| 1001 |
* Static Lex Inline Method
|
| 1002 |
*/
|
| 1003 |
static lexInline(e, t) {
|
| 1004 |
-
return new
|
| 1005 |
}
|
| 1006 |
/**
|
| 1007 |
* Preprocessing
|
|
@@ -1583,7 +1583,7 @@ ${n}</tr>
|
|
| 1583 |
v(this, "Renderer", we);
|
| 1584 |
v(this, "TextRenderer", Oe);
|
| 1585 |
v(this, "Lexer", F);
|
| 1586 |
-
v(this, "Tokenizer",
|
| 1587 |
v(this, "Hooks", me);
|
| 1588 |
this.use(...n);
|
| 1589 |
}
|
|
@@ -1656,7 +1656,7 @@ ${n}</tr>
|
|
| 1656 |
s.renderer = i;
|
| 1657 |
}
|
| 1658 |
if (t.tokenizer) {
|
| 1659 |
-
const i = this.defaults.tokenizer || new
|
| 1660 |
for (const r in t.tokenizer) {
|
| 1661 |
if (!(r in i))
|
| 1662 |
throw new Error(`tokenizer '${r}' does not exist`);
|
|
@@ -1767,7 +1767,7 @@ m.Renderer = we;
|
|
| 1767 |
m.TextRenderer = Oe;
|
| 1768 |
m.Lexer = F;
|
| 1769 |
m.lexer = F.lex;
|
| 1770 |
-
m.Tokenizer =
|
| 1771 |
m.Hooks = me;
|
| 1772 |
m.parse = m;
|
| 1773 |
m.options;
|
|
@@ -1783,13 +1783,13 @@ const {
|
|
| 1783 |
append_hydration: _,
|
| 1784 |
attr: y,
|
| 1785 |
children: L,
|
| 1786 |
-
claim_element:
|
| 1787 |
claim_html_tag: hn,
|
| 1788 |
claim_space: N,
|
| 1789 |
claim_text: te,
|
| 1790 |
destroy_each: pn,
|
| 1791 |
-
detach:
|
| 1792 |
-
element:
|
| 1793 |
ensure_array_like: Ke,
|
| 1794 |
flush: Z,
|
| 1795 |
get_svelte_dataset: K,
|
|
@@ -1817,15 +1817,15 @@ function tt(n) {
|
|
| 1817 |
), s;
|
| 1818 |
return {
|
| 1819 |
c() {
|
| 1820 |
-
e =
|
| 1821 |
},
|
| 1822 |
l(i) {
|
| 1823 |
-
e =
|
| 1824 |
var r = L(e);
|
| 1825 |
-
s = te(r, t), r.forEach(
|
| 1826 |
},
|
| 1827 |
h() {
|
| 1828 |
-
y(e, "class", "status-message svelte-
|
| 1829 |
e,
|
| 1830 |
"error",
|
| 1831 |
/*loading_status*/
|
|
@@ -1850,7 +1850,7 @@ function tt(n) {
|
|
| 1850 |
);
|
| 1851 |
},
|
| 1852 |
d(i) {
|
| 1853 |
-
i &&
|
| 1854 |
}
|
| 1855 |
};
|
| 1856 |
}
|
|
@@ -1858,19 +1858,19 @@ function nt(n) {
|
|
| 1858 |
let e, t;
|
| 1859 |
return {
|
| 1860 |
c() {
|
| 1861 |
-
e =
|
| 1862 |
/*label*/
|
| 1863 |
n[0]
|
| 1864 |
), this.h();
|
| 1865 |
},
|
| 1866 |
l(s) {
|
| 1867 |
-
e =
|
| 1868 |
var i = L(e);
|
| 1869 |
t = te(
|
| 1870 |
i,
|
| 1871 |
/*label*/
|
| 1872 |
n[0]
|
| 1873 |
-
), i.forEach(
|
| 1874 |
},
|
| 1875 |
h() {
|
| 1876 |
y(e, "class", "gradio-label");
|
|
@@ -1887,7 +1887,7 @@ function nt(n) {
|
|
| 1887 |
);
|
| 1888 |
},
|
| 1889 |
d(s) {
|
| 1890 |
-
s &&
|
| 1891 |
}
|
| 1892 |
};
|
| 1893 |
}
|
|
@@ -1895,20 +1895,20 @@ function gn(n) {
|
|
| 1895 |
let e, t = "No analysis data to display.";
|
| 1896 |
return {
|
| 1897 |
c() {
|
| 1898 |
-
e =
|
| 1899 |
},
|
| 1900 |
l(s) {
|
| 1901 |
-
e =
|
| 1902 |
},
|
| 1903 |
h() {
|
| 1904 |
-
y(e, "class", "svelte-
|
| 1905 |
},
|
| 1906 |
m(s, i) {
|
| 1907 |
D(s, e, i);
|
| 1908 |
},
|
| 1909 |
p: Ae,
|
| 1910 |
d(s) {
|
| 1911 |
-
s &&
|
| 1912 |
}
|
| 1913 |
};
|
| 1914 |
}
|
|
@@ -1919,7 +1919,7 @@ function kn(n) {
|
|
| 1919 |
), u, a, o, p, h = "Issue:", d, f, k = (
|
| 1920 |
/*display_value*/
|
| 1921 |
n[8].issue + ""
|
| 1922 |
-
), g, I, E, B, R = "Reason:", q, $,
|
| 1923 |
/*display_value*/
|
| 1924 |
n[8].reason + ""
|
| 1925 |
), j, W, H, G, J, Ze = "Feedback", ye, Y, ie, ue = m.parse(
|
|
@@ -1931,51 +1931,51 @@ function kn(n) {
|
|
| 1931 |
);
|
| 1932 |
return {
|
| 1933 |
c() {
|
| 1934 |
-
e =
|
| 1935 |
},
|
| 1936 |
-
l(
|
| 1937 |
-
e =
|
| 1938 |
-
var
|
| 1939 |
-
t =
|
| 1940 |
var Me = L(r);
|
| 1941 |
-
c =
|
| 1942 |
var He = L(c);
|
| 1943 |
-
u = te(He, l), He.forEach(
|
| 1944 |
var he = L(o);
|
| 1945 |
-
p =
|
| 1946 |
var Ge = L(f);
|
| 1947 |
-
g = te(Ge, k), Ge.forEach(
|
| 1948 |
var pe = L(E);
|
| 1949 |
-
B =
|
| 1950 |
var Fe = L($);
|
| 1951 |
-
j = te(Fe,
|
| 1952 |
var fe = L(G);
|
| 1953 |
-
J =
|
| 1954 |
var Qe = L(Y);
|
| 1955 |
-
ie = hn(Qe, !1), Qe.forEach(
|
| 1956 |
},
|
| 1957 |
h() {
|
| 1958 |
-
y(t, "class", "svelte-
|
| 1959 |
},
|
| 1960 |
-
m(
|
| 1961 |
-
D(
|
| 1962 |
},
|
| 1963 |
-
p(
|
| 1964 |
-
|
| 1965 |
256 && l !== (l = /*display_value*/
|
| 1966 |
-
|
| 1967 |
256 && k !== (k = /*display_value*/
|
| 1968 |
-
|
| 1969 |
-
256 &&
|
| 1970 |
-
|
| 1971 |
-
|
| 1972 |
256 && ue !== (ue = m.parse(
|
| 1973 |
/*display_value*/
|
| 1974 |
-
|
| 1975 |
) + "") && ie.p(ue);
|
| 1976 |
},
|
| 1977 |
-
d(
|
| 1978 |
-
|
| 1979 |
}
|
| 1980 |
};
|
| 1981 |
}
|
|
@@ -1988,22 +1988,22 @@ function st(n) {
|
|
| 1988 |
l[u] = it(et(n, c, u));
|
| 1989 |
return {
|
| 1990 |
c() {
|
| 1991 |
-
e =
|
| 1992 |
for (let u = 0; u < l.length; u += 1)
|
| 1993 |
l[u].c();
|
| 1994 |
this.h();
|
| 1995 |
},
|
| 1996 |
l(u) {
|
| 1997 |
-
e =
|
| 1998 |
var a = L(e);
|
| 1999 |
-
t =
|
| 2000 |
var o = L(r);
|
| 2001 |
for (let p = 0; p < l.length; p += 1)
|
| 2002 |
l[p].l(o);
|
| 2003 |
-
o.forEach(
|
| 2004 |
},
|
| 2005 |
h() {
|
| 2006 |
-
y(t, "class", "svelte-
|
| 2007 |
},
|
| 2008 |
m(u, a) {
|
| 2009 |
D(u, e, a), _(e, t), _(e, i), _(e, r);
|
|
@@ -2028,7 +2028,7 @@ function st(n) {
|
|
| 2028 |
}
|
| 2029 |
},
|
| 2030 |
d(u) {
|
| 2031 |
-
u &&
|
| 2032 |
}
|
| 2033 |
};
|
| 2034 |
}
|
|
@@ -2039,19 +2039,19 @@ function it(n) {
|
|
| 2039 |
), s, i;
|
| 2040 |
return {
|
| 2041 |
c() {
|
| 2042 |
-
e =
|
| 2043 |
},
|
| 2044 |
l(r) {
|
| 2045 |
-
e =
|
| 2046 |
var c = L(e);
|
| 2047 |
-
s = te(c, t), c.forEach(
|
| 2048 |
},
|
| 2049 |
h() {
|
| 2050 |
y(e, "class", i = "diff-part " + /*part*/
|
| 2051 |
(n[13].added ? "added" : (
|
| 2052 |
/*part*/
|
| 2053 |
n[13].removed ? "removed" : "common"
|
| 2054 |
-
)) + " svelte-
|
| 2055 |
},
|
| 2056 |
m(r, c) {
|
| 2057 |
D(r, e, c), _(e, s);
|
|
@@ -2064,10 +2064,10 @@ function it(n) {
|
|
| 2064 |
(r[13].added ? "added" : (
|
| 2065 |
/*part*/
|
| 2066 |
r[13].removed ? "removed" : "common"
|
| 2067 |
-
)) + " svelte-
|
| 2068 |
},
|
| 2069 |
d(r) {
|
| 2070 |
-
r &&
|
| 2071 |
}
|
| 2072 |
};
|
| 2073 |
}
|
|
@@ -2088,17 +2088,17 @@ function mn(n) {
|
|
| 2088 |
let a = u(n), o = a(n);
|
| 2089 |
return {
|
| 2090 |
c() {
|
| 2091 |
-
e =
|
| 2092 |
},
|
| 2093 |
l(p) {
|
| 2094 |
-
e =
|
| 2095 |
var h = L(e);
|
| 2096 |
-
c && c.l(h), t = N(h), s =
|
| 2097 |
var d = L(s);
|
| 2098 |
-
l && l.l(d), i = N(d), o.l(d), d.forEach(
|
| 2099 |
},
|
| 2100 |
h() {
|
| 2101 |
-
y(s, "class", "code-analysis-viewer svelte-
|
| 2102 |
n[1] || null), ge(
|
| 2103 |
e,
|
| 2104 |
"width",
|
|
@@ -2150,11 +2150,11 @@ function mn(n) {
|
|
| 2150 |
i: Ae,
|
| 2151 |
o: Ae,
|
| 2152 |
d(p) {
|
| 2153 |
-
p &&
|
| 2154 |
}
|
| 2155 |
};
|
| 2156 |
}
|
| 2157 |
-
function
|
| 2158 |
let s;
|
| 2159 |
m.setOptions({
|
| 2160 |
breaks: !0,
|
|
@@ -2195,7 +2195,7 @@ function bn(n, e, t) {
|
|
| 2195 |
}
|
| 2196 |
class wn extends un {
|
| 2197 |
constructor(e) {
|
| 2198 |
-
super(), fn(this, e,
|
| 2199 |
gradio: 10,
|
| 2200 |
label: 0,
|
| 2201 |
elem_id: 1,
|
|
|
|
| 1 |
+
var xt = Object.defineProperty;
|
| 2 |
+
var bt = (n, e, t) => e in n ? xt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
| 3 |
+
var v = (n, e, t) => bt(n, typeof e != "symbol" ? e + "" : e, t);
|
| 4 |
function V() {
|
| 5 |
}
|
| 6 |
V.prototype = {
|
|
|
|
| 28 |
var g = -1 / 0, I = 1 / 0;
|
| 29 |
function E() {
|
| 30 |
for (var R = Math.max(g, -o); R <= Math.min(I, o); R += 2) {
|
| 31 |
+
var q = void 0, $ = f[R - 1], S = f[R + 1];
|
| 32 |
$ && (f[R - 1] = void 0);
|
| 33 |
var j = !1;
|
| 34 |
+
if (S) {
|
| 35 |
+
var W = S.oldPos - R;
|
| 36 |
+
j = S && 0 <= W && W < u;
|
| 37 |
}
|
| 38 |
var H = $ && $.oldPos + 1 < a;
|
| 39 |
if (!j && !H) {
|
| 40 |
f[R] = void 0;
|
| 41 |
continue;
|
| 42 |
}
|
| 43 |
+
if (!H || j && $.oldPos + 1 < S.oldPos ? q = c.addToPath(S, !0, void 0, 0) : q = c.addToPath($, void 0, !0, 1), k = c.extractCommon(q, t, e, R), q.oldPos + 1 >= a && k + 1 >= u)
|
| 44 |
return l(wt(c, q.lastComponent, t, e, c.useLongestToken));
|
| 45 |
f[R] = q, q.oldPos + 1 >= a && (I = Math.min(I, R - 1)), k + 1 >= u && (g = Math.max(g, R + 1));
|
| 46 |
}
|
|
|
|
| 174 |
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
| 175 |
}, ke(n);
|
| 176 |
}
|
| 177 |
+
var zt = Object.prototype.toString, oe = new V();
|
| 178 |
oe.useLongestToken = !0;
|
| 179 |
oe.tokenize = lt.tokenize;
|
| 180 |
oe.castInput = function(n) {
|
| 181 |
var e = this.options, t = e.undefinedReplacement, s = e.stringifyReplacer, i = s === void 0 ? function(r, c) {
|
| 182 |
return typeof c > "u" ? t : c;
|
| 183 |
} : s;
|
| 184 |
+
return typeof n == "string" ? n : JSON.stringify(ze(n, null, null, i), i, " ");
|
| 185 |
};
|
| 186 |
oe.equals = function(n, e) {
|
| 187 |
return V.prototype.equals.call(oe, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
|
| 188 |
};
|
| 189 |
+
function ze(n, e, t, s, i) {
|
| 190 |
e = e || [], t = t || [], s && (n = s(i, n));
|
| 191 |
var r;
|
| 192 |
for (r = 0; r < e.length; r += 1)
|
| 193 |
if (e[r] === n)
|
| 194 |
return t[r];
|
| 195 |
var c;
|
| 196 |
+
if (zt.call(n) === "[object Array]") {
|
| 197 |
for (e.push(n), c = new Array(n.length), t.push(c), r = 0; r < n.length; r += 1)
|
| 198 |
+
c[r] = ze(n[r], e, t, s, i);
|
| 199 |
return e.pop(), t.pop(), c;
|
| 200 |
}
|
| 201 |
if (n && n.toJSON && (n = n.toJSON()), ke(n) === "object" && n !== null) {
|
|
|
|
| 204 |
for (u in n)
|
| 205 |
n.hasOwnProperty(u) && l.push(u);
|
| 206 |
for (l.sort(), r = 0; r < l.length; r += 1)
|
| 207 |
+
u = l[r], c[u] = ze(n[u], e, t, s, u);
|
| 208 |
e.pop(), t.pop();
|
| 209 |
} else
|
| 210 |
c = n;
|
| 211 |
return c;
|
| 212 |
}
|
| 213 |
+
var Ce = new V();
|
| 214 |
+
Ce.tokenize = function(n) {
|
| 215 |
return n.slice();
|
| 216 |
};
|
| 217 |
+
Ce.join = Ce.removeEmpty = function(n) {
|
| 218 |
return n;
|
| 219 |
};
|
| 220 |
function Le() {
|
|
|
|
| 304 |
fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`),
|
| 305 |
headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`),
|
| 306 |
htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i")
|
| 307 |
+
}, Ct = /^(?:[ \t]*(?:\n|$))+/, Tt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, St = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ce = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, $t = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ie = /(?:[*+-]|\d{1,9}[.)])/, ot = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ct = w(ot).replace(/bull/g, Ie).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), At = w(ot).replace(/bull/g, Ie).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ee = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Lt = /^[^\n]+/, Pe = /(?!\s*\])(?:\\.|[^\[\]\\])+/, It = w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Pe).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Et = w(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ie).getRegex(), ve = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", De = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Pt = w(
|
| 308 |
"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
|
| 309 |
"i"
|
| 310 |
).replace("comment", De).replace("tag", ve).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ut = w(Ee).replace("hr", ce).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ve).getRegex(), Dt = w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ut).getRegex(), Be = {
|
| 311 |
blockquote: Dt,
|
| 312 |
+
code: Tt,
|
| 313 |
def: It,
|
| 314 |
+
fences: St,
|
| 315 |
heading: $t,
|
| 316 |
hr: ce,
|
| 317 |
html: Pt,
|
| 318 |
lheading: ct,
|
| 319 |
list: Et,
|
| 320 |
+
newline: Ct,
|
| 321 |
paragraph: ut,
|
| 322 |
table: ae,
|
| 323 |
text: Lt
|
|
|
|
| 345 |
"gu"
|
| 346 |
).replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, _e).getRegex(), Xt = w(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), Jt = w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Yt = w(De).replace("(?:-->|$)", "-->").getRegex(), Kt = w(
|
| 347 |
"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
|
| 348 |
+
).replace("comment", Yt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), xe = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, en = w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", xe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), kt = w(/^!?\[(label)\]\[(ref)\]/).replace("label", xe).replace("ref", Pe).getRegex(), mt = w(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pe).getRegex(), tn = w("reflink|nolink(?!\\()", "g").replace("reflink", kt).replace("nolink", mt).getRegex(), Ne = {
|
| 349 |
_backpedal: ae,
|
| 350 |
// only used for GFM url
|
| 351 |
anyPunctuation: Xt,
|
|
|
|
| 368 |
url: ae
|
| 369 |
}, nn = {
|
| 370 |
...Ne,
|
| 371 |
+
link: w(/^!?\[(label)\]\((.*?)\)/).replace("label", xe).getRegex(),
|
| 372 |
+
reflink: w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", xe).getRegex()
|
| 373 |
+
}, Te = {
|
| 374 |
...Ne,
|
| 375 |
emStrongRDelimAst: Wt,
|
| 376 |
emStrongLDelim: Vt,
|
|
|
|
| 379 |
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
| 380 |
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
| 381 |
}, sn = {
|
| 382 |
+
...Te,
|
| 383 |
br: w(ht).replace("{2,}", "*").getRegex(),
|
| 384 |
+
text: w(Te.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
| 385 |
}, de = {
|
| 386 |
normal: Be,
|
| 387 |
gfm: Bt,
|
| 388 |
pedantic: qt
|
| 389 |
}, re = {
|
| 390 |
normal: Ne,
|
| 391 |
+
gfm: Te,
|
| 392 |
breaks: sn,
|
| 393 |
pedantic: nn
|
| 394 |
}, rn = {
|
|
|
|
| 481 |
}).join(`
|
| 482 |
`);
|
| 483 |
}
|
| 484 |
+
var be = class {
|
| 485 |
// set by the lexer
|
| 486 |
constructor(n) {
|
| 487 |
v(this, "options");
|
|
|
|
| 632 |
for (; n; ) {
|
| 633 |
const $ = n.split(`
|
| 634 |
`, 1)[0];
|
| 635 |
+
let S;
|
| 636 |
+
if (h = $, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), S = h) : S = h.replace(this.rules.other.tabCharGlobal, " "), B.test(h) || R.test(h) || q.test(h) || I.test(h) || E.test(h))
|
| 637 |
break;
|
| 638 |
+
if (S.search(this.rules.other.nonSpaceChar) >= f || !h.trim())
|
| 639 |
o += `
|
| 640 |
+
` + S.slice(f);
|
| 641 |
else {
|
| 642 |
if (d || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || B.test(p) || R.test(p) || E.test(p))
|
| 643 |
break;
|
|
|
|
| 645 |
` + h;
|
| 646 |
}
|
| 647 |
!d && !h.trim() && (d = !0), a += $ + `
|
| 648 |
+
`, n = n.substring($.length + 1), p = S.slice(f);
|
| 649 |
}
|
| 650 |
}
|
| 651 |
i.loose || (c ? i.loose = !0 : this.rules.other.doubleBlankLine.test(a) && (c = !0));
|
|
|
|
| 963 |
};
|
| 964 |
}
|
| 965 |
}
|
| 966 |
+
}, F = class Se {
|
| 967 |
constructor(e) {
|
| 968 |
v(this, "tokens");
|
| 969 |
v(this, "options");
|
| 970 |
v(this, "state");
|
| 971 |
v(this, "tokenizer");
|
| 972 |
v(this, "inlineQueue");
|
| 973 |
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || X, this.options.tokenizer = this.options.tokenizer || new be(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
| 974 |
inLink: !1,
|
| 975 |
inRawBlock: !1,
|
| 976 |
top: !0
|
|
|
|
| 995 |
* Static Lex Method
|
| 996 |
*/
|
| 997 |
static lex(e, t) {
|
| 998 |
+
return new Se(t).lex(e);
|
| 999 |
}
|
| 1000 |
/**
|
| 1001 |
* Static Lex Inline Method
|
| 1002 |
*/
|
| 1003 |
static lexInline(e, t) {
|
| 1004 |
+
return new Se(t).inlineTokens(e);
|
| 1005 |
}
|
| 1006 |
/**
|
| 1007 |
* Preprocessing
|
|
|
|
| 1583 |
v(this, "Renderer", we);
|
| 1584 |
v(this, "TextRenderer", Oe);
|
| 1585 |
v(this, "Lexer", F);
|
| 1586 |
+
v(this, "Tokenizer", be);
|
| 1587 |
v(this, "Hooks", me);
|
| 1588 |
this.use(...n);
|
| 1589 |
}
|
|
|
|
| 1656 |
s.renderer = i;
|
| 1657 |
}
|
| 1658 |
if (t.tokenizer) {
|
| 1659 |
+
const i = this.defaults.tokenizer || new be(this.defaults);
|
| 1660 |
for (const r in t.tokenizer) {
|
| 1661 |
if (!(r in i))
|
| 1662 |
throw new Error(`tokenizer '${r}' does not exist`);
|
|
|
|
| 1767 |
m.TextRenderer = Oe;
|
| 1768 |
m.Lexer = F;
|
| 1769 |
m.lexer = F.lex;
|
| 1770 |
+
m.Tokenizer = be;
|
| 1771 |
m.Hooks = me;
|
| 1772 |
m.parse = m;
|
| 1773 |
m.options;
|
|
|
|
| 1783 |
append_hydration: _,
|
| 1784 |
attr: y,
|
| 1785 |
children: L,
|
| 1786 |
+
claim_element: z,
|
| 1787 |
claim_html_tag: hn,
|
| 1788 |
claim_space: N,
|
| 1789 |
claim_text: te,
|
| 1790 |
destroy_each: pn,
|
| 1791 |
+
detach: b,
|
| 1792 |
+
element: C,
|
| 1793 |
ensure_array_like: Ke,
|
| 1794 |
flush: Z,
|
| 1795 |
get_svelte_dataset: K,
|
|
|
|
| 1817 |
), s;
|
| 1818 |
return {
|
| 1819 |
c() {
|
| 1820 |
+
e = C("div"), s = se(t), this.h();
|
| 1821 |
},
|
| 1822 |
l(i) {
|
| 1823 |
+
e = z(i, "DIV", { class: !0 });
|
| 1824 |
var r = L(e);
|
| 1825 |
+
s = te(r, t), r.forEach(b), this.h();
|
| 1826 |
},
|
| 1827 |
h() {
|
| 1828 |
+
y(e, "class", "status-message svelte-18zx8pk"), ee(
|
| 1829 |
e,
|
| 1830 |
"error",
|
| 1831 |
/*loading_status*/
|
|
|
|
| 1850 |
);
|
| 1851 |
},
|
| 1852 |
d(i) {
|
| 1853 |
+
i && b(e);
|
| 1854 |
}
|
| 1855 |
};
|
| 1856 |
}
|
|
|
|
| 1858 |
let e, t;
|
| 1859 |
return {
|
| 1860 |
c() {
|
| 1861 |
+
e = C("div"), t = se(
|
| 1862 |
/*label*/
|
| 1863 |
n[0]
|
| 1864 |
), this.h();
|
| 1865 |
},
|
| 1866 |
l(s) {
|
| 1867 |
+
e = z(s, "DIV", { class: !0 });
|
| 1868 |
var i = L(e);
|
| 1869 |
t = te(
|
| 1870 |
i,
|
| 1871 |
/*label*/
|
| 1872 |
n[0]
|
| 1873 |
+
), i.forEach(b), this.h();
|
| 1874 |
},
|
| 1875 |
h() {
|
| 1876 |
y(e, "class", "gradio-label");
|
|
|
|
| 1887 |
);
|
| 1888 |
},
|
| 1889 |
d(s) {
|
| 1890 |
+
s && b(e);
|
| 1891 |
}
|
| 1892 |
};
|
| 1893 |
}
|
|
|
|
| 1895 |
let e, t = "No analysis data to display.";
|
| 1896 |
return {
|
| 1897 |
c() {
|
| 1898 |
+
e = C("p"), e.textContent = t, this.h();
|
| 1899 |
},
|
| 1900 |
l(s) {
|
| 1901 |
+
e = z(s, "P", { class: !0, "data-svelte-h": !0 }), K(e) !== "svelte-1q8w132" && (e.textContent = t), this.h();
|
| 1902 |
},
|
| 1903 |
h() {
|
| 1904 |
+
y(e, "class", "svelte-18zx8pk");
|
| 1905 |
},
|
| 1906 |
m(s, i) {
|
| 1907 |
D(s, e, i);
|
| 1908 |
},
|
| 1909 |
p: Ae,
|
| 1910 |
d(s) {
|
| 1911 |
+
s && b(e);
|
| 1912 |
}
|
| 1913 |
};
|
| 1914 |
}
|
|
|
|
| 1919 |
), u, a, o, p, h = "Issue:", d, f, k = (
|
| 1920 |
/*display_value*/
|
| 1921 |
n[8].issue + ""
|
| 1922 |
+
), g, I, E, B, R = "Reason:", q, $, S = (
|
| 1923 |
/*display_value*/
|
| 1924 |
n[8].reason + ""
|
| 1925 |
), j, W, H, G, J, Ze = "Feedback", ye, Y, ie, ue = m.parse(
|
|
|
|
| 1931 |
);
|
| 1932 |
return {
|
| 1933 |
c() {
|
| 1934 |
+
e = C("div"), t = C("h4"), t.textContent = s, i = O(), r = C("pre"), c = C("code"), u = se(l), a = O(), o = C("div"), p = C("h4"), p.textContent = h, d = O(), f = C("p"), g = se(k), I = O(), E = C("div"), B = C("h4"), B.textContent = R, q = O(), $ = C("p"), j = se(S), W = O(), A && A.c(), H = O(), G = C("div"), J = C("h3"), J.textContent = Ze, ye = O(), Y = C("div"), ie = new cn(!1), this.h();
|
| 1935 |
},
|
| 1936 |
+
l(x) {
|
| 1937 |
+
e = z(x, "DIV", { class: !0 });
|
| 1938 |
+
var T = L(e);
|
| 1939 |
+
t = z(T, "H4", { class: !0, "data-svelte-h": !0 }), K(t) !== "svelte-1y38fdw" && (t.textContent = s), i = N(T), r = z(T, "PRE", { class: !0 });
|
| 1940 |
var Me = L(r);
|
| 1941 |
+
c = z(Me, "CODE", { class: !0 });
|
| 1942 |
var He = L(c);
|
| 1943 |
+
u = te(He, l), He.forEach(b), Me.forEach(b), T.forEach(b), a = N(x), o = z(x, "DIV", { class: !0 });
|
| 1944 |
var he = L(o);
|
| 1945 |
+
p = z(he, "H4", { class: !0, "data-svelte-h": !0 }), K(p) !== "svelte-1663oc9" && (p.textContent = h), d = N(he), f = z(he, "P", { class: !0 });
|
| 1946 |
var Ge = L(f);
|
| 1947 |
+
g = te(Ge, k), Ge.forEach(b), he.forEach(b), I = N(x), E = z(x, "DIV", { class: !0 });
|
| 1948 |
var pe = L(E);
|
| 1949 |
+
B = z(pe, "H4", { class: !0, "data-svelte-h": !0 }), K(B) !== "svelte-14axvnc" && (B.textContent = R), q = N(pe), $ = z(pe, "P", { class: !0 });
|
| 1950 |
var Fe = L($);
|
| 1951 |
+
j = te(Fe, S), Fe.forEach(b), pe.forEach(b), W = N(x), A && A.l(x), H = N(x), G = z(x, "DIV", { class: !0 });
|
| 1952 |
var fe = L(G);
|
| 1953 |
+
J = z(fe, "H3", { "data-svelte-h": !0 }), K(J) !== "svelte-76jzqn" && (J.textContent = Ze), ye = N(fe), Y = z(fe, "DIV", { class: !0 });
|
| 1954 |
var Qe = L(Y);
|
| 1955 |
+
ie = hn(Qe, !1), Qe.forEach(b), fe.forEach(b), this.h();
|
| 1956 |
},
|
| 1957 |
h() {
|
| 1958 |
+
y(t, "class", "svelte-18zx8pk"), y(c, "class", "svelte-18zx8pk"), y(r, "class", "svelte-18zx8pk"), y(e, "class", "analysis-section svelte-18zx8pk"), y(p, "class", "svelte-18zx8pk"), y(f, "class", "svelte-18zx8pk"), y(o, "class", "analysis-section svelte-18zx8pk"), y(B, "class", "svelte-18zx8pk"), y($, "class", "svelte-18zx8pk"), y(E, "class", "analysis-section svelte-18zx8pk"), ie.a = null, y(Y, "class", "markdown-content svelte-18zx8pk"), y(G, "class", "feedback-section svelte-18zx8pk");
|
| 1959 |
},
|
| 1960 |
+
m(x, T) {
|
| 1961 |
+
D(x, e, T), _(e, t), _(e, i), _(e, r), _(r, c), _(c, u), D(x, a, T), D(x, o, T), _(o, p), _(o, d), _(o, f), _(f, g), D(x, I, T), D(x, E, T), _(E, B), _(E, q), _(E, $), _($, j), D(x, W, T), A && A.m(x, T), D(x, H, T), D(x, G, T), _(G, J), _(G, ye), _(G, Y), ie.m(ue, Y);
|
| 1962 |
},
|
| 1963 |
+
p(x, T) {
|
| 1964 |
+
T & /*display_value*/
|
| 1965 |
256 && l !== (l = /*display_value*/
|
| 1966 |
+
x[8].code + "") && ne(u, l), T & /*display_value*/
|
| 1967 |
256 && k !== (k = /*display_value*/
|
| 1968 |
+
x[8].issue + "") && ne(g, k), T & /*display_value*/
|
| 1969 |
+
256 && S !== (S = /*display_value*/
|
| 1970 |
+
x[8].reason + "") && ne(j, S), /*display_value*/
|
| 1971 |
+
x[8].fixed_code ? A ? A.p(x, T) : (A = st(x), A.c(), A.m(H.parentNode, H)) : A && (A.d(1), A = null), T & /*display_value*/
|
| 1972 |
256 && ue !== (ue = m.parse(
|
| 1973 |
/*display_value*/
|
| 1974 |
+
x[8].feedback || ""
|
| 1975 |
) + "") && ie.p(ue);
|
| 1976 |
},
|
| 1977 |
+
d(x) {
|
| 1978 |
+
x && (b(e), b(a), b(o), b(I), b(E), b(W), b(H), b(G)), A && A.d(x);
|
| 1979 |
}
|
| 1980 |
};
|
| 1981 |
}
|
|
|
|
| 1988 |
l[u] = it(et(n, c, u));
|
| 1989 |
return {
|
| 1990 |
c() {
|
| 1991 |
+
e = C("div"), t = C("h4"), t.textContent = s, i = O(), r = C("pre");
|
| 1992 |
for (let u = 0; u < l.length; u += 1)
|
| 1993 |
l[u].c();
|
| 1994 |
this.h();
|
| 1995 |
},
|
| 1996 |
l(u) {
|
| 1997 |
+
e = z(u, "DIV", { class: !0 });
|
| 1998 |
var a = L(e);
|
| 1999 |
+
t = z(a, "H4", { class: !0, "data-svelte-h": !0 }), K(t) !== "svelte-18sigz6" && (t.textContent = s), i = N(a), r = z(a, "PRE", { class: !0 });
|
| 2000 |
var o = L(r);
|
| 2001 |
for (let p = 0; p < l.length; p += 1)
|
| 2002 |
l[p].l(o);
|
| 2003 |
+
o.forEach(b), a.forEach(b), this.h();
|
| 2004 |
},
|
| 2005 |
h() {
|
| 2006 |
+
y(t, "class", "svelte-18zx8pk"), y(r, "class", "diff-view svelte-18zx8pk"), y(e, "class", "analysis-section svelte-18zx8pk");
|
| 2007 |
},
|
| 2008 |
m(u, a) {
|
| 2009 |
D(u, e, a), _(e, t), _(e, i), _(e, r);
|
|
|
|
| 2028 |
}
|
| 2029 |
},
|
| 2030 |
d(u) {
|
| 2031 |
+
u && b(e), pn(l, u);
|
| 2032 |
}
|
| 2033 |
};
|
| 2034 |
}
|
|
|
|
| 2039 |
), s, i;
|
| 2040 |
return {
|
| 2041 |
c() {
|
| 2042 |
+
e = C("span"), s = se(t), this.h();
|
| 2043 |
},
|
| 2044 |
l(r) {
|
| 2045 |
+
e = z(r, "SPAN", { class: !0 });
|
| 2046 |
var c = L(e);
|
| 2047 |
+
s = te(c, t), c.forEach(b), this.h();
|
| 2048 |
},
|
| 2049 |
h() {
|
| 2050 |
y(e, "class", i = "diff-part " + /*part*/
|
| 2051 |
(n[13].added ? "added" : (
|
| 2052 |
/*part*/
|
| 2053 |
n[13].removed ? "removed" : "common"
|
| 2054 |
+
)) + " svelte-18zx8pk");
|
| 2055 |
},
|
| 2056 |
m(r, c) {
|
| 2057 |
D(r, e, c), _(e, s);
|
|
|
|
| 2064 |
(r[13].added ? "added" : (
|
| 2065 |
/*part*/
|
| 2066 |
r[13].removed ? "removed" : "common"
|
| 2067 |
+
)) + " svelte-18zx8pk") && y(e, "class", i);
|
| 2068 |
},
|
| 2069 |
d(r) {
|
| 2070 |
+
r && b(e);
|
| 2071 |
}
|
| 2072 |
};
|
| 2073 |
}
|
|
|
|
| 2088 |
let a = u(n), o = a(n);
|
| 2089 |
return {
|
| 2090 |
c() {
|
| 2091 |
+
e = C("div"), c && c.c(), t = O(), s = C("div"), l && l.c(), i = O(), o.c(), this.h();
|
| 2092 |
},
|
| 2093 |
l(p) {
|
| 2094 |
+
e = z(p, "DIV", { class: !0, id: !0, style: !0 });
|
| 2095 |
var h = L(e);
|
| 2096 |
+
c && c.l(h), t = N(h), s = z(h, "DIV", { class: !0 });
|
| 2097 |
var d = L(s);
|
| 2098 |
+
l && l.l(d), i = N(d), o.l(d), d.forEach(b), h.forEach(b), this.h();
|
| 2099 |
},
|
| 2100 |
h() {
|
| 2101 |
+
y(s, "class", "code-analysis-viewer svelte-18zx8pk"), y(e, "class", "gradio-container"), y(e, "id", r = /*elem_id*/
|
| 2102 |
n[1] || null), ge(
|
| 2103 |
e,
|
| 2104 |
"width",
|
|
|
|
| 2150 |
i: Ae,
|
| 2151 |
o: Ae,
|
| 2152 |
d(p) {
|
| 2153 |
+
p && b(e), c && c.d(), l && l.d(), o.d();
|
| 2154 |
}
|
| 2155 |
};
|
| 2156 |
}
|
| 2157 |
+
function xn(n, e, t) {
|
| 2158 |
let s;
|
| 2159 |
m.setOptions({
|
| 2160 |
breaks: !0,
|
|
|
|
| 2195 |
}
|
| 2196 |
class wn extends un {
|
| 2197 |
constructor(e) {
|
| 2198 |
+
super(), fn(this, e, xn, mn, dn, {
|
| 2199 |
gradio: 10,
|
| 2200 |
label: 0,
|
| 2201 |
elem_id: 1,
|
src/backend/gradio_codeanalysisviewer/templates/component/style.css
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
.code-analysis-viewer.svelte-
|
|
|
|
| 1 |
+
.code-analysis-viewer.svelte-18zx8pk.svelte-18zx8pk{font-family:var(--font-mono, monospace);font-size:var(--text-sm, 14px);color:var(--body-text-color, #333);border:1px solid var(--border-color-primary, #e0e0e0);border-radius:var(--radius-lg, 8px);padding:var(--spacing-lg, 16px);background-color:var(--background-fill-primary, #f9f9f9)}.analysis-section.svelte-18zx8pk.svelte-18zx8pk{margin-bottom:var(--spacing-lg, 16px);padding-bottom:var(--spacing-md, 12px);border-bottom:1px solid var(--border-color-secondary, #eee)}.analysis-section.svelte-18zx8pk.svelte-18zx8pk:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.analysis-section.svelte-18zx8pk h4.svelte-18zx8pk{font-weight:var(--font-weight-semibold, 600);color:var(--text-color-strong, #222);margin-top:0;margin-bottom:var(--spacing-sm, 8px);font-size:var(--text-md, 16px)}pre.svelte-18zx8pk.svelte-18zx8pk{background-color:var(--background-fill-secondary, #f0f0f0);padding:var(--spacing-md, 12px);border-radius:var(--radius-md, 6px);overflow-x:auto;white-space:pre-wrap;word-wrap:break-word}code.svelte-18zx8pk.svelte-18zx8pk{font-family:var(--font-mono, monospace)}p.svelte-18zx8pk.svelte-18zx8pk{line-height:1.6;margin-top:0;margin-bottom:4px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.6;color:#aeabab;background-color:#0b0000;overflow-wrap:break-word;word-break:break-word;max-width:100%}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk p{margin-bottom:8px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk ul,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk ol{padding-left:20px;margin-bottom:8px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk li{margin-bottom:4px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;background-color:#e6f3ff;padding:2px 4px;border-radius:4px;font-size:.9em}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk pre{background-color:#f0f0f0;padding:12px;border-radius:6px;overflow-x:auto;margin-bottom:12px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk pre code{background-color:transparent;padding:0;border-radius:0}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h1,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h2,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h3,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h4,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h5,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h6{margin-top:16px;margin-bottom:12px;font-weight:600;line-height:1.25;color:#c17979}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h3{font-size:1.25rem}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h4{font-size:1.1rem}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk a{color:#3b82f6;text-decoration:none}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk a:hover{text-decoration:underline}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk blockquote{padding:12px 16px;margin:12px 0;border-left:4px solid #3B82F6;background-color:#f5f5f5;color:#555}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk hr{height:1px;background-color:#d5d0d0;border:none;margin:16px 0}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk table{border-collapse:collapse;width:100%;margin:12px 0}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk th,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk td{border:1px solid #eee;padding:8px;text-align:left}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk th{background-color:#f0f0f0;font-weight:600}.diff-view.svelte-18zx8pk.svelte-18zx8pk{white-space:pre-wrap;word-wrap:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background-color:#f0f0f0;padding:12px;border-radius:6px;overflow-x:auto}.status-message.svelte-18zx8pk.svelte-18zx8pk{padding:12px;margin-bottom:12px;border-radius:6px;background-color:#ede5e5}.status-message.error.svelte-18zx8pk.svelte-18zx8pk{background-color:#ffe6e6;color:#8b0000}.diff-part.added.svelte-18zx8pk.svelte-18zx8pk{background-color:#cbe1d1;color:#006400}.diff-part.removed.svelte-18zx8pk.svelte-18zx8pk{background-color:#ffebe9;color:#b30000;text-decoration:line-through}.diff-part.common.svelte-18zx8pk.svelte-18zx8pk{color:#333;background-color:#fcfcfc;padding:0 2px}
|
src/frontend/Index.svelte
CHANGED
|
@@ -173,7 +173,8 @@
|
|
| 173 |
.feedback-section .markdown-content {
|
| 174 |
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| 175 |
line-height: 1.6;
|
| 176 |
-
color: #
|
|
|
|
| 177 |
overflow-wrap: break-word;
|
| 178 |
word-break: break-word;
|
| 179 |
max-width: 100%;
|
|
@@ -220,7 +221,7 @@
|
|
| 220 |
margin-bottom: 12px;
|
| 221 |
font-weight: 600;
|
| 222 |
line-height: 1.25;
|
| 223 |
-
color: #
|
| 224 |
}
|
| 225 |
|
| 226 |
.feedback-section .markdown-content :global(h3) {
|
|
@@ -250,7 +251,7 @@
|
|
| 250 |
|
| 251 |
.feedback-section .markdown-content :global(hr) {
|
| 252 |
height: 1px;
|
| 253 |
-
background-color: #
|
| 254 |
border: none;
|
| 255 |
margin: 16px 0;
|
| 256 |
}
|
|
@@ -289,7 +290,7 @@
|
|
| 289 |
padding: 12px;
|
| 290 |
margin-bottom: 12px;
|
| 291 |
border-radius: 6px;
|
| 292 |
-
background-color: #
|
| 293 |
}
|
| 294 |
|
| 295 |
.status-message.error {
|
|
|
|
| 173 |
.feedback-section .markdown-content {
|
| 174 |
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| 175 |
line-height: 1.6;
|
| 176 |
+
color: #aeabab;
|
| 177 |
+
background-color: #0b0000;
|
| 178 |
overflow-wrap: break-word;
|
| 179 |
word-break: break-word;
|
| 180 |
max-width: 100%;
|
|
|
|
| 221 |
margin-bottom: 12px;
|
| 222 |
font-weight: 600;
|
| 223 |
line-height: 1.25;
|
| 224 |
+
color: #c17979;
|
| 225 |
}
|
| 226 |
|
| 227 |
.feedback-section .markdown-content :global(h3) {
|
|
|
|
| 251 |
|
| 252 |
.feedback-section .markdown-content :global(hr) {
|
| 253 |
height: 1px;
|
| 254 |
+
background-color: #d5d0d0;
|
| 255 |
border: none;
|
| 256 |
margin: 16px 0;
|
| 257 |
}
|
|
|
|
| 290 |
padding: 12px;
|
| 291 |
margin-bottom: 12px;
|
| 292 |
border-radius: 6px;
|
| 293 |
+
background-color: #ede5e5;
|
| 294 |
}
|
| 295 |
|
| 296 |
.status-message.error {
|
src/pyproject.toml
CHANGED
|
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|
| 8 |
|
| 9 |
[project]
|
| 10 |
name = "gradio_codeanalysisviewer"
|
| 11 |
-
version = "0.0.
|
| 12 |
description = "A nicer view to show the Agentic code analyser outputs"
|
| 13 |
readme = "README.md"
|
| 14 |
license = "MIT"
|
|
|
|
| 8 |
|
| 9 |
[project]
|
| 10 |
name = "gradio_codeanalysisviewer"
|
| 11 |
+
version = "0.0.3"
|
| 12 |
description = "A nicer view to show the Agentic code analyser outputs"
|
| 13 |
readme = "README.md"
|
| 14 |
license = "MIT"
|