@squirrel-cloud/ui-vue 0.2.37 → 0.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -608,12 +608,12 @@ oe.prototype.parse = function(u, e) {
|
|
|
608
608
|
for (let x = 0, k = d.length; x < k; x++) {
|
|
609
609
|
const v = d[x];
|
|
610
610
|
if (v && !v.match(p0)) {
|
|
611
|
-
let
|
|
611
|
+
let g = "";
|
|
612
612
|
for (let y = 0, b = v.length; y < b; y++)
|
|
613
|
-
v.charCodeAt(y) > 127 ?
|
|
614
|
-
if (!
|
|
615
|
-
const y = d.slice(0, x), b = d.slice(x + 1),
|
|
616
|
-
|
|
613
|
+
v.charCodeAt(y) > 127 ? g += "x" : g += v[y];
|
|
614
|
+
if (!g.match(p0)) {
|
|
615
|
+
const y = d.slice(0, x), b = d.slice(x + 1), _ = v.match(Kn);
|
|
616
|
+
_ && (y.push(_[1]), b.unshift(_[2])), b.length && (o = b.join(".") + o), this.hostname = y.join(".");
|
|
617
617
|
break;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
@@ -1487,11 +1487,11 @@ function jr(u) {
|
|
|
1487
1487
|
a[p].schema ? a[p].schema === "mailto:" && !/^mailto:/i.test(k) ? k = u.md.normalizeLinkText("mailto:" + k).replace(/^mailto:/, "") : k = u.md.normalizeLinkText(k) : k = u.md.normalizeLinkText("http://" + k).replace(/^http:\/\//, "");
|
|
1488
1488
|
const v = a[p].index;
|
|
1489
1489
|
if (v > h) {
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1490
|
+
const _ = new u.Token("text", "", 0);
|
|
1491
|
+
_.content = s.slice(h, v), _.level = f, l.push(_);
|
|
1492
1492
|
}
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1493
|
+
const g = new u.Token("link_open", "a", 1);
|
|
1494
|
+
g.attrs = [["href", x]], g.level = f++, g.markup = "linkify", g.info = "auto", l.push(g);
|
|
1495
1495
|
const y = new u.Token("text", "", 0);
|
|
1496
1496
|
y.content = k, y.level = f, l.push(y);
|
|
1497
1497
|
const b = new u.Token("link_close", "a", -1);
|
|
@@ -1575,8 +1575,8 @@ function Qr(u, e) {
|
|
|
1575
1575
|
x = u[t].content.charCodeAt(0);
|
|
1576
1576
|
break;
|
|
1577
1577
|
}
|
|
1578
|
-
const k = Zu(d) || Uu(String.fromCharCode(d)), v = Zu(x) || Uu(String.fromCharCode(x)),
|
|
1579
|
-
if (y ? f = !1 : v && (
|
|
1578
|
+
const k = Zu(d) || Uu(String.fromCharCode(d)), v = Zu(x) || Uu(String.fromCharCode(x)), g = Vu(d), y = Vu(x);
|
|
1579
|
+
if (y ? f = !1 : v && (g || k || (f = !1)), g ? h = !1 : k && (y || v || (h = !1)), x === 34 && l[0] === '"' && d >= 48 && d <= 57 && (h = f = !1), f && h && (f = k, h = v), !f && !h) {
|
|
1580
1580
|
p && (o.content = ee(o.content, l.index, x0));
|
|
1581
1581
|
continue;
|
|
1582
1582
|
}
|
|
@@ -1587,12 +1587,12 @@ function Qr(u, e) {
|
|
|
1587
1587
|
break;
|
|
1588
1588
|
if (b.single === p && n[t].level === i) {
|
|
1589
1589
|
b = n[t];
|
|
1590
|
-
let
|
|
1591
|
-
p ? (
|
|
1590
|
+
let _, m;
|
|
1591
|
+
p ? (_ = e.md.options.quotes[2], m = e.md.options.quotes[3]) : (_ = e.md.options.quotes[0], m = e.md.options.quotes[1]), o.content = ee(o.content, l.index, m), u[b.token].content = ee(
|
|
1592
1592
|
u[b.token].content,
|
|
1593
1593
|
b.pos,
|
|
1594
|
-
|
|
1595
|
-
), s += m.length - 1, b.token === r && (s +=
|
|
1594
|
+
_
|
|
1595
|
+
), s += m.length - 1, b.token === r && (s += _.length - 1), c = o.content, a = c.length, n.length = t;
|
|
1596
1596
|
continue u;
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
@@ -1760,15 +1760,15 @@ function eo(u, e, t, n) {
|
|
|
1760
1760
|
let s = Ee(u, e + 1), a = s.split("|");
|
|
1761
1761
|
const l = [];
|
|
1762
1762
|
for (let b = 0; b < a.length; b++) {
|
|
1763
|
-
const
|
|
1764
|
-
if (!
|
|
1763
|
+
const _ = a[b].trim();
|
|
1764
|
+
if (!_) {
|
|
1765
1765
|
if (b === 0 || b === a.length - 1)
|
|
1766
1766
|
continue;
|
|
1767
1767
|
return !1;
|
|
1768
1768
|
}
|
|
1769
|
-
if (!/^:?-+:?$/.test(
|
|
1769
|
+
if (!/^:?-+:?$/.test(_))
|
|
1770
1770
|
return !1;
|
|
1771
|
-
|
|
1771
|
+
_.charCodeAt(_.length - 1) === 58 ? l.push(_.charCodeAt(0) === 58 ? "center" : "right") : _.charCodeAt(0) === 58 ? l.push("left") : l.push("");
|
|
1772
1772
|
}
|
|
1773
1773
|
if (s = Ee(u, e).trim(), s.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
|
|
1774
1774
|
return !1;
|
|
@@ -1787,13 +1787,13 @@ function eo(u, e, t, n) {
|
|
|
1787
1787
|
const v = u.push("tr_open", "tr", 1);
|
|
1788
1788
|
v.map = [e, e + 1];
|
|
1789
1789
|
for (let b = 0; b < a.length; b++) {
|
|
1790
|
-
const
|
|
1791
|
-
l[b] && (
|
|
1790
|
+
const _ = u.push("th_open", "th", 1);
|
|
1791
|
+
l[b] && (_.attrs = [["style", "text-align:" + l[b]]]);
|
|
1792
1792
|
const m = u.push("inline", "", 0);
|
|
1793
1793
|
m.content = a[b].trim(), m.children = [], u.push("th_close", "th", -1);
|
|
1794
1794
|
}
|
|
1795
1795
|
u.push("tr_close", "tr", -1), u.push("thead_close", "thead", -1);
|
|
1796
|
-
let
|
|
1796
|
+
let g, y = 0;
|
|
1797
1797
|
for (r = e + 2; r < t && !(u.sCount[r] < u.blkIndent); r++) {
|
|
1798
1798
|
let b = !1;
|
|
1799
1799
|
for (let m = 0, E = p.length; m < E; m++)
|
|
@@ -1805,10 +1805,10 @@ function eo(u, e, t, n) {
|
|
|
1805
1805
|
break;
|
|
1806
1806
|
if (r === e + 2) {
|
|
1807
1807
|
const m = u.push("tbody_open", "tbody", 1);
|
|
1808
|
-
m.map =
|
|
1808
|
+
m.map = g = [e + 2, 0];
|
|
1809
1809
|
}
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1810
|
+
const _ = u.push("tr_open", "tr", 1);
|
|
1811
|
+
_.map = [r, r + 1];
|
|
1812
1812
|
for (let m = 0; m < f; m++) {
|
|
1813
1813
|
const E = u.push("td_open", "td", 1);
|
|
1814
1814
|
l[m] && (E.attrs = [["style", "text-align:" + l[m]]]);
|
|
@@ -1817,7 +1817,7 @@ function eo(u, e, t, n) {
|
|
|
1817
1817
|
}
|
|
1818
1818
|
u.push("tr_close", "tr", -1);
|
|
1819
1819
|
}
|
|
1820
|
-
return
|
|
1820
|
+
return g && (u.push("tbody_close", "tbody", -1), g[1] = r), u.push("table_close", "table", -1), x[1] = r, u.parentType = h, u.line = r, !0;
|
|
1821
1821
|
}
|
|
1822
1822
|
function to(u, e, t) {
|
|
1823
1823
|
if (u.sCount[e] - u.blkIndent < 4)
|
|
@@ -1881,9 +1881,9 @@ function ro(u, e, t, n) {
|
|
|
1881
1881
|
if (r = u.bMarks[d] + u.tShift[d], o = u.eMarks[d], r >= o)
|
|
1882
1882
|
break;
|
|
1883
1883
|
if (u.src.charCodeAt(r++) === 62 && !y) {
|
|
1884
|
-
let
|
|
1885
|
-
u.src.charCodeAt(r) === 32 ? (r++,
|
|
1886
|
-
let F =
|
|
1884
|
+
let _ = u.sCount[d] + 1, m, E;
|
|
1885
|
+
u.src.charCodeAt(r) === 32 ? (r++, _++, E = !1, m = !0) : u.src.charCodeAt(r) === 9 ? (m = !0, (u.bsCount[d] + _) % 4 === 3 ? (r++, _++, E = !1) : E = !0) : m = !1;
|
|
1886
|
+
let F = _;
|
|
1887
1887
|
for (c.push(u.bMarks[d]), u.bMarks[d] = r; r < o; ) {
|
|
1888
1888
|
const M = u.src.charCodeAt(r);
|
|
1889
1889
|
if (T(M))
|
|
@@ -1892,14 +1892,14 @@ function ro(u, e, t, n) {
|
|
|
1892
1892
|
break;
|
|
1893
1893
|
r++;
|
|
1894
1894
|
}
|
|
1895
|
-
p = r >= o, s.push(u.bsCount[d]), u.bsCount[d] = u.sCount[d] + 1 + (m ? 1 : 0), a.push(u.sCount[d]), u.sCount[d] = F -
|
|
1895
|
+
p = r >= o, s.push(u.bsCount[d]), u.bsCount[d] = u.sCount[d] + 1 + (m ? 1 : 0), a.push(u.sCount[d]), u.sCount[d] = F - _, l.push(u.tShift[d]), u.tShift[d] = r - u.bMarks[d];
|
|
1896
1896
|
continue;
|
|
1897
1897
|
}
|
|
1898
1898
|
if (p)
|
|
1899
1899
|
break;
|
|
1900
1900
|
let b = !1;
|
|
1901
|
-
for (let
|
|
1902
|
-
if (f[
|
|
1901
|
+
for (let _ = 0, m = f.length; _ < m; _++)
|
|
1902
|
+
if (f[_](u, d, t, !0)) {
|
|
1903
1903
|
b = !0;
|
|
1904
1904
|
break;
|
|
1905
1905
|
}
|
|
@@ -1915,8 +1915,8 @@ function ro(u, e, t, n) {
|
|
|
1915
1915
|
k.markup = ">";
|
|
1916
1916
|
const v = [e, 0];
|
|
1917
1917
|
k.map = v, u.md.block.tokenize(u, e, d);
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1918
|
+
const g = u.push("blockquote_close", "blockquote", -1);
|
|
1919
|
+
g.markup = ">", u.lineMax = i, u.parentType = h, v[1] = u.line;
|
|
1920
1920
|
for (let y = 0; y < l.length; y++)
|
|
1921
1921
|
u.bMarks[y + e] = c[y], u.tShift[y + e] = l[y], u.sCount[y + e] = a[y], u.bsCount[y + e] = s[y];
|
|
1922
1922
|
return u.blkIndent = x, !0;
|
|
@@ -2006,34 +2006,34 @@ function io(u, e, t, n) {
|
|
|
2006
2006
|
const k = [s, 0];
|
|
2007
2007
|
c.map = k, c.markup = String.fromCharCode(d);
|
|
2008
2008
|
let v = !1;
|
|
2009
|
-
const
|
|
2009
|
+
const g = u.md.block.ruler.getRules("list"), y = u.parentType;
|
|
2010
2010
|
for (u.parentType = "list"; s < t; ) {
|
|
2011
2011
|
o = p, r = u.eMarks[s];
|
|
2012
2012
|
const b = u.sCount[s] + p - (u.bMarks[s] + u.tShift[s]);
|
|
2013
|
-
let
|
|
2013
|
+
let _ = b;
|
|
2014
2014
|
for (; o < r; ) {
|
|
2015
2015
|
const X = u.src.charCodeAt(o);
|
|
2016
2016
|
if (X === 9)
|
|
2017
|
-
|
|
2017
|
+
_ += 4 - (_ + u.bsCount[s]) % 4;
|
|
2018
2018
|
else if (X === 32)
|
|
2019
|
-
|
|
2019
|
+
_++;
|
|
2020
2020
|
else
|
|
2021
2021
|
break;
|
|
2022
2022
|
o++;
|
|
2023
2023
|
}
|
|
2024
2024
|
const m = o;
|
|
2025
2025
|
let E;
|
|
2026
|
-
m >= r ? E = 1 : E =
|
|
2026
|
+
m >= r ? E = 1 : E = _ - b, E > 4 && (E = 1);
|
|
2027
2027
|
const F = b + E;
|
|
2028
2028
|
c = u.push("list_item_open", "li", 1), c.markup = String.fromCharCode(d);
|
|
2029
2029
|
const M = [s, 0];
|
|
2030
2030
|
c.map = M, f && (c.info = u.src.slice(i, p - 1));
|
|
2031
2031
|
const z = u.tight, B = u.tShift[s], mu = u.sCount[s], Fu = u.listIndent;
|
|
2032
|
-
if (u.listIndent = u.blkIndent, u.blkIndent = F, u.tight = !0, u.tShift[s] = m - u.bMarks[s], u.sCount[s] =
|
|
2032
|
+
if (u.listIndent = u.blkIndent, u.blkIndent = F, u.tight = !0, u.tShift[s] = m - u.bMarks[s], u.sCount[s] = _, m >= r && u.isEmpty(s + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, s, t, !0), (!u.tight || v) && (a = !1), v = u.line - s > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent = Fu, u.tShift[s] = B, u.sCount[s] = mu, u.tight = z, c = u.push("list_item_close", "li", -1), c.markup = String.fromCharCode(d), s = u.line, M[1] = s, s >= t || u.sCount[s] < u.blkIndent || u.sCount[s] - u.blkIndent >= 4)
|
|
2033
2033
|
break;
|
|
2034
2034
|
let W = !1;
|
|
2035
|
-
for (let X = 0, q =
|
|
2036
|
-
if (
|
|
2035
|
+
for (let X = 0, q = g.length; X < q; X++)
|
|
2036
|
+
if (g[X](u, s, t, !0)) {
|
|
2037
2037
|
W = !0;
|
|
2038
2038
|
break;
|
|
2039
2039
|
}
|
|
@@ -2054,40 +2054,40 @@ function so(u, e, t, n) {
|
|
|
2054
2054
|
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e], i = e + 1;
|
|
2055
2055
|
if (u.sCount[e] - u.blkIndent >= 4 || u.src.charCodeAt(r) !== 91)
|
|
2056
2056
|
return !1;
|
|
2057
|
-
function c(
|
|
2057
|
+
function c(g) {
|
|
2058
2058
|
const y = u.lineMax;
|
|
2059
|
-
if (
|
|
2059
|
+
if (g >= y || u.isEmpty(g))
|
|
2060
2060
|
return null;
|
|
2061
2061
|
let b = !1;
|
|
2062
|
-
if (u.sCount[
|
|
2062
|
+
if (u.sCount[g] - u.blkIndent > 3 && (b = !0), u.sCount[g] < 0 && (b = !0), !b) {
|
|
2063
2063
|
const E = u.md.block.ruler.getRules("reference"), F = u.parentType;
|
|
2064
2064
|
u.parentType = "reference";
|
|
2065
2065
|
let M = !1;
|
|
2066
2066
|
for (let z = 0, B = E.length; z < B; z++)
|
|
2067
|
-
if (E[z](u,
|
|
2067
|
+
if (E[z](u, g, y, !0)) {
|
|
2068
2068
|
M = !0;
|
|
2069
2069
|
break;
|
|
2070
2070
|
}
|
|
2071
2071
|
if (u.parentType = F, M)
|
|
2072
2072
|
return null;
|
|
2073
2073
|
}
|
|
2074
|
-
const
|
|
2075
|
-
return u.src.slice(
|
|
2074
|
+
const _ = u.bMarks[g] + u.tShift[g], m = u.eMarks[g];
|
|
2075
|
+
return u.src.slice(_, m + 1);
|
|
2076
2076
|
}
|
|
2077
2077
|
let s = u.src.slice(r, o + 1);
|
|
2078
2078
|
o = s.length;
|
|
2079
2079
|
let a = -1;
|
|
2080
2080
|
for (r = 1; r < o; r++) {
|
|
2081
|
-
const
|
|
2082
|
-
if (
|
|
2081
|
+
const g = s.charCodeAt(r);
|
|
2082
|
+
if (g === 91)
|
|
2083
2083
|
return !1;
|
|
2084
|
-
if (
|
|
2084
|
+
if (g === 93) {
|
|
2085
2085
|
a = r;
|
|
2086
2086
|
break;
|
|
2087
|
-
} else if (
|
|
2087
|
+
} else if (g === 10) {
|
|
2088
2088
|
const y = c(i);
|
|
2089
2089
|
y !== null && (s += y, o = s.length, i++);
|
|
2090
|
-
} else if (
|
|
2090
|
+
} else if (g === 92 && (r++, r < o && s.charCodeAt(r) === 10)) {
|
|
2091
2091
|
const y = c(i);
|
|
2092
2092
|
y !== null && (s += y, o = s.length, i++);
|
|
2093
2093
|
}
|
|
@@ -2095,11 +2095,11 @@ function so(u, e, t, n) {
|
|
|
2095
2095
|
if (a < 0 || s.charCodeAt(a + 1) !== 58)
|
|
2096
2096
|
return !1;
|
|
2097
2097
|
for (r = a + 2; r < o; r++) {
|
|
2098
|
-
const
|
|
2099
|
-
if (
|
|
2098
|
+
const g = s.charCodeAt(r);
|
|
2099
|
+
if (g === 10) {
|
|
2100
2100
|
const y = c(i);
|
|
2101
2101
|
y !== null && (s += y, o = s.length, i++);
|
|
2102
|
-
} else if (!T(
|
|
2102
|
+
} else if (!T(g)) break;
|
|
2103
2103
|
}
|
|
2104
2104
|
const l = u.md.helpers.parseLinkDestination(s, r, o);
|
|
2105
2105
|
if (!l.ok)
|
|
@@ -2110,29 +2110,29 @@ function so(u, e, t, n) {
|
|
|
2110
2110
|
r = l.pos;
|
|
2111
2111
|
const h = r, p = i, d = r;
|
|
2112
2112
|
for (; r < o; r++) {
|
|
2113
|
-
const
|
|
2114
|
-
if (
|
|
2113
|
+
const g = s.charCodeAt(r);
|
|
2114
|
+
if (g === 10) {
|
|
2115
2115
|
const y = c(i);
|
|
2116
2116
|
y !== null && (s += y, o = s.length, i++);
|
|
2117
|
-
} else if (!T(
|
|
2117
|
+
} else if (!T(g)) break;
|
|
2118
2118
|
}
|
|
2119
2119
|
let x = u.md.helpers.parseLinkTitle(s, r, o);
|
|
2120
2120
|
for (; x.can_continue; ) {
|
|
2121
|
-
const
|
|
2122
|
-
if (
|
|
2123
|
-
s +=
|
|
2121
|
+
const g = c(i);
|
|
2122
|
+
if (g === null) break;
|
|
2123
|
+
s += g, r = o, o = s.length, i++, x = u.md.helpers.parseLinkTitle(s, r, o, x);
|
|
2124
2124
|
}
|
|
2125
2125
|
let k;
|
|
2126
2126
|
for (r < o && d !== r && x.ok ? (k = x.str, r = x.pos) : (k = "", r = h, i = p); r < o; ) {
|
|
2127
|
-
const
|
|
2128
|
-
if (!T(
|
|
2127
|
+
const g = s.charCodeAt(r);
|
|
2128
|
+
if (!T(g))
|
|
2129
2129
|
break;
|
|
2130
2130
|
r++;
|
|
2131
2131
|
}
|
|
2132
2132
|
if (r < o && s.charCodeAt(r) !== 10 && k)
|
|
2133
2133
|
for (k = "", r = h, i = p; r < o; ) {
|
|
2134
|
-
const
|
|
2135
|
-
if (!T(
|
|
2134
|
+
const g = s.charCodeAt(r);
|
|
2135
|
+
if (!T(g))
|
|
2136
2136
|
break;
|
|
2137
2137
|
r++;
|
|
2138
2138
|
}
|
|
@@ -3528,7 +3528,7 @@ function zc() {
|
|
|
3528
3528
|
const o = [], i = { children: [] };
|
|
3529
3529
|
let c = i;
|
|
3530
3530
|
return r.forEach((s) => {
|
|
3531
|
-
var x, k, v,
|
|
3531
|
+
var x, k, v, g, y, b, _, m, E, F, M;
|
|
3532
3532
|
const { type: a, children: l, content: f, attrs: h, tag: p, hidden: d } = s;
|
|
3533
3533
|
switch (a) {
|
|
3534
3534
|
case "heading_open":
|
|
@@ -3589,7 +3589,7 @@ function zc() {
|
|
|
3589
3589
|
break;
|
|
3590
3590
|
}
|
|
3591
3591
|
case "code_inline": {
|
|
3592
|
-
(
|
|
3592
|
+
(g = c.children) == null || g.push({
|
|
3593
3593
|
tag: "code",
|
|
3594
3594
|
children: [f],
|
|
3595
3595
|
attrs: h ? Object.fromEntries(h) : {}
|
|
@@ -3605,7 +3605,7 @@ function zc() {
|
|
|
3605
3605
|
break;
|
|
3606
3606
|
}
|
|
3607
3607
|
case "text": {
|
|
3608
|
-
(
|
|
3608
|
+
(_ = c.children) == null || _.push(f);
|
|
3609
3609
|
break;
|
|
3610
3610
|
}
|
|
3611
3611
|
case "image": {
|
|
@@ -3941,8 +3941,8 @@ const Pc = ["disabled", "form", "type"], se = /* @__PURE__ */ R({
|
|
|
3941
3941
|
props: {
|
|
3942
3942
|
size: { default: "md" },
|
|
3943
3943
|
type: {},
|
|
3944
|
-
round: { type: Boolean },
|
|
3945
|
-
disabled: { type: Boolean }
|
|
3944
|
+
round: { type: Boolean, default: void 0 },
|
|
3945
|
+
disabled: { type: Boolean, default: void 0 }
|
|
3946
3946
|
},
|
|
3947
3947
|
setup(u) {
|
|
3948
3948
|
const e = u;
|
|
@@ -4038,10 +4038,10 @@ const Pc = ["disabled", "form", "type"], se = /* @__PURE__ */ R({
|
|
|
4038
4038
|
name: "sq-form",
|
|
4039
4039
|
__name: "form",
|
|
4040
4040
|
props: /* @__PURE__ */ uu({
|
|
4041
|
-
round: { type: Boolean },
|
|
4041
|
+
round: { type: Boolean, default: void 0 },
|
|
4042
4042
|
showStatusIcon: { type: Boolean },
|
|
4043
|
-
disabled: { type: Boolean },
|
|
4044
|
-
readonly: { type: Boolean },
|
|
4043
|
+
disabled: { type: Boolean, default: void 0 },
|
|
4044
|
+
readonly: { type: Boolean, default: void 0 },
|
|
4045
4045
|
labelWidth: {},
|
|
4046
4046
|
size: { default: "md" },
|
|
4047
4047
|
step: {},
|
|
@@ -4072,44 +4072,43 @@ const Pc = ["disabled", "form", "type"], se = /* @__PURE__ */ R({
|
|
|
4072
4072
|
return o.size !== "md" && b.push(`sq-form--${o.size}`), b;
|
|
4073
4073
|
}), l = D(() => {
|
|
4074
4074
|
const b = o.step;
|
|
4075
|
-
return b === void 0 ? o.config : o.config.filter((
|
|
4075
|
+
return b === void 0 ? o.config : o.config.filter((_) => _.step === void 0 ? _ : Array.isArray(_.step) ? _.step.includes(b) : _.step === b);
|
|
4076
4076
|
});
|
|
4077
4077
|
de(() => {
|
|
4078
4078
|
n = structuredClone(ue(i.value));
|
|
4079
4079
|
});
|
|
4080
4080
|
function f(b) {
|
|
4081
|
-
var
|
|
4082
|
-
return !o.hideRequiredAsterisk && ((
|
|
4081
|
+
var _;
|
|
4082
|
+
return !o.hideRequiredAsterisk && ((_ = b.rule) == null ? void 0 : _.required);
|
|
4083
4083
|
}
|
|
4084
|
-
async function h(b,
|
|
4084
|
+
async function h(b, _, m, E = !0) {
|
|
4085
4085
|
if (!m) return;
|
|
4086
4086
|
const F = m.trigger ?? "change", M = Array.isArray(F) ? "array" : "string";
|
|
4087
|
-
if (
|
|
4088
|
-
if (M === "array" && !F.includes(
|
|
4089
|
-
if (M === "string" && F !==
|
|
4087
|
+
if (_) {
|
|
4088
|
+
if (M === "array" && !F.includes(_)) return;
|
|
4089
|
+
if (M === "string" && F !== _) return;
|
|
4090
4090
|
}
|
|
4091
4091
|
const z = i.value[b];
|
|
4092
|
-
console.log(b, g, m, z);
|
|
4093
4092
|
let B = !1;
|
|
4094
|
-
return m.validateFunc ? B = await d(b, z, m,
|
|
4093
|
+
return m.validateFunc ? B = await d(b, z, m, _) : typeof z == "string" && (B = x(b, z, m)), E && r("validate", b, B, ue(s.value)), B;
|
|
4095
4094
|
}
|
|
4096
4095
|
function p(b) {
|
|
4097
4096
|
return c.value[b] ? "error" : s.value.includes(b) ? "success" : void 0;
|
|
4098
4097
|
}
|
|
4099
|
-
async function d(b,
|
|
4100
|
-
const F = await m.validateFunc(
|
|
4098
|
+
async function d(b, _, m, E) {
|
|
4099
|
+
const F = await m.validateFunc(_, E);
|
|
4101
4100
|
return F === !0 ? v(b) : F === !1 ? k(b, "字段验证失败") : F ? k(b, F) : v(b), F === !0 || typeof F == "string" && !F;
|
|
4102
4101
|
}
|
|
4103
|
-
function x(b,
|
|
4104
|
-
return m.required && !
|
|
4102
|
+
function x(b, _, m) {
|
|
4103
|
+
return m.required && !_ ? (k(b, m.requiredText ?? "字段必填"), !1) : m.pattern && _ && !m.pattern.test(_) ? (k(b, m.patternText ?? "字段验证失败"), !1) : (v(b), !0);
|
|
4105
4104
|
}
|
|
4106
|
-
function k(b,
|
|
4107
|
-
s.value = s.value.filter((m) => m !== b), c.value[b] =
|
|
4105
|
+
function k(b, _) {
|
|
4106
|
+
s.value = s.value.filter((m) => m !== b), c.value[b] = _;
|
|
4108
4107
|
}
|
|
4109
4108
|
function v(b) {
|
|
4110
4109
|
s.value.push(b), delete c.value[b];
|
|
4111
4110
|
}
|
|
4112
|
-
function
|
|
4111
|
+
function g() {
|
|
4113
4112
|
i.value = structuredClone(n), c.value = {}, s.value = [], r("validate", "SQFORM", !1, ue(s.value));
|
|
4114
4113
|
}
|
|
4115
4114
|
function y(b = !0) {
|
|
@@ -4121,7 +4120,7 @@ const Pc = ["disabled", "form", "type"], se = /* @__PURE__ */ R({
|
|
|
4121
4120
|
});
|
|
4122
4121
|
return Promise.all(m).then((E) => (r("validate", "SQFORM", !E.includes(!1), ue(s.value)), E));
|
|
4123
4122
|
}
|
|
4124
|
-
return e({ resetFields:
|
|
4123
|
+
return e({ resetFields: g, validate: y }), (b, _) => (w(), S("form", {
|
|
4125
4124
|
class: $(["sq-form", a.value]),
|
|
4126
4125
|
style: su({ "--form-label-width": o.labelWidth })
|
|
4127
4126
|
}, [
|
|
@@ -4199,11 +4198,11 @@ const Pc = ["disabled", "form", "type"], se = /* @__PURE__ */ R({
|
|
|
4199
4198
|
const n = I0(), r = t, o = u, { inputSize: i, inputRound: c, inputDisabled: s, inputReadonly: a, id: l } = $c(o), f = bu(u, "value"), h = P(!1), p = P(!1), d = Lu(null), x = D(() => {
|
|
4200
4199
|
const q = [], H = C(i), I = C(c), nu = C(s);
|
|
4201
4200
|
return H !== "md" && q.push(`sq-input--${H}`), o.status && q.push(`is-${o.status}`), I && q.push("is-round"), nu && q.push("is-disabled"), q;
|
|
4202
|
-
}), k = D(() => C(p) ? xn : Bn), v = D(() => C(p) ? "text" : o.type),
|
|
4201
|
+
}), k = D(() => C(p) ? xn : Bn), v = D(() => C(p) ? "text" : o.type), g = D(() => n.prefix || o.prefixIcon), y = D(() => C(h) && C(f).length), b = D(() => C(y) && o.clearable), _ = D(() => C(y) && o.type === "password"), m = D(() => {
|
|
4203
4202
|
const q = o.showStatusIcon && o.status;
|
|
4204
4203
|
return n.suffix || q || o.suffixIcon;
|
|
4205
4204
|
}), E = D(
|
|
4206
|
-
() => C(
|
|
4205
|
+
() => C(_) || C(b) || C(m)
|
|
4207
4206
|
), F = D(() => {
|
|
4208
4207
|
if (o.showStatusIcon && o.status)
|
|
4209
4208
|
switch (o.status) {
|
|
@@ -4243,7 +4242,7 @@ const Pc = ["disabled", "form", "type"], se = /* @__PURE__ */ R({
|
|
|
4243
4242
|
class: $(["sq-input", x.value]),
|
|
4244
4243
|
onMousedown: B
|
|
4245
4244
|
}, [
|
|
4246
|
-
|
|
4245
|
+
g.value ? (w(), S("span", Xc, [
|
|
4247
4246
|
j(q.$slots, "prefix", {}, () => [
|
|
4248
4247
|
(w(), L(hu(o.prefixIcon)))
|
|
4249
4248
|
])
|
|
@@ -4277,7 +4276,7 @@ const Pc = ["disabled", "form", "type"], se = /* @__PURE__ */ R({
|
|
|
4277
4276
|
class: "sq-input-suffix-pwd",
|
|
4278
4277
|
onMousedown: Fu
|
|
4279
4278
|
}, null, 544)), [
|
|
4280
|
-
[Du,
|
|
4279
|
+
[Du, _.value]
|
|
4281
4280
|
]),
|
|
4282
4281
|
pu(Pu(C(en), {
|
|
4283
4282
|
class: "sq-input-suffix-clear",
|
|
@@ -4714,10 +4713,10 @@ const Di = async (u, e, t) => {
|
|
|
4714
4713
|
name: k,
|
|
4715
4714
|
fn: v
|
|
4716
4715
|
} = c[x], {
|
|
4717
|
-
x:
|
|
4716
|
+
x: g,
|
|
4718
4717
|
y,
|
|
4719
4718
|
data: b,
|
|
4720
|
-
reset:
|
|
4719
|
+
reset: _
|
|
4721
4720
|
} = await v({
|
|
4722
4721
|
x: l,
|
|
4723
4722
|
y: f,
|
|
@@ -4732,17 +4731,17 @@ const Di = async (u, e, t) => {
|
|
|
4732
4731
|
floating: e
|
|
4733
4732
|
}
|
|
4734
4733
|
});
|
|
4735
|
-
l =
|
|
4734
|
+
l = g ?? l, f = y ?? f, p = {
|
|
4736
4735
|
...p,
|
|
4737
4736
|
[k]: {
|
|
4738
4737
|
...p[k],
|
|
4739
4738
|
...b
|
|
4740
4739
|
}
|
|
4741
|
-
},
|
|
4740
|
+
}, _ && d <= 50 && (d++, typeof _ == "object" && (_.placement && (h = _.placement), _.rects && (a = _.rects === !0 ? await i.getElementRects({
|
|
4742
4741
|
reference: u,
|
|
4743
4742
|
floating: e,
|
|
4744
4743
|
strategy: r
|
|
4745
|
-
}) :
|
|
4744
|
+
}) : _.rects), {
|
|
4746
4745
|
x: l,
|
|
4747
4746
|
y: f
|
|
4748
4747
|
} = S0(a, h, s)), x = -1);
|
|
@@ -4776,7 +4775,7 @@ async function Ei(u, e) {
|
|
|
4776
4775
|
boundary: a,
|
|
4777
4776
|
rootBoundary: l,
|
|
4778
4777
|
strategy: s
|
|
4779
|
-
})),
|
|
4778
|
+
})), g = f === "floating" ? {
|
|
4780
4779
|
x: n,
|
|
4781
4780
|
y: r,
|
|
4782
4781
|
width: i.floating.width,
|
|
@@ -4787,17 +4786,17 @@ async function Ei(u, e) {
|
|
|
4787
4786
|
} : {
|
|
4788
4787
|
x: 1,
|
|
4789
4788
|
y: 1
|
|
4790
|
-
},
|
|
4789
|
+
}, _ = fe(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4791
4790
|
elements: c,
|
|
4792
|
-
rect:
|
|
4791
|
+
rect: g,
|
|
4793
4792
|
offsetParent: y,
|
|
4794
4793
|
strategy: s
|
|
4795
|
-
}) :
|
|
4794
|
+
}) : g);
|
|
4796
4795
|
return {
|
|
4797
|
-
top: (v.top -
|
|
4798
|
-
bottom: (
|
|
4799
|
-
left: (v.left -
|
|
4800
|
-
right: (
|
|
4796
|
+
top: (v.top - _.top + d.top) / b.y,
|
|
4797
|
+
bottom: (_.bottom - v.bottom + d.bottom) / b.y,
|
|
4798
|
+
left: (v.left - _.left + d.left) / b.x,
|
|
4799
|
+
right: (_.right - v.right + d.right) / b.x
|
|
4801
4800
|
};
|
|
4802
4801
|
}
|
|
4803
4802
|
const Ai = function(u) {
|
|
@@ -4824,9 +4823,9 @@ const Ai = function(u) {
|
|
|
4824
4823
|
} = u0(u, e);
|
|
4825
4824
|
if ((t = o.arrow) != null && t.alignmentOffset)
|
|
4826
4825
|
return {};
|
|
4827
|
-
const v = $u(r),
|
|
4828
|
-
!h && m &&
|
|
4829
|
-
const E = [c, ...
|
|
4826
|
+
const v = $u(r), g = wu(c), y = $u(c) === c, b = await (s.isRTL == null ? void 0 : s.isRTL(a.floating)), _ = h || (y || !x ? [le(c)] : gi(c)), m = d !== "none";
|
|
4827
|
+
!h && m && _.push(...vi(c, x, d, b));
|
|
4828
|
+
const E = [c, ..._], F = await Ei(e, k), M = [];
|
|
4830
4829
|
let z = ((n = o.flip) == null ? void 0 : n.overflows) || [];
|
|
4831
4830
|
if (l && M.push(F[v]), f) {
|
|
4832
4831
|
const W = xi(r, i, b);
|
|
@@ -4838,9 +4837,9 @@ const Ai = function(u) {
|
|
|
4838
4837
|
}], !M.every((W) => W <= 0)) {
|
|
4839
4838
|
var B, mu;
|
|
4840
4839
|
const W = (((B = o.flip) == null ? void 0 : B.index) || 0) + 1, X = E[W];
|
|
4841
|
-
if (X && (!(f === "alignment" ?
|
|
4840
|
+
if (X && (!(f === "alignment" ? g !== wu(X) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4842
4841
|
// overflows the main axis.
|
|
4843
|
-
z.every((I) => wu(I.placement) ===
|
|
4842
|
+
z.every((I) => wu(I.placement) === g ? I.overflows[0] > 0 : !0)))
|
|
4844
4843
|
return {
|
|
4845
4844
|
data: {
|
|
4846
4845
|
index: W,
|
|
@@ -4858,7 +4857,7 @@ const Ai = function(u) {
|
|
|
4858
4857
|
const H = (Fu = z.filter((I) => {
|
|
4859
4858
|
if (m) {
|
|
4860
4859
|
const nu = wu(I.placement);
|
|
4861
|
-
return nu ===
|
|
4860
|
+
return nu === g || // Create a bias to the `y` side axis due to horizontal
|
|
4862
4861
|
// reading directions favoring greater width.
|
|
4863
4862
|
nu === "y";
|
|
4864
4863
|
}
|
|
@@ -5096,7 +5095,7 @@ function Eu(u, e, t, n) {
|
|
|
5096
5095
|
const h = G(o), p = n && eu(n) ? G(n) : n;
|
|
5097
5096
|
let d = h, x = Pe(d);
|
|
5098
5097
|
for (; x && n && p !== d; ) {
|
|
5099
|
-
const k = Tu(x), v = x.getBoundingClientRect(),
|
|
5098
|
+
const k = Tu(x), v = x.getBoundingClientRect(), g = tu(x), y = v.left + (x.clientLeft + parseFloat(g.paddingLeft)) * k.x, b = v.top + (x.clientTop + parseFloat(g.paddingTop)) * k.y;
|
|
5100
5099
|
s *= k.x, a *= k.y, l *= k.x, f *= k.y, s += y, a += b, d = G(x), x = Pe(d);
|
|
5101
5100
|
}
|
|
5102
5101
|
}
|
|
@@ -5359,7 +5358,7 @@ function es(u, e) {
|
|
|
5359
5358
|
threshold: Bu(0, $e(1, s)) || 1
|
|
5360
5359
|
};
|
|
5361
5360
|
let b = !0;
|
|
5362
|
-
function
|
|
5361
|
+
function _(m) {
|
|
5363
5362
|
const E = m[0].intersectionRatio;
|
|
5364
5363
|
if (E !== s) {
|
|
5365
5364
|
if (!b)
|
|
@@ -5371,13 +5370,13 @@ function es(u, e) {
|
|
|
5371
5370
|
E === 1 && !Ct(a, u.getBoundingClientRect()) && i(), b = !1;
|
|
5372
5371
|
}
|
|
5373
5372
|
try {
|
|
5374
|
-
t = new IntersectionObserver(
|
|
5373
|
+
t = new IntersectionObserver(_, {
|
|
5375
5374
|
...y,
|
|
5376
5375
|
// Handle <iframe>s
|
|
5377
5376
|
root: r.ownerDocument
|
|
5378
5377
|
});
|
|
5379
5378
|
} catch {
|
|
5380
|
-
t = new IntersectionObserver(
|
|
5379
|
+
t = new IntersectionObserver(_, y);
|
|
5381
5380
|
}
|
|
5382
5381
|
t.observe(u);
|
|
5383
5382
|
}
|
|
@@ -5400,8 +5399,8 @@ function ts(u, e, t, n) {
|
|
|
5400
5399
|
const f = a && c ? es(a, t) : null;
|
|
5401
5400
|
let h = -1, p = null;
|
|
5402
5401
|
i && (p = new ResizeObserver((v) => {
|
|
5403
|
-
let [
|
|
5404
|
-
|
|
5402
|
+
let [g] = v;
|
|
5403
|
+
g && g.target === a && p && (p.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
5405
5404
|
var y;
|
|
5406
5405
|
(y = p) == null || y.observe(e);
|
|
5407
5406
|
})), t();
|
|
@@ -5414,8 +5413,8 @@ function ts(u, e, t, n) {
|
|
|
5414
5413
|
}
|
|
5415
5414
|
return t(), () => {
|
|
5416
5415
|
var v;
|
|
5417
|
-
l.forEach((
|
|
5418
|
-
r &&
|
|
5416
|
+
l.forEach((g) => {
|
|
5417
|
+
r && g.removeEventListener("scroll", t), o && g.removeEventListener("resize", t);
|
|
5419
5418
|
}), f == null || f(), (v = p) == null || v.disconnect(), p = null, s && cancelAnimationFrame(d);
|
|
5420
5419
|
};
|
|
5421
5420
|
}
|
|
@@ -5487,7 +5486,7 @@ function is(u, e, t) {
|
|
|
5487
5486
|
top: M + "px"
|
|
5488
5487
|
};
|
|
5489
5488
|
});
|
|
5490
|
-
let
|
|
5489
|
+
let g;
|
|
5491
5490
|
function y() {
|
|
5492
5491
|
if (a.value == null || l.value == null)
|
|
5493
5492
|
return;
|
|
@@ -5501,15 +5500,15 @@ function is(u, e, t) {
|
|
|
5501
5500
|
});
|
|
5502
5501
|
}
|
|
5503
5502
|
function b() {
|
|
5504
|
-
typeof
|
|
5503
|
+
typeof g == "function" && (g(), g = void 0);
|
|
5505
5504
|
}
|
|
5506
|
-
function
|
|
5505
|
+
function _() {
|
|
5507
5506
|
if (b(), n === void 0) {
|
|
5508
5507
|
y();
|
|
5509
5508
|
return;
|
|
5510
5509
|
}
|
|
5511
5510
|
if (a.value != null && l.value != null) {
|
|
5512
|
-
|
|
5511
|
+
g = n(a.value, l.value, y);
|
|
5513
5512
|
return;
|
|
5514
5513
|
}
|
|
5515
5514
|
}
|
|
@@ -5518,7 +5517,7 @@ function is(u, e, t) {
|
|
|
5518
5517
|
}
|
|
5519
5518
|
return re([o, i, c, r], y, {
|
|
5520
5519
|
flush: "sync"
|
|
5521
|
-
}), re([a, l],
|
|
5520
|
+
}), re([a, l], _, {
|
|
5522
5521
|
flush: "sync"
|
|
5523
5522
|
}), re(r, m, {
|
|
5524
5523
|
flush: "sync"
|
|
@@ -5803,8 +5802,8 @@ const Ss = /* @__PURE__ */ R({
|
|
|
5803
5802
|
emits: /* @__PURE__ */ uu(["focus", "blur", "input", "change"], ["update:value"]),
|
|
5804
5803
|
setup(u, { expose: e, emit: t }) {
|
|
5805
5804
|
const n = t, r = u, { textareaSize: o, textareaRound: i, textareaDisabled: c, textareaReadonly: s, id: a } = Oc(r), l = bu(u, "value"), f = Lu(null), h = D(() => {
|
|
5806
|
-
const k = [], v = C(o),
|
|
5807
|
-
return v !== "md" && k.push(`sq-textarea--${v}`), r.status && k.push(`is-${r.status}`),
|
|
5805
|
+
const k = [], v = C(o), g = C(i), y = C(c);
|
|
5806
|
+
return v !== "md" && k.push(`sq-textarea--${v}`), r.status && k.push(`is-${r.status}`), g && k.push("is-round"), y && k.push("is-disabled"), k;
|
|
5808
5807
|
}), p = D(() => C(c) || C(s) ? "none" : r.resize);
|
|
5809
5808
|
function d() {
|
|
5810
5809
|
var k;
|
|
@@ -5818,7 +5817,7 @@ const Ss = /* @__PURE__ */ R({
|
|
|
5818
5817
|
class: $(["sq-textarea", h.value])
|
|
5819
5818
|
}, [
|
|
5820
5819
|
pu(A("textarea", {
|
|
5821
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
5820
|
+
"onUpdate:modelValue": v[0] || (v[0] = (g) => l.value = g),
|
|
5822
5821
|
class: "sq-textarea-inner",
|
|
5823
5822
|
id: C(a),
|
|
5824
5823
|
style: su({ resize: p.value }),
|
|
@@ -5836,10 +5835,10 @@ const Ss = /* @__PURE__ */ R({
|
|
|
5836
5835
|
inputmode: r.inputmode,
|
|
5837
5836
|
ref_key: "textareaRef",
|
|
5838
5837
|
ref: f,
|
|
5839
|
-
onFocus: v[1] || (v[1] = (
|
|
5840
|
-
onBlur: v[2] || (v[2] = (
|
|
5841
|
-
onInput: v[3] || (v[3] = (
|
|
5842
|
-
onChange: v[4] || (v[4] = (
|
|
5838
|
+
onFocus: v[1] || (v[1] = (g) => n("focus", g)),
|
|
5839
|
+
onBlur: v[2] || (v[2] = (g) => n("blur", g)),
|
|
5840
|
+
onInput: v[3] || (v[3] = (g) => n("input", g)),
|
|
5841
|
+
onChange: v[4] || (v[4] = (g) => n("change", g))
|
|
5843
5842
|
}, null, 44, ds), [
|
|
5844
5843
|
[Bt, l.value]
|
|
5845
5844
|
])
|