@oiij/naive-ui 0.0.38 → 0.0.40
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.
- package/dist/components/data-table-plus/index.d.ts +1 -1
- package/dist/components/preset-form/index.d.ts +1 -1
- package/dist/components/preset-picker/index.d.ts +2 -0
- package/dist/components.cjs +12 -12
- package/dist/components.js +1209 -1203
- package/dist/components.umd.cjs +12 -12
- package/package.json +4 -4
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as Tr, onBeforeMount as Mo, defineComponent as
|
|
1
|
+
import { inject as Tr, onBeforeMount as Mo, defineComponent as ke, createBlock as $, openBlock as R, Transition as Lo, mergeProps as Y, unref as _, withCtx as O, renderSlot as B, ref as j, toValue as Be, isRef as Qt, isReactive as No, watchEffect as Re, watch as Ze, computed as ee, nextTick as Pr, normalizeClass as Ou, createElementVNode as Ye, normalizeStyle as rn, createVNode as Z, createCommentVNode as te, resolveDynamicComponent as le, Teleport as $o, normalizeProps as fe, guardReactiveProps as We, createSlots as Rr, onMounted as Io, createElementBlock as re, createTextVNode as vu, toDisplayString as nu, onScopeDispose as on, onUnmounted as zo, reactive as gu, toRefs as Bo, h as ge, useTemplateRef as mt, Fragment as Ce, renderList as eu, toRaw as we, toRef as Uo, withModifiers as qo, mergeModels as jo, useModel as Ho } from "vue";
|
|
2
2
|
import { NEl as an, NAvatar as Go, NFlex as $e, NSpin as Or, cM as qn, NConfigProvider as Vo, NLoadingBarProvider as Wo, NDialogProvider as Zo, NModalProvider as Yo, NNotificationProvider as Xo, NMessageProvider as Qo, NGlobalStyle as Jo, useDialog as Ko, useLoadingBar as ei, useMessage as ui, useModal as ti, useNotification as ni, NTooltip as ln, NButton as ru, NFormItem as ri, NInputGroup as oi, NInput as sn, NTimePicker as ii, NSwitch as ai, NSlider as li, NSelect as Mr, NRate as si, NRadioGroup as ci, NInputNumber as fi, NDynamicTags as di, NDatePicker as pi, NDivider as cn, NCheckboxGroup as hi, NColorPicker as bi, NCheckbox as mi, NRadio as gi, NGrid as st, NGi as ct, NCollapseTransition as Lr, NDataTable as ki, NPagination as Nr, NForm as xi, NBadge as vi, NButtonGroup as _i, NModal as yi } from "naive-ui";
|
|
3
3
|
import { createEventHook as rt, useClipboard as Ei, useTimeoutFn as Ai, useDebounceFn as $r } from "@vueuse/core";
|
|
4
4
|
function wi(e) {
|
|
@@ -10,51 +10,51 @@ function wi(e) {
|
|
|
10
10
|
const o = {
|
|
11
11
|
install(d) {
|
|
12
12
|
r = d.c;
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const E = d.context;
|
|
14
|
+
E.bem = {}, E.bem.b = null, E.bem.els = null;
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
function a(d) {
|
|
18
|
-
let
|
|
18
|
+
let E, A;
|
|
19
19
|
return {
|
|
20
|
-
before(
|
|
21
|
-
|
|
20
|
+
before(v) {
|
|
21
|
+
E = v.bem.b, A = v.bem.els, v.bem.els = null;
|
|
22
22
|
},
|
|
23
|
-
after(
|
|
24
|
-
|
|
23
|
+
after(v) {
|
|
24
|
+
v.bem.b = E, v.bem.els = A;
|
|
25
25
|
},
|
|
26
|
-
$({ context:
|
|
27
|
-
return d = typeof d == "string" ? d : d({ context:
|
|
26
|
+
$({ context: v, props: p }) {
|
|
27
|
+
return d = typeof d == "string" ? d : d({ context: v, props: p }), v.bem.b = d, `${p?.bPrefix || u}${v.bem.b}`;
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
function i(d) {
|
|
32
|
-
let
|
|
32
|
+
let E;
|
|
33
33
|
return {
|
|
34
|
-
before(
|
|
35
|
-
|
|
34
|
+
before(A) {
|
|
35
|
+
E = A.bem.els;
|
|
36
36
|
},
|
|
37
|
-
after(
|
|
38
|
-
|
|
37
|
+
after(A) {
|
|
38
|
+
A.bem.els = E;
|
|
39
39
|
},
|
|
40
|
-
$({ context:
|
|
41
|
-
return d = typeof d == "string" ? d : d({ context:
|
|
40
|
+
$({ context: A, props: v }) {
|
|
41
|
+
return d = typeof d == "string" ? d : d({ context: A, props: v }), A.bem.els = d.split(",").map((p) => p.trim()), A.bem.els.map((p) => `${v?.bPrefix || u}${A.bem.b}${t}${p}`).join(", ");
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
function l(d) {
|
|
46
46
|
return {
|
|
47
|
-
$({ context:
|
|
48
|
-
d = typeof d == "string" ? d : d({ context:
|
|
49
|
-
const
|
|
50
|
-
function p(
|
|
51
|
-
return
|
|
47
|
+
$({ context: E, props: A }) {
|
|
48
|
+
d = typeof d == "string" ? d : d({ context: E, props: A });
|
|
49
|
+
const v = d.split(",").map((m) => m.trim());
|
|
50
|
+
function p(m) {
|
|
51
|
+
return v.map((b) => `&${A?.bPrefix || u}${E.bem.b}${m !== void 0 ? `${t}${m}` : ""}${n}${b}`).join(", ");
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
53
|
+
const k = E.bem.els;
|
|
54
|
+
if (k !== null) {
|
|
55
|
+
if (process.env.NODE_ENV !== "production" && k.length >= 2)
|
|
56
56
|
throw Error(`[css-render/plugin-bem]: m(${d}) is invalid, using modifier inside multiple elements is not allowed`);
|
|
57
|
-
return p(
|
|
57
|
+
return p(k[0]);
|
|
58
58
|
} else
|
|
59
59
|
return p();
|
|
60
60
|
}
|
|
@@ -62,12 +62,12 @@ function wi(e) {
|
|
|
62
62
|
}
|
|
63
63
|
function s(d) {
|
|
64
64
|
return {
|
|
65
|
-
$({ context:
|
|
66
|
-
d = typeof d == "string" ? d : d({ context:
|
|
67
|
-
const
|
|
68
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
65
|
+
$({ context: E, props: A }) {
|
|
66
|
+
d = typeof d == "string" ? d : d({ context: E, props: A });
|
|
67
|
+
const v = E.bem.els;
|
|
68
|
+
if (process.env.NODE_ENV !== "production" && v !== null && v.length >= 2)
|
|
69
69
|
throw Error(`[css-render/plugin-bem]: notM(${d}) is invalid, using modifier inside multiple elements is not allowed`);
|
|
70
|
-
return `&:not(${
|
|
70
|
+
return `&:not(${A?.bPrefix || u}${E.bem.b}${v !== null && v.length > 0 ? `${t}${v[0]}` : ""}${n}${d})`;
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
@@ -289,9 +289,9 @@ function Ii(e, u, t, n, r, o, a, i, l) {
|
|
|
289
289
|
if (s === void 0 && (s = u.render(n)), f.textContent = s, c !== null)
|
|
290
290
|
return c;
|
|
291
291
|
if (a) {
|
|
292
|
-
const
|
|
293
|
-
if (
|
|
294
|
-
return i.insertBefore(f,
|
|
292
|
+
const y = i.querySelector(`meta[name="${a}"]`);
|
|
293
|
+
if (y)
|
|
294
|
+
return i.insertBefore(f, y), Gn(u.els, f), f;
|
|
295
295
|
}
|
|
296
296
|
return r ? i.insertBefore(f, i.querySelector("style, link")) : i.appendChild(f), Gn(u.els, f), f;
|
|
297
297
|
}
|
|
@@ -407,14 +407,14 @@ function Ki() {
|
|
|
407
407
|
Ji()
|
|
408
408
|
]);
|
|
409
409
|
}
|
|
410
|
-
const Ur = /* @__PURE__ */
|
|
410
|
+
const Ur = /* @__PURE__ */ ke({
|
|
411
411
|
__name: "BaseTransition",
|
|
412
412
|
props: {
|
|
413
413
|
name: { default: "fade" },
|
|
414
414
|
transitionProps: {}
|
|
415
415
|
},
|
|
416
416
|
setup(e) {
|
|
417
|
-
return gt(Qi, Ki()), (u, t) => (R(), $(Lo,
|
|
417
|
+
return gt(Qi, Ki()), (u, t) => (R(), $(Lo, Y({
|
|
418
418
|
name: `${_(Iu)}-${u.name}`,
|
|
419
419
|
appear: "",
|
|
420
420
|
mode: "out-in"
|
|
@@ -435,14 +435,14 @@ const {
|
|
|
435
435
|
getOwnPropertyDescriptor: ta
|
|
436
436
|
} = Object;
|
|
437
437
|
let {
|
|
438
|
-
freeze:
|
|
438
|
+
freeze: ve,
|
|
439
439
|
seal: Se,
|
|
440
440
|
create: jr
|
|
441
441
|
} = Object, {
|
|
442
442
|
apply: Kt,
|
|
443
443
|
construct: en
|
|
444
444
|
} = typeof Reflect < "u" && Reflect;
|
|
445
|
-
|
|
445
|
+
ve || (ve = function(u) {
|
|
446
446
|
return u;
|
|
447
447
|
});
|
|
448
448
|
Se || (Se = function(u) {
|
|
@@ -454,8 +454,8 @@ Kt || (Kt = function(u, t, n) {
|
|
|
454
454
|
en || (en = function(u, t) {
|
|
455
455
|
return new u(...t);
|
|
456
456
|
});
|
|
457
|
-
const Qu =
|
|
458
|
-
function
|
|
457
|
+
const Qu = _e(Array.prototype.forEach), na = _e(Array.prototype.lastIndexOf), Wn = _e(Array.prototype.pop), wu = _e(Array.prototype.push), ra = _e(Array.prototype.splice), ot = _e(String.prototype.toLowerCase), Ot = _e(String.prototype.toString), Zn = _e(String.prototype.match), Cu = _e(String.prototype.replace), oa = _e(String.prototype.indexOf), ia = _e(String.prototype.trim), Pe = _e(Object.prototype.hasOwnProperty), xe = _e(RegExp.prototype.test), Du = aa(TypeError);
|
|
458
|
+
function _e(e) {
|
|
459
459
|
return function(u) {
|
|
460
460
|
u instanceof RegExp && (u.lastIndex = 0);
|
|
461
461
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
|
|
@@ -470,7 +470,7 @@ function aa(e) {
|
|
|
470
470
|
return en(e, t);
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function q(e, u) {
|
|
474
474
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ot;
|
|
475
475
|
Vn && Vn(e, null);
|
|
476
476
|
let n = u.length;
|
|
@@ -500,9 +500,9 @@ function Fu(e, u) {
|
|
|
500
500
|
const n = ta(e, u);
|
|
501
501
|
if (n) {
|
|
502
502
|
if (n.get)
|
|
503
|
-
return
|
|
503
|
+
return _e(n.get);
|
|
504
504
|
if (typeof n.value == "function")
|
|
505
|
-
return
|
|
505
|
+
return _e(n.value);
|
|
506
506
|
}
|
|
507
507
|
e = ua(e);
|
|
508
508
|
}
|
|
@@ -511,7 +511,7 @@ function Fu(e, u) {
|
|
|
511
511
|
}
|
|
512
512
|
return t;
|
|
513
513
|
}
|
|
514
|
-
const Yn =
|
|
514
|
+
const Yn = ve(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Mt = ve(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Lt = ve(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), sa = ve(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Nt = ve(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ca = ve(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Xn = ve(["#text"]), Qn = ve(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), $t = ve(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Jn = ve(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ju = ve(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), fa = Se(/\{\{[\w\W]*|[\w\W]*\}\}/gm), da = Se(/<%[\w\W]*|[\w\W]*%>/gm), pa = Se(/\$\{[\w\W]*/gm), ha = Se(/^data-[\-\w.\u00B7-\uFFFF]+$/), ba = Se(/^aria-[\-\w]+$/), Hr = Se(
|
|
515
515
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
516
516
|
// eslint-disable-line no-useless-escape
|
|
517
517
|
), ma = Se(/^(?:\w+script|data):/i), ga = Se(
|
|
@@ -588,14 +588,14 @@ function Vr() {
|
|
|
588
588
|
NodeFilter: s,
|
|
589
589
|
NamedNodeMap: c = e.NamedNodeMap || e.MozNamedAttrMap,
|
|
590
590
|
HTMLFormElement: f,
|
|
591
|
-
DOMParser:
|
|
591
|
+
DOMParser: y,
|
|
592
592
|
trustedTypes: x
|
|
593
|
-
} = e, d = l.prototype,
|
|
593
|
+
} = e, d = l.prototype, E = Fu(d, "cloneNode"), A = Fu(d, "remove"), v = Fu(d, "nextSibling"), p = Fu(d, "childNodes"), k = Fu(d, "parentNode");
|
|
594
594
|
if (typeof a == "function") {
|
|
595
595
|
const N = t.createElement("template");
|
|
596
596
|
N.content && N.content.ownerDocument && (t = N.content.ownerDocument);
|
|
597
597
|
}
|
|
598
|
-
let
|
|
598
|
+
let m, b = "";
|
|
599
599
|
const {
|
|
600
600
|
implementation: h,
|
|
601
601
|
createNodeIterator: C,
|
|
@@ -604,25 +604,25 @@ function Vr() {
|
|
|
604
604
|
} = t, {
|
|
605
605
|
importNode: I
|
|
606
606
|
} = n;
|
|
607
|
-
let
|
|
608
|
-
u.isSupported = typeof qr == "function" && typeof
|
|
607
|
+
let L = er();
|
|
608
|
+
u.isSupported = typeof qr == "function" && typeof k == "function" && h && h.createHTMLDocument !== void 0;
|
|
609
609
|
const {
|
|
610
|
-
MUSTACHE_EXPR:
|
|
611
|
-
ERB_EXPR:
|
|
612
|
-
TMPLIT_EXPR:
|
|
613
|
-
DATA_ATTR:
|
|
614
|
-
ARIA_ATTR:
|
|
615
|
-
IS_SCRIPT_OR_DATA:
|
|
616
|
-
ATTR_WHITESPACE:
|
|
617
|
-
CUSTOM_ELEMENT:
|
|
610
|
+
MUSTACHE_EXPR: G,
|
|
611
|
+
ERB_EXPR: X,
|
|
612
|
+
TMPLIT_EXPR: T,
|
|
613
|
+
DATA_ATTR: V,
|
|
614
|
+
ARIA_ATTR: de,
|
|
615
|
+
IS_SCRIPT_OR_DATA: K,
|
|
616
|
+
ATTR_WHITESPACE: W,
|
|
617
|
+
CUSTOM_ELEMENT: ce
|
|
618
618
|
} = Kn;
|
|
619
619
|
let {
|
|
620
|
-
IS_ALLOWED_URI:
|
|
620
|
+
IS_ALLOWED_URI: pe
|
|
621
621
|
} = Kn, w = null;
|
|
622
|
-
const z =
|
|
622
|
+
const z = q({}, [...Yn, ...Mt, ...Lt, ...Nt, ...Xn]);
|
|
623
623
|
let F = null;
|
|
624
|
-
const
|
|
625
|
-
let
|
|
624
|
+
const H = q({}, [...Qn, ...$t, ...Jn, ...Ju]);
|
|
625
|
+
let U = Object.seal(jr(null, {
|
|
626
626
|
tagNameCheck: {
|
|
627
627
|
writable: !0,
|
|
628
628
|
configurable: !1,
|
|
@@ -641,101 +641,101 @@ function Vr() {
|
|
|
641
641
|
enumerable: !0,
|
|
642
642
|
value: !1
|
|
643
643
|
}
|
|
644
|
-
})), ue = null,
|
|
644
|
+
})), ue = null, oe = null, ye = !0, Me = !0, Le = !1, iu = !0, Xe = !1, Qe = !0, au = !1, At = !1, wt = !1, su = !1, qu = !1, ju = !1, An = !0, wn = !1;
|
|
645
645
|
const Co = "user-content-";
|
|
646
646
|
let Ct = !0, yu = !1, cu = {}, fu = null;
|
|
647
|
-
const Cn =
|
|
647
|
+
const Cn = q({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
648
648
|
let Dn = null;
|
|
649
|
-
const Fn =
|
|
649
|
+
const Fn = q({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
650
650
|
let Dt = null;
|
|
651
|
-
const Sn =
|
|
651
|
+
const Sn = q({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Hu = "http://www.w3.org/1998/Math/MathML", Gu = "http://www.w3.org/2000/svg", je = "http://www.w3.org/1999/xhtml";
|
|
652
652
|
let du = je, Ft = !1, St = null;
|
|
653
|
-
const Do =
|
|
654
|
-
let Vu =
|
|
655
|
-
const Fo =
|
|
653
|
+
const Do = q({}, [Hu, Gu, je], Ot);
|
|
654
|
+
let Vu = q({}, ["mi", "mo", "mn", "ms", "mtext"]), Wu = q({}, ["annotation-xml"]);
|
|
655
|
+
const Fo = q({}, ["title", "style", "font", "a", "script"]);
|
|
656
656
|
let Eu = null;
|
|
657
657
|
const So = ["application/xhtml+xml", "text/html"], To = "text/html";
|
|
658
|
-
let
|
|
658
|
+
let ie = null, pu = null;
|
|
659
659
|
const Po = t.createElement("form"), Tn = function(g) {
|
|
660
660
|
return g instanceof RegExp || g instanceof Function;
|
|
661
661
|
}, Tt = function() {
|
|
662
662
|
let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
663
663
|
if (!(pu && pu === g)) {
|
|
664
664
|
if ((!g || typeof g != "object") && (g = {}), g = Ve(g), Eu = // eslint-disable-next-line unicorn/prefer-includes
|
|
665
|
-
So.indexOf(g.PARSER_MEDIA_TYPE) === -1 ? To : g.PARSER_MEDIA_TYPE,
|
|
665
|
+
So.indexOf(g.PARSER_MEDIA_TYPE) === -1 ? To : g.PARSER_MEDIA_TYPE, ie = Eu === "application/xhtml+xml" ? Ot : ot, w = Pe(g, "ALLOWED_TAGS") ? q({}, g.ALLOWED_TAGS, ie) : z, F = Pe(g, "ALLOWED_ATTR") ? q({}, g.ALLOWED_ATTR, ie) : H, St = Pe(g, "ALLOWED_NAMESPACES") ? q({}, g.ALLOWED_NAMESPACES, Ot) : Do, Dt = Pe(g, "ADD_URI_SAFE_ATTR") ? q(Ve(Sn), g.ADD_URI_SAFE_ATTR, ie) : Sn, Dn = Pe(g, "ADD_DATA_URI_TAGS") ? q(Ve(Fn), g.ADD_DATA_URI_TAGS, ie) : Fn, fu = Pe(g, "FORBID_CONTENTS") ? q({}, g.FORBID_CONTENTS, ie) : Cn, ue = Pe(g, "FORBID_TAGS") ? q({}, g.FORBID_TAGS, ie) : Ve({}), oe = Pe(g, "FORBID_ATTR") ? q({}, g.FORBID_ATTR, ie) : Ve({}), cu = Pe(g, "USE_PROFILES") ? g.USE_PROFILES : !1, ye = g.ALLOW_ARIA_ATTR !== !1, Me = g.ALLOW_DATA_ATTR !== !1, Le = g.ALLOW_UNKNOWN_PROTOCOLS || !1, iu = g.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Xe = g.SAFE_FOR_TEMPLATES || !1, Qe = g.SAFE_FOR_XML !== !1, au = g.WHOLE_DOCUMENT || !1, su = g.RETURN_DOM || !1, qu = g.RETURN_DOM_FRAGMENT || !1, ju = g.RETURN_TRUSTED_TYPE || !1, wt = g.FORCE_BODY || !1, An = g.SANITIZE_DOM !== !1, wn = g.SANITIZE_NAMED_PROPS || !1, Ct = g.KEEP_CONTENT !== !1, yu = g.IN_PLACE || !1, pe = g.ALLOWED_URI_REGEXP || Hr, du = g.NAMESPACE || je, Vu = g.MATHML_TEXT_INTEGRATION_POINTS || Vu, Wu = g.HTML_INTEGRATION_POINTS || Wu, U = g.CUSTOM_ELEMENT_HANDLING || {}, g.CUSTOM_ELEMENT_HANDLING && Tn(g.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (U.tagNameCheck = g.CUSTOM_ELEMENT_HANDLING.tagNameCheck), g.CUSTOM_ELEMENT_HANDLING && Tn(g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (U.attributeNameCheck = g.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), g.CUSTOM_ELEMENT_HANDLING && typeof g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (U.allowCustomizedBuiltInElements = g.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Xe && (Me = !1), qu && (su = !0), cu && (w = q({}, Xn), F = [], cu.html === !0 && (q(w, Yn), q(F, Qn)), cu.svg === !0 && (q(w, Mt), q(F, $t), q(F, Ju)), cu.svgFilters === !0 && (q(w, Lt), q(F, $t), q(F, Ju)), cu.mathMl === !0 && (q(w, Nt), q(F, Jn), q(F, Ju))), g.ADD_TAGS && (w === z && (w = Ve(w)), q(w, g.ADD_TAGS, ie)), g.ADD_ATTR && (F === H && (F = Ve(F)), q(F, g.ADD_ATTR, ie)), g.ADD_URI_SAFE_ATTR && q(Dt, g.ADD_URI_SAFE_ATTR, ie), g.FORBID_CONTENTS && (fu === Cn && (fu = Ve(fu)), q(fu, g.FORBID_CONTENTS, ie)), Ct && (w["#text"] = !0), au && q(w, ["html", "head", "body"]), w.table && (q(w, ["tbody"]), delete ue.tbody), g.TRUSTED_TYPES_POLICY) {
|
|
666
666
|
if (typeof g.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
667
667
|
throw Du('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
668
668
|
if (typeof g.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
669
669
|
throw Du('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
670
|
-
|
|
670
|
+
m = g.TRUSTED_TYPES_POLICY, b = m.createHTML("");
|
|
671
671
|
} else
|
|
672
|
-
|
|
673
|
-
|
|
672
|
+
m === void 0 && (m = va(x, r)), m !== null && typeof b == "string" && (b = m.createHTML(""));
|
|
673
|
+
ve && ve(g), pu = g;
|
|
674
674
|
}
|
|
675
|
-
}, Pn =
|
|
676
|
-
let
|
|
677
|
-
(!
|
|
675
|
+
}, Pn = q({}, [...Mt, ...Lt, ...sa]), Rn = q({}, [...Nt, ...ca]), Ro = function(g) {
|
|
676
|
+
let S = k(g);
|
|
677
|
+
(!S || !S.tagName) && (S = {
|
|
678
678
|
namespaceURI: du,
|
|
679
679
|
tagName: "template"
|
|
680
680
|
});
|
|
681
|
-
const
|
|
682
|
-
return St[g.namespaceURI] ? g.namespaceURI === Gu ?
|
|
681
|
+
const M = ot(g.tagName), J = ot(S.tagName);
|
|
682
|
+
return St[g.namespaceURI] ? g.namespaceURI === Gu ? S.namespaceURI === je ? M === "svg" : S.namespaceURI === Hu ? M === "svg" && (J === "annotation-xml" || Vu[J]) : !!Pn[M] : g.namespaceURI === Hu ? S.namespaceURI === je ? M === "math" : S.namespaceURI === Gu ? M === "math" && Wu[J] : !!Rn[M] : g.namespaceURI === je ? S.namespaceURI === Gu && !Wu[J] || S.namespaceURI === Hu && !Vu[J] ? !1 : !Rn[M] && (Fo[M] || !Pn[M]) : !!(Eu === "application/xhtml+xml" && St[g.namespaceURI]) : !1;
|
|
683
683
|
}, Ne = function(g) {
|
|
684
684
|
wu(u.removed, {
|
|
685
685
|
element: g
|
|
686
686
|
});
|
|
687
687
|
try {
|
|
688
|
-
|
|
688
|
+
k(g).removeChild(g);
|
|
689
689
|
} catch {
|
|
690
|
-
|
|
690
|
+
A(g);
|
|
691
691
|
}
|
|
692
|
-
}, hu = function(g,
|
|
692
|
+
}, hu = function(g, S) {
|
|
693
693
|
try {
|
|
694
694
|
wu(u.removed, {
|
|
695
|
-
attribute:
|
|
696
|
-
from:
|
|
695
|
+
attribute: S.getAttributeNode(g),
|
|
696
|
+
from: S
|
|
697
697
|
});
|
|
698
698
|
} catch {
|
|
699
699
|
wu(u.removed, {
|
|
700
700
|
attribute: null,
|
|
701
|
-
from:
|
|
701
|
+
from: S
|
|
702
702
|
});
|
|
703
703
|
}
|
|
704
|
-
if (
|
|
704
|
+
if (S.removeAttribute(g), g === "is")
|
|
705
705
|
if (su || qu)
|
|
706
706
|
try {
|
|
707
|
-
Ne(
|
|
707
|
+
Ne(S);
|
|
708
708
|
} catch {
|
|
709
709
|
}
|
|
710
710
|
else
|
|
711
711
|
try {
|
|
712
|
-
|
|
712
|
+
S.setAttribute(g, "");
|
|
713
713
|
} catch {
|
|
714
714
|
}
|
|
715
715
|
}, On = function(g) {
|
|
716
|
-
let
|
|
716
|
+
let S = null, M = null;
|
|
717
717
|
if (wt)
|
|
718
718
|
g = "<remove></remove>" + g;
|
|
719
719
|
else {
|
|
720
|
-
const
|
|
721
|
-
|
|
720
|
+
const ne = Zn(g, /^[\r\n\t ]+/);
|
|
721
|
+
M = ne && ne[0];
|
|
722
722
|
}
|
|
723
723
|
Eu === "application/xhtml+xml" && du === je && (g = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + g + "</body></html>");
|
|
724
|
-
const J =
|
|
724
|
+
const J = m ? m.createHTML(g) : g;
|
|
725
725
|
if (du === je)
|
|
726
726
|
try {
|
|
727
|
-
|
|
727
|
+
S = new y().parseFromString(J, Eu);
|
|
728
728
|
} catch {
|
|
729
729
|
}
|
|
730
|
-
if (!
|
|
731
|
-
|
|
730
|
+
if (!S || !S.documentElement) {
|
|
731
|
+
S = h.createDocument(du, "template", null);
|
|
732
732
|
try {
|
|
733
|
-
|
|
733
|
+
S.documentElement.innerHTML = Ft ? b : J;
|
|
734
734
|
} catch {
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
const
|
|
738
|
-
return g &&
|
|
737
|
+
const he = S.body || S.documentElement;
|
|
738
|
+
return g && M && he.insertBefore(t.createTextNode(M), he.childNodes[0] || null), du === je ? D.call(S, au ? "html" : "body")[0] : au ? S.documentElement : he;
|
|
739
739
|
}, Mn = function(g) {
|
|
740
740
|
return C.call(
|
|
741
741
|
g.ownerDocument || g,
|
|
@@ -749,60 +749,60 @@ function Vr() {
|
|
|
749
749
|
}, Ln = function(g) {
|
|
750
750
|
return typeof i == "function" && g instanceof i;
|
|
751
751
|
};
|
|
752
|
-
function He(N, g,
|
|
753
|
-
Qu(N, (
|
|
754
|
-
|
|
752
|
+
function He(N, g, S) {
|
|
753
|
+
Qu(N, (M) => {
|
|
754
|
+
M.call(u, g, S, pu);
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
const Nn = function(g) {
|
|
758
|
-
let
|
|
759
|
-
if (He(
|
|
758
|
+
let S = null;
|
|
759
|
+
if (He(L.beforeSanitizeElements, g, null), Pt(g))
|
|
760
760
|
return Ne(g), !0;
|
|
761
|
-
const
|
|
762
|
-
if (He(
|
|
763
|
-
tagName:
|
|
761
|
+
const M = ie(g.nodeName);
|
|
762
|
+
if (He(L.uponSanitizeElement, g, {
|
|
763
|
+
tagName: M,
|
|
764
764
|
allowedTags: w
|
|
765
|
-
}), Qe && g.hasChildNodes() && !Ln(g.firstElementChild) &&
|
|
765
|
+
}), Qe && g.hasChildNodes() && !Ln(g.firstElementChild) && xe(/<[/\w!]/g, g.innerHTML) && xe(/<[/\w!]/g, g.textContent) || g.nodeType === Su.progressingInstruction || Qe && g.nodeType === Su.comment && xe(/<[/\w]/g, g.data))
|
|
766
766
|
return Ne(g), !0;
|
|
767
|
-
if (!w[
|
|
768
|
-
if (!ue[
|
|
767
|
+
if (!w[M] || ue[M]) {
|
|
768
|
+
if (!ue[M] && In(M) && (U.tagNameCheck instanceof RegExp && xe(U.tagNameCheck, M) || U.tagNameCheck instanceof Function && U.tagNameCheck(M)))
|
|
769
769
|
return !1;
|
|
770
|
-
if (Ct && !fu[
|
|
771
|
-
const J =
|
|
772
|
-
if (
|
|
773
|
-
const
|
|
774
|
-
for (let
|
|
775
|
-
const Ge =
|
|
776
|
-
Ge.__removalCount = (g.__removalCount || 0) + 1, J.insertBefore(Ge,
|
|
770
|
+
if (Ct && !fu[M]) {
|
|
771
|
+
const J = k(g) || g.parentNode, he = p(g) || g.childNodes;
|
|
772
|
+
if (he && J) {
|
|
773
|
+
const ne = he.length;
|
|
774
|
+
for (let Ee = ne - 1; Ee >= 0; --Ee) {
|
|
775
|
+
const Ge = E(he[Ee], !0);
|
|
776
|
+
Ge.__removalCount = (g.__removalCount || 0) + 1, J.insertBefore(Ge, v(g));
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
return Ne(g), !0;
|
|
781
781
|
}
|
|
782
|
-
return g instanceof l && !Ro(g) || (
|
|
783
|
-
|
|
784
|
-
}), g.textContent !==
|
|
782
|
+
return g instanceof l && !Ro(g) || (M === "noscript" || M === "noembed" || M === "noframes") && xe(/<\/no(script|embed|frames)/i, g.innerHTML) ? (Ne(g), !0) : (Xe && g.nodeType === Su.text && (S = g.textContent, Qu([G, X, T], (J) => {
|
|
783
|
+
S = Cu(S, J, " ");
|
|
784
|
+
}), g.textContent !== S && (wu(u.removed, {
|
|
785
785
|
element: g.cloneNode()
|
|
786
|
-
}), g.textContent =
|
|
787
|
-
}, $n = function(g,
|
|
788
|
-
if (An && (
|
|
786
|
+
}), g.textContent = S)), He(L.afterSanitizeElements, g, null), !1);
|
|
787
|
+
}, $n = function(g, S, M) {
|
|
788
|
+
if (An && (S === "id" || S === "name") && (M in t || M in Po))
|
|
789
789
|
return !1;
|
|
790
|
-
if (!(Me && !
|
|
791
|
-
if (!(
|
|
792
|
-
if (!F[
|
|
790
|
+
if (!(Me && !oe[S] && xe(V, S))) {
|
|
791
|
+
if (!(ye && xe(de, S))) {
|
|
792
|
+
if (!F[S] || oe[S]) {
|
|
793
793
|
if (
|
|
794
794
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
795
795
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
796
796
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
797
|
-
!(In(g) && (
|
|
797
|
+
!(In(g) && (U.tagNameCheck instanceof RegExp && xe(U.tagNameCheck, g) || U.tagNameCheck instanceof Function && U.tagNameCheck(g)) && (U.attributeNameCheck instanceof RegExp && xe(U.attributeNameCheck, S) || U.attributeNameCheck instanceof Function && U.attributeNameCheck(S)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
798
798
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
799
|
-
|
|
799
|
+
S === "is" && U.allowCustomizedBuiltInElements && (U.tagNameCheck instanceof RegExp && xe(U.tagNameCheck, M) || U.tagNameCheck instanceof Function && U.tagNameCheck(M)))
|
|
800
800
|
) return !1;
|
|
801
|
-
} else if (!Dt[
|
|
802
|
-
if (!
|
|
803
|
-
if (!((
|
|
804
|
-
if (!(Le && !
|
|
805
|
-
if (
|
|
801
|
+
} else if (!Dt[S]) {
|
|
802
|
+
if (!xe(pe, Cu(M, W, ""))) {
|
|
803
|
+
if (!((S === "src" || S === "xlink:href" || S === "href") && g !== "script" && oa(M, "data:") === 0 && Dn[g])) {
|
|
804
|
+
if (!(Le && !xe(K, Cu(M, W, "")))) {
|
|
805
|
+
if (M)
|
|
806
806
|
return !1;
|
|
807
807
|
}
|
|
808
808
|
}
|
|
@@ -812,79 +812,79 @@ function Vr() {
|
|
|
812
812
|
}
|
|
813
813
|
return !0;
|
|
814
814
|
}, In = function(g) {
|
|
815
|
-
return g !== "annotation-xml" && Zn(g,
|
|
815
|
+
return g !== "annotation-xml" && Zn(g, ce);
|
|
816
816
|
}, zn = function(g) {
|
|
817
|
-
He(
|
|
817
|
+
He(L.beforeSanitizeAttributes, g, null);
|
|
818
818
|
const {
|
|
819
|
-
attributes:
|
|
819
|
+
attributes: S
|
|
820
820
|
} = g;
|
|
821
|
-
if (!
|
|
821
|
+
if (!S || Pt(g))
|
|
822
822
|
return;
|
|
823
|
-
const
|
|
823
|
+
const M = {
|
|
824
824
|
attrName: "",
|
|
825
825
|
attrValue: "",
|
|
826
826
|
keepAttr: !0,
|
|
827
827
|
allowedAttributes: F,
|
|
828
828
|
forceKeepAttr: void 0
|
|
829
829
|
};
|
|
830
|
-
let J =
|
|
830
|
+
let J = S.length;
|
|
831
831
|
for (; J--; ) {
|
|
832
|
-
const
|
|
833
|
-
name:
|
|
834
|
-
namespaceURI:
|
|
832
|
+
const he = S[J], {
|
|
833
|
+
name: ne,
|
|
834
|
+
namespaceURI: Ee,
|
|
835
835
|
value: Ge
|
|
836
|
-
} =
|
|
837
|
-
let
|
|
838
|
-
if (
|
|
839
|
-
hu(
|
|
836
|
+
} = he, Au = ie(ne), Rt = Ge;
|
|
837
|
+
let be = ne === "value" ? Rt : ia(Rt);
|
|
838
|
+
if (M.attrName = Au, M.attrValue = be, M.keepAttr = !0, M.forceKeepAttr = void 0, He(L.uponSanitizeAttribute, g, M), be = M.attrValue, wn && (Au === "id" || Au === "name") && (hu(ne, g), be = Co + be), Qe && xe(/((--!?|])>)|<\/(style|title)/i, be)) {
|
|
839
|
+
hu(ne, g);
|
|
840
840
|
continue;
|
|
841
841
|
}
|
|
842
|
-
if (
|
|
842
|
+
if (M.forceKeepAttr)
|
|
843
843
|
continue;
|
|
844
|
-
if (!
|
|
845
|
-
hu(
|
|
844
|
+
if (!M.keepAttr) {
|
|
845
|
+
hu(ne, g);
|
|
846
846
|
continue;
|
|
847
847
|
}
|
|
848
|
-
if (!iu &&
|
|
849
|
-
hu(
|
|
848
|
+
if (!iu && xe(/\/>/i, be)) {
|
|
849
|
+
hu(ne, g);
|
|
850
850
|
continue;
|
|
851
851
|
}
|
|
852
|
-
Xe && Qu([
|
|
853
|
-
|
|
852
|
+
Xe && Qu([G, X, T], (Un) => {
|
|
853
|
+
be = Cu(be, Un, " ");
|
|
854
854
|
});
|
|
855
|
-
const Bn =
|
|
856
|
-
if (!$n(Bn, Au,
|
|
857
|
-
hu(
|
|
855
|
+
const Bn = ie(g.nodeName);
|
|
856
|
+
if (!$n(Bn, Au, be)) {
|
|
857
|
+
hu(ne, g);
|
|
858
858
|
continue;
|
|
859
859
|
}
|
|
860
|
-
if (
|
|
860
|
+
if (m && typeof x == "object" && typeof x.getAttributeType == "function" && !Ee)
|
|
861
861
|
switch (x.getAttributeType(Bn, Au)) {
|
|
862
862
|
case "TrustedHTML": {
|
|
863
|
-
|
|
863
|
+
be = m.createHTML(be);
|
|
864
864
|
break;
|
|
865
865
|
}
|
|
866
866
|
case "TrustedScriptURL": {
|
|
867
|
-
|
|
867
|
+
be = m.createScriptURL(be);
|
|
868
868
|
break;
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
|
-
if (
|
|
871
|
+
if (be !== Rt)
|
|
872
872
|
try {
|
|
873
|
-
|
|
873
|
+
Ee ? g.setAttributeNS(Ee, ne, be) : g.setAttribute(ne, be), Pt(g) ? Ne(g) : Wn(u.removed);
|
|
874
874
|
} catch {
|
|
875
|
-
hu(
|
|
875
|
+
hu(ne, g);
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
He(
|
|
878
|
+
He(L.afterSanitizeAttributes, g, null);
|
|
879
879
|
}, Oo = function N(g) {
|
|
880
|
-
let
|
|
881
|
-
const
|
|
882
|
-
for (He(
|
|
883
|
-
He(
|
|
884
|
-
He(
|
|
880
|
+
let S = null;
|
|
881
|
+
const M = Mn(g);
|
|
882
|
+
for (He(L.beforeSanitizeShadowDOM, g, null); S = M.nextNode(); )
|
|
883
|
+
He(L.uponSanitizeShadowNode, S, null), Nn(S), zn(S), S.content instanceof o && N(S.content);
|
|
884
|
+
He(L.afterSanitizeShadowDOM, g, null);
|
|
885
885
|
};
|
|
886
886
|
return u.sanitize = function(N) {
|
|
887
|
-
let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
887
|
+
let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, S = null, M = null, J = null, he = null;
|
|
888
888
|
if (Ft = !N, Ft && (N = "<!-->"), typeof N != "string" && !Ln(N))
|
|
889
889
|
if (typeof N.toString == "function") {
|
|
890
890
|
if (N = N.toString(), typeof N != "string")
|
|
@@ -895,59 +895,59 @@ function Vr() {
|
|
|
895
895
|
return N;
|
|
896
896
|
if (At || Tt(g), u.removed = [], typeof N == "string" && (yu = !1), yu) {
|
|
897
897
|
if (N.nodeName) {
|
|
898
|
-
const Ge =
|
|
898
|
+
const Ge = ie(N.nodeName);
|
|
899
899
|
if (!w[Ge] || ue[Ge])
|
|
900
900
|
throw Du("root node is forbidden and cannot be sanitized in-place");
|
|
901
901
|
}
|
|
902
902
|
} else if (N instanceof i)
|
|
903
|
-
|
|
903
|
+
S = On("<!---->"), M = S.ownerDocument.importNode(N, !0), M.nodeType === Su.element && M.nodeName === "BODY" || M.nodeName === "HTML" ? S = M : S.appendChild(M);
|
|
904
904
|
else {
|
|
905
905
|
if (!su && !Xe && !au && // eslint-disable-next-line unicorn/prefer-includes
|
|
906
906
|
N.indexOf("<") === -1)
|
|
907
|
-
return
|
|
908
|
-
if (
|
|
909
|
-
return su ? null : ju ?
|
|
907
|
+
return m && ju ? m.createHTML(N) : N;
|
|
908
|
+
if (S = On(N), !S)
|
|
909
|
+
return su ? null : ju ? b : "";
|
|
910
910
|
}
|
|
911
|
-
|
|
912
|
-
const
|
|
913
|
-
for (; J =
|
|
911
|
+
S && wt && Ne(S.firstChild);
|
|
912
|
+
const ne = Mn(yu ? N : S);
|
|
913
|
+
for (; J = ne.nextNode(); )
|
|
914
914
|
Nn(J), zn(J), J.content instanceof o && Oo(J.content);
|
|
915
915
|
if (yu)
|
|
916
916
|
return N;
|
|
917
917
|
if (su) {
|
|
918
918
|
if (qu)
|
|
919
|
-
for (
|
|
920
|
-
|
|
919
|
+
for (he = P.call(S.ownerDocument); S.firstChild; )
|
|
920
|
+
he.appendChild(S.firstChild);
|
|
921
921
|
else
|
|
922
|
-
|
|
923
|
-
return (F.shadowroot || F.shadowrootmode) && (
|
|
922
|
+
he = S;
|
|
923
|
+
return (F.shadowroot || F.shadowrootmode) && (he = I.call(n, he, !0)), he;
|
|
924
924
|
}
|
|
925
|
-
let
|
|
926
|
-
return au && w["!doctype"] &&
|
|
927
|
-
` +
|
|
928
|
-
|
|
929
|
-
}),
|
|
925
|
+
let Ee = au ? S.outerHTML : S.innerHTML;
|
|
926
|
+
return au && w["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && xe(Gr, S.ownerDocument.doctype.name) && (Ee = "<!DOCTYPE " + S.ownerDocument.doctype.name + `>
|
|
927
|
+
` + Ee), Xe && Qu([G, X, T], (Ge) => {
|
|
928
|
+
Ee = Cu(Ee, Ge, " ");
|
|
929
|
+
}), m && ju ? m.createHTML(Ee) : Ee;
|
|
930
930
|
}, u.setConfig = function() {
|
|
931
931
|
let N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
932
932
|
Tt(N), At = !0;
|
|
933
933
|
}, u.clearConfig = function() {
|
|
934
934
|
pu = null, At = !1;
|
|
935
|
-
}, u.isValidAttribute = function(N, g,
|
|
935
|
+
}, u.isValidAttribute = function(N, g, S) {
|
|
936
936
|
pu || Tt({});
|
|
937
|
-
const
|
|
938
|
-
return $n(
|
|
937
|
+
const M = ie(N), J = ie(g);
|
|
938
|
+
return $n(M, J, S);
|
|
939
939
|
}, u.addHook = function(N, g) {
|
|
940
|
-
typeof g == "function" && wu(
|
|
940
|
+
typeof g == "function" && wu(L[N], g);
|
|
941
941
|
}, u.removeHook = function(N, g) {
|
|
942
942
|
if (g !== void 0) {
|
|
943
|
-
const
|
|
944
|
-
return
|
|
943
|
+
const S = na(L[N], g);
|
|
944
|
+
return S === -1 ? void 0 : ra(L[N], S, 1)[0];
|
|
945
945
|
}
|
|
946
|
-
return Wn(
|
|
946
|
+
return Wn(L[N]);
|
|
947
947
|
}, u.removeHooks = function(N) {
|
|
948
|
-
|
|
948
|
+
L[N] = [];
|
|
949
949
|
}, u.removeAllHooks = function() {
|
|
950
|
-
|
|
950
|
+
L = er();
|
|
951
951
|
}, u;
|
|
952
952
|
}
|
|
953
953
|
var _a = Vr();
|
|
@@ -1099,20 +1099,20 @@ ft.prototype.parse = function(e, u) {
|
|
|
1099
1099
|
for (let d = 0; d < nr.length; d++)
|
|
1100
1100
|
n = o.indexOf(nr[d]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
1101
1101
|
s === -1 && (s = o.length), o[s - 1] === ":" && s--;
|
|
1102
|
-
const
|
|
1103
|
-
o = o.slice(s), this.parseHost(
|
|
1102
|
+
const y = o.slice(0, s);
|
|
1103
|
+
o = o.slice(s), this.parseHost(y), this.hostname = this.hostname || "";
|
|
1104
1104
|
const x = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
1105
1105
|
if (!x) {
|
|
1106
1106
|
const d = this.hostname.split(/\./);
|
|
1107
|
-
for (let
|
|
1108
|
-
const
|
|
1109
|
-
if (
|
|
1107
|
+
for (let E = 0, A = d.length; E < A; E++) {
|
|
1108
|
+
const v = d[E];
|
|
1109
|
+
if (v && !v.match(or)) {
|
|
1110
1110
|
let p = "";
|
|
1111
|
-
for (let
|
|
1112
|
-
|
|
1111
|
+
for (let k = 0, m = v.length; k < m; k++)
|
|
1112
|
+
v.charCodeAt(k) > 127 ? p += "x" : p += v[k];
|
|
1113
1113
|
if (!p.match(or)) {
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1114
|
+
const k = d.slice(0, E), m = d.slice(E + 1), b = v.match(Pa);
|
|
1115
|
+
b && (k.push(b[1]), m.unshift(b[2])), m.length && (o = m.join(".") + o), this.hostname = k.join(".");
|
|
1116
1116
|
break;
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
@@ -1192,42 +1192,42 @@ function za(e) {
|
|
|
1192
1192
|
var u;
|
|
1193
1193
|
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u = $a.get(e)) !== null && u !== void 0 ? u : e;
|
|
1194
1194
|
}
|
|
1195
|
-
var
|
|
1195
|
+
var se;
|
|
1196
1196
|
(function(e) {
|
|
1197
1197
|
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
|
|
1198
|
-
})(
|
|
1198
|
+
})(se || (se = {}));
|
|
1199
1199
|
const Ba = 32;
|
|
1200
1200
|
var uu;
|
|
1201
1201
|
(function(e) {
|
|
1202
1202
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
1203
1203
|
})(uu || (uu = {}));
|
|
1204
1204
|
function un(e) {
|
|
1205
|
-
return e >=
|
|
1205
|
+
return e >= se.ZERO && e <= se.NINE;
|
|
1206
1206
|
}
|
|
1207
1207
|
function Ua(e) {
|
|
1208
|
-
return e >=
|
|
1208
|
+
return e >= se.UPPER_A && e <= se.UPPER_F || e >= se.LOWER_A && e <= se.LOWER_F;
|
|
1209
1209
|
}
|
|
1210
1210
|
function qa(e) {
|
|
1211
|
-
return e >=
|
|
1211
|
+
return e >= se.UPPER_A && e <= se.UPPER_Z || e >= se.LOWER_A && e <= se.LOWER_Z || un(e);
|
|
1212
1212
|
}
|
|
1213
1213
|
function ja(e) {
|
|
1214
|
-
return e ===
|
|
1214
|
+
return e === se.EQUALS || qa(e);
|
|
1215
1215
|
}
|
|
1216
|
-
var
|
|
1216
|
+
var ae;
|
|
1217
1217
|
(function(e) {
|
|
1218
1218
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
|
1219
|
-
})(
|
|
1219
|
+
})(ae || (ae = {}));
|
|
1220
1220
|
var Ke;
|
|
1221
1221
|
(function(e) {
|
|
1222
1222
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
1223
1223
|
})(Ke || (Ke = {}));
|
|
1224
1224
|
class Ha {
|
|
1225
1225
|
constructor(u, t, n) {
|
|
1226
|
-
this.decodeTree = u, this.emitCodePoint = t, this.errors = n, this.state =
|
|
1226
|
+
this.decodeTree = u, this.emitCodePoint = t, this.errors = n, this.state = ae.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Ke.Strict;
|
|
1227
1227
|
}
|
|
1228
1228
|
/** Resets the instance to make it reusable. */
|
|
1229
1229
|
startEntity(u) {
|
|
1230
|
-
this.decodeMode = u, this.state =
|
|
1230
|
+
this.decodeMode = u, this.state = ae.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
1231
1231
|
}
|
|
1232
1232
|
/**
|
|
1233
1233
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -1242,15 +1242,15 @@ class Ha {
|
|
|
1242
1242
|
*/
|
|
1243
1243
|
write(u, t) {
|
|
1244
1244
|
switch (this.state) {
|
|
1245
|
-
case
|
|
1246
|
-
return u.charCodeAt(t) ===
|
|
1247
|
-
case
|
|
1245
|
+
case ae.EntityStart:
|
|
1246
|
+
return u.charCodeAt(t) === se.NUM ? (this.state = ae.NumericStart, this.consumed += 1, this.stateNumericStart(u, t + 1)) : (this.state = ae.NamedEntity, this.stateNamedEntity(u, t));
|
|
1247
|
+
case ae.NumericStart:
|
|
1248
1248
|
return this.stateNumericStart(u, t);
|
|
1249
|
-
case
|
|
1249
|
+
case ae.NumericDecimal:
|
|
1250
1250
|
return this.stateNumericDecimal(u, t);
|
|
1251
|
-
case
|
|
1251
|
+
case ae.NumericHex:
|
|
1252
1252
|
return this.stateNumericHex(u, t);
|
|
1253
|
-
case
|
|
1253
|
+
case ae.NamedEntity:
|
|
1254
1254
|
return this.stateNamedEntity(u, t);
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
@@ -1264,7 +1264,7 @@ class Ha {
|
|
|
1264
1264
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
1265
1265
|
*/
|
|
1266
1266
|
stateNumericStart(u, t) {
|
|
1267
|
-
return t >= u.length ? -1 : (u.charCodeAt(t) | Ba) ===
|
|
1267
|
+
return t >= u.length ? -1 : (u.charCodeAt(t) | Ba) === se.LOWER_X ? (this.state = ae.NumericHex, this.consumed += 1, this.stateNumericHex(u, t + 1)) : (this.state = ae.NumericDecimal, this.stateNumericDecimal(u, t));
|
|
1268
1268
|
}
|
|
1269
1269
|
addToNumericResult(u, t, n, r) {
|
|
1270
1270
|
if (t !== n) {
|
|
@@ -1329,11 +1329,11 @@ class Ha {
|
|
|
1329
1329
|
var n;
|
|
1330
1330
|
if (this.consumed <= t)
|
|
1331
1331
|
return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1332
|
-
if (u ===
|
|
1332
|
+
if (u === se.SEMI)
|
|
1333
1333
|
this.consumed += 1;
|
|
1334
1334
|
else if (this.decodeMode === Ke.Strict)
|
|
1335
1335
|
return 0;
|
|
1336
|
-
return this.emitCodePoint(za(this.result), this.consumed), this.errors && (u !==
|
|
1336
|
+
return this.emitCodePoint(za(this.result), this.consumed), this.errors && (u !== se.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
1337
1337
|
}
|
|
1338
1338
|
/**
|
|
1339
1339
|
* Parses a named entity.
|
|
@@ -1355,7 +1355,7 @@ class Ha {
|
|
|
1355
1355
|
(o === 0 || // And there should be no invalid characters.
|
|
1356
1356
|
ja(a)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1357
1357
|
if (r = n[this.treeIndex], o = (r & uu.VALUE_LENGTH) >> 14, o !== 0) {
|
|
1358
|
-
if (a ===
|
|
1358
|
+
if (a === se.SEMI)
|
|
1359
1359
|
return this.emitNamedEntityData(this.treeIndex, o, this.consumed + this.excess);
|
|
1360
1360
|
this.decodeMode !== Ke.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1361
1361
|
}
|
|
@@ -1395,16 +1395,16 @@ class Ha {
|
|
|
1395
1395
|
end() {
|
|
1396
1396
|
var u;
|
|
1397
1397
|
switch (this.state) {
|
|
1398
|
-
case
|
|
1398
|
+
case ae.NamedEntity:
|
|
1399
1399
|
return this.result !== 0 && (this.decodeMode !== Ke.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
1400
1400
|
// Otherwise, emit a numeric entity if we have one.
|
|
1401
|
-
case
|
|
1401
|
+
case ae.NumericDecimal:
|
|
1402
1402
|
return this.emitNumericEntity(0, 2);
|
|
1403
|
-
case
|
|
1403
|
+
case ae.NumericHex:
|
|
1404
1404
|
return this.emitNumericEntity(0, 3);
|
|
1405
|
-
case
|
|
1405
|
+
case ae.NumericStart:
|
|
1406
1406
|
return (u = this.errors) === null || u === void 0 || u.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1407
|
-
case
|
|
1407
|
+
case ae.EntityStart:
|
|
1408
1408
|
return 0;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
@@ -1524,7 +1524,7 @@ const o0 = /[.?*+^$[\]\\(){}|-]/g;
|
|
|
1524
1524
|
function i0(e) {
|
|
1525
1525
|
return e.replace(o0, "\\$&");
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Q(e) {
|
|
1528
1528
|
switch (e) {
|
|
1529
1529
|
case 9:
|
|
1530
1530
|
case 32:
|
|
@@ -1611,7 +1611,7 @@ const a0 = { mdurl: Ra, ucmicro: Ma }, l0 = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1611
1611
|
has: Ya,
|
|
1612
1612
|
isMdAsciiPunct: Nu,
|
|
1613
1613
|
isPunctChar: Lu,
|
|
1614
|
-
isSpace:
|
|
1614
|
+
isSpace: Q,
|
|
1615
1615
|
isString: bn,
|
|
1616
1616
|
isValidEntityCode: mn,
|
|
1617
1617
|
isWhiteSpace: Mu,
|
|
@@ -1740,10 +1740,10 @@ Ue.fence = function(e, u, t, n, r) {
|
|
|
1740
1740
|
if (a) {
|
|
1741
1741
|
const c = o.attrIndex("class"), f = o.attrs ? o.attrs.slice() : [];
|
|
1742
1742
|
c < 0 ? f.push(["class", t.langPrefix + i]) : (f[c] = f[c].slice(), f[c][1] += " " + t.langPrefix + i);
|
|
1743
|
-
const
|
|
1743
|
+
const y = {
|
|
1744
1744
|
attrs: f
|
|
1745
1745
|
};
|
|
1746
|
-
return `<pre><code${r.renderAttrs(
|
|
1746
|
+
return `<pre><code${r.renderAttrs(y)}>${s}</code></pre>
|
|
1747
1747
|
`;
|
|
1748
1748
|
}
|
|
1749
1749
|
return `<pre><code${r.renderAttrs(o)}>${s}</code></pre>
|
|
@@ -1839,16 +1839,16 @@ _u.prototype.render = function(e, u, t) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
return n;
|
|
1841
1841
|
};
|
|
1842
|
-
function
|
|
1842
|
+
function De() {
|
|
1843
1843
|
this.__rules__ = [], this.__cache__ = null;
|
|
1844
1844
|
}
|
|
1845
|
-
|
|
1845
|
+
De.prototype.__find__ = function(e) {
|
|
1846
1846
|
for (let u = 0; u < this.__rules__.length; u++)
|
|
1847
1847
|
if (this.__rules__[u].name === e)
|
|
1848
1848
|
return u;
|
|
1849
1849
|
return -1;
|
|
1850
1850
|
};
|
|
1851
|
-
|
|
1851
|
+
De.prototype.__compile__ = function() {
|
|
1852
1852
|
const e = this, u = [""];
|
|
1853
1853
|
e.__rules__.forEach(function(t) {
|
|
1854
1854
|
t.enabled && t.alt.forEach(function(n) {
|
|
@@ -1860,13 +1860,13 @@ we.prototype.__compile__ = function() {
|
|
|
1860
1860
|
});
|
|
1861
1861
|
});
|
|
1862
1862
|
};
|
|
1863
|
-
|
|
1863
|
+
De.prototype.at = function(e, u, t) {
|
|
1864
1864
|
const n = this.__find__(e), r = t || {};
|
|
1865
1865
|
if (n === -1)
|
|
1866
1866
|
throw new Error("Parser rule not found: " + e);
|
|
1867
1867
|
this.__rules__[n].fn = u, this.__rules__[n].alt = r.alt || [], this.__cache__ = null;
|
|
1868
1868
|
};
|
|
1869
|
-
|
|
1869
|
+
De.prototype.before = function(e, u, t, n) {
|
|
1870
1870
|
const r = this.__find__(e), o = n || {};
|
|
1871
1871
|
if (r === -1)
|
|
1872
1872
|
throw new Error("Parser rule not found: " + e);
|
|
@@ -1877,7 +1877,7 @@ we.prototype.before = function(e, u, t, n) {
|
|
|
1877
1877
|
alt: o.alt || []
|
|
1878
1878
|
}), this.__cache__ = null;
|
|
1879
1879
|
};
|
|
1880
|
-
|
|
1880
|
+
De.prototype.after = function(e, u, t, n) {
|
|
1881
1881
|
const r = this.__find__(e), o = n || {};
|
|
1882
1882
|
if (r === -1)
|
|
1883
1883
|
throw new Error("Parser rule not found: " + e);
|
|
@@ -1888,7 +1888,7 @@ we.prototype.after = function(e, u, t, n) {
|
|
|
1888
1888
|
alt: o.alt || []
|
|
1889
1889
|
}), this.__cache__ = null;
|
|
1890
1890
|
};
|
|
1891
|
-
|
|
1891
|
+
De.prototype.push = function(e, u, t) {
|
|
1892
1892
|
const n = t || {};
|
|
1893
1893
|
this.__rules__.push({
|
|
1894
1894
|
name: e,
|
|
@@ -1897,7 +1897,7 @@ we.prototype.push = function(e, u, t) {
|
|
|
1897
1897
|
alt: n.alt || []
|
|
1898
1898
|
}), this.__cache__ = null;
|
|
1899
1899
|
};
|
|
1900
|
-
|
|
1900
|
+
De.prototype.enable = function(e, u) {
|
|
1901
1901
|
Array.isArray(e) || (e = [e]);
|
|
1902
1902
|
const t = [];
|
|
1903
1903
|
return e.forEach(function(n) {
|
|
@@ -1910,12 +1910,12 @@ we.prototype.enable = function(e, u) {
|
|
|
1910
1910
|
this.__rules__[r].enabled = !0, t.push(n);
|
|
1911
1911
|
}, this), this.__cache__ = null, t;
|
|
1912
1912
|
};
|
|
1913
|
-
|
|
1913
|
+
De.prototype.enableOnly = function(e, u) {
|
|
1914
1914
|
Array.isArray(e) || (e = [e]), this.__rules__.forEach(function(t) {
|
|
1915
1915
|
t.enabled = !1;
|
|
1916
1916
|
}), this.enable(e, u);
|
|
1917
1917
|
};
|
|
1918
|
-
|
|
1918
|
+
De.prototype.disable = function(e, u) {
|
|
1919
1919
|
Array.isArray(e) || (e = [e]);
|
|
1920
1920
|
const t = [];
|
|
1921
1921
|
return e.forEach(function(n) {
|
|
@@ -1928,7 +1928,7 @@ we.prototype.disable = function(e, u) {
|
|
|
1928
1928
|
this.__rules__[r].enabled = !1, t.push(n);
|
|
1929
1929
|
}, this), this.__cache__ = null, t;
|
|
1930
1930
|
};
|
|
1931
|
-
|
|
1931
|
+
De.prototype.getRules = function(e) {
|
|
1932
1932
|
return this.__cache__ === null && this.__compile__(), this.__cache__[e] || [];
|
|
1933
1933
|
};
|
|
1934
1934
|
function Oe(e, u, t) {
|
|
@@ -2004,29 +2004,29 @@ function v0(e) {
|
|
|
2004
2004
|
const l = i.content;
|
|
2005
2005
|
let s = e.md.linkify.match(l);
|
|
2006
2006
|
const c = [];
|
|
2007
|
-
let f = i.level,
|
|
2007
|
+
let f = i.level, y = 0;
|
|
2008
2008
|
s.length > 0 && s[0].index === 0 && a > 0 && r[a - 1].type === "text_special" && (s = s.slice(1));
|
|
2009
2009
|
for (let x = 0; x < s.length; x++) {
|
|
2010
|
-
const d = s[x].url,
|
|
2011
|
-
if (!e.md.validateLink(
|
|
2010
|
+
const d = s[x].url, E = e.md.normalizeLink(d);
|
|
2011
|
+
if (!e.md.validateLink(E))
|
|
2012
2012
|
continue;
|
|
2013
|
-
let
|
|
2014
|
-
s[x].schema ? s[x].schema === "mailto:" && !/^mailto:/i.test(
|
|
2015
|
-
const
|
|
2016
|
-
if (
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2013
|
+
let A = s[x].text;
|
|
2014
|
+
s[x].schema ? s[x].schema === "mailto:" && !/^mailto:/i.test(A) ? A = e.md.normalizeLinkText("mailto:" + A).replace(/^mailto:/, "") : A = e.md.normalizeLinkText(A) : A = e.md.normalizeLinkText("http://" + A).replace(/^http:\/\//, "");
|
|
2015
|
+
const v = s[x].index;
|
|
2016
|
+
if (v > y) {
|
|
2017
|
+
const b = new e.Token("text", "", 0);
|
|
2018
|
+
b.content = l.slice(y, v), b.level = f, c.push(b);
|
|
2019
2019
|
}
|
|
2020
2020
|
const p = new e.Token("link_open", "a", 1);
|
|
2021
|
-
p.attrs = [["href",
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2021
|
+
p.attrs = [["href", E]], p.level = f++, p.markup = "linkify", p.info = "auto", c.push(p);
|
|
2022
|
+
const k = new e.Token("text", "", 0);
|
|
2023
|
+
k.content = A, k.level = f, c.push(k);
|
|
2024
|
+
const m = new e.Token("link_close", "a", -1);
|
|
2025
|
+
m.level = --f, m.markup = "linkify", m.info = "auto", c.push(m), y = s[x].lastIndex;
|
|
2026
2026
|
}
|
|
2027
|
-
if (
|
|
2027
|
+
if (y < l.length) {
|
|
2028
2028
|
const x = new e.Token("text", "", 0);
|
|
2029
|
-
x.content = l.slice(
|
|
2029
|
+
x.content = l.slice(y), x.level = f, c.push(x);
|
|
2030
2030
|
}
|
|
2031
2031
|
u[t].children = r = Kr(r, a, c);
|
|
2032
2032
|
}
|
|
@@ -2081,7 +2081,7 @@ function S0(e, u) {
|
|
|
2081
2081
|
const c = lr.exec(i);
|
|
2082
2082
|
if (!c)
|
|
2083
2083
|
break;
|
|
2084
|
-
let f = !0,
|
|
2084
|
+
let f = !0, y = !0;
|
|
2085
2085
|
l = c.index + 1;
|
|
2086
2086
|
const x = c[0] === "'";
|
|
2087
2087
|
let d = 32;
|
|
@@ -2093,33 +2093,33 @@ function S0(e, u) {
|
|
|
2093
2093
|
d = e[t].content.charCodeAt(e[t].content.length - 1);
|
|
2094
2094
|
break;
|
|
2095
2095
|
}
|
|
2096
|
-
let
|
|
2096
|
+
let E = 32;
|
|
2097
2097
|
if (l < s)
|
|
2098
|
-
|
|
2098
|
+
E = i.charCodeAt(l);
|
|
2099
2099
|
else
|
|
2100
2100
|
for (t = r + 1; t < e.length && !(e[t].type === "softbreak" || e[t].type === "hardbreak"); t++)
|
|
2101
2101
|
if (e[t].content) {
|
|
2102
|
-
|
|
2102
|
+
E = e[t].content.charCodeAt(0);
|
|
2103
2103
|
break;
|
|
2104
2104
|
}
|
|
2105
|
-
const
|
|
2106
|
-
if (
|
|
2105
|
+
const A = Nu(d) || Lu(String.fromCharCode(d)), v = Nu(E) || Lu(String.fromCharCode(E)), p = Mu(d), k = Mu(E);
|
|
2106
|
+
if (k ? f = !1 : v && (p || A || (f = !1)), p ? y = !1 : A && (k || v || (y = !1)), E === 34 && c[0] === '"' && d >= 48 && d <= 57 && (y = f = !1), f && y && (f = A, y = v), !f && !y) {
|
|
2107
2107
|
x && (o.content = Ku(o.content, c.index, sr));
|
|
2108
2108
|
continue;
|
|
2109
2109
|
}
|
|
2110
|
-
if (
|
|
2110
|
+
if (y)
|
|
2111
2111
|
for (t = n.length - 1; t >= 0; t--) {
|
|
2112
|
-
let
|
|
2112
|
+
let m = n[t];
|
|
2113
2113
|
if (n[t].level < a)
|
|
2114
2114
|
break;
|
|
2115
|
-
if (
|
|
2116
|
-
|
|
2117
|
-
let
|
|
2118
|
-
x ? (
|
|
2119
|
-
e[
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
), l += h.length - 1,
|
|
2115
|
+
if (m.single === x && n[t].level === a) {
|
|
2116
|
+
m = n[t];
|
|
2117
|
+
let b, h;
|
|
2118
|
+
x ? (b = u.md.options.quotes[2], h = u.md.options.quotes[3]) : (b = u.md.options.quotes[0], h = u.md.options.quotes[1]), o.content = Ku(o.content, c.index, h), e[m.token].content = Ku(
|
|
2119
|
+
e[m.token].content,
|
|
2120
|
+
m.pos,
|
|
2121
|
+
b
|
|
2122
|
+
), l += h.length - 1, m.token === r && (l += b.length - 1), i = o.content, s = i.length, n.length = t;
|
|
2123
2123
|
continue e;
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
@@ -2128,7 +2128,7 @@ function S0(e, u) {
|
|
|
2128
2128
|
pos: c.index,
|
|
2129
2129
|
single: x,
|
|
2130
2130
|
level: a
|
|
2131
|
-
}) :
|
|
2131
|
+
}) : y && x && (o.content = Ku(o.content, c.index, sr));
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
}
|
|
@@ -2162,7 +2162,7 @@ const zt = [
|
|
|
2162
2162
|
["text_join", P0]
|
|
2163
2163
|
];
|
|
2164
2164
|
function gn() {
|
|
2165
|
-
this.ruler = new
|
|
2165
|
+
this.ruler = new De();
|
|
2166
2166
|
for (let e = 0; e < zt.length; e++)
|
|
2167
2167
|
this.ruler.push(zt[e][0], zt[e][1]);
|
|
2168
2168
|
}
|
|
@@ -2178,7 +2178,7 @@ function qe(e, u, t, n) {
|
|
|
2178
2178
|
for (let o = 0, a = 0, i = 0, l = 0, s = r.length, c = !1; a < s; a++) {
|
|
2179
2179
|
const f = r.charCodeAt(a);
|
|
2180
2180
|
if (!c)
|
|
2181
|
-
if (
|
|
2181
|
+
if (Q(f)) {
|
|
2182
2182
|
i++, f === 9 ? l += 4 - l % 4 : l++;
|
|
2183
2183
|
continue;
|
|
2184
2184
|
} else
|
|
@@ -2202,7 +2202,7 @@ qe.prototype.skipEmptyLines = function(u) {
|
|
|
2202
2202
|
qe.prototype.skipSpaces = function(u) {
|
|
2203
2203
|
for (let t = this.src.length; u < t; u++) {
|
|
2204
2204
|
const n = this.src.charCodeAt(u);
|
|
2205
|
-
if (!
|
|
2205
|
+
if (!Q(n))
|
|
2206
2206
|
break;
|
|
2207
2207
|
}
|
|
2208
2208
|
return u;
|
|
@@ -2211,7 +2211,7 @@ qe.prototype.skipSpacesBack = function(u, t) {
|
|
|
2211
2211
|
if (u <= t)
|
|
2212
2212
|
return u;
|
|
2213
2213
|
for (; u > t; )
|
|
2214
|
-
if (!
|
|
2214
|
+
if (!Q(this.src.charCodeAt(--u)))
|
|
2215
2215
|
return u + 1;
|
|
2216
2216
|
return u;
|
|
2217
2217
|
};
|
|
@@ -2237,9 +2237,9 @@ qe.prototype.getLines = function(u, t, n, r) {
|
|
|
2237
2237
|
const s = this.bMarks[i];
|
|
2238
2238
|
let c = s, f;
|
|
2239
2239
|
for (i + 1 < t || r ? f = this.eMarks[i] + 1 : f = this.eMarks[i]; c < f && l < n; ) {
|
|
2240
|
-
const
|
|
2241
|
-
if (
|
|
2242
|
-
|
|
2240
|
+
const y = this.src.charCodeAt(c);
|
|
2241
|
+
if (Q(y))
|
|
2242
|
+
y === 9 ? l += 4 - (l + this.bsCount[i]) % 4 : l++;
|
|
2243
2243
|
else if (c - s < this.tShift[i])
|
|
2244
2244
|
l++;
|
|
2245
2245
|
else
|
|
@@ -2276,26 +2276,26 @@ function O0(e, u, t, n) {
|
|
|
2276
2276
|
if (a !== 124 && a !== 45 && a !== 58 || o >= e.eMarks[r])
|
|
2277
2277
|
return !1;
|
|
2278
2278
|
const i = e.src.charCodeAt(o++);
|
|
2279
|
-
if (i !== 124 && i !== 45 && i !== 58 && !
|
|
2279
|
+
if (i !== 124 && i !== 45 && i !== 58 && !Q(i) || a === 45 && Q(i))
|
|
2280
2280
|
return !1;
|
|
2281
2281
|
for (; o < e.eMarks[r]; ) {
|
|
2282
|
-
const
|
|
2283
|
-
if (
|
|
2282
|
+
const m = e.src.charCodeAt(o);
|
|
2283
|
+
if (m !== 124 && m !== 45 && m !== 58 && !Q(m))
|
|
2284
2284
|
return !1;
|
|
2285
2285
|
o++;
|
|
2286
2286
|
}
|
|
2287
2287
|
let l = Bt(e, u + 1), s = l.split("|");
|
|
2288
2288
|
const c = [];
|
|
2289
|
-
for (let
|
|
2290
|
-
const
|
|
2291
|
-
if (!
|
|
2292
|
-
if (
|
|
2289
|
+
for (let m = 0; m < s.length; m++) {
|
|
2290
|
+
const b = s[m].trim();
|
|
2291
|
+
if (!b) {
|
|
2292
|
+
if (m === 0 || m === s.length - 1)
|
|
2293
2293
|
continue;
|
|
2294
2294
|
return !1;
|
|
2295
2295
|
}
|
|
2296
|
-
if (!/^:?-+:?$/.test(
|
|
2296
|
+
if (!/^:?-+:?$/.test(b))
|
|
2297
2297
|
return !1;
|
|
2298
|
-
|
|
2298
|
+
b.charCodeAt(b.length - 1) === 58 ? c.push(b.charCodeAt(0) === 58 ? "center" : "right") : b.charCodeAt(0) === 58 ? c.push("left") : c.push("");
|
|
2299
2299
|
}
|
|
2300
2300
|
if (l = Bt(e, u).trim(), l.indexOf("|") === -1 || e.sCount[u] - e.blkIndent >= 4)
|
|
2301
2301
|
return !1;
|
|
@@ -2305,37 +2305,37 @@ function O0(e, u, t, n) {
|
|
|
2305
2305
|
return !1;
|
|
2306
2306
|
if (n)
|
|
2307
2307
|
return !0;
|
|
2308
|
-
const
|
|
2308
|
+
const y = e.parentType;
|
|
2309
2309
|
e.parentType = "table";
|
|
2310
|
-
const x = e.md.block.ruler.getRules("blockquote"), d = e.push("table_open", "table", 1),
|
|
2311
|
-
d.map =
|
|
2312
|
-
const
|
|
2313
|
-
|
|
2314
|
-
const
|
|
2315
|
-
|
|
2316
|
-
for (let
|
|
2317
|
-
const
|
|
2318
|
-
c[
|
|
2310
|
+
const x = e.md.block.ruler.getRules("blockquote"), d = e.push("table_open", "table", 1), E = [u, 0];
|
|
2311
|
+
d.map = E;
|
|
2312
|
+
const A = e.push("thead_open", "thead", 1);
|
|
2313
|
+
A.map = [u, u + 1];
|
|
2314
|
+
const v = e.push("tr_open", "tr", 1);
|
|
2315
|
+
v.map = [u, u + 1];
|
|
2316
|
+
for (let m = 0; m < s.length; m++) {
|
|
2317
|
+
const b = e.push("th_open", "th", 1);
|
|
2318
|
+
c[m] && (b.attrs = [["style", "text-align:" + c[m]]]);
|
|
2319
2319
|
const h = e.push("inline", "", 0);
|
|
2320
|
-
h.content = s[
|
|
2320
|
+
h.content = s[m].trim(), h.children = [], e.push("th_close", "th", -1);
|
|
2321
2321
|
}
|
|
2322
2322
|
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
|
2323
|
-
let p,
|
|
2323
|
+
let p, k = 0;
|
|
2324
2324
|
for (r = u + 2; r < t && !(e.sCount[r] < e.blkIndent); r++) {
|
|
2325
|
-
let
|
|
2325
|
+
let m = !1;
|
|
2326
2326
|
for (let h = 0, C = x.length; h < C; h++)
|
|
2327
2327
|
if (x[h](e, r, t, !0)) {
|
|
2328
|
-
|
|
2328
|
+
m = !0;
|
|
2329
2329
|
break;
|
|
2330
2330
|
}
|
|
2331
|
-
if (
|
|
2331
|
+
if (m || (l = Bt(e, r).trim(), !l) || e.sCount[r] - e.blkIndent >= 4 || (s = cr(l), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), k += f - s.length, k > R0))
|
|
2332
2332
|
break;
|
|
2333
2333
|
if (r === u + 2) {
|
|
2334
2334
|
const h = e.push("tbody_open", "tbody", 1);
|
|
2335
2335
|
h.map = p = [u + 2, 0];
|
|
2336
2336
|
}
|
|
2337
|
-
const
|
|
2338
|
-
|
|
2337
|
+
const b = e.push("tr_open", "tr", 1);
|
|
2338
|
+
b.map = [r, r + 1];
|
|
2339
2339
|
for (let h = 0; h < f; h++) {
|
|
2340
2340
|
const C = e.push("td_open", "td", 1);
|
|
2341
2341
|
c[h] && (C.attrs = [["style", "text-align:" + c[h]]]);
|
|
@@ -2344,7 +2344,7 @@ function O0(e, u, t, n) {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
e.push("tr_close", "tr", -1);
|
|
2346
2346
|
}
|
|
2347
|
-
return p && (e.push("tbody_close", "tbody", -1), p[1] = r), e.push("table_close", "table", -1),
|
|
2347
|
+
return p && (e.push("tbody_close", "tbody", -1), p[1] = r), e.push("table_close", "table", -1), E[1] = r, e.parentType = y, e.line = r, !0;
|
|
2348
2348
|
}
|
|
2349
2349
|
function M0(e, u, t) {
|
|
2350
2350
|
if (e.sCount[u] - e.blkIndent < 4)
|
|
@@ -2383,13 +2383,13 @@ function L0(e, u, t, n) {
|
|
|
2383
2383
|
return !1;
|
|
2384
2384
|
if (n)
|
|
2385
2385
|
return !0;
|
|
2386
|
-
let f = u,
|
|
2386
|
+
let f = u, y = !1;
|
|
2387
2387
|
for (; f++, !(f >= t || (r = i = e.bMarks[f] + e.tShift[f], o = e.eMarks[f], r < o && e.sCount[f] < e.blkIndent)); )
|
|
2388
2388
|
if (e.src.charCodeAt(r) === a && !(e.sCount[f] - e.blkIndent >= 4) && (r = e.skipChars(r, a), !(r - i < l) && (r = e.skipSpaces(r), !(r < o)))) {
|
|
2389
|
-
|
|
2389
|
+
y = !0;
|
|
2390
2390
|
break;
|
|
2391
2391
|
}
|
|
2392
|
-
l = e.sCount[u], e.line = f + (
|
|
2392
|
+
l = e.sCount[u], e.line = f + (y ? 1 : 0);
|
|
2393
2393
|
const x = e.push("fence", "code", 0);
|
|
2394
2394
|
return x.info = c, x.content = e.getLines(u + 1, f, l, !0), x.markup = s, x.map = [u, e.line], !0;
|
|
2395
2395
|
}
|
|
@@ -2400,53 +2400,53 @@ function N0(e, u, t, n) {
|
|
|
2400
2400
|
return !1;
|
|
2401
2401
|
if (n)
|
|
2402
2402
|
return !0;
|
|
2403
|
-
const i = [], l = [], s = [], c = [], f = e.md.block.ruler.getRules("blockquote"),
|
|
2403
|
+
const i = [], l = [], s = [], c = [], f = e.md.block.ruler.getRules("blockquote"), y = e.parentType;
|
|
2404
2404
|
e.parentType = "blockquote";
|
|
2405
2405
|
let x = !1, d;
|
|
2406
2406
|
for (d = u; d < t; d++) {
|
|
2407
|
-
const
|
|
2407
|
+
const k = e.sCount[d] < e.blkIndent;
|
|
2408
2408
|
if (r = e.bMarks[d] + e.tShift[d], o = e.eMarks[d], r >= o)
|
|
2409
2409
|
break;
|
|
2410
|
-
if (e.src.charCodeAt(r++) === 62 && !
|
|
2411
|
-
let
|
|
2412
|
-
e.src.charCodeAt(r) === 32 ? (r++,
|
|
2413
|
-
let P =
|
|
2410
|
+
if (e.src.charCodeAt(r++) === 62 && !k) {
|
|
2411
|
+
let b = e.sCount[d] + 1, h, C;
|
|
2412
|
+
e.src.charCodeAt(r) === 32 ? (r++, b++, C = !1, h = !0) : e.src.charCodeAt(r) === 9 ? (h = !0, (e.bsCount[d] + b) % 4 === 3 ? (r++, b++, C = !1) : C = !0) : h = !1;
|
|
2413
|
+
let P = b;
|
|
2414
2414
|
for (i.push(e.bMarks[d]), e.bMarks[d] = r; r < o; ) {
|
|
2415
2415
|
const D = e.src.charCodeAt(r);
|
|
2416
|
-
if (
|
|
2416
|
+
if (Q(D))
|
|
2417
2417
|
D === 9 ? P += 4 - (P + e.bsCount[d] + (C ? 1 : 0)) % 4 : P++;
|
|
2418
2418
|
else
|
|
2419
2419
|
break;
|
|
2420
2420
|
r++;
|
|
2421
2421
|
}
|
|
2422
|
-
x = r >= o, l.push(e.bsCount[d]), e.bsCount[d] = e.sCount[d] + 1 + (h ? 1 : 0), s.push(e.sCount[d]), e.sCount[d] = P -
|
|
2422
|
+
x = r >= o, l.push(e.bsCount[d]), e.bsCount[d] = e.sCount[d] + 1 + (h ? 1 : 0), s.push(e.sCount[d]), e.sCount[d] = P - b, c.push(e.tShift[d]), e.tShift[d] = r - e.bMarks[d];
|
|
2423
2423
|
continue;
|
|
2424
2424
|
}
|
|
2425
2425
|
if (x)
|
|
2426
2426
|
break;
|
|
2427
|
-
let
|
|
2428
|
-
for (let
|
|
2429
|
-
if (f[
|
|
2430
|
-
|
|
2427
|
+
let m = !1;
|
|
2428
|
+
for (let b = 0, h = f.length; b < h; b++)
|
|
2429
|
+
if (f[b](e, d, t, !0)) {
|
|
2430
|
+
m = !0;
|
|
2431
2431
|
break;
|
|
2432
2432
|
}
|
|
2433
|
-
if (
|
|
2433
|
+
if (m) {
|
|
2434
2434
|
e.lineMax = d, e.blkIndent !== 0 && (i.push(e.bMarks[d]), l.push(e.bsCount[d]), c.push(e.tShift[d]), s.push(e.sCount[d]), e.sCount[d] -= e.blkIndent);
|
|
2435
2435
|
break;
|
|
2436
2436
|
}
|
|
2437
2437
|
i.push(e.bMarks[d]), l.push(e.bsCount[d]), c.push(e.tShift[d]), s.push(e.sCount[d]), e.sCount[d] = -1;
|
|
2438
2438
|
}
|
|
2439
|
-
const
|
|
2439
|
+
const E = e.blkIndent;
|
|
2440
2440
|
e.blkIndent = 0;
|
|
2441
|
-
const
|
|
2442
|
-
|
|
2443
|
-
const
|
|
2444
|
-
|
|
2441
|
+
const A = e.push("blockquote_open", "blockquote", 1);
|
|
2442
|
+
A.markup = ">";
|
|
2443
|
+
const v = [u, 0];
|
|
2444
|
+
A.map = v, e.md.block.tokenize(e, u, d);
|
|
2445
2445
|
const p = e.push("blockquote_close", "blockquote", -1);
|
|
2446
|
-
p.markup = ">", e.lineMax = a, e.parentType =
|
|
2447
|
-
for (let
|
|
2448
|
-
e.bMarks[
|
|
2449
|
-
return e.blkIndent =
|
|
2446
|
+
p.markup = ">", e.lineMax = a, e.parentType = y, v[1] = e.line;
|
|
2447
|
+
for (let k = 0; k < c.length; k++)
|
|
2448
|
+
e.bMarks[k + u] = i[k], e.tShift[k + u] = c[k], e.sCount[k + u] = s[k], e.bsCount[k + u] = l[k];
|
|
2449
|
+
return e.blkIndent = E, !0;
|
|
2450
2450
|
}
|
|
2451
2451
|
function $0(e, u, t, n) {
|
|
2452
2452
|
const r = e.eMarks[u];
|
|
@@ -2459,7 +2459,7 @@ function $0(e, u, t, n) {
|
|
|
2459
2459
|
let i = 1;
|
|
2460
2460
|
for (; o < r; ) {
|
|
2461
2461
|
const s = e.src.charCodeAt(o++);
|
|
2462
|
-
if (s !== a && !
|
|
2462
|
+
if (s !== a && !Q(s))
|
|
2463
2463
|
return !1;
|
|
2464
2464
|
s === a && i++;
|
|
2465
2465
|
}
|
|
@@ -2479,7 +2479,7 @@ function fr(e, u) {
|
|
|
2479
2479
|
return -1;
|
|
2480
2480
|
if (n < t) {
|
|
2481
2481
|
const o = e.src.charCodeAt(n);
|
|
2482
|
-
if (!
|
|
2482
|
+
if (!Q(o))
|
|
2483
2483
|
return -1;
|
|
2484
2484
|
}
|
|
2485
2485
|
return n;
|
|
@@ -2504,7 +2504,7 @@ function dr(e, u) {
|
|
|
2504
2504
|
break;
|
|
2505
2505
|
return -1;
|
|
2506
2506
|
}
|
|
2507
|
-
return r < n && (o = e.src.charCodeAt(r), !
|
|
2507
|
+
return r < n && (o = e.src.charCodeAt(r), !Q(o)) ? -1 : r;
|
|
2508
2508
|
}
|
|
2509
2509
|
function I0(e, u) {
|
|
2510
2510
|
const t = e.level + 2;
|
|
@@ -2517,9 +2517,9 @@ function z0(e, u, t, n) {
|
|
|
2517
2517
|
return !1;
|
|
2518
2518
|
let c = !1;
|
|
2519
2519
|
n && e.parentType === "paragraph" && e.sCount[l] >= e.blkIndent && (c = !0);
|
|
2520
|
-
let f,
|
|
2520
|
+
let f, y, x;
|
|
2521
2521
|
if ((x = dr(e, l)) >= 0) {
|
|
2522
|
-
if (f = !0, a = e.bMarks[l] + e.tShift[l],
|
|
2522
|
+
if (f = !0, a = e.bMarks[l] + e.tShift[l], y = Number(e.src.slice(a, x - 1)), c && y !== 1) return !1;
|
|
2523
2523
|
} else if ((x = fr(e, l)) >= 0)
|
|
2524
2524
|
f = !1;
|
|
2525
2525
|
else
|
|
@@ -2528,43 +2528,43 @@ function z0(e, u, t, n) {
|
|
|
2528
2528
|
return !1;
|
|
2529
2529
|
if (n)
|
|
2530
2530
|
return !0;
|
|
2531
|
-
const d = e.src.charCodeAt(x - 1),
|
|
2532
|
-
f ? (i = e.push("ordered_list_open", "ol", 1),
|
|
2533
|
-
const
|
|
2534
|
-
i.map =
|
|
2535
|
-
let
|
|
2536
|
-
const p = e.md.block.ruler.getRules("list"),
|
|
2531
|
+
const d = e.src.charCodeAt(x - 1), E = e.tokens.length;
|
|
2532
|
+
f ? (i = e.push("ordered_list_open", "ol", 1), y !== 1 && (i.attrs = [["start", y]])) : i = e.push("bullet_list_open", "ul", 1);
|
|
2533
|
+
const A = [l, 0];
|
|
2534
|
+
i.map = A, i.markup = String.fromCharCode(d);
|
|
2535
|
+
let v = !1;
|
|
2536
|
+
const p = e.md.block.ruler.getRules("list"), k = e.parentType;
|
|
2537
2537
|
for (e.parentType = "list"; l < t; ) {
|
|
2538
2538
|
o = x, r = e.eMarks[l];
|
|
2539
|
-
const
|
|
2540
|
-
let
|
|
2539
|
+
const m = e.sCount[l] + x - (e.bMarks[l] + e.tShift[l]);
|
|
2540
|
+
let b = m;
|
|
2541
2541
|
for (; o < r; ) {
|
|
2542
|
-
const
|
|
2543
|
-
if (
|
|
2544
|
-
|
|
2545
|
-
else if (
|
|
2546
|
-
|
|
2542
|
+
const V = e.src.charCodeAt(o);
|
|
2543
|
+
if (V === 9)
|
|
2544
|
+
b += 4 - (b + e.bsCount[l]) % 4;
|
|
2545
|
+
else if (V === 32)
|
|
2546
|
+
b++;
|
|
2547
2547
|
else
|
|
2548
2548
|
break;
|
|
2549
2549
|
o++;
|
|
2550
2550
|
}
|
|
2551
2551
|
const h = o;
|
|
2552
2552
|
let C;
|
|
2553
|
-
h >= r ? C = 1 : C =
|
|
2554
|
-
const P =
|
|
2553
|
+
h >= r ? C = 1 : C = b - m, C > 4 && (C = 1);
|
|
2554
|
+
const P = m + C;
|
|
2555
2555
|
i = e.push("list_item_open", "li", 1), i.markup = String.fromCharCode(d);
|
|
2556
2556
|
const D = [l, 0];
|
|
2557
2557
|
i.map = D, f && (i.info = e.src.slice(a, x - 1));
|
|
2558
|
-
const I = e.tight,
|
|
2559
|
-
if (e.listIndent = e.blkIndent, e.blkIndent = P, e.tight = !0, e.tShift[l] = h - e.bMarks[l], e.sCount[l] =
|
|
2558
|
+
const I = e.tight, L = e.tShift[l], G = e.sCount[l], X = e.listIndent;
|
|
2559
|
+
if (e.listIndent = e.blkIndent, e.blkIndent = P, e.tight = !0, e.tShift[l] = h - e.bMarks[l], e.sCount[l] = b, h >= r && e.isEmpty(l + 1) ? e.line = Math.min(e.line + 2, t) : e.md.block.tokenize(e, l, t, !0), (!e.tight || v) && (s = !1), v = e.line - l > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = X, e.tShift[l] = L, e.sCount[l] = G, e.tight = I, i = e.push("list_item_close", "li", -1), i.markup = String.fromCharCode(d), l = e.line, D[1] = l, l >= t || e.sCount[l] < e.blkIndent || e.sCount[l] - e.blkIndent >= 4)
|
|
2560
2560
|
break;
|
|
2561
|
-
let
|
|
2562
|
-
for (let
|
|
2563
|
-
if (p[
|
|
2564
|
-
|
|
2561
|
+
let T = !1;
|
|
2562
|
+
for (let V = 0, de = p.length; V < de; V++)
|
|
2563
|
+
if (p[V](e, l, t, !0)) {
|
|
2564
|
+
T = !0;
|
|
2565
2565
|
break;
|
|
2566
2566
|
}
|
|
2567
|
-
if (
|
|
2567
|
+
if (T)
|
|
2568
2568
|
break;
|
|
2569
2569
|
if (f) {
|
|
2570
2570
|
if (x = dr(e, l), x < 0)
|
|
@@ -2575,31 +2575,31 @@ function z0(e, u, t, n) {
|
|
|
2575
2575
|
if (d !== e.src.charCodeAt(x - 1))
|
|
2576
2576
|
break;
|
|
2577
2577
|
}
|
|
2578
|
-
return f ? i = e.push("ordered_list_close", "ol", -1) : i = e.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(d),
|
|
2578
|
+
return f ? i = e.push("ordered_list_close", "ol", -1) : i = e.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(d), A[1] = l, e.line = l, e.parentType = k, s && I0(e, E), !0;
|
|
2579
2579
|
}
|
|
2580
2580
|
function B0(e, u, t, n) {
|
|
2581
2581
|
let r = e.bMarks[u] + e.tShift[u], o = e.eMarks[u], a = u + 1;
|
|
2582
2582
|
if (e.sCount[u] - e.blkIndent >= 4 || e.src.charCodeAt(r) !== 91)
|
|
2583
2583
|
return !1;
|
|
2584
2584
|
function i(p) {
|
|
2585
|
-
const
|
|
2586
|
-
if (p >=
|
|
2585
|
+
const k = e.lineMax;
|
|
2586
|
+
if (p >= k || e.isEmpty(p))
|
|
2587
2587
|
return null;
|
|
2588
|
-
let
|
|
2589
|
-
if (e.sCount[p] - e.blkIndent > 3 && (
|
|
2588
|
+
let m = !1;
|
|
2589
|
+
if (e.sCount[p] - e.blkIndent > 3 && (m = !0), e.sCount[p] < 0 && (m = !0), !m) {
|
|
2590
2590
|
const C = e.md.block.ruler.getRules("reference"), P = e.parentType;
|
|
2591
2591
|
e.parentType = "reference";
|
|
2592
2592
|
let D = !1;
|
|
2593
|
-
for (let I = 0,
|
|
2594
|
-
if (C[I](e, p,
|
|
2593
|
+
for (let I = 0, L = C.length; I < L; I++)
|
|
2594
|
+
if (C[I](e, p, k, !0)) {
|
|
2595
2595
|
D = !0;
|
|
2596
2596
|
break;
|
|
2597
2597
|
}
|
|
2598
2598
|
if (e.parentType = P, D)
|
|
2599
2599
|
return null;
|
|
2600
2600
|
}
|
|
2601
|
-
const
|
|
2602
|
-
return e.src.slice(
|
|
2601
|
+
const b = e.bMarks[p] + e.tShift[p], h = e.eMarks[p];
|
|
2602
|
+
return e.src.slice(b, h + 1);
|
|
2603
2603
|
}
|
|
2604
2604
|
let l = e.src.slice(r, o + 1);
|
|
2605
2605
|
o = l.length;
|
|
@@ -2612,11 +2612,11 @@ function B0(e, u, t, n) {
|
|
|
2612
2612
|
s = r;
|
|
2613
2613
|
break;
|
|
2614
2614
|
} else if (p === 10) {
|
|
2615
|
-
const
|
|
2616
|
-
|
|
2615
|
+
const k = i(a);
|
|
2616
|
+
k !== null && (l += k, o = l.length, a++);
|
|
2617
2617
|
} else if (p === 92 && (r++, r < o && l.charCodeAt(r) === 10)) {
|
|
2618
|
-
const
|
|
2619
|
-
|
|
2618
|
+
const k = i(a);
|
|
2619
|
+
k !== null && (l += k, o = l.length, a++);
|
|
2620
2620
|
}
|
|
2621
2621
|
}
|
|
2622
2622
|
if (s < 0 || l.charCodeAt(s + 1) !== 58)
|
|
@@ -2624,9 +2624,9 @@ function B0(e, u, t, n) {
|
|
|
2624
2624
|
for (r = s + 2; r < o; r++) {
|
|
2625
2625
|
const p = l.charCodeAt(r);
|
|
2626
2626
|
if (p === 10) {
|
|
2627
|
-
const
|
|
2628
|
-
|
|
2629
|
-
} else if (!
|
|
2627
|
+
const k = i(a);
|
|
2628
|
+
k !== null && (l += k, o = l.length, a++);
|
|
2629
|
+
} else if (!Q(p)) break;
|
|
2630
2630
|
}
|
|
2631
2631
|
const c = e.md.helpers.parseLinkDestination(l, r, o);
|
|
2632
2632
|
if (!c.ok)
|
|
@@ -2635,38 +2635,38 @@ function B0(e, u, t, n) {
|
|
|
2635
2635
|
if (!e.md.validateLink(f))
|
|
2636
2636
|
return !1;
|
|
2637
2637
|
r = c.pos;
|
|
2638
|
-
const
|
|
2638
|
+
const y = r, x = a, d = r;
|
|
2639
2639
|
for (; r < o; r++) {
|
|
2640
2640
|
const p = l.charCodeAt(r);
|
|
2641
2641
|
if (p === 10) {
|
|
2642
|
-
const
|
|
2643
|
-
|
|
2644
|
-
} else if (!
|
|
2642
|
+
const k = i(a);
|
|
2643
|
+
k !== null && (l += k, o = l.length, a++);
|
|
2644
|
+
} else if (!Q(p)) break;
|
|
2645
2645
|
}
|
|
2646
|
-
let
|
|
2647
|
-
for (;
|
|
2646
|
+
let E = e.md.helpers.parseLinkTitle(l, r, o);
|
|
2647
|
+
for (; E.can_continue; ) {
|
|
2648
2648
|
const p = i(a);
|
|
2649
2649
|
if (p === null) break;
|
|
2650
|
-
l += p, r = o, o = l.length, a++,
|
|
2650
|
+
l += p, r = o, o = l.length, a++, E = e.md.helpers.parseLinkTitle(l, r, o, E);
|
|
2651
2651
|
}
|
|
2652
|
-
let
|
|
2653
|
-
for (r < o && d !== r &&
|
|
2652
|
+
let A;
|
|
2653
|
+
for (r < o && d !== r && E.ok ? (A = E.str, r = E.pos) : (A = "", r = y, a = x); r < o; ) {
|
|
2654
2654
|
const p = l.charCodeAt(r);
|
|
2655
|
-
if (!
|
|
2655
|
+
if (!Q(p))
|
|
2656
2656
|
break;
|
|
2657
2657
|
r++;
|
|
2658
2658
|
}
|
|
2659
|
-
if (r < o && l.charCodeAt(r) !== 10 &&
|
|
2660
|
-
for (
|
|
2659
|
+
if (r < o && l.charCodeAt(r) !== 10 && A)
|
|
2660
|
+
for (A = "", r = y, a = x; r < o; ) {
|
|
2661
2661
|
const p = l.charCodeAt(r);
|
|
2662
|
-
if (!
|
|
2662
|
+
if (!Q(p))
|
|
2663
2663
|
break;
|
|
2664
2664
|
r++;
|
|
2665
2665
|
}
|
|
2666
2666
|
if (r < o && l.charCodeAt(r) !== 10)
|
|
2667
2667
|
return !1;
|
|
2668
|
-
const
|
|
2669
|
-
return
|
|
2668
|
+
const v = _t(l.slice(1, s));
|
|
2669
|
+
return v ? (n || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[v] > "u" && (e.env.references[v] = { title: A, href: f }), e.line = a), !0) : !1;
|
|
2670
2670
|
}
|
|
2671
2671
|
const U0 = [
|
|
2672
2672
|
"address",
|
|
@@ -2773,13 +2773,13 @@ function ul(e, u, t, n) {
|
|
|
2773
2773
|
let i = 1;
|
|
2774
2774
|
for (a = e.src.charCodeAt(++r); a === 35 && r < o && i <= 6; )
|
|
2775
2775
|
i++, a = e.src.charCodeAt(++r);
|
|
2776
|
-
if (i > 6 || r < o && !
|
|
2776
|
+
if (i > 6 || r < o && !Q(a))
|
|
2777
2777
|
return !1;
|
|
2778
2778
|
if (n)
|
|
2779
2779
|
return !0;
|
|
2780
2780
|
o = e.skipSpacesBack(o, r);
|
|
2781
2781
|
const l = e.skipCharsBack(o, 35, r);
|
|
2782
|
-
l > r &&
|
|
2782
|
+
l > r && Q(e.src.charCodeAt(l - 1)) && (o = l), e.line = u + 1;
|
|
2783
2783
|
const s = e.push("heading_open", "h" + String(i), 1);
|
|
2784
2784
|
s.markup = "########".slice(0, i), s.map = [u, e.line];
|
|
2785
2785
|
const c = e.push("inline", "", 0);
|
|
@@ -2807,13 +2807,13 @@ function tl(e, u, t) {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
if (e.sCount[i] < 0)
|
|
2809
2809
|
continue;
|
|
2810
|
-
let
|
|
2810
|
+
let y = !1;
|
|
2811
2811
|
for (let x = 0, d = n.length; x < d; x++)
|
|
2812
2812
|
if (n[x](e, i, t, !0)) {
|
|
2813
|
-
|
|
2813
|
+
y = !0;
|
|
2814
2814
|
break;
|
|
2815
2815
|
}
|
|
2816
|
-
if (
|
|
2816
|
+
if (y)
|
|
2817
2817
|
break;
|
|
2818
2818
|
}
|
|
2819
2819
|
if (!o)
|
|
@@ -2865,7 +2865,7 @@ const et = [
|
|
|
2865
2865
|
["paragraph", nl]
|
|
2866
2866
|
];
|
|
2867
2867
|
function yt() {
|
|
2868
|
-
this.ruler = new
|
|
2868
|
+
this.ruler = new De();
|
|
2869
2869
|
for (let e = 0; e < et.length; e++)
|
|
2870
2870
|
this.ruler.push(et[e][0], et[e][1], { alt: (et[e][2] || []).slice() });
|
|
2871
2871
|
}
|
|
@@ -2914,8 +2914,8 @@ Bu.prototype.scanDelims = function(e, u) {
|
|
|
2914
2914
|
let o = e;
|
|
2915
2915
|
for (; o < t && this.src.charCodeAt(o) === n; )
|
|
2916
2916
|
o++;
|
|
2917
|
-
const a = o - e, i = o < t ? this.src.charCodeAt(o) : 32, l = Nu(r) || Lu(String.fromCharCode(r)), s = Nu(i) || Lu(String.fromCharCode(i)), c = Mu(r), f = Mu(i),
|
|
2918
|
-
return { can_open:
|
|
2917
|
+
const a = o - e, i = o < t ? this.src.charCodeAt(o) : 32, l = Nu(r) || Lu(String.fromCharCode(r)), s = Nu(i) || Lu(String.fromCharCode(i)), c = Mu(r), f = Mu(i), y = !f && (!s || c || l), x = !c && (!l || f || s);
|
|
2918
|
+
return { can_open: y && (u || !x || l), can_close: x && (u || !y || s), length: a };
|
|
2919
2919
|
};
|
|
2920
2920
|
Bu.prototype.Token = Oe;
|
|
2921
2921
|
function rl(e) {
|
|
@@ -2994,7 +2994,7 @@ function ll(e, u) {
|
|
|
2994
2994
|
e.pending = e.pending.slice(0, -1), e.push("softbreak", "br", 0);
|
|
2995
2995
|
else
|
|
2996
2996
|
e.push("softbreak", "br", 0);
|
|
2997
|
-
for (t++; t < r &&
|
|
2997
|
+
for (t++; t < r && Q(e.src.charCodeAt(t)); )
|
|
2998
2998
|
t++;
|
|
2999
2999
|
return e.pos = t, !0;
|
|
3000
3000
|
}
|
|
@@ -3010,7 +3010,7 @@ function sl(e, u) {
|
|
|
3010
3010
|
if (e.src.charCodeAt(t) !== 92 || (t++, t >= n)) return !1;
|
|
3011
3011
|
let r = e.src.charCodeAt(t);
|
|
3012
3012
|
if (r === 10) {
|
|
3013
|
-
for (u || e.push("hardbreak", "br", 0), t++; t < n && (r = e.src.charCodeAt(t), !!
|
|
3013
|
+
for (u || e.push("hardbreak", "br", 0), t++; t < n && (r = e.src.charCodeAt(t), !!Q(r)); )
|
|
3014
3014
|
t++;
|
|
3015
3015
|
return e.pos = t, !0;
|
|
3016
3016
|
}
|
|
@@ -3163,20 +3163,20 @@ function bl(e, u) {
|
|
|
3163
3163
|
let t, n, r, o, a = "", i = "", l = e.pos, s = !0;
|
|
3164
3164
|
if (e.src.charCodeAt(e.pos) !== 91)
|
|
3165
3165
|
return !1;
|
|
3166
|
-
const c = e.pos, f = e.posMax,
|
|
3166
|
+
const c = e.pos, f = e.posMax, y = e.pos + 1, x = e.md.helpers.parseLinkLabel(e, e.pos, !0);
|
|
3167
3167
|
if (x < 0)
|
|
3168
3168
|
return !1;
|
|
3169
3169
|
let d = x + 1;
|
|
3170
3170
|
if (d < f && e.src.charCodeAt(d) === 40) {
|
|
3171
|
-
for (s = !1, d++; d < f && (t = e.src.charCodeAt(d), !(!
|
|
3171
|
+
for (s = !1, d++; d < f && (t = e.src.charCodeAt(d), !(!Q(t) && t !== 10)); d++)
|
|
3172
3172
|
;
|
|
3173
3173
|
if (d >= f)
|
|
3174
3174
|
return !1;
|
|
3175
3175
|
if (l = d, r = e.md.helpers.parseLinkDestination(e.src, d, e.posMax), r.ok) {
|
|
3176
|
-
for (a = e.md.normalizeLink(r.str), e.md.validateLink(a) ? d = r.pos : a = "", l = d; d < f && (t = e.src.charCodeAt(d), !(!
|
|
3176
|
+
for (a = e.md.normalizeLink(r.str), e.md.validateLink(a) ? d = r.pos : a = "", l = d; d < f && (t = e.src.charCodeAt(d), !(!Q(t) && t !== 10)); d++)
|
|
3177
3177
|
;
|
|
3178
3178
|
if (r = e.md.helpers.parseLinkTitle(e.src, d, e.posMax), d < f && l !== d && r.ok)
|
|
3179
|
-
for (i = r.str, d = r.pos; d < f && (t = e.src.charCodeAt(d), !(!
|
|
3179
|
+
for (i = r.str, d = r.pos; d < f && (t = e.src.charCodeAt(d), !(!Q(t) && t !== 10)); d++)
|
|
3180
3180
|
;
|
|
3181
3181
|
}
|
|
3182
3182
|
(d >= f || e.src.charCodeAt(d) !== 41) && (s = !0), d++;
|
|
@@ -3184,60 +3184,60 @@ function bl(e, u) {
|
|
|
3184
3184
|
if (s) {
|
|
3185
3185
|
if (typeof e.env.references > "u")
|
|
3186
3186
|
return !1;
|
|
3187
|
-
if (d < f && e.src.charCodeAt(d) === 91 ? (l = d + 1, d = e.md.helpers.parseLinkLabel(e, d), d >= 0 ? n = e.src.slice(l, d++) : d = x + 1) : d = x + 1, n || (n = e.src.slice(
|
|
3187
|
+
if (d < f && e.src.charCodeAt(d) === 91 ? (l = d + 1, d = e.md.helpers.parseLinkLabel(e, d), d >= 0 ? n = e.src.slice(l, d++) : d = x + 1) : d = x + 1, n || (n = e.src.slice(y, x)), o = e.env.references[_t(n)], !o)
|
|
3188
3188
|
return e.pos = c, !1;
|
|
3189
3189
|
a = o.href, i = o.title;
|
|
3190
3190
|
}
|
|
3191
3191
|
if (!u) {
|
|
3192
|
-
e.pos =
|
|
3193
|
-
const
|
|
3194
|
-
|
|
3192
|
+
e.pos = y, e.posMax = x;
|
|
3193
|
+
const E = e.push("link_open", "a", 1), A = [["href", a]];
|
|
3194
|
+
E.attrs = A, i && A.push(["title", i]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
|
|
3195
3195
|
}
|
|
3196
3196
|
return e.pos = d, e.posMax = f, !0;
|
|
3197
3197
|
}
|
|
3198
3198
|
function ml(e, u) {
|
|
3199
3199
|
let t, n, r, o, a, i, l, s, c = "";
|
|
3200
|
-
const f = e.pos,
|
|
3200
|
+
const f = e.pos, y = e.posMax;
|
|
3201
3201
|
if (e.src.charCodeAt(e.pos) !== 33 || e.src.charCodeAt(e.pos + 1) !== 91)
|
|
3202
3202
|
return !1;
|
|
3203
3203
|
const x = e.pos + 2, d = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1);
|
|
3204
3204
|
if (d < 0)
|
|
3205
3205
|
return !1;
|
|
3206
|
-
if (o = d + 1, o <
|
|
3207
|
-
for (o++; o <
|
|
3206
|
+
if (o = d + 1, o < y && e.src.charCodeAt(o) === 40) {
|
|
3207
|
+
for (o++; o < y && (t = e.src.charCodeAt(o), !(!Q(t) && t !== 10)); o++)
|
|
3208
3208
|
;
|
|
3209
|
-
if (o >=
|
|
3209
|
+
if (o >= y)
|
|
3210
3210
|
return !1;
|
|
3211
|
-
for (s = o, i = e.md.helpers.parseLinkDestination(e.src, o, e.posMax), i.ok && (c = e.md.normalizeLink(i.str), e.md.validateLink(c) ? o = i.pos : c = ""), s = o; o <
|
|
3211
|
+
for (s = o, i = e.md.helpers.parseLinkDestination(e.src, o, e.posMax), i.ok && (c = e.md.normalizeLink(i.str), e.md.validateLink(c) ? o = i.pos : c = ""), s = o; o < y && (t = e.src.charCodeAt(o), !(!Q(t) && t !== 10)); o++)
|
|
3212
3212
|
;
|
|
3213
|
-
if (i = e.md.helpers.parseLinkTitle(e.src, o, e.posMax), o <
|
|
3214
|
-
for (l = i.str, o = i.pos; o <
|
|
3213
|
+
if (i = e.md.helpers.parseLinkTitle(e.src, o, e.posMax), o < y && s !== o && i.ok)
|
|
3214
|
+
for (l = i.str, o = i.pos; o < y && (t = e.src.charCodeAt(o), !(!Q(t) && t !== 10)); o++)
|
|
3215
3215
|
;
|
|
3216
3216
|
else
|
|
3217
3217
|
l = "";
|
|
3218
|
-
if (o >=
|
|
3218
|
+
if (o >= y || e.src.charCodeAt(o) !== 41)
|
|
3219
3219
|
return e.pos = f, !1;
|
|
3220
3220
|
o++;
|
|
3221
3221
|
} else {
|
|
3222
3222
|
if (typeof e.env.references > "u")
|
|
3223
3223
|
return !1;
|
|
3224
|
-
if (o <
|
|
3224
|
+
if (o < y && e.src.charCodeAt(o) === 91 ? (s = o + 1, o = e.md.helpers.parseLinkLabel(e, o), o >= 0 ? r = e.src.slice(s, o++) : o = d + 1) : o = d + 1, r || (r = e.src.slice(x, d)), a = e.env.references[_t(r)], !a)
|
|
3225
3225
|
return e.pos = f, !1;
|
|
3226
3226
|
c = a.href, l = a.title;
|
|
3227
3227
|
}
|
|
3228
3228
|
if (!u) {
|
|
3229
3229
|
n = e.src.slice(x, d);
|
|
3230
|
-
const
|
|
3230
|
+
const E = [];
|
|
3231
3231
|
e.md.inline.parse(
|
|
3232
3232
|
n,
|
|
3233
3233
|
e.md,
|
|
3234
3234
|
e.env,
|
|
3235
|
-
|
|
3235
|
+
E
|
|
3236
3236
|
);
|
|
3237
|
-
const
|
|
3238
|
-
|
|
3237
|
+
const A = e.push("image", "img", 0), v = [["src", c], ["alt", ""]];
|
|
3238
|
+
A.attrs = v, A.children = E, A.content = n, l && v.push(["title", l]);
|
|
3239
3239
|
}
|
|
3240
|
-
return e.pos = o, e.posMax =
|
|
3240
|
+
return e.pos = o, e.posMax = y, !0;
|
|
3241
3241
|
}
|
|
3242
3242
|
const gl = /^([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])?)*)$/, kl = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
|
|
3243
3243
|
function xl(e, u) {
|
|
@@ -3352,8 +3352,8 @@ function br(e) {
|
|
|
3352
3352
|
for (; s > l; s -= o[s] + 1) {
|
|
3353
3353
|
const f = e[s];
|
|
3354
3354
|
if (f.marker === i.marker && f.open && f.end < 0) {
|
|
3355
|
-
let
|
|
3356
|
-
if ((f.close || i.open) && (f.length + i.length) % 3 === 0 && (f.length % 3 !== 0 || i.length % 3 !== 0) && (
|
|
3355
|
+
let y = !1;
|
|
3356
|
+
if ((f.close || i.open) && (f.length + i.length) % 3 === 0 && (f.length % 3 !== 0 || i.length % 3 !== 0) && (y = !0), !y) {
|
|
3357
3357
|
const x = s > 0 && !e[s - 1].open ? o[s - 1] + 1 : 0;
|
|
3358
3358
|
o[a] = a - s + x, o[s] = x, i.open = !1, f.end = a, f.close = !1, c = -1, r = -2;
|
|
3359
3359
|
break;
|
|
@@ -3398,10 +3398,10 @@ const Ut = [
|
|
|
3398
3398
|
["fragments_join", Fl]
|
|
3399
3399
|
];
|
|
3400
3400
|
function Uu() {
|
|
3401
|
-
this.ruler = new
|
|
3401
|
+
this.ruler = new De();
|
|
3402
3402
|
for (let e = 0; e < Ut.length; e++)
|
|
3403
3403
|
this.ruler.push(Ut[e][0], Ut[e][1]);
|
|
3404
|
-
this.ruler2 = new
|
|
3404
|
+
this.ruler2 = new De();
|
|
3405
3405
|
for (let e = 0; e < qt.length; e++)
|
|
3406
3406
|
this.ruler2.push(qt[e][0], qt[e][1]);
|
|
3407
3407
|
}
|
|
@@ -3592,18 +3592,18 @@ function nn(e, u) {
|
|
|
3592
3592
|
const t = new Bl(e, u);
|
|
3593
3593
|
return e.__compiled__[t.schema].normalize(t, e), t;
|
|
3594
3594
|
}
|
|
3595
|
-
function
|
|
3596
|
-
if (!(this instanceof
|
|
3597
|
-
return new
|
|
3595
|
+
function Fe(e, u) {
|
|
3596
|
+
if (!(this instanceof Fe))
|
|
3597
|
+
return new Fe(e, u);
|
|
3598
3598
|
u || Ml(e) && (u = e, e = {}), this.__opts__ = tn({}, ao, u), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = tn({}, Ll, e), this.__compiled__ = {}, this.__tlds__ = $l, this.__tlds_replaced__ = !1, this.re = {}, pt(this);
|
|
3599
3599
|
}
|
|
3600
|
-
|
|
3600
|
+
Fe.prototype.add = function(u, t) {
|
|
3601
3601
|
return this.__schemas__[u] = t, pt(this), this;
|
|
3602
3602
|
};
|
|
3603
|
-
|
|
3603
|
+
Fe.prototype.set = function(u) {
|
|
3604
3604
|
return this.__opts__ = tn(this.__opts__, u), this;
|
|
3605
3605
|
};
|
|
3606
|
-
|
|
3606
|
+
Fe.prototype.test = function(u) {
|
|
3607
3607
|
if (this.__text_cache__ = u, this.__index__ = -1, !u.length)
|
|
3608
3608
|
return !1;
|
|
3609
3609
|
let t, n, r, o, a, i, l, s, c;
|
|
@@ -3616,13 +3616,13 @@ De.prototype.test = function(u) {
|
|
|
3616
3616
|
}
|
|
3617
3617
|
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = u.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = u.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (a = n.index + n[1].length, (this.__index__ < 0 || a < this.__index__) && (this.__schema__ = "", this.__index__ = a, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (c = u.indexOf("@"), c >= 0 && (r = u.match(this.re.email_fuzzy)) !== null && (a = r.index + r[1].length, i = r.index + r[0].length, (this.__index__ < 0 || a < this.__index__ || a === this.__index__ && i > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = a, this.__last_index__ = i))), this.__index__ >= 0;
|
|
3618
3618
|
};
|
|
3619
|
-
|
|
3619
|
+
Fe.prototype.pretest = function(u) {
|
|
3620
3620
|
return this.re.pretest.test(u);
|
|
3621
3621
|
};
|
|
3622
|
-
|
|
3622
|
+
Fe.prototype.testSchemaAt = function(u, t, n) {
|
|
3623
3623
|
return this.__compiled__[t.toLowerCase()] ? this.__compiled__[t.toLowerCase()].validate(u, n, this) : 0;
|
|
3624
3624
|
};
|
|
3625
|
-
|
|
3625
|
+
Fe.prototype.match = function(u) {
|
|
3626
3626
|
const t = [];
|
|
3627
3627
|
let n = 0;
|
|
3628
3628
|
this.__index__ >= 0 && this.__text_cache__ === u && (t.push(nn(this, n)), n = this.__last_index__);
|
|
@@ -3631,22 +3631,22 @@ De.prototype.match = function(u) {
|
|
|
3631
3631
|
t.push(nn(this, n)), r = r.slice(this.__last_index__), n += this.__last_index__;
|
|
3632
3632
|
return t.length ? t : null;
|
|
3633
3633
|
};
|
|
3634
|
-
|
|
3634
|
+
Fe.prototype.matchAtStart = function(u) {
|
|
3635
3635
|
if (this.__text_cache__ = u, this.__index__ = -1, !u.length) return null;
|
|
3636
3636
|
const t = this.re.schema_at_start.exec(u);
|
|
3637
3637
|
if (!t) return null;
|
|
3638
3638
|
const n = this.testSchemaAt(u, t[2], t[0].length);
|
|
3639
3639
|
return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n, nn(this, 0)) : null;
|
|
3640
3640
|
};
|
|
3641
|
-
|
|
3641
|
+
Fe.prototype.tlds = function(u, t) {
|
|
3642
3642
|
return u = Array.isArray(u) ? u : [u], t ? (this.__tlds__ = this.__tlds__.concat(u).sort().filter(function(n, r, o) {
|
|
3643
3643
|
return n !== o[r - 1];
|
|
3644
3644
|
}).reverse(), pt(this), this) : (this.__tlds__ = u.slice(), this.__tlds_replaced__ = !0, pt(this), this);
|
|
3645
3645
|
};
|
|
3646
|
-
|
|
3646
|
+
Fe.prototype.normalize = function(u) {
|
|
3647
3647
|
u.schema || (u.url = "http://" + u.url), u.schema === "mailto:" && !/^mailto:/i.test(u.url) && (u.url = "mailto:" + u.url);
|
|
3648
3648
|
};
|
|
3649
|
-
|
|
3649
|
+
Fe.prototype.onCompile = function() {
|
|
3650
3650
|
};
|
|
3651
3651
|
const mu = 2147483647, Ie = 36, xn = 1, $u = 26, Ul = 38, ql = 700, lo = 72, so = 128, co = "-", jl = /^xn--/, Hl = /[^\0-\x7F]/, Gl = /[\x2E\u3002\uFF0E\uFF61]/g, Vl = {
|
|
3652
3652
|
overflow: "Overflow: input needs wider integers to process",
|
|
@@ -3703,10 +3703,10 @@ const Zl = (e) => String.fromCodePoint(...e), Yl = function(e) {
|
|
|
3703
3703
|
const l = n;
|
|
3704
3704
|
for (let c = 1, f = Ie; ; f += Ie) {
|
|
3705
3705
|
i >= t && Je("invalid-input");
|
|
3706
|
-
const
|
|
3707
|
-
|
|
3706
|
+
const y = Yl(e.charCodeAt(i++));
|
|
3707
|
+
y >= Ie && Je("invalid-input"), y > ze((mu - n) / c) && Je("overflow"), n += y * c;
|
|
3708
3708
|
const x = f <= o ? xn : f >= o + $u ? $u : f - o;
|
|
3709
|
-
if (
|
|
3709
|
+
if (y < x)
|
|
3710
3710
|
break;
|
|
3711
3711
|
const d = Ie - x;
|
|
3712
3712
|
c > ze(mu / d) && Je("overflow"), c *= d;
|
|
@@ -3733,14 +3733,14 @@ const Zl = (e) => String.fromCodePoint(...e), Yl = function(e) {
|
|
|
3733
3733
|
for (const c of e)
|
|
3734
3734
|
if (c < n && ++r > mu && Je("overflow"), c === n) {
|
|
3735
3735
|
let f = r;
|
|
3736
|
-
for (let
|
|
3737
|
-
const x =
|
|
3736
|
+
for (let y = Ie; ; y += Ie) {
|
|
3737
|
+
const x = y <= o ? xn : y >= o + $u ? $u : y - o;
|
|
3738
3738
|
if (f < x)
|
|
3739
3739
|
break;
|
|
3740
|
-
const d = f - x,
|
|
3740
|
+
const d = f - x, E = Ie - x;
|
|
3741
3741
|
u.push(
|
|
3742
|
-
Ht(kr(x + d %
|
|
3743
|
-
), f = ze(d /
|
|
3742
|
+
Ht(kr(x + d % E, 0))
|
|
3743
|
+
), f = ze(d / E);
|
|
3744
3744
|
}
|
|
3745
3745
|
u.push(Ht(kr(f, 0))), o = ho(r, s, i === a), r = 0, ++i;
|
|
3746
3746
|
}
|
|
@@ -3973,7 +3973,7 @@ function is(e) {
|
|
|
3973
3973
|
function Te(e, u) {
|
|
3974
3974
|
if (!(this instanceof Te))
|
|
3975
3975
|
return new Te(e, u);
|
|
3976
|
-
u || bn(e) || (u = e || {}, e = "default"), this.inline = new Uu(), this.block = new yt(), this.core = new gn(), this.renderer = new _u(), this.linkify = new
|
|
3976
|
+
u || bn(e) || (u = e || {}, e = "default"), this.inline = new Uu(), this.block = new yt(), this.core = new gn(), this.renderer = new _u(), this.linkify = new Fe(), this.validateLink = rs, this.normalizeLink = os, this.normalizeLinkText = is, this.utils = l0, this.helpers = vt({}, d0), this.options = {}, this.configure(e), u && this.set(u);
|
|
3977
3977
|
}
|
|
3978
3978
|
Te.prototype.set = function(e) {
|
|
3979
3979
|
return vt(this.options, e), this;
|
|
@@ -4036,17 +4036,17 @@ Te.prototype.renderInline = function(e, u) {
|
|
|
4036
4036
|
return u = u || {}, this.renderer.render(this.parseInline(e, u), this.options, u);
|
|
4037
4037
|
};
|
|
4038
4038
|
function as(e, u) {
|
|
4039
|
-
const { manual: t = !1, domPurify: n = !0, ...r } = u ?? {}, o =
|
|
4039
|
+
const { manual: t = !1, domPurify: n = !0, ...r } = u ?? {}, o = j(Qt(e) ? Be(e.value) : No(e) ? Be(e) : e);
|
|
4040
4040
|
Qt(e) && Re(() => {
|
|
4041
4041
|
o.value = Be(e.value);
|
|
4042
4042
|
});
|
|
4043
|
-
const a =
|
|
4043
|
+
const a = j(""), i = j(), l = Te({ ...r });
|
|
4044
4044
|
function s(c) {
|
|
4045
4045
|
const f = l.render(c);
|
|
4046
4046
|
if (a.value = n ? _a.sanitize(f) : f, i.value) i.value.innerHTML = a.value;
|
|
4047
4047
|
else {
|
|
4048
|
-
const
|
|
4049
|
-
x && (x.innerHTML = a.value,
|
|
4048
|
+
const y = Ze(i, (x) => {
|
|
4049
|
+
x && (x.innerHTML = a.value, y());
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
4052
|
return a.value;
|
|
@@ -4062,23 +4062,23 @@ function as(e, u) {
|
|
|
4062
4062
|
};
|
|
4063
4063
|
}
|
|
4064
4064
|
function ls(e, u) {
|
|
4065
|
-
const { step: t = 1, interval: n = 50, enabled: r = !0 } = u ?? {}, o =
|
|
4065
|
+
const { step: t = 1, interval: n = 50, enabled: r = !0 } = u ?? {}, o = j(0), a = j(!1), i = j(!1), l = j(!1), s = ee(() => r ? e.value.slice(0, o.value) : e.value), c = ee(() => Number(Math.min(o.value / e.value.length * 100, 100).toFixed(2)));
|
|
4066
4066
|
let f = null;
|
|
4067
|
-
const
|
|
4068
|
-
Ze(e, (
|
|
4067
|
+
const y = rt(), x = rt(), d = rt();
|
|
4068
|
+
Ze(e, (b, h) => {
|
|
4069
4069
|
if (!h) {
|
|
4070
|
-
o.value = 0,
|
|
4070
|
+
o.value = 0, E();
|
|
4071
4071
|
return;
|
|
4072
4072
|
}
|
|
4073
|
-
|
|
4073
|
+
b.startsWith(h) || (o.value = 0), E();
|
|
4074
4074
|
}, { immediate: !0 });
|
|
4075
|
-
function
|
|
4075
|
+
function E() {
|
|
4076
4076
|
if (f && clearTimeout(f), !r) {
|
|
4077
4077
|
o.value = e.value.length, i.value = !0, l.value = !1, a.value = !1, x.trigger(s.value);
|
|
4078
4078
|
return;
|
|
4079
4079
|
}
|
|
4080
|
-
l.value = !0, a.value = !1, i.value = !1,
|
|
4081
|
-
function
|
|
4080
|
+
l.value = !0, a.value = !1, i.value = !1, y.trigger();
|
|
4081
|
+
function b() {
|
|
4082
4082
|
if (o.value += t, d.trigger({
|
|
4083
4083
|
index: o.value,
|
|
4084
4084
|
value: s.value
|
|
@@ -4086,25 +4086,25 @@ function ls(e, u) {
|
|
|
4086
4086
|
o.value = e.value.length, i.value = !0, l.value = !1, x.trigger(s.value);
|
|
4087
4087
|
return;
|
|
4088
4088
|
}
|
|
4089
|
-
f = setTimeout(
|
|
4089
|
+
f = setTimeout(b, n);
|
|
4090
4090
|
}
|
|
4091
|
-
f = setTimeout(
|
|
4091
|
+
f = setTimeout(b, n);
|
|
4092
4092
|
}
|
|
4093
|
-
function
|
|
4093
|
+
function A() {
|
|
4094
4094
|
f && clearTimeout(f), a.value = !0, l.value = !1, i.value = !1;
|
|
4095
4095
|
}
|
|
4096
|
-
function
|
|
4097
|
-
f && clearTimeout(f),
|
|
4096
|
+
function v() {
|
|
4097
|
+
f && clearTimeout(f), E();
|
|
4098
4098
|
}
|
|
4099
4099
|
function p() {
|
|
4100
4100
|
f && clearTimeout(f), o.value = 0, Pr(() => {
|
|
4101
|
-
|
|
4101
|
+
E();
|
|
4102
4102
|
});
|
|
4103
4103
|
}
|
|
4104
|
-
function
|
|
4104
|
+
function k() {
|
|
4105
4105
|
f && clearTimeout(f), l.value = !1, a.value = !1, i.value = !0, o.value = e.value.length, x.trigger(s.value);
|
|
4106
4106
|
}
|
|
4107
|
-
function
|
|
4107
|
+
function m() {
|
|
4108
4108
|
f && clearTimeout(f), f = null, l.value = !1, a.value = !1, i.value = !1, o.value = 0;
|
|
4109
4109
|
}
|
|
4110
4110
|
return {
|
|
@@ -4114,13 +4114,13 @@ function ls(e, u) {
|
|
|
4114
4114
|
isTyping: l,
|
|
4115
4115
|
typedValue: s,
|
|
4116
4116
|
progress: c,
|
|
4117
|
-
start:
|
|
4118
|
-
pause:
|
|
4119
|
-
resume:
|
|
4117
|
+
start: E,
|
|
4118
|
+
pause: A,
|
|
4119
|
+
resume: v,
|
|
4120
4120
|
restart: p,
|
|
4121
|
-
stop:
|
|
4122
|
-
destroy:
|
|
4123
|
-
onStat:
|
|
4121
|
+
stop: k,
|
|
4122
|
+
destroy: m,
|
|
4123
|
+
onStat: y.on,
|
|
4124
4124
|
onStop: x.on,
|
|
4125
4125
|
onUpdate: d.on
|
|
4126
4126
|
};
|
|
@@ -4197,8 +4197,8 @@ function cs() {
|
|
|
4197
4197
|
* @memberof Prism
|
|
4198
4198
|
*/
|
|
4199
4199
|
util: {
|
|
4200
|
-
encode: function p(
|
|
4201
|
-
return
|
|
4200
|
+
encode: function p(k) {
|
|
4201
|
+
return k instanceof l ? new l(k.type, p(k.content), k.alias) : Array.isArray(k) ? k.map(p) : k.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
4202
4202
|
},
|
|
4203
4203
|
/**
|
|
4204
4204
|
* Returns the name of the type of the given value.
|
|
@@ -4238,30 +4238,30 @@ function cs() {
|
|
|
4238
4238
|
* @returns {T}
|
|
4239
4239
|
* @template T
|
|
4240
4240
|
*/
|
|
4241
|
-
clone: function p(
|
|
4242
|
-
|
|
4243
|
-
var
|
|
4244
|
-
switch (i.util.type(
|
|
4241
|
+
clone: function p(k, m) {
|
|
4242
|
+
m = m || {};
|
|
4243
|
+
var b, h;
|
|
4244
|
+
switch (i.util.type(k)) {
|
|
4245
4245
|
case "Object":
|
|
4246
|
-
if (h = i.util.objId(
|
|
4247
|
-
return
|
|
4248
|
-
|
|
4249
|
-
{},
|
|
4250
|
-
for (var C in
|
|
4251
|
-
|
|
4246
|
+
if (h = i.util.objId(k), m[h])
|
|
4247
|
+
return m[h];
|
|
4248
|
+
b = /** @type {Record<string, any>} */
|
|
4249
|
+
{}, m[h] = b;
|
|
4250
|
+
for (var C in k)
|
|
4251
|
+
k.hasOwnProperty(C) && (b[C] = p(k[C], m));
|
|
4252
4252
|
return (
|
|
4253
4253
|
/** @type {any} */
|
|
4254
|
-
|
|
4254
|
+
b
|
|
4255
4255
|
);
|
|
4256
4256
|
case "Array":
|
|
4257
|
-
return h = i.util.objId(
|
|
4257
|
+
return h = i.util.objId(k), m[h] ? m[h] : (b = [], m[h] = b, /** @type {Array} */
|
|
4258
4258
|
/** @type {any} */
|
|
4259
|
-
|
|
4260
|
-
|
|
4259
|
+
k.forEach(function(P, D) {
|
|
4260
|
+
b[D] = p(P, m);
|
|
4261
4261
|
}), /** @type {any} */
|
|
4262
|
-
|
|
4262
|
+
b);
|
|
4263
4263
|
default:
|
|
4264
|
-
return
|
|
4264
|
+
return k;
|
|
4265
4265
|
}
|
|
4266
4266
|
},
|
|
4267
4267
|
/**
|
|
@@ -4274,9 +4274,9 @@ function cs() {
|
|
|
4274
4274
|
*/
|
|
4275
4275
|
getLanguage: function(p) {
|
|
4276
4276
|
for (; p; ) {
|
|
4277
|
-
var
|
|
4278
|
-
if (
|
|
4279
|
-
return
|
|
4277
|
+
var k = r.exec(p.className);
|
|
4278
|
+
if (k)
|
|
4279
|
+
return k[1].toLowerCase();
|
|
4280
4280
|
p = p.parentElement;
|
|
4281
4281
|
}
|
|
4282
4282
|
return "none";
|
|
@@ -4288,8 +4288,8 @@ function cs() {
|
|
|
4288
4288
|
* @param {string} language
|
|
4289
4289
|
* @returns {void}
|
|
4290
4290
|
*/
|
|
4291
|
-
setLanguage: function(p,
|
|
4292
|
-
p.className = p.className.replace(RegExp(r, "gi"), ""), p.classList.add("language-" +
|
|
4291
|
+
setLanguage: function(p, k) {
|
|
4292
|
+
p.className = p.className.replace(RegExp(r, "gi"), ""), p.classList.add("language-" + k);
|
|
4293
4293
|
},
|
|
4294
4294
|
/**
|
|
4295
4295
|
* Returns the script element that is currently executing.
|
|
@@ -4308,13 +4308,13 @@ function cs() {
|
|
|
4308
4308
|
);
|
|
4309
4309
|
try {
|
|
4310
4310
|
throw new Error();
|
|
4311
|
-
} catch (
|
|
4312
|
-
var p = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(
|
|
4311
|
+
} catch (b) {
|
|
4312
|
+
var p = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(b.stack) || [])[1];
|
|
4313
4313
|
if (p) {
|
|
4314
|
-
var
|
|
4315
|
-
for (var
|
|
4316
|
-
if (
|
|
4317
|
-
return
|
|
4314
|
+
var k = document.getElementsByTagName("script");
|
|
4315
|
+
for (var m in k)
|
|
4316
|
+
if (k[m].src == p)
|
|
4317
|
+
return k[m];
|
|
4318
4318
|
}
|
|
4319
4319
|
return null;
|
|
4320
4320
|
}
|
|
@@ -4338,16 +4338,16 @@ function cs() {
|
|
|
4338
4338
|
* @param {boolean} [defaultActivation=false]
|
|
4339
4339
|
* @returns {boolean}
|
|
4340
4340
|
*/
|
|
4341
|
-
isActive: function(p,
|
|
4342
|
-
for (var
|
|
4341
|
+
isActive: function(p, k, m) {
|
|
4342
|
+
for (var b = "no-" + k; p; ) {
|
|
4343
4343
|
var h = p.classList;
|
|
4344
|
-
if (h.contains(
|
|
4344
|
+
if (h.contains(k))
|
|
4345
4345
|
return !0;
|
|
4346
|
-
if (h.contains(
|
|
4346
|
+
if (h.contains(b))
|
|
4347
4347
|
return !1;
|
|
4348
4348
|
p = p.parentElement;
|
|
4349
4349
|
}
|
|
4350
|
-
return !!
|
|
4350
|
+
return !!m;
|
|
4351
4351
|
}
|
|
4352
4352
|
},
|
|
4353
4353
|
/**
|
|
@@ -4393,11 +4393,11 @@ function cs() {
|
|
|
4393
4393
|
* 'color': /\b(?:red|green|blue)\b/
|
|
4394
4394
|
* });
|
|
4395
4395
|
*/
|
|
4396
|
-
extend: function(p,
|
|
4397
|
-
var
|
|
4398
|
-
for (var
|
|
4399
|
-
|
|
4400
|
-
return
|
|
4396
|
+
extend: function(p, k) {
|
|
4397
|
+
var m = i.util.clone(i.languages[p]);
|
|
4398
|
+
for (var b in k)
|
|
4399
|
+
m[b] = k[b];
|
|
4400
|
+
return m;
|
|
4401
4401
|
},
|
|
4402
4402
|
/**
|
|
4403
4403
|
* Inserts tokens _before_ another token in a language definition or any other grammar.
|
|
@@ -4474,31 +4474,31 @@ function cs() {
|
|
|
4474
4474
|
* @returns {Grammar} The new grammar object.
|
|
4475
4475
|
* @public
|
|
4476
4476
|
*/
|
|
4477
|
-
insertBefore: function(p,
|
|
4478
|
-
|
|
4477
|
+
insertBefore: function(p, k, m, b) {
|
|
4478
|
+
b = b || /** @type {any} */
|
|
4479
4479
|
i.languages;
|
|
4480
|
-
var h =
|
|
4480
|
+
var h = b[p], C = {};
|
|
4481
4481
|
for (var P in h)
|
|
4482
4482
|
if (h.hasOwnProperty(P)) {
|
|
4483
|
-
if (P ==
|
|
4484
|
-
for (var D in
|
|
4485
|
-
|
|
4486
|
-
|
|
4483
|
+
if (P == k)
|
|
4484
|
+
for (var D in m)
|
|
4485
|
+
m.hasOwnProperty(D) && (C[D] = m[D]);
|
|
4486
|
+
m.hasOwnProperty(P) || (C[P] = h[P]);
|
|
4487
4487
|
}
|
|
4488
|
-
var I =
|
|
4489
|
-
return
|
|
4490
|
-
|
|
4488
|
+
var I = b[p];
|
|
4489
|
+
return b[p] = C, i.languages.DFS(i.languages, function(L, G) {
|
|
4490
|
+
G === I && L != p && (this[L] = C);
|
|
4491
4491
|
}), C;
|
|
4492
4492
|
},
|
|
4493
4493
|
// Traverse a language definition with Depth First Search
|
|
4494
|
-
DFS: function p(
|
|
4494
|
+
DFS: function p(k, m, b, h) {
|
|
4495
4495
|
h = h || {};
|
|
4496
4496
|
var C = i.util.objId;
|
|
4497
|
-
for (var P in
|
|
4498
|
-
if (
|
|
4499
|
-
|
|
4500
|
-
var D =
|
|
4501
|
-
I === "Object" && !h[C(D)] ? (h[C(D)] = !0, p(D,
|
|
4497
|
+
for (var P in k)
|
|
4498
|
+
if (k.hasOwnProperty(P)) {
|
|
4499
|
+
m.call(k, P, k[P], b || P);
|
|
4500
|
+
var D = k[P], I = i.util.type(D);
|
|
4501
|
+
I === "Object" && !h[C(D)] ? (h[C(D)] = !0, p(D, m, null, h)) : I === "Array" && !h[C(D)] && (h[C(D)] = !0, p(D, m, P, h));
|
|
4502
4502
|
}
|
|
4503
4503
|
}
|
|
4504
4504
|
},
|
|
@@ -4515,8 +4515,8 @@ function cs() {
|
|
|
4515
4515
|
* @memberof Prism
|
|
4516
4516
|
* @public
|
|
4517
4517
|
*/
|
|
4518
|
-
highlightAll: function(p,
|
|
4519
|
-
i.highlightAllUnder(document, p,
|
|
4518
|
+
highlightAll: function(p, k) {
|
|
4519
|
+
i.highlightAllUnder(document, p, k);
|
|
4520
4520
|
},
|
|
4521
4521
|
/**
|
|
4522
4522
|
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
|
|
@@ -4533,15 +4533,15 @@ function cs() {
|
|
|
4533
4533
|
* @memberof Prism
|
|
4534
4534
|
* @public
|
|
4535
4535
|
*/
|
|
4536
|
-
highlightAllUnder: function(p,
|
|
4537
|
-
var
|
|
4538
|
-
callback:
|
|
4536
|
+
highlightAllUnder: function(p, k, m) {
|
|
4537
|
+
var b = {
|
|
4538
|
+
callback: m,
|
|
4539
4539
|
container: p,
|
|
4540
4540
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
4541
4541
|
};
|
|
4542
|
-
i.hooks.run("before-highlightall",
|
|
4543
|
-
for (var h = 0, C; C =
|
|
4544
|
-
i.highlightElement(C,
|
|
4542
|
+
i.hooks.run("before-highlightall", b), b.elements = Array.prototype.slice.apply(b.container.querySelectorAll(b.selector)), i.hooks.run("before-all-elements-highlight", b);
|
|
4543
|
+
for (var h = 0, C; C = b.elements[h++]; )
|
|
4544
|
+
i.highlightElement(C, k === !0, b.callback);
|
|
4545
4545
|
},
|
|
4546
4546
|
/**
|
|
4547
4547
|
* Highlights the code inside a single element.
|
|
@@ -4571,33 +4571,33 @@ function cs() {
|
|
|
4571
4571
|
* @memberof Prism
|
|
4572
4572
|
* @public
|
|
4573
4573
|
*/
|
|
4574
|
-
highlightElement: function(p,
|
|
4575
|
-
var
|
|
4576
|
-
i.util.setLanguage(p,
|
|
4574
|
+
highlightElement: function(p, k, m) {
|
|
4575
|
+
var b = i.util.getLanguage(p), h = i.languages[b];
|
|
4576
|
+
i.util.setLanguage(p, b);
|
|
4577
4577
|
var C = p.parentElement;
|
|
4578
|
-
C && C.nodeName.toLowerCase() === "pre" && i.util.setLanguage(C,
|
|
4578
|
+
C && C.nodeName.toLowerCase() === "pre" && i.util.setLanguage(C, b);
|
|
4579
4579
|
var P = p.textContent, D = {
|
|
4580
4580
|
element: p,
|
|
4581
|
-
language:
|
|
4581
|
+
language: b,
|
|
4582
4582
|
grammar: h,
|
|
4583
4583
|
code: P
|
|
4584
4584
|
};
|
|
4585
|
-
function I(
|
|
4586
|
-
D.highlightedCode =
|
|
4585
|
+
function I(G) {
|
|
4586
|
+
D.highlightedCode = G, i.hooks.run("before-insert", D), D.element.innerHTML = D.highlightedCode, i.hooks.run("after-highlight", D), i.hooks.run("complete", D), m && m.call(D.element);
|
|
4587
4587
|
}
|
|
4588
4588
|
if (i.hooks.run("before-sanity-check", D), C = D.element.parentElement, C && C.nodeName.toLowerCase() === "pre" && !C.hasAttribute("tabindex") && C.setAttribute("tabindex", "0"), !D.code) {
|
|
4589
|
-
i.hooks.run("complete", D),
|
|
4589
|
+
i.hooks.run("complete", D), m && m.call(D.element);
|
|
4590
4590
|
return;
|
|
4591
4591
|
}
|
|
4592
4592
|
if (i.hooks.run("before-highlight", D), !D.grammar) {
|
|
4593
4593
|
I(i.util.encode(D.code));
|
|
4594
4594
|
return;
|
|
4595
4595
|
}
|
|
4596
|
-
if (
|
|
4597
|
-
var
|
|
4598
|
-
|
|
4599
|
-
I(
|
|
4600
|
-
},
|
|
4596
|
+
if (k && n.Worker) {
|
|
4597
|
+
var L = new Worker(i.filename);
|
|
4598
|
+
L.onmessage = function(G) {
|
|
4599
|
+
I(G.data);
|
|
4600
|
+
}, L.postMessage(JSON.stringify({
|
|
4601
4601
|
language: D.language,
|
|
4602
4602
|
code: D.code,
|
|
4603
4603
|
immediateClose: !0
|
|
@@ -4625,15 +4625,15 @@ function cs() {
|
|
|
4625
4625
|
* @example
|
|
4626
4626
|
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
4627
4627
|
*/
|
|
4628
|
-
highlight: function(p,
|
|
4629
|
-
var
|
|
4628
|
+
highlight: function(p, k, m) {
|
|
4629
|
+
var b = {
|
|
4630
4630
|
code: p,
|
|
4631
|
-
grammar:
|
|
4632
|
-
language:
|
|
4631
|
+
grammar: k,
|
|
4632
|
+
language: m
|
|
4633
4633
|
};
|
|
4634
|
-
if (i.hooks.run("before-tokenize",
|
|
4635
|
-
throw new Error('The language "' +
|
|
4636
|
-
return
|
|
4634
|
+
if (i.hooks.run("before-tokenize", b), !b.grammar)
|
|
4635
|
+
throw new Error('The language "' + b.language + '" has no grammar.');
|
|
4636
|
+
return b.tokens = i.tokenize(b.code, b.grammar), i.hooks.run("after-tokenize", b), l.stringify(i.util.encode(b.tokens), b.language);
|
|
4637
4637
|
},
|
|
4638
4638
|
/**
|
|
4639
4639
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -4659,15 +4659,15 @@ function cs() {
|
|
|
4659
4659
|
* }
|
|
4660
4660
|
* });
|
|
4661
4661
|
*/
|
|
4662
|
-
tokenize: function(p,
|
|
4663
|
-
var
|
|
4664
|
-
if (
|
|
4665
|
-
for (var
|
|
4666
|
-
b
|
|
4667
|
-
delete
|
|
4662
|
+
tokenize: function(p, k) {
|
|
4663
|
+
var m = k.rest;
|
|
4664
|
+
if (m) {
|
|
4665
|
+
for (var b in m)
|
|
4666
|
+
k[b] = m[b];
|
|
4667
|
+
delete k.rest;
|
|
4668
4668
|
}
|
|
4669
4669
|
var h = new f();
|
|
4670
|
-
return
|
|
4670
|
+
return y(h, h.head, p), c(p, h, k, h.head, 0), d(h);
|
|
4671
4671
|
},
|
|
4672
4672
|
/**
|
|
4673
4673
|
* @namespace
|
|
@@ -4688,9 +4688,9 @@ function cs() {
|
|
|
4688
4688
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
4689
4689
|
* @public
|
|
4690
4690
|
*/
|
|
4691
|
-
add: function(p,
|
|
4692
|
-
var
|
|
4693
|
-
|
|
4691
|
+
add: function(p, k) {
|
|
4692
|
+
var m = i.hooks.all;
|
|
4693
|
+
m[p] = m[p] || [], m[p].push(k);
|
|
4694
4694
|
},
|
|
4695
4695
|
/**
|
|
4696
4696
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
@@ -4701,94 +4701,94 @@ function cs() {
|
|
|
4701
4701
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
4702
4702
|
* @public
|
|
4703
4703
|
*/
|
|
4704
|
-
run: function(p,
|
|
4705
|
-
var
|
|
4706
|
-
if (!(!
|
|
4707
|
-
for (var
|
|
4708
|
-
h(
|
|
4704
|
+
run: function(p, k) {
|
|
4705
|
+
var m = i.hooks.all[p];
|
|
4706
|
+
if (!(!m || !m.length))
|
|
4707
|
+
for (var b = 0, h; h = m[b++]; )
|
|
4708
|
+
h(k);
|
|
4709
4709
|
}
|
|
4710
4710
|
},
|
|
4711
4711
|
Token: l
|
|
4712
4712
|
};
|
|
4713
4713
|
n.Prism = i;
|
|
4714
|
-
function l(p,
|
|
4715
|
-
this.type = p, this.content =
|
|
4714
|
+
function l(p, k, m, b) {
|
|
4715
|
+
this.type = p, this.content = k, this.alias = m, this.length = (b || "").length | 0;
|
|
4716
4716
|
}
|
|
4717
|
-
l.stringify = function p(
|
|
4718
|
-
if (typeof
|
|
4719
|
-
return
|
|
4720
|
-
if (Array.isArray(
|
|
4721
|
-
var
|
|
4722
|
-
return
|
|
4723
|
-
|
|
4724
|
-
}),
|
|
4717
|
+
l.stringify = function p(k, m) {
|
|
4718
|
+
if (typeof k == "string")
|
|
4719
|
+
return k;
|
|
4720
|
+
if (Array.isArray(k)) {
|
|
4721
|
+
var b = "";
|
|
4722
|
+
return k.forEach(function(I) {
|
|
4723
|
+
b += p(I, m);
|
|
4724
|
+
}), b;
|
|
4725
4725
|
}
|
|
4726
4726
|
var h = {
|
|
4727
|
-
type:
|
|
4728
|
-
content: p(
|
|
4727
|
+
type: k.type,
|
|
4728
|
+
content: p(k.content, m),
|
|
4729
4729
|
tag: "span",
|
|
4730
|
-
classes: ["token",
|
|
4730
|
+
classes: ["token", k.type],
|
|
4731
4731
|
attributes: {},
|
|
4732
|
-
language:
|
|
4733
|
-
}, C =
|
|
4732
|
+
language: m
|
|
4733
|
+
}, C = k.alias;
|
|
4734
4734
|
C && (Array.isArray(C) ? Array.prototype.push.apply(h.classes, C) : h.classes.push(C)), i.hooks.run("wrap", h);
|
|
4735
4735
|
var P = "";
|
|
4736
4736
|
for (var D in h.attributes)
|
|
4737
4737
|
P += " " + D + '="' + (h.attributes[D] || "").replace(/"/g, """) + '"';
|
|
4738
4738
|
return "<" + h.tag + ' class="' + h.classes.join(" ") + '"' + P + ">" + h.content + "</" + h.tag + ">";
|
|
4739
4739
|
};
|
|
4740
|
-
function s(p,
|
|
4741
|
-
p.lastIndex =
|
|
4742
|
-
var h = p.exec(
|
|
4743
|
-
if (h &&
|
|
4740
|
+
function s(p, k, m, b) {
|
|
4741
|
+
p.lastIndex = k;
|
|
4742
|
+
var h = p.exec(m);
|
|
4743
|
+
if (h && b && h[1]) {
|
|
4744
4744
|
var C = h[1].length;
|
|
4745
4745
|
h.index += C, h[0] = h[0].slice(C);
|
|
4746
4746
|
}
|
|
4747
4747
|
return h;
|
|
4748
4748
|
}
|
|
4749
|
-
function c(p,
|
|
4750
|
-
for (var P in
|
|
4751
|
-
if (!(!
|
|
4752
|
-
var D =
|
|
4749
|
+
function c(p, k, m, b, h, C) {
|
|
4750
|
+
for (var P in m)
|
|
4751
|
+
if (!(!m.hasOwnProperty(P) || !m[P])) {
|
|
4752
|
+
var D = m[P];
|
|
4753
4753
|
D = Array.isArray(D) ? D : [D];
|
|
4754
4754
|
for (var I = 0; I < D.length; ++I) {
|
|
4755
4755
|
if (C && C.cause == P + "," + I)
|
|
4756
4756
|
return;
|
|
4757
|
-
var
|
|
4758
|
-
if (
|
|
4759
|
-
var
|
|
4760
|
-
|
|
4757
|
+
var L = D[I], G = L.inside, X = !!L.lookbehind, T = !!L.greedy, V = L.alias;
|
|
4758
|
+
if (T && !L.pattern.global) {
|
|
4759
|
+
var de = L.pattern.toString().match(/[imsuy]*$/)[0];
|
|
4760
|
+
L.pattern = RegExp(L.pattern.source, de + "g");
|
|
4761
4761
|
}
|
|
4762
|
-
for (var
|
|
4763
|
-
var
|
|
4764
|
-
if (
|
|
4762
|
+
for (var K = L.pattern || L, W = b.next, ce = h; W !== k.tail && !(C && ce >= C.reach); ce += W.value.length, W = W.next) {
|
|
4763
|
+
var pe = W.value;
|
|
4764
|
+
if (k.length > p.length)
|
|
4765
4765
|
return;
|
|
4766
|
-
if (!(
|
|
4766
|
+
if (!(pe instanceof l)) {
|
|
4767
4767
|
var w = 1, z;
|
|
4768
|
-
if (
|
|
4769
|
-
if (z = s(
|
|
4768
|
+
if (T) {
|
|
4769
|
+
if (z = s(K, ce, p, X), !z || z.index >= p.length)
|
|
4770
4770
|
break;
|
|
4771
|
-
var ue = z.index, F = z.index + z[0].length,
|
|
4772
|
-
for (
|
|
4773
|
-
|
|
4774
|
-
if (
|
|
4771
|
+
var ue = z.index, F = z.index + z[0].length, H = ce;
|
|
4772
|
+
for (H += W.value.length; ue >= H; )
|
|
4773
|
+
W = W.next, H += W.value.length;
|
|
4774
|
+
if (H -= W.value.length, ce = H, W.value instanceof l)
|
|
4775
4775
|
continue;
|
|
4776
|
-
for (var
|
|
4777
|
-
w++,
|
|
4778
|
-
w--,
|
|
4779
|
-
} else if (z = s(
|
|
4776
|
+
for (var U = W; U !== k.tail && (H < F || typeof U.value == "string"); U = U.next)
|
|
4777
|
+
w++, H += U.value.length;
|
|
4778
|
+
w--, pe = p.slice(ce, H), z.index -= ce;
|
|
4779
|
+
} else if (z = s(K, 0, pe, X), !z)
|
|
4780
4780
|
continue;
|
|
4781
|
-
var ue = z.index,
|
|
4781
|
+
var ue = z.index, oe = z[0], ye = pe.slice(0, ue), Me = pe.slice(ue + oe.length), Le = ce + pe.length;
|
|
4782
4782
|
C && Le > C.reach && (C.reach = Le);
|
|
4783
|
-
var iu =
|
|
4784
|
-
|
|
4785
|
-
var Xe = new l(P,
|
|
4786
|
-
if (
|
|
4783
|
+
var iu = W.prev;
|
|
4784
|
+
ye && (iu = y(k, iu, ye), ce += ye.length), x(k, iu, w);
|
|
4785
|
+
var Xe = new l(P, G ? i.tokenize(oe, G) : oe, V, oe);
|
|
4786
|
+
if (W = y(k, iu, Xe), Me && y(k, W, Me), w > 1) {
|
|
4787
4787
|
var Qe = {
|
|
4788
4788
|
cause: P + "," + I,
|
|
4789
4789
|
reach: Le
|
|
4790
4790
|
};
|
|
4791
|
-
c(p,
|
|
4791
|
+
c(p, k, m, W.prev, ce, Qe), C && Qe.reach > C.reach && (C.reach = Qe.reach);
|
|
4792
4792
|
}
|
|
4793
4793
|
}
|
|
4794
4794
|
}
|
|
@@ -4796,36 +4796,36 @@ function cs() {
|
|
|
4796
4796
|
}
|
|
4797
4797
|
}
|
|
4798
4798
|
function f() {
|
|
4799
|
-
var p = { value: null, prev: null, next: null },
|
|
4800
|
-
p.next =
|
|
4799
|
+
var p = { value: null, prev: null, next: null }, k = { value: null, prev: p, next: null };
|
|
4800
|
+
p.next = k, this.head = p, this.tail = k, this.length = 0;
|
|
4801
4801
|
}
|
|
4802
|
-
function
|
|
4803
|
-
var
|
|
4804
|
-
return
|
|
4802
|
+
function y(p, k, m) {
|
|
4803
|
+
var b = k.next, h = { value: m, prev: k, next: b };
|
|
4804
|
+
return k.next = h, b.prev = h, p.length++, h;
|
|
4805
4805
|
}
|
|
4806
|
-
function x(p,
|
|
4807
|
-
for (var
|
|
4808
|
-
|
|
4809
|
-
|
|
4806
|
+
function x(p, k, m) {
|
|
4807
|
+
for (var b = k.next, h = 0; h < m && b !== p.tail; h++)
|
|
4808
|
+
b = b.next;
|
|
4809
|
+
k.next = b, b.prev = k, p.length -= h;
|
|
4810
4810
|
}
|
|
4811
4811
|
function d(p) {
|
|
4812
|
-
for (var
|
|
4813
|
-
|
|
4814
|
-
return
|
|
4812
|
+
for (var k = [], m = p.head.next; m !== p.tail; )
|
|
4813
|
+
k.push(m.value), m = m.next;
|
|
4814
|
+
return k;
|
|
4815
4815
|
}
|
|
4816
4816
|
if (!n.document)
|
|
4817
4817
|
return n.addEventListener && (i.disableWorkerMessageHandler || n.addEventListener("message", function(p) {
|
|
4818
|
-
var
|
|
4819
|
-
n.postMessage(i.highlight(
|
|
4818
|
+
var k = JSON.parse(p.data), m = k.language, b = k.code, h = k.immediateClose;
|
|
4819
|
+
n.postMessage(i.highlight(b, i.languages[m], m)), h && n.close();
|
|
4820
4820
|
}, !1)), i;
|
|
4821
|
-
var
|
|
4822
|
-
|
|
4823
|
-
function
|
|
4821
|
+
var E = i.util.currentScript();
|
|
4822
|
+
E && (i.filename = E.src, E.hasAttribute("data-manual") && (i.manual = !0));
|
|
4823
|
+
function A() {
|
|
4824
4824
|
i.manual || i.highlightAll();
|
|
4825
4825
|
}
|
|
4826
4826
|
if (!i.manual) {
|
|
4827
|
-
var
|
|
4828
|
-
|
|
4827
|
+
var v = document.readyState;
|
|
4828
|
+
v === "loading" || v === "interactive" && E && E.defer ? document.addEventListener("DOMContentLoaded", A) : window.requestAnimationFrame ? window.requestAnimationFrame(A) : window.setTimeout(A, 16);
|
|
4829
4829
|
}
|
|
4830
4830
|
return i;
|
|
4831
4831
|
}(u);
|
|
@@ -5207,8 +5207,8 @@ function cs() {
|
|
|
5207
5207
|
if (typeof t > "u" || typeof document > "u")
|
|
5208
5208
|
return;
|
|
5209
5209
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
5210
|
-
var n = "Loading…", r = function(
|
|
5211
|
-
return "✖ Error " +
|
|
5210
|
+
var n = "Loading…", r = function(E, A) {
|
|
5211
|
+
return "✖ Error " + E + " while fetching file: " + A;
|
|
5212
5212
|
}, o = "✖ Error: File does not exist or is empty", a = {
|
|
5213
5213
|
js: "javascript",
|
|
5214
5214
|
py: "python",
|
|
@@ -5220,51 +5220,51 @@ function cs() {
|
|
|
5220
5220
|
h: "c",
|
|
5221
5221
|
tex: "latex"
|
|
5222
5222
|
}, i = "data-src-status", l = "loading", s = "loaded", c = "failed", f = "pre[data-src]:not([" + i + '="' + s + '"]):not([' + i + '="' + l + '"])';
|
|
5223
|
-
function
|
|
5223
|
+
function y(E, A, v) {
|
|
5224
5224
|
var p = new XMLHttpRequest();
|
|
5225
|
-
p.open("GET",
|
|
5226
|
-
p.readyState == 4 && (p.status < 400 && p.responseText ?
|
|
5225
|
+
p.open("GET", E, !0), p.onreadystatechange = function() {
|
|
5226
|
+
p.readyState == 4 && (p.status < 400 && p.responseText ? A(p.responseText) : p.status >= 400 ? v(r(p.status, p.statusText)) : v(o));
|
|
5227
5227
|
}, p.send(null);
|
|
5228
5228
|
}
|
|
5229
|
-
function x(
|
|
5230
|
-
var
|
|
5231
|
-
if (
|
|
5232
|
-
var
|
|
5233
|
-
return p ?
|
|
5229
|
+
function x(E) {
|
|
5230
|
+
var A = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(E || "");
|
|
5231
|
+
if (A) {
|
|
5232
|
+
var v = Number(A[1]), p = A[2], k = A[3];
|
|
5233
|
+
return p ? k ? [v, Number(k)] : [v, void 0] : [v, v];
|
|
5234
5234
|
}
|
|
5235
5235
|
}
|
|
5236
|
-
t.hooks.add("before-highlightall", function(
|
|
5237
|
-
|
|
5238
|
-
}), t.hooks.add("before-sanity-check", function(
|
|
5239
|
-
var
|
|
5236
|
+
t.hooks.add("before-highlightall", function(E) {
|
|
5237
|
+
E.selector += ", " + f;
|
|
5238
|
+
}), t.hooks.add("before-sanity-check", function(E) {
|
|
5239
|
+
var A = (
|
|
5240
5240
|
/** @type {HTMLPreElement} */
|
|
5241
|
-
|
|
5241
|
+
E.element
|
|
5242
5242
|
);
|
|
5243
|
-
if (
|
|
5244
|
-
|
|
5245
|
-
var
|
|
5246
|
-
|
|
5247
|
-
var p =
|
|
5248
|
-
if (
|
|
5249
|
-
var
|
|
5250
|
-
|
|
5243
|
+
if (A.matches(f)) {
|
|
5244
|
+
E.code = "", A.setAttribute(i, l);
|
|
5245
|
+
var v = A.appendChild(document.createElement("CODE"));
|
|
5246
|
+
v.textContent = n;
|
|
5247
|
+
var p = A.getAttribute("data-src"), k = E.language;
|
|
5248
|
+
if (k === "none") {
|
|
5249
|
+
var m = (/\.(\w+)$/.exec(p) || [, "none"])[1];
|
|
5250
|
+
k = a[m] || m;
|
|
5251
5251
|
}
|
|
5252
|
-
t.util.setLanguage(
|
|
5253
|
-
var
|
|
5254
|
-
|
|
5252
|
+
t.util.setLanguage(v, k), t.util.setLanguage(A, k);
|
|
5253
|
+
var b = t.plugins.autoloader;
|
|
5254
|
+
b && b.loadLanguages(k), y(
|
|
5255
5255
|
p,
|
|
5256
5256
|
function(h) {
|
|
5257
|
-
|
|
5258
|
-
var C = x(
|
|
5257
|
+
A.setAttribute(i, s);
|
|
5258
|
+
var C = x(A.getAttribute("data-range"));
|
|
5259
5259
|
if (C) {
|
|
5260
5260
|
var P = h.split(/\r\n?|\n/g), D = C[0], I = C[1] == null ? P.length : C[1];
|
|
5261
5261
|
D < 0 && (D += P.length), D = Math.max(0, Math.min(D - 1, P.length)), I < 0 && (I += P.length), I = Math.max(0, Math.min(I, P.length)), h = P.slice(D, I).join(`
|
|
5262
|
-
`),
|
|
5262
|
+
`), A.hasAttribute("data-start") || A.setAttribute("data-start", String(D + 1));
|
|
5263
5263
|
}
|
|
5264
|
-
|
|
5264
|
+
v.textContent = h, t.highlightElement(v);
|
|
5265
5265
|
},
|
|
5266
5266
|
function(h) {
|
|
5267
|
-
|
|
5267
|
+
A.setAttribute(i, c), v.textContent = h;
|
|
5268
5268
|
}
|
|
5269
5269
|
);
|
|
5270
5270
|
}
|
|
@@ -5276,9 +5276,9 @@ function cs() {
|
|
|
5276
5276
|
*
|
|
5277
5277
|
* @param {ParentNode} [container=document]
|
|
5278
5278
|
*/
|
|
5279
|
-
highlight: function(
|
|
5280
|
-
for (var
|
|
5281
|
-
t.highlightElement(
|
|
5279
|
+
highlight: function(A) {
|
|
5280
|
+
for (var v = (A || document).querySelectorAll(f), p = 0, k; k = v[p++]; )
|
|
5281
|
+
t.highlightElement(k);
|
|
5282
5282
|
}
|
|
5283
5283
|
};
|
|
5284
5284
|
var d = !1;
|
|
@@ -5332,7 +5332,7 @@ function bs() {
|
|
|
5332
5332
|
])
|
|
5333
5333
|
]);
|
|
5334
5334
|
}
|
|
5335
|
-
const ms = ["innerHTML"], gs = /* @__PURE__ */
|
|
5335
|
+
const ms = ["innerHTML"], gs = /* @__PURE__ */ ke({
|
|
5336
5336
|
__name: "TypeWriter",
|
|
5337
5337
|
props: {
|
|
5338
5338
|
value: {},
|
|
@@ -5346,7 +5346,7 @@ const ms = ["innerHTML"], gs = /* @__PURE__ */ me({
|
|
|
5346
5346
|
setup(e, { emit: u }) {
|
|
5347
5347
|
const t = u;
|
|
5348
5348
|
gt(ut, bs());
|
|
5349
|
-
const { typedValue: n, isTyping: r, onStat: o, onUpdate: a, onStop: i } = ls(
|
|
5349
|
+
const { typedValue: n, isTyping: r, onStat: o, onUpdate: a, onStop: i } = ls(ee(() => e.value ?? ""), {
|
|
5350
5350
|
step: e.step,
|
|
5351
5351
|
interval: e.interval,
|
|
5352
5352
|
enabled: e.typing
|
|
@@ -5364,7 +5364,7 @@ const ms = ["innerHTML"], gs = /* @__PURE__ */ me({
|
|
|
5364
5364
|
typographer: !0,
|
|
5365
5365
|
breaks: !0,
|
|
5366
5366
|
highlight: ds
|
|
5367
|
-
}), s =
|
|
5367
|
+
}), s = ee(() => e.markdown ? l.value : n.value);
|
|
5368
5368
|
return (c, f) => (R(), $(_(an), {
|
|
5369
5369
|
tag: "div",
|
|
5370
5370
|
class: Ou([_(ut)])
|
|
@@ -5399,7 +5399,7 @@ function ys() {
|
|
|
5399
5399
|
])
|
|
5400
5400
|
]);
|
|
5401
5401
|
}
|
|
5402
|
-
const Kc = /* @__PURE__ */
|
|
5402
|
+
const Kc = /* @__PURE__ */ ke({
|
|
5403
5403
|
__name: "Bubble",
|
|
5404
5404
|
props: {
|
|
5405
5405
|
avatar: {},
|
|
@@ -5420,29 +5420,29 @@ const Kc = /* @__PURE__ */ me({
|
|
|
5420
5420
|
}, {
|
|
5421
5421
|
default: O(() => [
|
|
5422
5422
|
B(n.$slots, "avatar", {}, () => [
|
|
5423
|
-
n.avatar ? (R(), $(_(Go),
|
|
5423
|
+
n.avatar ? (R(), $(_(Go), Y({
|
|
5424
5424
|
key: 0,
|
|
5425
5425
|
round: ""
|
|
5426
5426
|
}, n.avatar.props), {
|
|
5427
5427
|
default: O(() => [
|
|
5428
|
-
(R(), $(
|
|
5428
|
+
(R(), $(le(n.avatar.icon)))
|
|
5429
5429
|
]),
|
|
5430
5430
|
_: 1
|
|
5431
5431
|
}, 16)) : te("", !0)
|
|
5432
5432
|
]),
|
|
5433
|
-
|
|
5433
|
+
Z(_($e), { vertical: "" }, {
|
|
5434
5434
|
default: O(() => [
|
|
5435
5435
|
B(n.$slots, "header"),
|
|
5436
|
-
|
|
5436
|
+
Z(_(Ur), null, {
|
|
5437
5437
|
default: O(() => [
|
|
5438
5438
|
n.loading ? B(n.$slots, "loading", { key: 0 }, () => [
|
|
5439
|
-
|
|
5439
|
+
Z(_(Or), { style: { height: "44px" } })
|
|
5440
5440
|
]) : B(n.$slots, "default", { key: 1 }, () => [
|
|
5441
5441
|
Ye("div", {
|
|
5442
5442
|
class: Ou([`${_(Zt)}__content`, n.contentClass]),
|
|
5443
5443
|
style: rn(n.contentStyle)
|
|
5444
5444
|
}, [
|
|
5445
|
-
|
|
5445
|
+
Z(_(gs), {
|
|
5446
5446
|
typing: n.typing,
|
|
5447
5447
|
markdown: n.markdown,
|
|
5448
5448
|
value: n.content,
|
|
@@ -5481,7 +5481,7 @@ function ws() {
|
|
|
5481
5481
|
])
|
|
5482
5482
|
]);
|
|
5483
5483
|
}
|
|
5484
|
-
const Cs = /* @__PURE__ */
|
|
5484
|
+
const Cs = /* @__PURE__ */ ke({
|
|
5485
5485
|
__name: "FullLoading",
|
|
5486
5486
|
props: {
|
|
5487
5487
|
show: { type: Boolean },
|
|
@@ -5494,7 +5494,7 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5494
5494
|
},
|
|
5495
5495
|
setup(e) {
|
|
5496
5496
|
gt(tt, ws());
|
|
5497
|
-
const u =
|
|
5497
|
+
const u = j("auto");
|
|
5498
5498
|
return Re(() => {
|
|
5499
5499
|
if (e.disableScroll) {
|
|
5500
5500
|
const t = e.scrollSelector instanceof HTMLElement ? e.scrollSelector : document.querySelector(e.scrollSelector);
|
|
@@ -5509,7 +5509,7 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5509
5509
|
style: rn(typeof t.mask == "object" ? t.mask : {})
|
|
5510
5510
|
}, {
|
|
5511
5511
|
default: O(() => [
|
|
5512
|
-
|
|
5512
|
+
Z(_(Or), fe(We(t.spinProps)), Rr({ _: 2 }, [
|
|
5513
5513
|
t.$slots.description ? {
|
|
5514
5514
|
name: "description",
|
|
5515
5515
|
fn: O(() => [
|
|
@@ -5533,7 +5533,7 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5533
5533
|
_: 3
|
|
5534
5534
|
}));
|
|
5535
5535
|
}
|
|
5536
|
-
}), ef = /* @__PURE__ */
|
|
5536
|
+
}), ef = /* @__PURE__ */ ke({
|
|
5537
5537
|
__name: "ConfigProviders",
|
|
5538
5538
|
props: {
|
|
5539
5539
|
globalStyle: { type: Boolean, default: !1 },
|
|
@@ -5546,7 +5546,7 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5546
5546
|
messageProviderProps: {}
|
|
5547
5547
|
},
|
|
5548
5548
|
setup(e) {
|
|
5549
|
-
const u =
|
|
5549
|
+
const u = j(!1);
|
|
5550
5550
|
function t() {
|
|
5551
5551
|
window.$dialog = Ko(), window.$loadingBar = ei(), window.$message = ui(), window.$modal = ti(), window.$notification = ni(), window.$loading = {
|
|
5552
5552
|
start: () => {
|
|
@@ -5557,7 +5557,7 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5557
5557
|
}
|
|
5558
5558
|
};
|
|
5559
5559
|
}
|
|
5560
|
-
const n =
|
|
5560
|
+
const n = ke({
|
|
5561
5561
|
setup() {
|
|
5562
5562
|
Io(() => {
|
|
5563
5563
|
t();
|
|
@@ -5569,18 +5569,18 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5569
5569
|
});
|
|
5570
5570
|
return (r, o) => (R(), $(_(Vo), fe(We(r.configProviderProps)), {
|
|
5571
5571
|
default: O(() => [
|
|
5572
|
-
|
|
5572
|
+
Z(_(Wo), fe(We(r.loadingBarProps)), {
|
|
5573
5573
|
default: O(() => [
|
|
5574
|
-
|
|
5574
|
+
Z(_(Zo), fe(We(r.dialogProviderProps)), {
|
|
5575
5575
|
default: O(() => [
|
|
5576
|
-
|
|
5576
|
+
Z(_(Yo), fe(We(r.modalProviderProps)), {
|
|
5577
5577
|
default: O(() => [
|
|
5578
|
-
|
|
5578
|
+
Z(_(Xo), fe(We(r.notificationProviderProps)), {
|
|
5579
5579
|
default: O(() => [
|
|
5580
|
-
|
|
5580
|
+
Z(_(Qo), fe(We(r.messageProviderProps)), {
|
|
5581
5581
|
default: O(() => [
|
|
5582
5582
|
B(r.$slots, "default"),
|
|
5583
|
-
|
|
5583
|
+
Z(_(n))
|
|
5584
5584
|
]),
|
|
5585
5585
|
_: 3
|
|
5586
5586
|
}, 16)
|
|
@@ -5597,7 +5597,7 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5597
5597
|
_: 3
|
|
5598
5598
|
}, 16),
|
|
5599
5599
|
r.globalStyle ? (R(), $(_(Jo), { key: 0 })) : te("", !0),
|
|
5600
|
-
|
|
5600
|
+
Z(_(Cs), Y({ show: u.value }, r.fullLoadingProps), null, 16, ["show"])
|
|
5601
5601
|
]),
|
|
5602
5602
|
_: 3
|
|
5603
5603
|
}, 16));
|
|
@@ -5616,14 +5616,14 @@ const Cs = /* @__PURE__ */ me({
|
|
|
5616
5616
|
viewBox: "0 0 24 24"
|
|
5617
5617
|
};
|
|
5618
5618
|
function Ss(e, u, t, n, r, o) {
|
|
5619
|
-
return R(),
|
|
5619
|
+
return R(), re("svg", Fs, u[0] || (u[0] = [
|
|
5620
5620
|
Ye("path", {
|
|
5621
5621
|
fill: "currentColor",
|
|
5622
5622
|
d: "M18.355 6.54h-1.94V4.69a2.69 2.69 0 0 0-1.646-2.484A2.7 2.7 0 0 0 13.745 2h-8.05a2.68 2.68 0 0 0-2.67 2.69v10.09a2.68 2.68 0 0 0 2.67 2.69h1.94v1.85a2.68 2.68 0 0 0 2.67 2.68h8a2.68 2.68 0 0 0 2.67-2.68V9.23a2.69 2.69 0 0 0-2.62-2.69M7.635 9.23v6.74h-1.94a1.18 1.18 0 0 1-1.17-1.19V4.69a1.18 1.18 0 0 1 1.17-1.19h8.05a1.18 1.18 0 0 1 1.17 1.19v1.85h-4.61a2.69 2.69 0 0 0-2.67 2.69"
|
|
5623
5623
|
}, null, -1)
|
|
5624
5624
|
]));
|
|
5625
5625
|
}
|
|
5626
|
-
const Ts = /* @__PURE__ */ vn(Ds, [["render", Ss]]), uf = /* @__PURE__ */
|
|
5626
|
+
const Ts = /* @__PURE__ */ vn(Ds, [["render", Ss]]), uf = /* @__PURE__ */ ke({
|
|
5627
5627
|
__name: "CopyButton",
|
|
5628
5628
|
props: {
|
|
5629
5629
|
value: {},
|
|
@@ -5650,13 +5650,13 @@ const Ts = /* @__PURE__ */ vn(Ds, [["render", Ss]]), uf = /* @__PURE__ */ me({
|
|
|
5650
5650
|
onClick: o
|
|
5651
5651
|
}, [
|
|
5652
5652
|
B(a.$slots, "default", {}, () => [
|
|
5653
|
-
|
|
5653
|
+
Z(_(ru), Y({
|
|
5654
5654
|
quaternary: "",
|
|
5655
5655
|
size: "tiny"
|
|
5656
5656
|
}, a.buttonProps), {
|
|
5657
5657
|
icon: O(() => [
|
|
5658
5658
|
B(a.$slots, "icon", {}, () => [
|
|
5659
|
-
|
|
5659
|
+
Z(Ts)
|
|
5660
5660
|
])
|
|
5661
5661
|
]),
|
|
5662
5662
|
_: 3
|
|
@@ -5673,7 +5673,7 @@ const Ts = /* @__PURE__ */ vn(Ds, [["render", Ss]]), uf = /* @__PURE__ */ me({
|
|
|
5673
5673
|
}, 16));
|
|
5674
5674
|
}
|
|
5675
5675
|
}), xo = (e, { manual: u, ready: t = !0, refreshDeps: n = [], refreshDepsAction: r }) => {
|
|
5676
|
-
const o =
|
|
5676
|
+
const o = j(!1);
|
|
5677
5677
|
return Re(() => {
|
|
5678
5678
|
!u && e.options.refreshDeps !== !0 && (o.value = _(t));
|
|
5679
5679
|
}), n instanceof Array ? Ze(
|
|
@@ -5729,7 +5729,7 @@ const at = /* @__PURE__ */ new Map(), Ps = (e, u, t) => {
|
|
|
5729
5729
|
setCache: r,
|
|
5730
5730
|
getCache: o
|
|
5731
5731
|
}) => {
|
|
5732
|
-
const a =
|
|
5732
|
+
const a = j(), i = j(), l = (c, f) => {
|
|
5733
5733
|
r ? r(f) : Ps(c, t, f), Ns(c, f.data);
|
|
5734
5734
|
}, s = (c, f = []) => o ? o(f) : Rs(c);
|
|
5735
5735
|
return Re(() => {
|
|
@@ -5755,12 +5755,12 @@ const at = /* @__PURE__ */ new Map(), Ps = (e, u, t) => {
|
|
|
5755
5755
|
};
|
|
5756
5756
|
},
|
|
5757
5757
|
onRequest: (c, f) => {
|
|
5758
|
-
let
|
|
5759
|
-
return
|
|
5758
|
+
let y = Os(u);
|
|
5759
|
+
return y && y !== i.value ? { servicePromise: y } : (y = c(...f), i.value = y, Ms(u, y), { servicePromise: y });
|
|
5760
5760
|
},
|
|
5761
5761
|
onSuccess: (c, f) => {
|
|
5762
|
-
var
|
|
5763
|
-
u && ((
|
|
5762
|
+
var y;
|
|
5763
|
+
u && ((y = a.value) == null || y.call(a), l(u, {
|
|
5764
5764
|
data: c,
|
|
5765
5765
|
params: f,
|
|
5766
5766
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
@@ -5774,8 +5774,8 @@ const at = /* @__PURE__ */ new Map(), Ps = (e, u, t) => {
|
|
|
5774
5774
|
data: c,
|
|
5775
5775
|
params: e.state.params,
|
|
5776
5776
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
5777
|
-
}), a.value = Yt(u, (
|
|
5778
|
-
e.setState({ data:
|
|
5777
|
+
}), a.value = Yt(u, (y) => {
|
|
5778
|
+
e.setState({ data: y });
|
|
5779
5779
|
}));
|
|
5780
5780
|
}
|
|
5781
5781
|
} : {};
|
|
@@ -5840,54 +5840,54 @@ function Ar(e) {
|
|
|
5840
5840
|
}
|
|
5841
5841
|
var ic = "Expected a function", ac = Math.max, lc = Math.min;
|
|
5842
5842
|
function yo(e, u, t) {
|
|
5843
|
-
var n, r, o, a, i, l, s = 0, c = !1, f = !1,
|
|
5843
|
+
var n, r, o, a, i, l, s = 0, c = !1, f = !1, y = !0;
|
|
5844
5844
|
if (typeof e != "function")
|
|
5845
5845
|
throw new TypeError(ic);
|
|
5846
|
-
u = Ar(u) || 0, ht(t) && (c = !!t.leading, f = "maxWait" in t, o = f ? ac(Ar(t.maxWait) || 0, u) : o,
|
|
5846
|
+
u = Ar(u) || 0, ht(t) && (c = !!t.leading, f = "maxWait" in t, o = f ? ac(Ar(t.maxWait) || 0, u) : o, y = "trailing" in t ? !!t.trailing : y);
|
|
5847
5847
|
function x(h) {
|
|
5848
5848
|
var C = n, P = r;
|
|
5849
5849
|
return n = r = void 0, s = h, a = e.apply(P, C), a;
|
|
5850
5850
|
}
|
|
5851
5851
|
function d(h) {
|
|
5852
|
-
return s = h, i = setTimeout(
|
|
5852
|
+
return s = h, i = setTimeout(v, u), c ? x(h) : a;
|
|
5853
5853
|
}
|
|
5854
|
-
function
|
|
5854
|
+
function E(h) {
|
|
5855
5855
|
var C = h - l, P = h - s, D = u - C;
|
|
5856
5856
|
return f ? lc(D, o - P) : D;
|
|
5857
5857
|
}
|
|
5858
|
-
function
|
|
5858
|
+
function A(h) {
|
|
5859
5859
|
var C = h - l, P = h - s;
|
|
5860
5860
|
return l === void 0 || C >= u || C < 0 || f && P >= o;
|
|
5861
5861
|
}
|
|
5862
|
-
function
|
|
5862
|
+
function v() {
|
|
5863
5863
|
var h = Xt();
|
|
5864
|
-
if (
|
|
5864
|
+
if (A(h))
|
|
5865
5865
|
return p(h);
|
|
5866
|
-
i = setTimeout(
|
|
5866
|
+
i = setTimeout(v, E(h));
|
|
5867
5867
|
}
|
|
5868
5868
|
function p(h) {
|
|
5869
|
-
return i = void 0,
|
|
5869
|
+
return i = void 0, y && n ? x(h) : (n = r = void 0, a);
|
|
5870
5870
|
}
|
|
5871
|
-
function
|
|
5871
|
+
function k() {
|
|
5872
5872
|
i !== void 0 && clearTimeout(i), s = 0, n = l = r = i = void 0;
|
|
5873
5873
|
}
|
|
5874
|
-
function
|
|
5874
|
+
function m() {
|
|
5875
5875
|
return i === void 0 ? a : p(Xt());
|
|
5876
5876
|
}
|
|
5877
|
-
function
|
|
5878
|
-
var h = Xt(), C =
|
|
5877
|
+
function b() {
|
|
5878
|
+
var h = Xt(), C = A(h);
|
|
5879
5879
|
if (n = arguments, r = this, l = h, C) {
|
|
5880
5880
|
if (i === void 0)
|
|
5881
5881
|
return d(l);
|
|
5882
5882
|
if (f)
|
|
5883
|
-
return clearTimeout(i), i = setTimeout(
|
|
5883
|
+
return clearTimeout(i), i = setTimeout(v, u), x(l);
|
|
5884
5884
|
}
|
|
5885
|
-
return i === void 0 && (i = setTimeout(
|
|
5885
|
+
return i === void 0 && (i = setTimeout(v, u)), a;
|
|
5886
5886
|
}
|
|
5887
|
-
return
|
|
5887
|
+
return b.cancel = k, b.flush = m, b;
|
|
5888
5888
|
}
|
|
5889
5889
|
const sc = (e, { debounceWait: u, debounceLeading: t, debounceTrailing: n, debounceMaxWait: r }) => {
|
|
5890
|
-
const o =
|
|
5890
|
+
const o = j(), a = ee(() => {
|
|
5891
5891
|
const i = {}, l = _(t), s = _(n), c = _(r);
|
|
5892
5892
|
return l !== void 0 && (i.leading = l), s !== void 0 && (i.trailing = s), c !== void 0 && (i.maxWait = c), i;
|
|
5893
5893
|
});
|
|
@@ -5901,8 +5901,8 @@ const sc = (e, { debounceWait: u, debounceLeading: t, debounceTrailing: n, debou
|
|
|
5901
5901
|
_(u),
|
|
5902
5902
|
a.value
|
|
5903
5903
|
), e.runAsync = (...s) => new Promise((c, f) => {
|
|
5904
|
-
var
|
|
5905
|
-
(
|
|
5904
|
+
var y;
|
|
5905
|
+
(y = o.value) == null || y.call(o, () => {
|
|
5906
5906
|
l(...s).then(c).catch(f);
|
|
5907
5907
|
});
|
|
5908
5908
|
}), i(() => {
|
|
@@ -5977,30 +5977,30 @@ class gc {
|
|
|
5977
5977
|
return this.requestInstances;
|
|
5978
5978
|
}
|
|
5979
5979
|
}
|
|
5980
|
-
const
|
|
5980
|
+
const Ae = new gc(), kc = (e, { ready: u = !0, debugKey: t, ...n }) => {
|
|
5981
5981
|
const r = () => {
|
|
5982
|
-
if (t && !
|
|
5982
|
+
if (t && !Ae.has(t)) {
|
|
5983
5983
|
const a = e.serviceRef.value.toString().includes("function") ? pc(e.serviceRef.value.toString()) : hc(e.serviceRef.value.toString());
|
|
5984
|
-
|
|
5984
|
+
Ae.insert(t, {
|
|
5985
5985
|
instance: e,
|
|
5986
5986
|
requestName: a,
|
|
5987
5987
|
time: Date.now()
|
|
5988
5988
|
});
|
|
5989
5989
|
}
|
|
5990
|
-
}, o =
|
|
5990
|
+
}, o = ee(
|
|
5991
5991
|
() => Object.fromEntries(
|
|
5992
5992
|
Object.entries({ ready: u, ...n }).map(([a, i]) => [a, _(i)])
|
|
5993
5993
|
)
|
|
5994
5994
|
);
|
|
5995
5995
|
return Re(() => {
|
|
5996
|
-
t &&
|
|
5996
|
+
t && Ae.has(t) && Ae.emit({
|
|
5997
5997
|
...e,
|
|
5998
5998
|
options: { ...e.options, ...o.value }
|
|
5999
5999
|
});
|
|
6000
6000
|
}), {
|
|
6001
6001
|
name: "devtoolsPlugin",
|
|
6002
6002
|
onBefore: (a) => {
|
|
6003
|
-
r(), t &&
|
|
6003
|
+
r(), t && Ae.has(t) && Ae.emit({
|
|
6004
6004
|
...e.state,
|
|
6005
6005
|
key: t,
|
|
6006
6006
|
params: a,
|
|
@@ -6010,7 +6010,7 @@ const ye = new gc(), kc = (e, { ready: u = !0, debugKey: t, ...n }) => {
|
|
|
6010
6010
|
});
|
|
6011
6011
|
},
|
|
6012
6012
|
onSuccess(a, i) {
|
|
6013
|
-
r(), t &&
|
|
6013
|
+
r(), t && Ae.has(t) && Ae.emit({
|
|
6014
6014
|
...e.state,
|
|
6015
6015
|
key: t,
|
|
6016
6016
|
data: a,
|
|
@@ -6021,7 +6021,7 @@ const ye = new gc(), kc = (e, { ready: u = !0, debugKey: t, ...n }) => {
|
|
|
6021
6021
|
});
|
|
6022
6022
|
},
|
|
6023
6023
|
onCancel() {
|
|
6024
|
-
r(), t &&
|
|
6024
|
+
r(), t && Ae.has(t) && Ae.emit({
|
|
6025
6025
|
...e.state,
|
|
6026
6026
|
key: t,
|
|
6027
6027
|
loading: !1,
|
|
@@ -6030,7 +6030,7 @@ const ye = new gc(), kc = (e, { ready: u = !0, debugKey: t, ...n }) => {
|
|
|
6030
6030
|
});
|
|
6031
6031
|
},
|
|
6032
6032
|
onError(a, i) {
|
|
6033
|
-
r(), t &&
|
|
6033
|
+
r(), t && Ae.has(t) && Ae.emit({
|
|
6034
6034
|
...e.state,
|
|
6035
6035
|
key: t,
|
|
6036
6036
|
params: i,
|
|
@@ -6041,7 +6041,7 @@ const ye = new gc(), kc = (e, { ready: u = !0, debugKey: t, ...n }) => {
|
|
|
6041
6041
|
});
|
|
6042
6042
|
},
|
|
6043
6043
|
onMutate(a) {
|
|
6044
|
-
r(), t &&
|
|
6044
|
+
r(), t && Ae.has(t) && Ae.emit({
|
|
6045
6045
|
...e.state,
|
|
6046
6046
|
key: t,
|
|
6047
6047
|
data: a,
|
|
@@ -6052,7 +6052,7 @@ const ye = new gc(), kc = (e, { ready: u = !0, debugKey: t, ...n }) => {
|
|
|
6052
6052
|
}
|
|
6053
6053
|
};
|
|
6054
6054
|
}, xc = (e, { loadingDelay: u }) => {
|
|
6055
|
-
const t =
|
|
6055
|
+
const t = j(), n = () => {
|
|
6056
6056
|
t.value && (clearTimeout(_(t.value)), t.value = void 0);
|
|
6057
6057
|
};
|
|
6058
6058
|
return {
|
|
@@ -6099,7 +6099,7 @@ if (_n()) {
|
|
|
6099
6099
|
}
|
|
6100
6100
|
const yc = (e, { pollingInterval: u, pollingWhenHidden: t = !0, pollingErrorRetryCount: n = -1 }) => {
|
|
6101
6101
|
let r;
|
|
6102
|
-
const o =
|
|
6102
|
+
const o = j(), a = j(0), i = () => {
|
|
6103
6103
|
var l;
|
|
6104
6104
|
r && clearTimeout(r), (l = o.value) == null || l.call(o);
|
|
6105
6105
|
};
|
|
@@ -6157,7 +6157,7 @@ if (vc) {
|
|
|
6157
6157
|
window.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", e, !1);
|
|
6158
6158
|
}
|
|
6159
6159
|
const Cc = (e, { refreshOnWindowFocus: u, focusTimespan: t = 5e3 }) => {
|
|
6160
|
-
const n =
|
|
6160
|
+
const n = j(), r = () => {
|
|
6161
6161
|
var o;
|
|
6162
6162
|
(o = n.value) == null || o.call(n);
|
|
6163
6163
|
};
|
|
@@ -6180,7 +6180,7 @@ const Cc = (e, { refreshOnWindowFocus: u, focusTimespan: t = 5e3 }) => {
|
|
|
6180
6180
|
name: "refreshOnWindowFocusPlugin"
|
|
6181
6181
|
};
|
|
6182
6182
|
}, Dc = (e, { retryInterval: u, retryCount: t }) => {
|
|
6183
|
-
const n =
|
|
6183
|
+
const n = j(), r = j(0), o = j(!1);
|
|
6184
6184
|
return t ? {
|
|
6185
6185
|
name: "retryPlugin",
|
|
6186
6186
|
onBefore: () => {
|
|
@@ -6216,23 +6216,23 @@ function Sc(e, u, t) {
|
|
|
6216
6216
|
}
|
|
6217
6217
|
const Tc = (e, { throttleWait: u, throttleLeading: t, throttleTrailing: n }) => {
|
|
6218
6218
|
let r = null;
|
|
6219
|
-
const o =
|
|
6219
|
+
const o = ee(() => {
|
|
6220
6220
|
const s = {};
|
|
6221
6221
|
return _(t) !== void 0 && (s.leading = _(t)), _(n) !== void 0 && (s.trailing = _(n)), s;
|
|
6222
|
-
}), a = e.runAsync.bind(e), i =
|
|
6222
|
+
}), a = e.runAsync.bind(e), i = j(), l = ee(() => _(u));
|
|
6223
6223
|
return Ze([l, o], (s) => {
|
|
6224
6224
|
r && (r.cancel(), e.runAsync = a);
|
|
6225
|
-
const [c, f] = s,
|
|
6225
|
+
const [c, f] = s, y = Sc(
|
|
6226
6226
|
(x) => {
|
|
6227
6227
|
x();
|
|
6228
6228
|
},
|
|
6229
6229
|
_(c),
|
|
6230
6230
|
f
|
|
6231
6231
|
);
|
|
6232
|
-
r =
|
|
6233
|
-
var
|
|
6234
|
-
(
|
|
6235
|
-
a(...x).then(d).catch(
|
|
6232
|
+
r = y, i.value = y, e.runAsync = (...x) => new Promise((d, E) => {
|
|
6233
|
+
var A;
|
|
6234
|
+
(A = i.value) == null || A.call(i, () => {
|
|
6235
|
+
a(...x).then(d).catch(E);
|
|
6236
6236
|
});
|
|
6237
6237
|
});
|
|
6238
6238
|
}, {
|
|
@@ -6287,9 +6287,9 @@ class Mc {
|
|
|
6287
6287
|
return Object.assign({}, ...a);
|
|
6288
6288
|
}
|
|
6289
6289
|
async runAsync(...u) {
|
|
6290
|
-
var t, n, r, o, a, i, l, s, c, f,
|
|
6290
|
+
var t, n, r, o, a, i, l, s, c, f, y;
|
|
6291
6291
|
this.count += 1;
|
|
6292
|
-
const x = this.count, { stopNow: d = !1, returnNow:
|
|
6292
|
+
const x = this.count, { stopNow: d = !1, returnNow: E = !1, ...A } = this.runPluginHandler(
|
|
6293
6293
|
"onBefore",
|
|
6294
6294
|
u
|
|
6295
6295
|
);
|
|
@@ -6299,47 +6299,47 @@ class Mc {
|
|
|
6299
6299
|
if (this.setState({
|
|
6300
6300
|
loading: !0,
|
|
6301
6301
|
params: u,
|
|
6302
|
-
...
|
|
6303
|
-
}),
|
|
6304
|
-
return Promise.resolve(
|
|
6302
|
+
...A
|
|
6303
|
+
}), E)
|
|
6304
|
+
return Promise.resolve(A.data);
|
|
6305
6305
|
try {
|
|
6306
6306
|
(n = (t = this.options).onBefore) == null || n.call(t, u);
|
|
6307
|
-
} catch (
|
|
6307
|
+
} catch (v) {
|
|
6308
6308
|
return this.setState({
|
|
6309
|
-
error:
|
|
6309
|
+
error: v,
|
|
6310
6310
|
loading: !1
|
|
6311
|
-
}), (o = (r = this.options).onError) == null || o.call(r,
|
|
6311
|
+
}), (o = (r = this.options).onError) == null || o.call(r, v, u), this.runPluginHandler("onError", v, u), new Promise(() => {
|
|
6312
6312
|
});
|
|
6313
6313
|
}
|
|
6314
6314
|
try {
|
|
6315
|
-
let { servicePromise:
|
|
6316
|
-
const p = (
|
|
6317
|
-
var
|
|
6315
|
+
let { servicePromise: v } = this.runPluginHandler("onRequest", this.serviceRef.value, u);
|
|
6316
|
+
const p = (m) => {
|
|
6317
|
+
var b, h, C, P;
|
|
6318
6318
|
if (!this.options.concurrent && x !== this.count)
|
|
6319
6319
|
return new Promise(() => {
|
|
6320
6320
|
});
|
|
6321
|
-
const D = this.options.formatResult ? this.options.formatResult(
|
|
6322
|
-
data:
|
|
6321
|
+
const D = this.options.formatResult ? this.options.formatResult(m) : m, I = {
|
|
6322
|
+
data: m
|
|
6323
6323
|
};
|
|
6324
6324
|
return this.setState({
|
|
6325
6325
|
data: D,
|
|
6326
6326
|
error: void 0,
|
|
6327
6327
|
loading: !1
|
|
6328
|
-
}), (h = (
|
|
6328
|
+
}), (h = (b = this.options).onSuccess) == null || h.call(b, D, u), this.runPluginHandler("onSuccess", D, u, I), this.previousValidData = D, (P = (C = this.options).onFinally) == null || P.call(C, u, D, void 0), (this.options.concurrent || x === this.count) && this.runPluginHandler("onFinally", u, D, void 0), D;
|
|
6329
6329
|
};
|
|
6330
|
-
|
|
6331
|
-
const
|
|
6332
|
-
return p(
|
|
6333
|
-
} catch (
|
|
6330
|
+
v || (v = this.serviceRef.value(...u));
|
|
6331
|
+
const k = await v;
|
|
6332
|
+
return p(k);
|
|
6333
|
+
} catch (v) {
|
|
6334
6334
|
if (!this.options.concurrent && x !== this.count)
|
|
6335
6335
|
return new Promise(() => {
|
|
6336
6336
|
});
|
|
6337
6337
|
throw this.setState({
|
|
6338
|
-
error:
|
|
6338
|
+
error: v,
|
|
6339
6339
|
loading: !1
|
|
6340
|
-
}), (i = (a = this.options).onError) == null || i.call(a,
|
|
6340
|
+
}), (i = (a = this.options).onError) == null || i.call(a, v, u), this.runPluginHandler("onError", v, u), (Dr((l = this.options) == null ? void 0 : l.rollbackOnError) && ((s = this.options) != null && s.rollbackOnError(u)) || Pc((c = this.options) == null ? void 0 : c.rollbackOnError) && this.options.rollbackOnError) && this.setState({
|
|
6341
6341
|
data: this.previousValidData
|
|
6342
|
-
}), (
|
|
6342
|
+
}), (y = (f = this.options).onFinally) == null || y.call(f, u, void 0, v), (this.options.concurrent || x === this.count) && this.runPluginHandler("onFinally", u, void 0, v), v;
|
|
6343
6343
|
}
|
|
6344
6344
|
}
|
|
6345
6345
|
run(...u) {
|
|
@@ -6383,32 +6383,32 @@ function $c(e, u = {}, t = []) {
|
|
|
6383
6383
|
ready: a,
|
|
6384
6384
|
initialData: r,
|
|
6385
6385
|
...i
|
|
6386
|
-
}, s =
|
|
6386
|
+
}, s = j(e), c = gu({
|
|
6387
6387
|
data: r,
|
|
6388
6388
|
loading: !1,
|
|
6389
6389
|
params: void 0,
|
|
6390
6390
|
error: void 0
|
|
6391
|
-
}), f = (
|
|
6392
|
-
|
|
6393
|
-
},
|
|
6394
|
-
var
|
|
6395
|
-
return (
|
|
6391
|
+
}), f = (E, A) => {
|
|
6392
|
+
A ? c[A] = E : Nc(E) && (c.data = E.data, c.loading = E.loading, c.error = E.error, c.params = E.params);
|
|
6393
|
+
}, y = t.map((E) => {
|
|
6394
|
+
var A;
|
|
6395
|
+
return (A = E?.onInit) == null ? void 0 : A.call(E, l);
|
|
6396
6396
|
}).filter(Boolean), x = new Mc(
|
|
6397
6397
|
s,
|
|
6398
6398
|
l,
|
|
6399
6399
|
f,
|
|
6400
|
-
Object.assign({}, ...
|
|
6400
|
+
Object.assign({}, ...y, c)
|
|
6401
6401
|
);
|
|
6402
|
-
x.options = l, x.pluginImpls = t.map((
|
|
6403
|
-
const d =
|
|
6402
|
+
x.options = l, x.pluginImpls = t.map((E) => E(x, l));
|
|
6403
|
+
const d = ee(() => Qt(a) ? a.value : a);
|
|
6404
6404
|
if (Re(() => {
|
|
6405
6405
|
if (!o) {
|
|
6406
|
-
const
|
|
6407
|
-
d.value && x.options.refreshDeps === !0 && s.value && x.run(...
|
|
6406
|
+
const E = x.state.params || u.defaultParams || [];
|
|
6407
|
+
d.value && x.options.refreshDeps === !0 && s.value && x.run(...E);
|
|
6408
6408
|
}
|
|
6409
6409
|
}), !o && x.options.refreshDeps !== !0) {
|
|
6410
|
-
const
|
|
6411
|
-
_(a) && x.run(...
|
|
6410
|
+
const E = x.state.params || u.defaultParams || [];
|
|
6411
|
+
_(a) && x.run(...E);
|
|
6412
6412
|
}
|
|
6413
6413
|
return on(() => {
|
|
6414
6414
|
x.cancel();
|
|
@@ -6448,8 +6448,8 @@ function En(e, u, t) {
|
|
|
6448
6448
|
[...t || [], ...r]
|
|
6449
6449
|
);
|
|
6450
6450
|
}
|
|
6451
|
-
function
|
|
6452
|
-
return u ?
|
|
6451
|
+
function me(e, u, t) {
|
|
6452
|
+
return u ? ge(ri, {
|
|
6453
6453
|
...t,
|
|
6454
6454
|
...typeof u == "string" ? { label: u } : typeof u == "boolean" ? {} : u
|
|
6455
6455
|
}, {
|
|
@@ -6465,7 +6465,7 @@ const zc = {
|
|
|
6465
6465
|
viewBox: "0 0 24 24"
|
|
6466
6466
|
};
|
|
6467
6467
|
function Uc(e, u, t, n, r, o) {
|
|
6468
|
-
return R(),
|
|
6468
|
+
return R(), re("svg", Bc, u[0] || (u[0] = [
|
|
6469
6469
|
Ye("path", {
|
|
6470
6470
|
fill: "none",
|
|
6471
6471
|
stroke: "currentColor",
|
|
@@ -6476,7 +6476,7 @@ function Uc(e, u, t, n, r, o) {
|
|
|
6476
6476
|
}, null, -1)
|
|
6477
6477
|
]));
|
|
6478
6478
|
}
|
|
6479
|
-
const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */
|
|
6479
|
+
const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ ke({
|
|
6480
6480
|
__name: "SearchInput",
|
|
6481
6481
|
props: {
|
|
6482
6482
|
value: {},
|
|
@@ -6490,7 +6490,7 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6490
6490
|
},
|
|
6491
6491
|
emits: ["update:value"],
|
|
6492
6492
|
setup(e, { emit: u }) {
|
|
6493
|
-
const t = u, n = mt("input-ref"), r =
|
|
6493
|
+
const t = u, n = mt("input-ref"), r = j(e.value ?? null), o = ee(() => typeof e.searchButton == "boolean" ? "text" : e.searchButton), { start: a } = Ai(() => {
|
|
6494
6494
|
}, typeof e.autoTrigger == "number" ? e.autoTrigger : 500);
|
|
6495
6495
|
Re(() => {
|
|
6496
6496
|
r.value = e.value ?? null;
|
|
@@ -6511,10 +6511,10 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6511
6511
|
!e.loading && r.value && n.value?.focus();
|
|
6512
6512
|
}), (c, f) => (R(), $(_(oi), null, {
|
|
6513
6513
|
default: O(() => [
|
|
6514
|
-
|
|
6514
|
+
Z(_(sn), Y({
|
|
6515
6515
|
ref: "input-ref",
|
|
6516
6516
|
value: r.value,
|
|
6517
|
-
"onUpdate:value": f[0] || (f[0] = (
|
|
6517
|
+
"onUpdate:value": f[0] || (f[0] = (y) => r.value = y),
|
|
6518
6518
|
clearable: "",
|
|
6519
6519
|
loading: c.loading,
|
|
6520
6520
|
placeholder: c.placeholder
|
|
@@ -6522,7 +6522,7 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6522
6522
|
prefix: O(() => [
|
|
6523
6523
|
B(c.$slots, "prefix", {}, () => [
|
|
6524
6524
|
B(c.$slots, "prefix-icon", {}, () => [
|
|
6525
|
-
|
|
6525
|
+
Z(Fr, { style: { width: "18px", height: "18px" } })
|
|
6526
6526
|
])
|
|
6527
6527
|
])
|
|
6528
6528
|
]),
|
|
@@ -6532,13 +6532,13 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6532
6532
|
value: c.value,
|
|
6533
6533
|
loading: c.loading
|
|
6534
6534
|
}, () => [
|
|
6535
|
-
o.value ? (R(), $(_(ru),
|
|
6535
|
+
o.value ? (R(), $(_(ru), Y({
|
|
6536
6536
|
key: 0,
|
|
6537
6537
|
type: c.type,
|
|
6538
6538
|
loading: c.loading
|
|
6539
6539
|
}, c.buttonProps, { onClick: l }), Rr({
|
|
6540
6540
|
default: O(() => [
|
|
6541
|
-
o.value === "text" ? (R(),
|
|
6541
|
+
o.value === "text" ? (R(), re(Ce, { key: 0 }, [
|
|
6542
6542
|
vu(" 搜索 ")
|
|
6543
6543
|
], 64)) : te("", !0)
|
|
6544
6544
|
]),
|
|
@@ -6548,7 +6548,7 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6548
6548
|
name: "icon",
|
|
6549
6549
|
fn: O(() => [
|
|
6550
6550
|
B(c.$slots, "button-icon", {}, () => [
|
|
6551
|
-
|
|
6551
|
+
Z(Fr)
|
|
6552
6552
|
])
|
|
6553
6553
|
]),
|
|
6554
6554
|
key: "0"
|
|
@@ -6559,7 +6559,7 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6559
6559
|
_: 3
|
|
6560
6560
|
}));
|
|
6561
6561
|
}
|
|
6562
|
-
}), tu = /* @__PURE__ */
|
|
6562
|
+
}), tu = /* @__PURE__ */ ke({
|
|
6563
6563
|
__name: "PresetInput",
|
|
6564
6564
|
props: {
|
|
6565
6565
|
value: {},
|
|
@@ -6588,7 +6588,7 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6588
6588
|
const { type: o, props: a } = e.options ?? {};
|
|
6589
6589
|
if (o === "button") {
|
|
6590
6590
|
const { label: i, ...l } = a ?? {};
|
|
6591
|
-
return
|
|
6591
|
+
return ge(n[o], {
|
|
6592
6592
|
...l
|
|
6593
6593
|
}, {
|
|
6594
6594
|
default: () => i
|
|
@@ -6596,36 +6596,36 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6596
6596
|
}
|
|
6597
6597
|
if (o === "checkbox") {
|
|
6598
6598
|
const { options: i, ...l } = a ?? {};
|
|
6599
|
-
return
|
|
6599
|
+
return ge(n[o], {
|
|
6600
6600
|
value: e.value,
|
|
6601
6601
|
"onUpdate:value": (s) => {
|
|
6602
6602
|
t("update:value", s);
|
|
6603
6603
|
},
|
|
6604
6604
|
...l
|
|
6605
6605
|
}, {
|
|
6606
|
-
default: () => i?.map((s) =>
|
|
6606
|
+
default: () => i?.map((s) => ge(mi, { ...s }))
|
|
6607
6607
|
});
|
|
6608
6608
|
}
|
|
6609
6609
|
if (o === "divider") {
|
|
6610
6610
|
const { ...i } = a ?? {};
|
|
6611
|
-
return
|
|
6611
|
+
return ge(n[o], {
|
|
6612
6612
|
...i
|
|
6613
6613
|
});
|
|
6614
6614
|
}
|
|
6615
6615
|
if (o === "radio") {
|
|
6616
6616
|
const { options: i, ...l } = a ?? {};
|
|
6617
|
-
return
|
|
6617
|
+
return ge(n[o], {
|
|
6618
6618
|
value: e.value,
|
|
6619
6619
|
"onUpdate:value": (s) => {
|
|
6620
6620
|
t("update:value", s);
|
|
6621
6621
|
},
|
|
6622
6622
|
...l
|
|
6623
6623
|
}, {
|
|
6624
|
-
default: () => i?.map((s) =>
|
|
6624
|
+
default: () => i?.map((s) => ge(gi, { ...s }))
|
|
6625
6625
|
});
|
|
6626
6626
|
}
|
|
6627
6627
|
if (o && n[o])
|
|
6628
|
-
return
|
|
6628
|
+
return ge(n[o], {
|
|
6629
6629
|
value: e.value,
|
|
6630
6630
|
"onUpdate:value": (i) => {
|
|
6631
6631
|
t("update:value", i);
|
|
@@ -6633,12 +6633,12 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6633
6633
|
...a
|
|
6634
6634
|
});
|
|
6635
6635
|
}
|
|
6636
|
-
return (o, a) => (R(), $(
|
|
6636
|
+
return (o, a) => (R(), $(le(r())));
|
|
6637
6637
|
}
|
|
6638
6638
|
}), qc = { style: { height: "100%", display: "flex", "align-items": "center" } }, jc = {
|
|
6639
6639
|
key: 0,
|
|
6640
6640
|
style: { "font-size": "16px" }
|
|
6641
|
-
}, tf = /* @__PURE__ */
|
|
6641
|
+
}, tf = /* @__PURE__ */ ke({
|
|
6642
6642
|
__name: "DataTablePlus",
|
|
6643
6643
|
props: {
|
|
6644
6644
|
api: { type: Function },
|
|
@@ -6664,7 +6664,7 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6664
6664
|
},
|
|
6665
6665
|
emits: ["before", "success", "error", "finally", "clickRow", "contextMenuRow", "load", "scroll", "update:checkedRowKeys", "update:expandedRowKeys", "update:filters", "update:sorter", "update:page", "update:pageSize"],
|
|
6666
6666
|
setup(e, { expose: u, emit: t }) {
|
|
6667
|
-
const n = t, r =
|
|
6667
|
+
const n = t, r = ee(() => {
|
|
6668
6668
|
const w = typeof e.filterLayout == "string" ? [e.filterLayout, e.filterLayout] : e.filterLayout;
|
|
6669
6669
|
return {
|
|
6670
6670
|
grid: w[0] === "grid",
|
|
@@ -6672,26 +6672,26 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6672
6672
|
collapsedGrid: w[1] === "grid",
|
|
6673
6673
|
collapsedFlex: w[1] === "flex"
|
|
6674
6674
|
};
|
|
6675
|
-
}), o =
|
|
6675
|
+
}), o = gu(e.columns ?? []), a = mt("data-table-ref"), i = { page: "page", pageSize: "pageSize", filter: "filter", sorter: "sorter", list: "list", count: "count", rowKey: "id", search: "search", children: "children", ...e.fields }, l = {
|
|
6676
6676
|
...e.search && typeof e.search == "boolean" ? {} : e.search
|
|
6677
|
-
},
|
|
6677
|
+
}, s = gu({
|
|
6678
6678
|
showSizePicker: !0,
|
|
6679
6679
|
pageSizes: [10, 20, 30],
|
|
6680
6680
|
pageSlot: 5,
|
|
6681
6681
|
prefix: (w) => `共${w.itemCount}条数据`,
|
|
6682
6682
|
...e.pagination && typeof e.pagination == "boolean" ? {} : e.pagination
|
|
6683
|
-
}),
|
|
6683
|
+
}), c = j({
|
|
6684
6684
|
page: 1,
|
|
6685
6685
|
pageSize: 10,
|
|
6686
6686
|
itemCount: 0
|
|
6687
|
-
}),
|
|
6688
|
-
[
|
|
6689
|
-
[
|
|
6690
|
-
[
|
|
6687
|
+
}), f = j(), y = j(), x = {
|
|
6688
|
+
[i.page]: c.value.page,
|
|
6689
|
+
[i.pageSize]: c.value.pageSize,
|
|
6690
|
+
[i.search]: null,
|
|
6691
6691
|
...e.defaultParams
|
|
6692
|
-
}, { loading:
|
|
6692
|
+
}, { loading: d, data: E, error: A, params: v, run: p, runAsync: k, refresh: m, refreshAsync: b, cancel: h, mutate: C } = En(e.api, {
|
|
6693
6693
|
defaultParams: [
|
|
6694
|
-
|
|
6694
|
+
x
|
|
6695
6695
|
],
|
|
6696
6696
|
manual: e.manual,
|
|
6697
6697
|
...e.requestOptions,
|
|
@@ -6699,7 +6699,7 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6699
6699
|
e.requestOptions?.onBefore?.(w), n("before", w);
|
|
6700
6700
|
},
|
|
6701
6701
|
onSuccess: (w, z) => {
|
|
6702
|
-
e.requestOptions?.onSuccess?.(w, z), n("success", w, z),
|
|
6702
|
+
e.requestOptions?.onSuccess?.(w, z), n("success", w, z), L(w, z);
|
|
6703
6703
|
},
|
|
6704
6704
|
onError: (w, z) => {
|
|
6705
6705
|
e.requestOptions?.onError?.(w, z), n("error", w, z);
|
|
@@ -6707,45 +6707,45 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6707
6707
|
onFinally: (w, z, F) => {
|
|
6708
6708
|
e.requestOptions?.onFinally?.(w, z, F), n("finally", w, z, F);
|
|
6709
6709
|
}
|
|
6710
|
-
}, e.requestPlugins),
|
|
6711
|
-
function
|
|
6712
|
-
if (w[
|
|
6713
|
-
|
|
6714
|
-
}),
|
|
6715
|
-
for (const F of
|
|
6710
|
+
}, e.requestPlugins), P = [], D = ee(() => E.value ? Array.isArray(E.value[i.list]) ? E.value[i.list] : (console.warn(`DataTablePlus: data[${i.list}] must be an array`), []) : []), I = ee(() => e.columns?.reduce((w, z) => w + Number(z.width ?? 100), 0));
|
|
6711
|
+
function L(w, z) {
|
|
6712
|
+
if (w[i.list]?.forEach((F) => {
|
|
6713
|
+
P.some((H) => H[i.rowKey] === F[i.rowKey]) || P.push(F);
|
|
6714
|
+
}), c.value.page = i.page in z[0] ? Number(z[0][i.page]) : 1, c.value.pageSize = i.pageSize in z[0] ? Number(z[0][i.pageSize]) : 10, c.value.itemCount = i.count in w ? Number(w[i.count]) : 0, o) {
|
|
6715
|
+
for (const F of o)
|
|
6716
6716
|
if ("key" in F) {
|
|
6717
|
-
if (
|
|
6718
|
-
const
|
|
6719
|
-
|
|
6717
|
+
if (f.value && F.key in f.value) {
|
|
6718
|
+
const H = f.value[F.key];
|
|
6719
|
+
H && "filter" in F && F.filter && (F.filterMultiple ? Array.isArray(H) ? F.filterOptionValues = H : F.filterOptionValues = [H] : Array.isArray(H) ? F.filterOptionValue = H[0] : F.filterOptionValue = H);
|
|
6720
6720
|
}
|
|
6721
|
-
if ("sorter" in F && typeof F.sorter == "boolean" && (F.sortOrder = !1),
|
|
6722
|
-
const
|
|
6723
|
-
|
|
6721
|
+
if ("sorter" in F && typeof F.sorter == "boolean" && (F.sortOrder = !1), y.value && F.key in y.value) {
|
|
6722
|
+
const H = y.value[F.key];
|
|
6723
|
+
H && "sorter" in F && F.sorter && (F.sortOrder = H.order);
|
|
6724
6724
|
}
|
|
6725
6725
|
}
|
|
6726
6726
|
}
|
|
6727
6727
|
}
|
|
6728
|
-
function
|
|
6729
|
-
return
|
|
6730
|
-
...
|
|
6728
|
+
function G(w) {
|
|
6729
|
+
return p({
|
|
6730
|
+
...v.value[0],
|
|
6731
6731
|
...w
|
|
6732
6732
|
});
|
|
6733
6733
|
}
|
|
6734
|
-
const
|
|
6734
|
+
const X = {
|
|
6735
6735
|
onUpdatePage: (w) => {
|
|
6736
|
-
n("update:page", w), !
|
|
6737
|
-
[
|
|
6736
|
+
n("update:page", w), !d.value && G({
|
|
6737
|
+
[i.page]: w
|
|
6738
6738
|
});
|
|
6739
6739
|
},
|
|
6740
6740
|
onUpdatePageSize: (w) => {
|
|
6741
|
-
n("update:pageSize", w), !
|
|
6742
|
-
[
|
|
6741
|
+
n("update:pageSize", w), !d.value && G({
|
|
6742
|
+
[i.pageSize]: w
|
|
6743
6743
|
});
|
|
6744
6744
|
},
|
|
6745
6745
|
onUpdateFilters: (w, z) => {
|
|
6746
|
-
n("update:filters", w, z),
|
|
6747
|
-
[
|
|
6748
|
-
...e.columnsFilterOptions ? e.columnsFilterOptions(w) : { [
|
|
6746
|
+
n("update:filters", w, z), f.value = w, G({
|
|
6747
|
+
[i.page]: 1,
|
|
6748
|
+
...e.columnsFilterOptions ? e.columnsFilterOptions(w) : { [i.filter]: w }
|
|
6749
6749
|
});
|
|
6750
6750
|
},
|
|
6751
6751
|
onUpdateSorter: (w) => {
|
|
@@ -6755,9 +6755,9 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6755
6755
|
for (const F of w)
|
|
6756
6756
|
z[F.columnKey] = F;
|
|
6757
6757
|
else w && (z[w.columnKey] = w);
|
|
6758
|
-
|
|
6759
|
-
[
|
|
6760
|
-
...e.columnsSorterOptions ? e.columnsSorterOptions(z) : { [
|
|
6758
|
+
y.value = z, G({
|
|
6759
|
+
[i.page]: 1,
|
|
6760
|
+
...e.columnsSorterOptions ? e.columnsSorterOptions(z) : { [i.sorter]: z }
|
|
6761
6761
|
});
|
|
6762
6762
|
},
|
|
6763
6763
|
onLoad: (w) => n("load", w),
|
|
@@ -6765,104 +6765,104 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6765
6765
|
n("scroll", w);
|
|
6766
6766
|
},
|
|
6767
6767
|
onUpdateCheckedRowKeys: (w, z, F) => {
|
|
6768
|
-
const
|
|
6769
|
-
n("update:checkedRowKeys", w,
|
|
6768
|
+
const H = w.map((U) => P.find((ue) => ue[i.rowKey] === U));
|
|
6769
|
+
n("update:checkedRowKeys", w, H, { row: we(F.row), action: F.action }, we(D.value));
|
|
6770
6770
|
},
|
|
6771
6771
|
onUpdateExpandedRowKeys: (w) => {
|
|
6772
|
-
n("update:expandedRowKeys", w,
|
|
6772
|
+
n("update:expandedRowKeys", w, we(D.value));
|
|
6773
6773
|
}
|
|
6774
6774
|
};
|
|
6775
|
-
function
|
|
6775
|
+
function T(w, z) {
|
|
6776
6776
|
return {
|
|
6777
6777
|
onClick: (F) => {
|
|
6778
|
-
n("clickRow",
|
|
6778
|
+
n("clickRow", we(w), z, F, we(D.value));
|
|
6779
6779
|
},
|
|
6780
6780
|
onContextmenu: (F) => {
|
|
6781
|
-
n("contextMenuRow",
|
|
6781
|
+
n("contextMenuRow", we(w), z, F, we(D.value));
|
|
6782
6782
|
}
|
|
6783
6783
|
};
|
|
6784
6784
|
}
|
|
6785
|
-
const
|
|
6786
|
-
function
|
|
6787
|
-
z &&
|
|
6785
|
+
const V = j(!1);
|
|
6786
|
+
function de(w, z) {
|
|
6787
|
+
z && G({
|
|
6788
6788
|
[z]: w
|
|
6789
6789
|
});
|
|
6790
6790
|
}
|
|
6791
|
-
const
|
|
6792
|
-
loading:
|
|
6793
|
-
data:
|
|
6794
|
-
error:
|
|
6795
|
-
params:
|
|
6796
|
-
pagination:
|
|
6797
|
-
filters:
|
|
6798
|
-
sorters:
|
|
6799
|
-
rawList:
|
|
6800
|
-
dataTableRef:
|
|
6801
|
-
},
|
|
6802
|
-
run:
|
|
6803
|
-
runAsync:
|
|
6804
|
-
refresh:
|
|
6805
|
-
refreshAsync:
|
|
6806
|
-
cancel:
|
|
6807
|
-
mutate:
|
|
6791
|
+
const K = {
|
|
6792
|
+
loading: d,
|
|
6793
|
+
data: E,
|
|
6794
|
+
error: A,
|
|
6795
|
+
params: v,
|
|
6796
|
+
pagination: c,
|
|
6797
|
+
filters: f,
|
|
6798
|
+
sorters: y,
|
|
6799
|
+
rawList: D,
|
|
6800
|
+
dataTableRef: a
|
|
6801
|
+
}, W = {
|
|
6802
|
+
run: p,
|
|
6803
|
+
runAsync: k,
|
|
6804
|
+
refresh: m,
|
|
6805
|
+
refreshAsync: b,
|
|
6806
|
+
cancel: h,
|
|
6807
|
+
mutate: C,
|
|
6808
6808
|
setParams: (w) => {
|
|
6809
|
-
Object.assign(
|
|
6809
|
+
Object.assign(v.value[0], w);
|
|
6810
6810
|
},
|
|
6811
|
-
runParams: (w) =>
|
|
6812
|
-
runParamsAsync: async (w) =>
|
|
6813
|
-
};
|
|
6811
|
+
runParams: (w) => p(Object.assign(v.value[0], w)),
|
|
6812
|
+
runParamsAsync: async (w) => k(Object.assign(v.value[0], w))
|
|
6813
|
+
}, ce = ee(() => e.filterOptions?.filter((w) => typeof w.hidden == "function" ? !w.hidden(K) : !w.hidden).filter((w) => !w.collapsed)), pe = ee(() => e.filterOptions?.filter((w) => typeof w.hidden == "function" ? !w.hidden(K) : !w.hidden).filter((w) => w.collapsed));
|
|
6814
6814
|
return u({
|
|
6815
|
-
refs:
|
|
6816
|
-
actions:
|
|
6815
|
+
refs: K,
|
|
6816
|
+
actions: W
|
|
6817
6817
|
}), (w, z) => (R(), $(_($e), { vertical: "" }, {
|
|
6818
6818
|
default: O(() => [
|
|
6819
6819
|
B(w.$slots, "header", {
|
|
6820
|
-
refs:
|
|
6821
|
-
actions:
|
|
6820
|
+
refs: K,
|
|
6821
|
+
actions: W
|
|
6822
6822
|
}, () => [
|
|
6823
|
-
|
|
6823
|
+
Z(_($e), null, {
|
|
6824
6824
|
default: O(() => [
|
|
6825
6825
|
B(w.$slots, "title", {}, () => [
|
|
6826
6826
|
Ye("div", qc, [
|
|
6827
|
-
w.title ? (R(),
|
|
6827
|
+
w.title ? (R(), re("span", jc, nu(w.title), 1)) : te("", !0)
|
|
6828
6828
|
])
|
|
6829
6829
|
]),
|
|
6830
|
-
w.search ? (R(), $(_(Eo),
|
|
6830
|
+
w.search ? (R(), $(_(Eo), Y({
|
|
6831
6831
|
key: 0,
|
|
6832
6832
|
style: { "margin-left": "auto", width: "260px" },
|
|
6833
|
-
value: _(
|
|
6834
|
-
loading: _(
|
|
6835
|
-
},
|
|
6836
|
-
"onUpdate:value": z[0] || (z[0] = (F) =>
|
|
6833
|
+
value: _(v)[0][i.search],
|
|
6834
|
+
loading: _(d)
|
|
6835
|
+
}, l, {
|
|
6836
|
+
"onUpdate:value": z[0] || (z[0] = (F) => de(F, i.search))
|
|
6837
6837
|
}), null, 16, ["value", "loading"])) : te("", !0),
|
|
6838
6838
|
B(w.$slots, "header-extra", {
|
|
6839
|
-
refs:
|
|
6840
|
-
actions:
|
|
6839
|
+
refs: K,
|
|
6840
|
+
actions: W
|
|
6841
6841
|
})
|
|
6842
6842
|
]),
|
|
6843
6843
|
_: 3
|
|
6844
6844
|
})
|
|
6845
6845
|
]),
|
|
6846
6846
|
B(w.$slots, "filter", {
|
|
6847
|
-
refs:
|
|
6848
|
-
actions:
|
|
6847
|
+
refs: K,
|
|
6848
|
+
actions: W
|
|
6849
6849
|
}, () => [
|
|
6850
|
-
|
|
6850
|
+
Z(_($e), { vertical: "" }, {
|
|
6851
6851
|
default: O(() => [
|
|
6852
|
-
r.value.grid &&
|
|
6852
|
+
r.value.grid && ce.value && ce.value.length > 0 ? (R(), $(_(st), fe(Y({ key: 0 }, w.filterGridProps)), {
|
|
6853
6853
|
default: O(() => [
|
|
6854
|
-
(R(!0),
|
|
6854
|
+
(R(!0), re(Ce, null, eu(w.filterOptions?.filter((F) => !F.collapsed), ({ key: F, gridSpan: H, gridItemProps: U, render: ue, label: oe, ...ye }, Me) => (R(), $(_(ct), Y({
|
|
6855
6855
|
key: Me,
|
|
6856
|
-
span:
|
|
6857
|
-
}, { ref_for: !0 },
|
|
6856
|
+
span: H
|
|
6857
|
+
}, { ref_for: !0 }, U), {
|
|
6858
6858
|
default: O(() => [
|
|
6859
|
-
ue ? (R(), $(
|
|
6860
|
-
|
|
6861
|
-
options:
|
|
6862
|
-
value: F ? _(
|
|
6863
|
-
"onUpdate:value": (Le) =>
|
|
6859
|
+
ue ? (R(), $(le(_(me)(ue(K, W), oe, { path: F, labelPlacement: "left" })), { key: 0 })) : (R(), $(le(_(me)(
|
|
6860
|
+
ge(_(tu), {
|
|
6861
|
+
options: ye,
|
|
6862
|
+
value: F ? _(v)[0][F] : void 0,
|
|
6863
|
+
"onUpdate:value": (Le) => de(Le, F)
|
|
6864
6864
|
}),
|
|
6865
|
-
|
|
6865
|
+
oe,
|
|
6866
6866
|
{ path: F, labelPlacement: "left" }
|
|
6867
6867
|
)), { key: 1 }))
|
|
6868
6868
|
]),
|
|
@@ -6871,55 +6871,55 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6871
6871
|
]),
|
|
6872
6872
|
_: 1
|
|
6873
6873
|
}, 16)) : te("", !0),
|
|
6874
|
-
r.value.flex &&
|
|
6874
|
+
r.value.flex && ce.value && ce.value.length > 0 ? (R(), $(_($e), fe(Y({ key: 1 }, w.filterFlexProps)), {
|
|
6875
6875
|
default: O(() => [
|
|
6876
|
-
(R(!0),
|
|
6877
|
-
|
|
6878
|
-
|
|
6876
|
+
(R(!0), re(Ce, null, eu(w.filterOptions?.filter((F) => !F.collapsed), ({ key: F, render: H, label: U, ...ue }, oe) => (R(), re(Ce, { key: oe }, [
|
|
6877
|
+
H ? (R(), $(le(_(me)(H(K, W), U, { path: F, labelPlacement: "left" })), { key: 0 })) : (R(), $(le(_(me)(
|
|
6878
|
+
ge(_(tu), {
|
|
6879
6879
|
options: ue,
|
|
6880
|
-
value: F ? _(
|
|
6881
|
-
"onUpdate:value": (
|
|
6880
|
+
value: F ? _(v)[0][F] : void 0,
|
|
6881
|
+
"onUpdate:value": (ye) => de(ye, F)
|
|
6882
6882
|
}),
|
|
6883
|
-
|
|
6883
|
+
U,
|
|
6884
6884
|
{ path: F, labelPlacement: "left" }
|
|
6885
6885
|
)), { key: 1 }))
|
|
6886
6886
|
], 64))), 128))
|
|
6887
6887
|
]),
|
|
6888
6888
|
_: 1
|
|
6889
6889
|
}, 16)) : te("", !0),
|
|
6890
|
-
|
|
6890
|
+
pe.value && pe.value.length > 0 ? (R(), $(_(cn), {
|
|
6891
6891
|
key: 2,
|
|
6892
6892
|
style: { margin: "5px 0" }
|
|
6893
6893
|
}, {
|
|
6894
6894
|
default: O(() => [
|
|
6895
|
-
|
|
6895
|
+
Z(_(ru), {
|
|
6896
6896
|
size: "tiny",
|
|
6897
|
-
onClick: z[1] || (z[1] = (F) =>
|
|
6897
|
+
onClick: z[1] || (z[1] = (F) => V.value = !V.value)
|
|
6898
6898
|
}, {
|
|
6899
6899
|
default: O(() => [
|
|
6900
|
-
vu(nu(
|
|
6900
|
+
vu(nu(V.value ? "折叠" : "展开"), 1)
|
|
6901
6901
|
]),
|
|
6902
6902
|
_: 1
|
|
6903
6903
|
})
|
|
6904
6904
|
]),
|
|
6905
6905
|
_: 1
|
|
6906
6906
|
})) : te("", !0),
|
|
6907
|
-
|
|
6907
|
+
Z(_(Lr), { show: V.value }, {
|
|
6908
6908
|
default: O(() => [
|
|
6909
|
-
r.value.collapsedGrid &&
|
|
6909
|
+
r.value.collapsedGrid && pe.value && pe.value.length > 0 ? (R(), $(_(st), fe(Y({ key: 0 }, w.filterGridProps)), {
|
|
6910
6910
|
default: O(() => [
|
|
6911
|
-
(R(!0),
|
|
6911
|
+
(R(!0), re(Ce, null, eu(w.filterOptions?.filter((F) => F.collapsed), ({ key: F, gridSpan: H, gridItemProps: U, render: ue, label: oe, ...ye }, Me) => (R(), $(_(ct), Y({
|
|
6912
6912
|
key: Me,
|
|
6913
|
-
span:
|
|
6914
|
-
}, { ref_for: !0 },
|
|
6913
|
+
span: H
|
|
6914
|
+
}, { ref_for: !0 }, U), {
|
|
6915
6915
|
default: O(() => [
|
|
6916
|
-
ue ? (R(), $(
|
|
6917
|
-
|
|
6918
|
-
options:
|
|
6919
|
-
value: F ? _(
|
|
6920
|
-
"onUpdate:value": (Le) =>
|
|
6916
|
+
ue ? (R(), $(le(_(me)(ue(K, W), oe, { path: F, labelPlacement: "left" })), { key: 0 })) : (R(), $(le(_(me)(
|
|
6917
|
+
ge(_(tu), {
|
|
6918
|
+
options: ye,
|
|
6919
|
+
value: F ? _(v)[0][F] : void 0,
|
|
6920
|
+
"onUpdate:value": (Le) => de(Le, F)
|
|
6921
6921
|
}),
|
|
6922
|
-
|
|
6922
|
+
oe,
|
|
6923
6923
|
{ path: F, labelPlacement: "left" }
|
|
6924
6924
|
)), { key: 1 }))
|
|
6925
6925
|
]),
|
|
@@ -6928,16 +6928,16 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6928
6928
|
]),
|
|
6929
6929
|
_: 1
|
|
6930
6930
|
}, 16)) : te("", !0),
|
|
6931
|
-
r.value.collapsedFlex &&
|
|
6931
|
+
r.value.collapsedFlex && pe.value && pe.value.length > 0 ? (R(), $(_($e), fe(Y({ key: 1 }, w.filterFlexProps)), {
|
|
6932
6932
|
default: O(() => [
|
|
6933
|
-
(R(!0),
|
|
6934
|
-
|
|
6935
|
-
|
|
6933
|
+
(R(!0), re(Ce, null, eu(w.filterOptions?.filter((F) => F.collapsed), ({ key: F, render: H, label: U, ...ue }, oe) => (R(), re(Ce, { key: oe }, [
|
|
6934
|
+
H ? (R(), $(le(_(me)(H(K, W), U, { path: F, labelPlacement: "left" })), { key: 0 })) : (R(), $(le(_(me)(
|
|
6935
|
+
ge(_(tu), {
|
|
6936
6936
|
options: ue,
|
|
6937
|
-
value: F ? _(
|
|
6938
|
-
"onUpdate:value": (
|
|
6937
|
+
value: F ? _(v)[0][F] : void 0,
|
|
6938
|
+
"onUpdate:value": (ye) => de(ye, F)
|
|
6939
6939
|
}),
|
|
6940
|
-
|
|
6940
|
+
U,
|
|
6941
6941
|
{ path: F, labelPlacement: "left" }
|
|
6942
6942
|
)), { key: 1 }))
|
|
6943
6943
|
], 64))), 128))
|
|
@@ -6951,59 +6951,59 @@ const Fr = /* @__PURE__ */ vn(zc, [["render", Uc]]), Eo = /* @__PURE__ */ me({
|
|
|
6951
6951
|
_: 1
|
|
6952
6952
|
})
|
|
6953
6953
|
]),
|
|
6954
|
-
|
|
6954
|
+
Z(_(ki), Y({
|
|
6955
6955
|
ref: "data-table-ref",
|
|
6956
6956
|
remote: "",
|
|
6957
6957
|
"flex-height": "",
|
|
6958
6958
|
"single-line": !1,
|
|
6959
|
-
"scroll-x":
|
|
6959
|
+
"scroll-x": I.value,
|
|
6960
6960
|
style: { flex: 1, ...w.customStyle },
|
|
6961
6961
|
class: w.customClass,
|
|
6962
|
-
"row-key": (F) => F[
|
|
6963
|
-
"children-key":
|
|
6964
|
-
loading: _(
|
|
6965
|
-
columns:
|
|
6966
|
-
data:
|
|
6967
|
-
"row-props":
|
|
6962
|
+
"row-key": (F) => F[i.rowKey],
|
|
6963
|
+
"children-key": i.children,
|
|
6964
|
+
loading: _(d),
|
|
6965
|
+
columns: o,
|
|
6966
|
+
data: D.value,
|
|
6967
|
+
"row-props": T
|
|
6968
6968
|
}, w.dataTableProps, {
|
|
6969
|
-
"onUpdate:filters":
|
|
6970
|
-
"onUpdate:sorter":
|
|
6971
|
-
onLoad:
|
|
6972
|
-
onScroll:
|
|
6973
|
-
"onUpdate:checkedRowKeys":
|
|
6974
|
-
"onUpdate:expandedRowKeys":
|
|
6969
|
+
"onUpdate:filters": X.onUpdateFilters,
|
|
6970
|
+
"onUpdate:sorter": X.onUpdateSorter,
|
|
6971
|
+
onLoad: X.onLoad,
|
|
6972
|
+
onScroll: X.onScroll,
|
|
6973
|
+
"onUpdate:checkedRowKeys": X.onUpdateCheckedRowKeys,
|
|
6974
|
+
"onUpdate:expandedRowKeys": X.onUpdateExpandedRowKeys
|
|
6975
6975
|
}), {
|
|
6976
6976
|
empty: O(() => [
|
|
6977
6977
|
B(w.$slots, "empty", {
|
|
6978
|
-
refs:
|
|
6979
|
-
actions:
|
|
6978
|
+
refs: K,
|
|
6979
|
+
actions: W
|
|
6980
6980
|
})
|
|
6981
6981
|
]),
|
|
6982
6982
|
loading: O(() => [
|
|
6983
6983
|
B(w.$slots, "loading", {
|
|
6984
|
-
refs:
|
|
6985
|
-
actions:
|
|
6984
|
+
refs: K,
|
|
6985
|
+
actions: W
|
|
6986
6986
|
})
|
|
6987
6987
|
]),
|
|
6988
6988
|
_: 3
|
|
6989
6989
|
}, 16, ["scroll-x", "style", "class", "row-key", "children-key", "loading", "columns", "data", "onUpdate:filters", "onUpdate:sorter", "onLoad", "onScroll", "onUpdate:checkedRowKeys", "onUpdate:expandedRowKeys"]),
|
|
6990
6990
|
B(w.$slots, "footer", {
|
|
6991
|
-
refs:
|
|
6992
|
-
actions:
|
|
6991
|
+
refs: K,
|
|
6992
|
+
actions: W
|
|
6993
6993
|
}, () => [
|
|
6994
|
-
|
|
6994
|
+
Z(_($e), null, {
|
|
6995
6995
|
default: O(() => [
|
|
6996
6996
|
B(w.$slots, "footer-extra", {
|
|
6997
|
-
refs:
|
|
6998
|
-
actions:
|
|
6997
|
+
refs: K,
|
|
6998
|
+
actions: W
|
|
6999
6999
|
}),
|
|
7000
|
-
w.pagination ? (R(), $(_(Nr),
|
|
7000
|
+
w.pagination ? (R(), $(_(Nr), Y({
|
|
7001
7001
|
key: 0,
|
|
7002
7002
|
style: { "margin-left": "auto" },
|
|
7003
|
-
disabled: _(
|
|
7004
|
-
}, { ...
|
|
7005
|
-
"onUpdate:page":
|
|
7006
|
-
"onUpdate:pageSize":
|
|
7003
|
+
disabled: _(d)
|
|
7004
|
+
}, { ...s, ...c.value }, {
|
|
7005
|
+
"onUpdate:page": X.onUpdatePage,
|
|
7006
|
+
"onUpdate:pageSize": X.onUpdatePageSize
|
|
7007
7007
|
}), null, 16, ["disabled", "onUpdate:page", "onUpdate:pageSize"])) : te("", !0)
|
|
7008
7008
|
]),
|
|
7009
7009
|
_: 3
|
|
@@ -7037,28 +7037,28 @@ function wo(e = {}, u = {}) {
|
|
|
7037
7037
|
return e;
|
|
7038
7038
|
}
|
|
7039
7039
|
function Hc(e, u) {
|
|
7040
|
-
const { rules: t, clearRules: n } = u ?? {}, r = structuredClone(
|
|
7040
|
+
const { rules: t, clearRules: n } = u ?? {}, r = structuredClone(we(Be(e))), o = j(Be(e ?? {})), a = t, i = j(), l = {
|
|
7041
7041
|
ref: i,
|
|
7042
7042
|
model: o,
|
|
7043
7043
|
rules: a
|
|
7044
7044
|
}, s = rt();
|
|
7045
7045
|
function c() {
|
|
7046
|
-
return new Promise((
|
|
7046
|
+
return new Promise((E, A) => {
|
|
7047
7047
|
if (!i.value)
|
|
7048
|
-
return
|
|
7049
|
-
i.value.validate().then((
|
|
7048
|
+
return A(new Error("useNaiveForm: formRef is not found."));
|
|
7049
|
+
i.value.validate().then((v) => (s.trigger(we(Be(o))), E(v))).catch(A);
|
|
7050
7050
|
});
|
|
7051
7051
|
}
|
|
7052
7052
|
function f() {
|
|
7053
7053
|
i.value?.restoreValidation();
|
|
7054
7054
|
}
|
|
7055
|
-
function
|
|
7055
|
+
function y() {
|
|
7056
7056
|
Ao(o.value, n);
|
|
7057
7057
|
}
|
|
7058
7058
|
function x() {
|
|
7059
|
-
|
|
7060
|
-
const
|
|
7061
|
-
wo(o.value,
|
|
7059
|
+
y();
|
|
7060
|
+
const E = structuredClone(r);
|
|
7061
|
+
wo(o.value, E);
|
|
7062
7062
|
}
|
|
7063
7063
|
function d() {
|
|
7064
7064
|
f(), x();
|
|
@@ -7072,7 +7072,7 @@ function Hc(e, u) {
|
|
|
7072
7072
|
resetValidation: f,
|
|
7073
7073
|
resetForm: x,
|
|
7074
7074
|
reset: d,
|
|
7075
|
-
clear:
|
|
7075
|
+
clear: y,
|
|
7076
7076
|
onValidated: s.on
|
|
7077
7077
|
};
|
|
7078
7078
|
}
|
|
@@ -7088,7 +7088,7 @@ function Gc(e) {
|
|
|
7088
7088
|
}), t.rules && (u[t.key] = Object.assign(u[t.key] ?? {}, t.rules)));
|
|
7089
7089
|
}), u;
|
|
7090
7090
|
}
|
|
7091
|
-
const nf = /* @__PURE__ */
|
|
7091
|
+
const nf = /* @__PURE__ */ ke({
|
|
7092
7092
|
__name: "PresetForm",
|
|
7093
7093
|
props: {
|
|
7094
7094
|
options: {},
|
|
@@ -7102,73 +7102,73 @@ const nf = /* @__PURE__ */ me({
|
|
|
7102
7102
|
},
|
|
7103
7103
|
emits: ["validated"],
|
|
7104
7104
|
setup(e, { expose: u, emit: t }) {
|
|
7105
|
-
const n = t, r =
|
|
7106
|
-
const
|
|
7105
|
+
const n = t, r = ee(() => {
|
|
7106
|
+
const m = typeof e.layout == "string" ? [e.layout, e.layout] : e.layout;
|
|
7107
7107
|
return {
|
|
7108
|
-
grid:
|
|
7109
|
-
flex:
|
|
7110
|
-
collapsedGrid:
|
|
7111
|
-
collapsedFlex:
|
|
7108
|
+
grid: m[0] === "grid",
|
|
7109
|
+
flex: m[0] === "flex",
|
|
7110
|
+
collapsedGrid: m[1] === "grid",
|
|
7111
|
+
collapsedFlex: m[1] === "flex"
|
|
7112
7112
|
};
|
|
7113
|
-
}),
|
|
7113
|
+
}), { formValue: o, formRules: a, formRef: i, validate: l, resetValidation: s, resetForm: c, reset: f, clear: y, onValidated: x } = Hc(e.values, {
|
|
7114
7114
|
rules: {
|
|
7115
7115
|
...e.rules,
|
|
7116
7116
|
...Gc(e.options)
|
|
7117
7117
|
},
|
|
7118
7118
|
clearRules: e.clearRules
|
|
7119
7119
|
});
|
|
7120
|
-
|
|
7121
|
-
n("validated",
|
|
7120
|
+
x((m) => {
|
|
7121
|
+
n("validated", m);
|
|
7122
7122
|
});
|
|
7123
|
-
const
|
|
7124
|
-
formRef:
|
|
7125
|
-
formValue:
|
|
7126
|
-
formRules:
|
|
7127
|
-
},
|
|
7128
|
-
validate:
|
|
7129
|
-
resetValidation:
|
|
7130
|
-
resetForm:
|
|
7131
|
-
reset:
|
|
7132
|
-
clear:
|
|
7133
|
-
onValidated:
|
|
7134
|
-
setValues: (
|
|
7135
|
-
Object.assign(
|
|
7123
|
+
const d = j(!1), E = {
|
|
7124
|
+
formRef: i,
|
|
7125
|
+
formValue: o,
|
|
7126
|
+
formRules: a
|
|
7127
|
+
}, A = {
|
|
7128
|
+
validate: l,
|
|
7129
|
+
resetValidation: s,
|
|
7130
|
+
resetForm: c,
|
|
7131
|
+
reset: f,
|
|
7132
|
+
clear: y,
|
|
7133
|
+
onValidated: x,
|
|
7134
|
+
setValues: (m) => {
|
|
7135
|
+
Object.assign(o.value, m);
|
|
7136
7136
|
}
|
|
7137
|
-
};
|
|
7137
|
+
}, v = ee(() => e.options?.filter((m) => typeof m.hidden == "function" ? !m.hidden(E) : !m.hidden).filter((m) => !m.collapsed)), p = ee(() => e.options?.filter((m) => typeof m.hidden == "function" ? !m.hidden(E) : !m.hidden).filter((m) => m.collapsed));
|
|
7138
7138
|
u({
|
|
7139
|
-
refs:
|
|
7140
|
-
actions:
|
|
7139
|
+
refs: E,
|
|
7140
|
+
actions: A
|
|
7141
7141
|
});
|
|
7142
|
-
function
|
|
7143
|
-
|
|
7142
|
+
function k(m, b) {
|
|
7143
|
+
b && A.setValues({ [b]: m });
|
|
7144
7144
|
}
|
|
7145
|
-
return (
|
|
7145
|
+
return (m, b) => (R(), $(_(xi), Y({
|
|
7146
7146
|
ref_key: "formRef",
|
|
7147
|
-
ref:
|
|
7148
|
-
model: _(
|
|
7149
|
-
rules: _(
|
|
7147
|
+
ref: i,
|
|
7148
|
+
model: _(o),
|
|
7149
|
+
rules: _(a)
|
|
7150
7150
|
}, e.formProps), {
|
|
7151
7151
|
default: O(() => [
|
|
7152
|
-
B(
|
|
7153
|
-
refs:
|
|
7154
|
-
actions:
|
|
7152
|
+
B(m.$slots, "header", {
|
|
7153
|
+
refs: E,
|
|
7154
|
+
actions: A
|
|
7155
7155
|
}),
|
|
7156
|
-
B(
|
|
7157
|
-
refs:
|
|
7158
|
-
actions:
|
|
7156
|
+
B(m.$slots, "default", {
|
|
7157
|
+
refs: E,
|
|
7158
|
+
actions: A
|
|
7159
7159
|
}, () => [
|
|
7160
|
-
r.value.grid &&
|
|
7160
|
+
r.value.grid && v.value && v.value.length > 0 ? (R(), $(_(st), fe(Y({ key: 0 }, m.gridProps)), {
|
|
7161
7161
|
default: O(() => [
|
|
7162
|
-
(R(!0),
|
|
7163
|
-
key:
|
|
7162
|
+
(R(!0), re(Ce, null, eu(v.value, ({ key: h, gridSpan: C, gridItemProps: P, render: D, label: I, ...L }, G) => (R(), $(_(ct), Y({
|
|
7163
|
+
key: G,
|
|
7164
7164
|
span: C
|
|
7165
7165
|
}, { ref_for: !0 }, P), {
|
|
7166
7166
|
default: O(() => [
|
|
7167
|
-
D ? (R(), $(
|
|
7168
|
-
|
|
7169
|
-
options:
|
|
7170
|
-
value: h ? _(
|
|
7171
|
-
"onUpdate:value": (
|
|
7167
|
+
D ? (R(), $(le(_(me)(D(E, A), I, { path: h })), { key: 0 })) : (R(), $(le(_(me)(
|
|
7168
|
+
ge(_(tu), {
|
|
7169
|
+
options: L,
|
|
7170
|
+
value: h ? _(o)[h] : void 0,
|
|
7171
|
+
"onUpdate:value": (X) => k(X, h)
|
|
7172
7172
|
}),
|
|
7173
7173
|
I,
|
|
7174
7174
|
{ path: h }
|
|
@@ -7179,14 +7179,14 @@ const nf = /* @__PURE__ */ me({
|
|
|
7179
7179
|
]),
|
|
7180
7180
|
_: 1
|
|
7181
7181
|
}, 16)) : te("", !0),
|
|
7182
|
-
r.value.flex &&
|
|
7182
|
+
r.value.flex && v.value && v.value.length > 0 ? (R(), $(_($e), fe(Y({ key: 1 }, m.flexProps)), {
|
|
7183
7183
|
default: O(() => [
|
|
7184
|
-
(R(!0),
|
|
7185
|
-
C ? (R(), $(
|
|
7186
|
-
|
|
7184
|
+
(R(!0), re(Ce, null, eu(v.value, ({ key: h, render: C, label: P, ...D }, I) => (R(), re(Ce, { key: I }, [
|
|
7185
|
+
C ? (R(), $(le(_(me)(C(E, A), P, { path: h })), { key: 0 })) : (R(), $(le(_(me)(
|
|
7186
|
+
ge(_(tu), {
|
|
7187
7187
|
options: D,
|
|
7188
|
-
value: h ? _(
|
|
7189
|
-
"onUpdate:value": (
|
|
7188
|
+
value: h ? _(o)[h] : void 0,
|
|
7189
|
+
"onUpdate:value": (L) => k(L, h)
|
|
7190
7190
|
}),
|
|
7191
7191
|
P,
|
|
7192
7192
|
{ path: h }
|
|
@@ -7195,37 +7195,37 @@ const nf = /* @__PURE__ */ me({
|
|
|
7195
7195
|
]),
|
|
7196
7196
|
_: 1
|
|
7197
7197
|
}, 16)) : te("", !0),
|
|
7198
|
-
|
|
7198
|
+
p.value && p.value.length > 0 ? (R(), $(_(cn), {
|
|
7199
7199
|
key: 2,
|
|
7200
7200
|
style: { margin: "5px 0" }
|
|
7201
7201
|
}, {
|
|
7202
7202
|
default: O(() => [
|
|
7203
|
-
|
|
7203
|
+
Z(_(ru), {
|
|
7204
7204
|
size: "tiny",
|
|
7205
|
-
onClick:
|
|
7205
|
+
onClick: b[0] || (b[0] = (h) => d.value = !d.value)
|
|
7206
7206
|
}, {
|
|
7207
7207
|
default: O(() => [
|
|
7208
|
-
vu(nu(
|
|
7208
|
+
vu(nu(d.value ? "折叠" : "展开"), 1)
|
|
7209
7209
|
]),
|
|
7210
7210
|
_: 1
|
|
7211
7211
|
})
|
|
7212
7212
|
]),
|
|
7213
7213
|
_: 1
|
|
7214
7214
|
})) : te("", !0),
|
|
7215
|
-
|
|
7215
|
+
Z(_(Lr), { show: d.value }, {
|
|
7216
7216
|
default: O(() => [
|
|
7217
|
-
r.value.collapsedGrid &&
|
|
7217
|
+
r.value.collapsedGrid && p.value && p.value.length > 0 ? (R(), $(_(st), fe(Y({ key: 0 }, m.gridProps)), {
|
|
7218
7218
|
default: O(() => [
|
|
7219
|
-
(R(!0),
|
|
7220
|
-
key:
|
|
7219
|
+
(R(!0), re(Ce, null, eu(p.value, ({ key: h, gridSpan: C, gridItemProps: P, render: D, label: I, ...L }, G) => (R(), $(_(ct), Y({
|
|
7220
|
+
key: G,
|
|
7221
7221
|
span: C
|
|
7222
7222
|
}, { ref_for: !0 }, P), {
|
|
7223
7223
|
default: O(() => [
|
|
7224
|
-
D ? (R(), $(
|
|
7225
|
-
|
|
7226
|
-
options:
|
|
7227
|
-
value: h ? _(
|
|
7228
|
-
"onUpdate:value": (
|
|
7224
|
+
D ? (R(), $(le(_(me)(D(E, A), I, { path: h })), { key: 0 })) : (R(), $(le(_(me)(
|
|
7225
|
+
ge(_(tu), {
|
|
7226
|
+
options: L,
|
|
7227
|
+
value: h ? _(o)[h] : void 0,
|
|
7228
|
+
"onUpdate:value": (X) => k(X, h)
|
|
7229
7229
|
}),
|
|
7230
7230
|
I,
|
|
7231
7231
|
{ path: h }
|
|
@@ -7236,14 +7236,14 @@ const nf = /* @__PURE__ */ me({
|
|
|
7236
7236
|
]),
|
|
7237
7237
|
_: 1
|
|
7238
7238
|
}, 16)) : te("", !0),
|
|
7239
|
-
r.value.collapsedFlex &&
|
|
7239
|
+
r.value.collapsedFlex && p.value && p.value.length > 0 ? (R(), $(_($e), fe(Y({ key: 1 }, m.flexProps)), {
|
|
7240
7240
|
default: O(() => [
|
|
7241
|
-
(R(!0),
|
|
7242
|
-
C ? (R(), $(
|
|
7243
|
-
|
|
7241
|
+
(R(!0), re(Ce, null, eu(p.value, ({ key: h, render: C, label: P, ...D }, I) => (R(), re(Ce, { key: I }, [
|
|
7242
|
+
C ? (R(), $(le(_(me)(C(E, A), P, { path: h })), { key: 0 })) : (R(), $(le(_(me)(
|
|
7243
|
+
ge(_(tu), {
|
|
7244
7244
|
options: D,
|
|
7245
|
-
value: h ? _(
|
|
7246
|
-
"onUpdate:value": (
|
|
7245
|
+
value: h ? _(o)[h] : void 0,
|
|
7246
|
+
"onUpdate:value": (L) => k(L, h)
|
|
7247
7247
|
}),
|
|
7248
7248
|
P,
|
|
7249
7249
|
{ path: h }
|
|
@@ -7256,9 +7256,9 @@ const nf = /* @__PURE__ */ me({
|
|
|
7256
7256
|
_: 1
|
|
7257
7257
|
}, 8, ["show"])
|
|
7258
7258
|
]),
|
|
7259
|
-
B(
|
|
7260
|
-
refs:
|
|
7261
|
-
actions:
|
|
7259
|
+
B(m.$slots, "footer", {
|
|
7260
|
+
refs: E,
|
|
7261
|
+
actions: A
|
|
7262
7262
|
})
|
|
7263
7263
|
]),
|
|
7264
7264
|
_: 3
|
|
@@ -7273,14 +7273,14 @@ const nf = /* @__PURE__ */ me({
|
|
|
7273
7273
|
viewBox: "0 0 24 24"
|
|
7274
7274
|
};
|
|
7275
7275
|
function Zc(e, u, t, n, r, o) {
|
|
7276
|
-
return R(),
|
|
7276
|
+
return R(), re("svg", Wc, u[0] || (u[0] = [
|
|
7277
7277
|
Ye("path", {
|
|
7278
7278
|
fill: "currentColor",
|
|
7279
7279
|
d: "M12 1.75A10.25 10.25 0 1 0 22.25 12A10.26 10.26 0 0 0 12 1.75m4.67 13.5a1 1 0 0 1 0 1.42a1 1 0 0 1-1.42 0L12 13.42l-3.25 3.25a1 1 0 0 1-1.41-1.42L10.59 12L7.34 8.75a1 1 0 1 1 1.41-1.41L12 10.59l3.25-3.25a1 1 0 1 1 1.42 1.41L13.42 12z"
|
|
7280
7280
|
}, null, -1)
|
|
7281
7281
|
]));
|
|
7282
7282
|
}
|
|
7283
|
-
const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */
|
|
7283
|
+
const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ ke({
|
|
7284
7284
|
__name: "PresetPicker",
|
|
7285
7285
|
props: {
|
|
7286
7286
|
value: {},
|
|
@@ -7300,7 +7300,7 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7300
7300
|
},
|
|
7301
7301
|
emits: ["update:value", "afterEnter", "afterLeave", "esc", "maskClick", "update:show", "close", "negativeClick", "positiveClick"],
|
|
7302
7302
|
setup(e, { expose: u, emit: t }) {
|
|
7303
|
-
const n = t, r = { label: "label", value: "value", ...e.fields }, o =
|
|
7303
|
+
const n = t, r = { label: "label", value: "value", ...e.fields }, o = j([]), a = j([]), i = gu({
|
|
7304
7304
|
type: "selection",
|
|
7305
7305
|
multiple: e.multiple,
|
|
7306
7306
|
width: 60,
|
|
@@ -7313,25 +7313,25 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7313
7313
|
const l = gu([
|
|
7314
7314
|
i,
|
|
7315
7315
|
...e.columns ?? []
|
|
7316
|
-
]), s =
|
|
7316
|
+
]), s = j(!1);
|
|
7317
7317
|
function c() {
|
|
7318
|
-
o.value = structuredClone(Array.isArray(e.value) ?
|
|
7318
|
+
o.value = structuredClone(Array.isArray(e.value) ? we(e.value) : e.value ? [e.value] : []), s.value = !0;
|
|
7319
7319
|
}
|
|
7320
|
-
function f(
|
|
7321
|
-
e.multiple ? o.value.includes(
|
|
7320
|
+
function f(b) {
|
|
7321
|
+
e.multiple ? o.value.includes(b?.[r.value]) ? (o.value = o.value.filter((h) => h !== b?.[r.value]), a.value = a.value.filter((h) => h?.[r.value] !== b?.[r.value])) : (o.value.push(b?.[r.value]), a.value.push(b)) : (o.value = [b?.[r.value]], a.value = [b]);
|
|
7322
7322
|
}
|
|
7323
|
-
function
|
|
7323
|
+
function y(b, h, C, P) {
|
|
7324
7324
|
if (C.action === "checkAll") {
|
|
7325
|
-
const D =
|
|
7325
|
+
const D = b.filter((L) => !o.value.includes(L));
|
|
7326
7326
|
o.value.push(...D);
|
|
7327
|
-
const I = h.filter((
|
|
7327
|
+
const I = h.filter((L) => !a.value.some((G) => G?.[r.value] === L?.[r.value]));
|
|
7328
7328
|
a.value.push(...I);
|
|
7329
7329
|
return;
|
|
7330
7330
|
}
|
|
7331
7331
|
if (C.action === "uncheckAll") {
|
|
7332
|
-
const D = o.value.filter((
|
|
7332
|
+
const D = o.value.filter((L) => !P?.some((G) => G?.[r.value] === L));
|
|
7333
7333
|
o.value = D;
|
|
7334
|
-
const I = a.value.filter((
|
|
7334
|
+
const I = a.value.filter((L) => !P?.some((G) => G?.[r.value] === L?.[r.value]));
|
|
7335
7335
|
a.value = I;
|
|
7336
7336
|
}
|
|
7337
7337
|
}
|
|
@@ -7340,71 +7340,77 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7340
7340
|
}
|
|
7341
7341
|
function d() {
|
|
7342
7342
|
if (n("positiveClick"), e.multiple) {
|
|
7343
|
-
const
|
|
7344
|
-
n("update:value",
|
|
7343
|
+
const b = we(Be(o)), h = b.map((C) => we(Be(a.value.find((P) => P?.[r.value] === C))));
|
|
7344
|
+
n("update:value", b, h);
|
|
7345
7345
|
} else {
|
|
7346
|
-
const
|
|
7347
|
-
n("update:value",
|
|
7346
|
+
const b = o.value[0] ?? null, h = we(Be(a.value.find((C) => C?.[r.value] === b)));
|
|
7347
|
+
n("update:value", b, h);
|
|
7348
7348
|
}
|
|
7349
7349
|
s.value = !1;
|
|
7350
7350
|
}
|
|
7351
|
-
function
|
|
7351
|
+
function E() {
|
|
7352
7352
|
n("update:value", null, null);
|
|
7353
7353
|
}
|
|
7354
|
-
const
|
|
7354
|
+
const A = ee(() => {
|
|
7355
7355
|
if (Array.isArray(e.value) && e.value.length > 0)
|
|
7356
|
-
return typeof e.fallbackLabel == "string" ? e.fallbackLabel : e.value.map((
|
|
7357
|
-
const h = a.value.find((C) => C?.[r.value] ===
|
|
7358
|
-
return h && h?.[r.label] ? h[r.label] : typeof e.fallbackLabel == "function" ? e.fallbackLabel(
|
|
7356
|
+
return typeof e.fallbackLabel == "string" ? e.fallbackLabel : e.value.map((b) => {
|
|
7357
|
+
const h = a.value.find((C) => C?.[r.value] === b);
|
|
7358
|
+
return h && h?.[r.label] ? h[r.label] : typeof e.fallbackLabel == "function" ? e.fallbackLabel(b) : b;
|
|
7359
7359
|
}).join(",");
|
|
7360
7360
|
if (e.value && !Array.isArray(e.value)) {
|
|
7361
|
-
const
|
|
7362
|
-
return
|
|
7361
|
+
const b = a.value.find((h) => h?.[r.value] === e.value);
|
|
7362
|
+
return b && b?.[r.label] ? b[r.label] : typeof e.fallbackLabel == "function" ? e.fallbackLabel(e.value) : e.fallbackLabel ?? e.value;
|
|
7363
7363
|
}
|
|
7364
7364
|
return e.placeholder;
|
|
7365
|
-
}),
|
|
7365
|
+
}), v = ee(() => e.clearable && (Array.isArray(e.value) ? e.value.length > 0 : !!e.value)), p = ee(() => Array.isArray(e.value) ? e.value.length : void 0), k = {
|
|
7366
7366
|
showModalFlag: s,
|
|
7367
7367
|
checkedRowKeys: o,
|
|
7368
7368
|
checkedRows: a,
|
|
7369
7369
|
columns: l
|
|
7370
|
-
},
|
|
7370
|
+
}, m = {
|
|
7371
7371
|
showModal: c,
|
|
7372
|
-
updateCheckedRowKeysEffect:
|
|
7372
|
+
updateCheckedRowKeysEffect: y,
|
|
7373
7373
|
clickRowEffect: f,
|
|
7374
|
-
clearValue:
|
|
7374
|
+
clearValue: E,
|
|
7375
|
+
setCheckedRowKeys: (b) => {
|
|
7376
|
+
o.value = b;
|
|
7377
|
+
},
|
|
7378
|
+
setCheckedRows: (b) => {
|
|
7379
|
+
a.value = b;
|
|
7380
|
+
}
|
|
7375
7381
|
};
|
|
7376
7382
|
return u({
|
|
7377
|
-
refs:
|
|
7378
|
-
actions:
|
|
7379
|
-
}), (
|
|
7380
|
-
show: Array.isArray(
|
|
7381
|
-
trigger: Array.isArray(
|
|
7383
|
+
refs: k,
|
|
7384
|
+
actions: m
|
|
7385
|
+
}), (b, h) => (R(), $(_(ln), {
|
|
7386
|
+
show: Array.isArray(b.value) ? void 0 : !1,
|
|
7387
|
+
trigger: Array.isArray(b.value) ? "hover" : "manual"
|
|
7382
7388
|
}, {
|
|
7383
7389
|
trigger: O(() => [
|
|
7384
|
-
|
|
7390
|
+
Z(_(vi), Y({ value: p.value }, b.badgeProps), {
|
|
7385
7391
|
default: O(() => [
|
|
7386
|
-
|
|
7392
|
+
Z(_(_i), null, {
|
|
7387
7393
|
default: O(() => [
|
|
7388
|
-
|
|
7389
|
-
type:
|
|
7390
|
-
disabled:
|
|
7391
|
-
},
|
|
7394
|
+
Z(_(ru), Y({
|
|
7395
|
+
type: b.type,
|
|
7396
|
+
disabled: b.disabled
|
|
7397
|
+
}, b.buttonProps, { onClick: c }), {
|
|
7392
7398
|
icon: O(() => [
|
|
7393
|
-
B(
|
|
7399
|
+
B(b.$slots, "button-icon")
|
|
7394
7400
|
]),
|
|
7395
7401
|
default: O(() => [
|
|
7396
|
-
B(
|
|
7397
|
-
Ye("span", null, nu(Array.isArray(
|
|
7402
|
+
B(b.$slots, "button", {}, () => [
|
|
7403
|
+
Ye("span", null, nu(Array.isArray(b.value) ? "已选择" : A.value), 1)
|
|
7398
7404
|
]),
|
|
7399
|
-
|
|
7405
|
+
Z(_(yi), Y({
|
|
7400
7406
|
show: s.value,
|
|
7401
7407
|
"onUpdate:show": h[0] || (h[0] = (C) => s.value = C),
|
|
7402
7408
|
style: { width: "auto" },
|
|
7403
7409
|
preset: "dialog",
|
|
7404
|
-
title:
|
|
7410
|
+
title: b.placeholder,
|
|
7405
7411
|
"positive-text": "确认",
|
|
7406
7412
|
"negative-text": "取消"
|
|
7407
|
-
},
|
|
7413
|
+
}, b.modalProps, {
|
|
7408
7414
|
onPositiveClick: d,
|
|
7409
7415
|
onNegativeClick: x,
|
|
7410
7416
|
onClose: h[1] || (h[1] = (C) => n("close")),
|
|
@@ -7415,21 +7421,21 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7415
7421
|
"onUpdate:show": h[6] || (h[6] = (C) => n("update:show", C))
|
|
7416
7422
|
}), {
|
|
7417
7423
|
action: O(() => [
|
|
7418
|
-
B(
|
|
7424
|
+
B(b.$slots, "modal-action")
|
|
7419
7425
|
]),
|
|
7420
7426
|
header: O(() => [
|
|
7421
|
-
B(
|
|
7427
|
+
B(b.$slots, "modal-header")
|
|
7422
7428
|
]),
|
|
7423
7429
|
icon: O(() => [
|
|
7424
|
-
B(
|
|
7430
|
+
B(b.$slots, "modal-icon")
|
|
7425
7431
|
]),
|
|
7426
7432
|
close: O(() => [
|
|
7427
|
-
B(
|
|
7433
|
+
B(b.$slots, "modal-close")
|
|
7428
7434
|
]),
|
|
7429
7435
|
default: O(() => [
|
|
7430
|
-
B(
|
|
7431
|
-
refs:
|
|
7432
|
-
actions:
|
|
7436
|
+
B(b.$slots, "default", {
|
|
7437
|
+
refs: k,
|
|
7438
|
+
actions: m
|
|
7433
7439
|
})
|
|
7434
7440
|
]),
|
|
7435
7441
|
_: 3
|
|
@@ -7437,17 +7443,17 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7437
7443
|
]),
|
|
7438
7444
|
_: 3
|
|
7439
7445
|
}, 16, ["type", "disabled"]),
|
|
7440
|
-
B(
|
|
7441
|
-
|
|
7446
|
+
B(b.$slots, "clear-button", {}, () => [
|
|
7447
|
+
v.value ? (R(), $(_(ru), Y({
|
|
7442
7448
|
key: 0,
|
|
7443
7449
|
circle: "",
|
|
7444
|
-
type:
|
|
7445
|
-
},
|
|
7446
|
-
onClick: qo(
|
|
7450
|
+
type: b.type
|
|
7451
|
+
}, b.clearButtonProps, {
|
|
7452
|
+
onClick: qo(E, ["stop"])
|
|
7447
7453
|
}), {
|
|
7448
7454
|
icon: O(() => [
|
|
7449
|
-
B(
|
|
7450
|
-
|
|
7455
|
+
B(b.$slots, "clear-icon", {}, () => [
|
|
7456
|
+
Z(Yc)
|
|
7451
7457
|
])
|
|
7452
7458
|
]),
|
|
7453
7459
|
_: 3
|
|
@@ -7461,12 +7467,12 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7461
7467
|
}, 16, ["value"])
|
|
7462
7468
|
]),
|
|
7463
7469
|
default: O(() => [
|
|
7464
|
-
Ye("div", null, nu(Array.isArray(
|
|
7470
|
+
Ye("div", null, nu(Array.isArray(b.value) ? A.value : ""), 1)
|
|
7465
7471
|
]),
|
|
7466
7472
|
_: 3
|
|
7467
7473
|
}, 8, ["show", "trigger"]));
|
|
7468
7474
|
}
|
|
7469
|
-
}), of = /* @__PURE__ */
|
|
7475
|
+
}), of = /* @__PURE__ */ ke({
|
|
7470
7476
|
__name: "PresetSelect",
|
|
7471
7477
|
props: {
|
|
7472
7478
|
api: { type: Function },
|
|
@@ -7491,9 +7497,9 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7491
7497
|
showSizePicker: !0,
|
|
7492
7498
|
pageSizes: [10, 20, 30],
|
|
7493
7499
|
pageSlot: 5,
|
|
7494
|
-
prefix: (
|
|
7500
|
+
prefix: (T) => `共${T.itemCount}条数据`,
|
|
7495
7501
|
...e.pagination && typeof e.pagination == "boolean" ? {} : e.pagination
|
|
7496
|
-
}), i =
|
|
7502
|
+
}), i = j({
|
|
7497
7503
|
page: 1,
|
|
7498
7504
|
pageSize: 10,
|
|
7499
7505
|
itemCount: 0
|
|
@@ -7502,127 +7508,127 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7502
7508
|
[o.pageSize]: i.value.pageSize,
|
|
7503
7509
|
[o.search]: "",
|
|
7504
7510
|
...e.defaultParams
|
|
7505
|
-
}, { data: s, error: c, loading: f, params:
|
|
7511
|
+
}, { data: s, error: c, loading: f, params: y, run: x, runAsync: d, refresh: E, refreshAsync: A, cancel: v, mutate: p } = En(e.api, {
|
|
7506
7512
|
defaultParams: [
|
|
7507
7513
|
l
|
|
7508
7514
|
],
|
|
7509
7515
|
manual: e.manual,
|
|
7510
7516
|
...e.requestOptions,
|
|
7511
|
-
onBefore: (
|
|
7512
|
-
e.requestOptions?.onBefore?.(
|
|
7517
|
+
onBefore: (T) => {
|
|
7518
|
+
e.requestOptions?.onBefore?.(T), n("before", T);
|
|
7513
7519
|
},
|
|
7514
|
-
onSuccess: (
|
|
7515
|
-
e.requestOptions?.onSuccess?.(
|
|
7520
|
+
onSuccess: (T, V) => {
|
|
7521
|
+
e.requestOptions?.onSuccess?.(T, V), n("success", T, V), b(T, V);
|
|
7516
7522
|
},
|
|
7517
|
-
onError: (
|
|
7518
|
-
e.requestOptions?.onError?.(
|
|
7523
|
+
onError: (T, V) => {
|
|
7524
|
+
e.requestOptions?.onError?.(T, V), n("error", T, V);
|
|
7519
7525
|
},
|
|
7520
|
-
onFinally: (
|
|
7521
|
-
e.requestOptions?.onFinally?.(
|
|
7526
|
+
onFinally: (T, V, de) => {
|
|
7527
|
+
e.requestOptions?.onFinally?.(T, V, de), n("finally", T, V, de);
|
|
7522
7528
|
}
|
|
7523
|
-
}, e.requestPlugins),
|
|
7524
|
-
[o.label]:
|
|
7525
|
-
[o.value]:
|
|
7526
|
-
[o.children]:
|
|
7529
|
+
}, e.requestPlugins), k = ee(() => s.value ? Array.isArray(s.value[o.list]) ? s.value[o.list] : (console.warn(`DataTablePlus: data[${o.list}] must be an array`), []) : []), m = ee(() => typeof e.optionFormat == "function" ? k.value.map((T) => e.optionFormat(T)).filter((T) => !!T) : k.value.map((T) => ({
|
|
7530
|
+
[o.label]: T[o.label],
|
|
7531
|
+
[o.value]: T[o.value],
|
|
7532
|
+
[o.children]: T[o.children]
|
|
7527
7533
|
})));
|
|
7528
|
-
function
|
|
7529
|
-
i.value.page =
|
|
7534
|
+
function b(T, V) {
|
|
7535
|
+
i.value.page = V[0] && o.page in V[0] ? Number(V[0][o.page]) : 1, i.value.pageSize = V[0] && o.pageSize in V[0] ? Number(V[0][o.pageSize]) : 10, i.value.itemCount = o.count in T ? Number(T[o.count]) : 0;
|
|
7530
7536
|
}
|
|
7531
|
-
function h(
|
|
7537
|
+
function h(T) {
|
|
7532
7538
|
return x({
|
|
7533
|
-
...
|
|
7534
|
-
...
|
|
7539
|
+
...y.value[0],
|
|
7540
|
+
...T
|
|
7535
7541
|
});
|
|
7536
7542
|
}
|
|
7537
|
-
const C =
|
|
7543
|
+
const C = j(""), P = $r(() => {
|
|
7538
7544
|
h({
|
|
7539
7545
|
[o.page]: 1,
|
|
7540
7546
|
[o.search]: C.value
|
|
7541
7547
|
});
|
|
7542
7548
|
}, typeof e.debounce == "number" ? e.debounce : 500), D = {
|
|
7543
|
-
onBlur: (
|
|
7544
|
-
n("blur",
|
|
7549
|
+
onBlur: (T) => {
|
|
7550
|
+
n("blur", T);
|
|
7545
7551
|
},
|
|
7546
7552
|
onClear: () => {
|
|
7547
7553
|
n("clear");
|
|
7548
7554
|
},
|
|
7549
|
-
onCreate: (
|
|
7550
|
-
onFocus: (
|
|
7551
|
-
n("focus",
|
|
7555
|
+
onCreate: (T) => n("create", T),
|
|
7556
|
+
onFocus: (T) => {
|
|
7557
|
+
n("focus", T);
|
|
7552
7558
|
},
|
|
7553
|
-
onScroll: (
|
|
7554
|
-
n("scroll",
|
|
7559
|
+
onScroll: (T) => {
|
|
7560
|
+
n("scroll", T);
|
|
7555
7561
|
},
|
|
7556
|
-
onUpdateValue: (
|
|
7557
|
-
const
|
|
7558
|
-
n("update:value",
|
|
7562
|
+
onUpdateValue: (T, V) => {
|
|
7563
|
+
const de = Array.isArray(T) ? k.value.filter((K) => T.includes(K[o.value])) : k.value.find((K) => K[o.value] === T) ?? null;
|
|
7564
|
+
n("update:value", T, V, we(Be(de)));
|
|
7559
7565
|
},
|
|
7560
|
-
onSearch: (
|
|
7561
|
-
C.value =
|
|
7566
|
+
onSearch: (T) => {
|
|
7567
|
+
C.value = T, !f.value && (e.debounce ? P() : h({
|
|
7562
7568
|
[o.page]: 1,
|
|
7563
7569
|
[o.search]: C.value
|
|
7564
7570
|
}));
|
|
7565
7571
|
},
|
|
7566
|
-
onUpdateShow: (
|
|
7567
|
-
|
|
7572
|
+
onUpdateShow: (T) => {
|
|
7573
|
+
T && (s.value || e.manual && x(l));
|
|
7568
7574
|
}
|
|
7569
7575
|
}, I = {
|
|
7570
|
-
onUpdatePage: (
|
|
7571
|
-
n("update:page",
|
|
7572
|
-
[o.page]:
|
|
7576
|
+
onUpdatePage: (T) => {
|
|
7577
|
+
n("update:page", T), !f.value && h({
|
|
7578
|
+
[o.page]: T
|
|
7573
7579
|
});
|
|
7574
7580
|
},
|
|
7575
|
-
onUpdatePageSize: (
|
|
7576
|
-
n("update:pageSize",
|
|
7577
|
-
[o.pageSize]:
|
|
7581
|
+
onUpdatePageSize: (T) => {
|
|
7582
|
+
n("update:pageSize", T), !f.value && h({
|
|
7583
|
+
[o.pageSize]: T
|
|
7578
7584
|
});
|
|
7579
7585
|
}
|
|
7580
7586
|
};
|
|
7581
|
-
function
|
|
7582
|
-
return typeof e.fallbackLabel == "function" ? e.fallbackLabel(
|
|
7583
|
-
[o.label]: e.fallbackLabel ?? `${
|
|
7584
|
-
[o.value]:
|
|
7587
|
+
function L(T) {
|
|
7588
|
+
return typeof e.fallbackLabel == "function" ? e.fallbackLabel(T) : {
|
|
7589
|
+
[o.label]: e.fallbackLabel ?? `${T}`,
|
|
7590
|
+
[o.value]: T
|
|
7585
7591
|
};
|
|
7586
7592
|
}
|
|
7587
|
-
const
|
|
7593
|
+
const G = {
|
|
7588
7594
|
loading: f,
|
|
7589
7595
|
data: s,
|
|
7590
7596
|
error: c,
|
|
7591
|
-
params:
|
|
7597
|
+
params: y,
|
|
7592
7598
|
pagination: i,
|
|
7593
|
-
rawList:
|
|
7599
|
+
rawList: k,
|
|
7594
7600
|
selectRef: r
|
|
7595
|
-
},
|
|
7601
|
+
}, X = {
|
|
7596
7602
|
run: x,
|
|
7597
7603
|
runAsync: d,
|
|
7598
|
-
refresh:
|
|
7599
|
-
refreshAsync:
|
|
7600
|
-
cancel:
|
|
7604
|
+
refresh: E,
|
|
7605
|
+
refreshAsync: A,
|
|
7606
|
+
cancel: v,
|
|
7601
7607
|
mutate: p,
|
|
7602
|
-
setParams: (
|
|
7603
|
-
Object.assign(
|
|
7608
|
+
setParams: (T) => {
|
|
7609
|
+
Object.assign(y.value[0], T);
|
|
7604
7610
|
},
|
|
7605
|
-
runParams: (
|
|
7606
|
-
runParamsAsync: async (
|
|
7611
|
+
runParams: (T) => x(Object.assign(y.value[0], T)),
|
|
7612
|
+
runParamsAsync: async (T) => d(Object.assign(y.value[0], T))
|
|
7607
7613
|
};
|
|
7608
7614
|
return u({
|
|
7609
|
-
refs:
|
|
7610
|
-
actions:
|
|
7611
|
-
}), (
|
|
7615
|
+
refs: G,
|
|
7616
|
+
actions: X
|
|
7617
|
+
}), (T, V) => (R(), $(_(Mr), Y({
|
|
7612
7618
|
ref: "select-ref",
|
|
7613
7619
|
remote: "",
|
|
7614
7620
|
filterable: "",
|
|
7615
|
-
multiple:
|
|
7616
|
-
disabled:
|
|
7617
|
-
clearable:
|
|
7618
|
-
options:
|
|
7621
|
+
multiple: T.multiple,
|
|
7622
|
+
disabled: T.disabled,
|
|
7623
|
+
clearable: T.clearable,
|
|
7624
|
+
options: m.value,
|
|
7619
7625
|
"label-field": o.label,
|
|
7620
7626
|
"value-field": o.value,
|
|
7621
7627
|
"children-field": o.children,
|
|
7622
|
-
value:
|
|
7623
|
-
"fallback-option":
|
|
7628
|
+
value: T.value,
|
|
7629
|
+
"fallback-option": L,
|
|
7624
7630
|
loading: _(f)
|
|
7625
|
-
},
|
|
7631
|
+
}, T.selectProps, {
|
|
7626
7632
|
onBlur: D.onBlur,
|
|
7627
7633
|
onClear: D.onClear,
|
|
7628
7634
|
onCreate: D.onCreate,
|
|
@@ -7633,23 +7639,23 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7633
7639
|
"onUpdate:value": D.onUpdateValue
|
|
7634
7640
|
}), {
|
|
7635
7641
|
header: O(() => [
|
|
7636
|
-
B(
|
|
7637
|
-
refs:
|
|
7638
|
-
actions:
|
|
7642
|
+
B(T.$slots, "header", {
|
|
7643
|
+
refs: G,
|
|
7644
|
+
actions: X
|
|
7639
7645
|
})
|
|
7640
7646
|
]),
|
|
7641
7647
|
action: O(() => [
|
|
7642
|
-
B(
|
|
7643
|
-
refs:
|
|
7644
|
-
actions:
|
|
7648
|
+
B(T.$slots, "footer", {
|
|
7649
|
+
refs: G,
|
|
7650
|
+
actions: X
|
|
7645
7651
|
}, () => [
|
|
7646
|
-
|
|
7652
|
+
Z(_($e), null, {
|
|
7647
7653
|
default: O(() => [
|
|
7648
|
-
B(
|
|
7649
|
-
refs:
|
|
7650
|
-
actions:
|
|
7654
|
+
B(T.$slots, "footer-extra", {
|
|
7655
|
+
refs: G,
|
|
7656
|
+
actions: X
|
|
7651
7657
|
}),
|
|
7652
|
-
|
|
7658
|
+
T.pagination ? (R(), $(_(Nr), Y({
|
|
7653
7659
|
key: 0,
|
|
7654
7660
|
style: { "margin-left": "auto" },
|
|
7655
7661
|
simple: "",
|
|
@@ -7664,15 +7670,15 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7664
7670
|
])
|
|
7665
7671
|
]),
|
|
7666
7672
|
empty: O(() => [
|
|
7667
|
-
B(
|
|
7673
|
+
B(T.$slots, "empty")
|
|
7668
7674
|
]),
|
|
7669
7675
|
arrow: O(() => [
|
|
7670
|
-
B(
|
|
7676
|
+
B(T.$slots, "arrow")
|
|
7671
7677
|
]),
|
|
7672
7678
|
_: 3
|
|
7673
7679
|
}, 16, ["multiple", "disabled", "clearable", "options", "label-field", "value-field", "children-field", "value", "loading", "onBlur", "onClear", "onCreate", "onFocus", "onScroll", "onSearch", "onUpdate:show", "onUpdate:value"]));
|
|
7674
7680
|
}
|
|
7675
|
-
}), af = /* @__PURE__ */
|
|
7681
|
+
}), af = /* @__PURE__ */ ke({
|
|
7676
7682
|
__name: "RemoteRequest",
|
|
7677
7683
|
props: {
|
|
7678
7684
|
api: { type: Function },
|
|
@@ -7684,7 +7690,7 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7684
7690
|
},
|
|
7685
7691
|
emits: ["before", "success", "error", "finally"],
|
|
7686
7692
|
setup(e, { expose: u, emit: t }) {
|
|
7687
|
-
const n = t, r = { page: "page", pageSize: "pageSize", search: "search", ...e.fields }, { loading: o, data: a, error: i, params: l, run: s, runAsync: c, refresh: f, refreshAsync:
|
|
7693
|
+
const n = t, r = { page: "page", pageSize: "pageSize", search: "search", ...e.fields }, { loading: o, data: a, error: i, params: l, run: s, runAsync: c, refresh: f, refreshAsync: y, cancel: x, mutate: d } = En(e.api, {
|
|
7688
7694
|
defaultParams: [
|
|
7689
7695
|
{
|
|
7690
7696
|
[r.page]: 1,
|
|
@@ -7695,42 +7701,42 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7695
7701
|
],
|
|
7696
7702
|
manual: e.manual,
|
|
7697
7703
|
...e.requestOptions,
|
|
7698
|
-
onBefore: (
|
|
7699
|
-
e.requestOptions?.onBefore?.(
|
|
7704
|
+
onBefore: (v) => {
|
|
7705
|
+
e.requestOptions?.onBefore?.(v), n("before", v);
|
|
7700
7706
|
},
|
|
7701
|
-
onSuccess: (
|
|
7702
|
-
e.requestOptions?.onSuccess?.(
|
|
7707
|
+
onSuccess: (v, p) => {
|
|
7708
|
+
e.requestOptions?.onSuccess?.(v, p), n("success", v, p);
|
|
7703
7709
|
},
|
|
7704
|
-
onError: (
|
|
7705
|
-
e.requestOptions?.onError?.(
|
|
7710
|
+
onError: (v, p) => {
|
|
7711
|
+
e.requestOptions?.onError?.(v, p), n("error", v, p);
|
|
7706
7712
|
},
|
|
7707
|
-
onFinally: (
|
|
7708
|
-
e.requestOptions?.onFinally?.(
|
|
7713
|
+
onFinally: (v, p, k) => {
|
|
7714
|
+
e.requestOptions?.onFinally?.(v, p, k), n("finally", v, p, k);
|
|
7709
7715
|
}
|
|
7710
|
-
}, e.requestPlugins),
|
|
7716
|
+
}, e.requestPlugins), E = {
|
|
7711
7717
|
loading: o,
|
|
7712
7718
|
data: a,
|
|
7713
7719
|
error: i,
|
|
7714
7720
|
params: l
|
|
7715
|
-
},
|
|
7721
|
+
}, A = {
|
|
7716
7722
|
run: s,
|
|
7717
7723
|
runAsync: c,
|
|
7718
7724
|
refresh: f,
|
|
7719
|
-
refreshAsync:
|
|
7725
|
+
refreshAsync: y,
|
|
7720
7726
|
cancel: x,
|
|
7721
7727
|
mutate: d,
|
|
7722
|
-
setParam: (
|
|
7723
|
-
Object.assign(l.value[0],
|
|
7728
|
+
setParam: (v) => {
|
|
7729
|
+
Object.assign(l.value[0], v);
|
|
7724
7730
|
},
|
|
7725
|
-
runParam: (
|
|
7726
|
-
runParamAsync: async (
|
|
7731
|
+
runParam: (v) => s(Object.assign(l.value[0], v)),
|
|
7732
|
+
runParamAsync: async (v) => c(Object.assign(l.value[0], v))
|
|
7727
7733
|
};
|
|
7728
|
-
return u({ refs:
|
|
7729
|
-
refs:
|
|
7730
|
-
actions:
|
|
7734
|
+
return u({ refs: E, actions: A }), (v, p) => B(v.$slots, "default", {
|
|
7735
|
+
refs: E,
|
|
7736
|
+
actions: A
|
|
7731
7737
|
});
|
|
7732
7738
|
}
|
|
7733
|
-
}), lf = /* @__PURE__ */
|
|
7739
|
+
}), lf = /* @__PURE__ */ ke({
|
|
7734
7740
|
__name: "ToggleEditor",
|
|
7735
7741
|
props: /* @__PURE__ */ jo({
|
|
7736
7742
|
inputProps: {}
|
|
@@ -7740,7 +7746,7 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7740
7746
|
}),
|
|
7741
7747
|
emits: ["update:value"],
|
|
7742
7748
|
setup(e) {
|
|
7743
|
-
const u = Ho(e, "value"), t =
|
|
7749
|
+
const u = Ho(e, "value"), t = j(!1), n = mt("inputRef"), r = j(u.value);
|
|
7744
7750
|
function o() {
|
|
7745
7751
|
t.value = !0, Pr(() => {
|
|
7746
7752
|
n.value?.focus();
|
|
@@ -7749,8 +7755,8 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7749
7755
|
function a() {
|
|
7750
7756
|
t.value = !1, u.value = r.value;
|
|
7751
7757
|
}
|
|
7752
|
-
return (i, l) => (R(),
|
|
7753
|
-
t.value ? (R(), $(_(sn),
|
|
7758
|
+
return (i, l) => (R(), re("div", { onClick: o }, [
|
|
7759
|
+
t.value ? (R(), $(_(sn), Y({
|
|
7754
7760
|
key: 0,
|
|
7755
7761
|
ref_key: "inputRef",
|
|
7756
7762
|
ref: n,
|
|
@@ -7759,12 +7765,12 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7759
7765
|
"onUpdate:value": l[0] || (l[0] = (s) => r.value = s),
|
|
7760
7766
|
onChange: a,
|
|
7761
7767
|
onBlur: a
|
|
7762
|
-
}), null, 16, ["value"])) : (R(),
|
|
7768
|
+
}), null, 16, ["value"])) : (R(), re(Ce, { key: 1 }, [
|
|
7763
7769
|
vu(nu(r.value), 1)
|
|
7764
7770
|
], 64))
|
|
7765
7771
|
]));
|
|
7766
7772
|
}
|
|
7767
|
-
}), sf = /* @__PURE__ */
|
|
7773
|
+
}), sf = /* @__PURE__ */ ke({
|
|
7768
7774
|
__name: "TooltipButton",
|
|
7769
7775
|
props: {
|
|
7770
7776
|
value: {},
|
|
@@ -7776,7 +7782,7 @@ const Yc = /* @__PURE__ */ vn(Vc, [["render", Zc]]), rf = /* @__PURE__ */ me({
|
|
|
7776
7782
|
const t = u;
|
|
7777
7783
|
return (n, r) => (R(), $(_(ln), fe(We(n.tooltipProps)), {
|
|
7778
7784
|
trigger: O(() => [
|
|
7779
|
-
|
|
7785
|
+
Z(_(ru), Y(n.buttonProps, {
|
|
7780
7786
|
onClick: r[0] || (r[0] = (o) => t("click", o))
|
|
7781
7787
|
}), {
|
|
7782
7788
|
icon: O(() => [
|