@oiij/naive-ui 0.0.25 → 0.0.27
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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { inject as Sr, onBeforeMount as To, defineComponent as xe, createBlock as
|
|
2
|
-
import { NEl as cn, NAvatar as qo, NFlex as
|
|
1
|
+
import { inject as Sr, onBeforeMount as To, defineComponent as xe, createBlock as I, openBlock as R, Transition as Po, mergeProps as X, unref as v, withCtx as L, renderSlot as H, ref as G, toValue as du, isRef as Qt, isReactive as Ro, watchEffect as Le, watch as He, computed as ge, nextTick as rn, normalizeClass as Su, createElementVNode as Lu, normalizeStyle as on, createVNode as Z, createCommentVNode as ie, resolveDynamicComponent as oe, Teleport as Oo, normalizeProps as ce, guardReactiveProps as qe, createSlots as Mo, onMounted as Lo, createElementBlock as se, createTextVNode as Nu, toDisplayString as Iu, onScopeDispose as an, onUnmounted as No, reactive as Tu, toRefs as Io, h as he, createStaticVNode as zo, useTemplateRef as mt, Fragment as we, renderList as Ye, toRaw as tu, toRef as $o, mergeModels as Bo, useModel as Uo } from "vue";
|
|
2
|
+
import { NEl as cn, NAvatar as qo, NFlex as je, NSpin as Tr, cM as qn, NConfigProvider as jo, NLoadingBarProvider as Ho, NDialogProvider as Go, NModalProvider as Wo, NNotificationProvider as Vo, NMessageProvider as Zo, NGlobalStyle as Yo, useDialog as Xo, useLoadingBar as Qo, useMessage as Jo, useModal as Ko, useNotification as ei, NTooltip as Pr, NButton as mu, NFormItem as ui, NInputGroup as ti, NInput as sn, NTimePicker as ni, NSwitch as ri, NSlider as oi, NSelect as Rr, NRate as ii, NRadioGroup as ai, NInputNumber as ci, NDynamicTags as si, NDatePicker as li, NDivider as ln, NCheckboxGroup as fi, NColorPicker as di, NCheckbox as pi, NRadio as hi, NGrid as st, NGi as lt, NCollapseTransition as Or, NDataTable as bi, NPagination as Mr, NDropdown as mi, NForm as gi } from "naive-ui";
|
|
3
3
|
import { createEventHook as rt, useClipboard as xi, useTimeoutFn as ki, useDebounceFn as Lr } from "@vueuse/core";
|
|
4
4
|
function _i(e) {
|
|
5
5
|
let u = ".", t = "__", n = "--", r;
|
|
@@ -414,12 +414,12 @@ const $r = /* @__PURE__ */ xe({
|
|
|
414
414
|
transitionProps: {}
|
|
415
415
|
},
|
|
416
416
|
setup(e) {
|
|
417
|
-
return gt(Wi, Zi()), (u, t) => (R(),
|
|
417
|
+
return gt(Wi, Zi()), (u, t) => (R(), I(Po, X({
|
|
418
418
|
name: `${v(zu)}-${u.name}`,
|
|
419
419
|
appear: "",
|
|
420
420
|
mode: "out-in"
|
|
421
421
|
}, u.transitionProps), {
|
|
422
|
-
default:
|
|
422
|
+
default: L(() => [
|
|
423
423
|
H(u.$slots, "default")
|
|
424
424
|
]),
|
|
425
425
|
_: 3
|
|
@@ -470,7 +470,7 @@ function ta(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
|
Wn && Wn(e, null);
|
|
476
476
|
let n = u.length;
|
|
@@ -489,10 +489,10 @@ function na(e) {
|
|
|
489
489
|
Se(e, u) || (e[u] = null);
|
|
490
490
|
return e;
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Ue(e) {
|
|
493
493
|
const u = Ur(null);
|
|
494
494
|
for (const [t, n] of Br(e))
|
|
495
|
-
Se(e, t) && (Array.isArray(n) ? u[t] = na(n) : n && typeof n == "object" && n.constructor === Object ? u[t] =
|
|
495
|
+
Se(e, t) && (Array.isArray(n) ? u[t] = na(n) : n && typeof n == "object" && n.constructor === Object ? u[t] = Ue(n) : u[t] = n);
|
|
496
496
|
return u;
|
|
497
497
|
}
|
|
498
498
|
function Au(e, u) {
|
|
@@ -574,7 +574,7 @@ const wu = {
|
|
|
574
574
|
};
|
|
575
575
|
function Hr() {
|
|
576
576
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ha();
|
|
577
|
-
const u = (
|
|
577
|
+
const u = (N) => Hr(N);
|
|
578
578
|
if (u.version = "3.2.6", u.removed = [], !e || !e.document || e.document.nodeType !== wu.document || !e.Element)
|
|
579
579
|
return u.isSupported = !1, u;
|
|
580
580
|
let {
|
|
@@ -589,40 +589,40 @@ function Hr() {
|
|
|
589
589
|
NamedNodeMap: l = e.NamedNodeMap || e.MozNamedAttrMap,
|
|
590
590
|
HTMLFormElement: f,
|
|
591
591
|
DOMParser: _,
|
|
592
|
-
trustedTypes:
|
|
592
|
+
trustedTypes: k
|
|
593
593
|
} = e, d = c.prototype, E = Au(d, "cloneNode"), A = Au(d, "remove"), y = Au(d, "nextSibling"), h = Au(d, "childNodes"), p = Au(d, "parentNode");
|
|
594
594
|
if (typeof a == "function") {
|
|
595
|
-
const
|
|
596
|
-
|
|
595
|
+
const N = t.createElement("template");
|
|
596
|
+
N.content && N.content.ownerDocument && (t = N.content.ownerDocument);
|
|
597
597
|
}
|
|
598
598
|
let g, m = "";
|
|
599
599
|
const {
|
|
600
|
-
implementation:
|
|
600
|
+
implementation: x,
|
|
601
601
|
createNodeIterator: w,
|
|
602
602
|
createDocumentFragment: P,
|
|
603
603
|
getElementsByTagName: D
|
|
604
604
|
} = t, {
|
|
605
|
-
importNode:
|
|
605
|
+
importNode: z
|
|
606
606
|
} = n;
|
|
607
|
-
let
|
|
608
|
-
u.isSupported = typeof Br == "function" && typeof p == "function" &&
|
|
607
|
+
let $ = er();
|
|
608
|
+
u.isSupported = typeof Br == "function" && typeof p == "function" && x && x.createHTMLDocument !== void 0;
|
|
609
609
|
const {
|
|
610
|
-
MUSTACHE_EXPR:
|
|
611
|
-
ERB_EXPR:
|
|
610
|
+
MUSTACHE_EXPR: K,
|
|
611
|
+
ERB_EXPR: ue,
|
|
612
612
|
TMPLIT_EXPR: S,
|
|
613
|
-
DATA_ATTR:
|
|
613
|
+
DATA_ATTR: W,
|
|
614
614
|
ARIA_ATTR: be,
|
|
615
|
-
IS_SCRIPT_OR_DATA:
|
|
616
|
-
ATTR_WHITESPACE:
|
|
617
|
-
CUSTOM_ELEMENT:
|
|
615
|
+
IS_SCRIPT_OR_DATA: Ae,
|
|
616
|
+
ATTR_WHITESPACE: V,
|
|
617
|
+
CUSTOM_ELEMENT: Q
|
|
618
618
|
} = Kn;
|
|
619
619
|
let {
|
|
620
|
-
IS_ALLOWED_URI:
|
|
621
|
-
} = Kn,
|
|
622
|
-
const
|
|
623
|
-
let
|
|
624
|
-
const
|
|
625
|
-
let
|
|
620
|
+
IS_ALLOWED_URI: C
|
|
621
|
+
} = Kn, O = null;
|
|
622
|
+
const T = q({}, [...Yn, ...Mt, ...Lt, ...Nt, ...Xn]);
|
|
623
|
+
let j = null;
|
|
624
|
+
const U = q({}, [...Qn, ...It, ...Jn, ...Ju]);
|
|
625
|
+
let B = Object.seal(Ur(null, {
|
|
626
626
|
tagNameCheck: {
|
|
627
627
|
writable: !0,
|
|
628
628
|
configurable: !1,
|
|
@@ -641,18 +641,18 @@ function Hr() {
|
|
|
641
641
|
enumerable: !0,
|
|
642
642
|
value: !1
|
|
643
643
|
}
|
|
644
|
-
})), te = null,
|
|
644
|
+
})), te = null, le = null, Pe = !0, nu = !0, ru = !1, Ke = !0, Ge = !1, We = !0, eu = !1, At = !1, wt = !1, ou = !1, qu = !1, ju = !1, An = !0, wn = !1;
|
|
645
645
|
const yo = "user-content-";
|
|
646
646
|
let Ct = !0, xu = !1, iu = {}, au = 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 =
|
|
652
|
-
let cu =
|
|
653
|
-
const Eo =
|
|
654
|
-
let Wu =
|
|
655
|
-
const Ao =
|
|
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", ze = "http://www.w3.org/1999/xhtml";
|
|
652
|
+
let cu = ze, Ft = !1, St = null;
|
|
653
|
+
const Eo = q({}, [Hu, Gu, ze], Ot);
|
|
654
|
+
let Wu = q({}, ["mi", "mo", "mn", "ms", "mtext"]), Vu = q({}, ["annotation-xml"]);
|
|
655
|
+
const Ao = q({}, ["title", "style", "font", "a", "script"]);
|
|
656
656
|
let ku = null;
|
|
657
657
|
const wo = ["application/xhtml+xml", "text/html"], Co = "text/html";
|
|
658
658
|
let ne = null, su = null;
|
|
@@ -661,26 +661,26 @@ function Hr() {
|
|
|
661
661
|
}, Tt = function() {
|
|
662
662
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
663
663
|
if (!(su && su === b)) {
|
|
664
|
-
if ((!b || typeof b != "object") && (b = {}), b =
|
|
665
|
-
wo.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Co : b.PARSER_MEDIA_TYPE, ne = ku === "application/xhtml+xml" ? Ot : ot,
|
|
664
|
+
if ((!b || typeof b != "object") && (b = {}), b = Ue(b), ku = // eslint-disable-next-line unicorn/prefer-includes
|
|
665
|
+
wo.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Co : b.PARSER_MEDIA_TYPE, ne = ku === "application/xhtml+xml" ? Ot : ot, O = Se(b, "ALLOWED_TAGS") ? q({}, b.ALLOWED_TAGS, ne) : T, j = Se(b, "ALLOWED_ATTR") ? q({}, b.ALLOWED_ATTR, ne) : U, St = Se(b, "ALLOWED_NAMESPACES") ? q({}, b.ALLOWED_NAMESPACES, Ot) : Eo, Dt = Se(b, "ADD_URI_SAFE_ATTR") ? q(Ue(Sn), b.ADD_URI_SAFE_ATTR, ne) : Sn, Dn = Se(b, "ADD_DATA_URI_TAGS") ? q(Ue(Fn), b.ADD_DATA_URI_TAGS, ne) : Fn, au = Se(b, "FORBID_CONTENTS") ? q({}, b.FORBID_CONTENTS, ne) : Cn, te = Se(b, "FORBID_TAGS") ? q({}, b.FORBID_TAGS, ne) : Ue({}), le = Se(b, "FORBID_ATTR") ? q({}, b.FORBID_ATTR, ne) : Ue({}), iu = Se(b, "USE_PROFILES") ? b.USE_PROFILES : !1, Pe = b.ALLOW_ARIA_ATTR !== !1, nu = b.ALLOW_DATA_ATTR !== !1, ru = b.ALLOW_UNKNOWN_PROTOCOLS || !1, Ke = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ge = b.SAFE_FOR_TEMPLATES || !1, We = b.SAFE_FOR_XML !== !1, eu = b.WHOLE_DOCUMENT || !1, ou = b.RETURN_DOM || !1, qu = b.RETURN_DOM_FRAGMENT || !1, ju = b.RETURN_TRUSTED_TYPE || !1, wt = b.FORCE_BODY || !1, An = b.SANITIZE_DOM !== !1, wn = b.SANITIZE_NAMED_PROPS || !1, Ct = b.KEEP_CONTENT !== !1, xu = b.IN_PLACE || !1, C = b.ALLOWED_URI_REGEXP || qr, cu = b.NAMESPACE || ze, Wu = b.MATHML_TEXT_INTEGRATION_POINTS || Wu, Vu = b.HTML_INTEGRATION_POINTS || Vu, B = b.CUSTOM_ELEMENT_HANDLING || {}, b.CUSTOM_ELEMENT_HANDLING && Tn(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (B.tagNameCheck = b.CUSTOM_ELEMENT_HANDLING.tagNameCheck), b.CUSTOM_ELEMENT_HANDLING && Tn(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (B.attributeNameCheck = b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), b.CUSTOM_ELEMENT_HANDLING && typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (B.allowCustomizedBuiltInElements = b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ge && (nu = !1), qu && (ou = !0), iu && (O = q({}, Xn), j = [], iu.html === !0 && (q(O, Yn), q(j, Qn)), iu.svg === !0 && (q(O, Mt), q(j, It), q(j, Ju)), iu.svgFilters === !0 && (q(O, Lt), q(j, It), q(j, Ju)), iu.mathMl === !0 && (q(O, Nt), q(j, Jn), q(j, Ju))), b.ADD_TAGS && (O === T && (O = Ue(O)), q(O, b.ADD_TAGS, ne)), b.ADD_ATTR && (j === U && (j = Ue(j)), q(j, b.ADD_ATTR, ne)), b.ADD_URI_SAFE_ATTR && q(Dt, b.ADD_URI_SAFE_ATTR, ne), b.FORBID_CONTENTS && (au === Cn && (au = Ue(au)), q(au, b.FORBID_CONTENTS, ne)), Ct && (O["#text"] = !0), eu && q(O, ["html", "head", "body"]), O.table && (q(O, ["tbody"]), delete te.tbody), b.TRUSTED_TYPES_POLICY) {
|
|
666
666
|
if (typeof b.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
667
667
|
throw Eu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
668
668
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
669
669
|
throw Eu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
670
670
|
g = b.TRUSTED_TYPES_POLICY, m = g.createHTML("");
|
|
671
671
|
} else
|
|
672
|
-
g === void 0 && (g = ba(
|
|
672
|
+
g === void 0 && (g = ba(k, r)), g !== null && typeof m == "string" && (m = g.createHTML(""));
|
|
673
673
|
ke && ke(b), su = b;
|
|
674
674
|
}
|
|
675
|
-
}, Pn =
|
|
675
|
+
}, Pn = q({}, [...Mt, ...Lt, ...ra]), Rn = q({}, [...Nt, ...oa]), Fo = function(b) {
|
|
676
676
|
let F = p(b);
|
|
677
677
|
(!F || !F.tagName) && (F = {
|
|
678
678
|
namespaceURI: cu,
|
|
679
679
|
tagName: "template"
|
|
680
680
|
});
|
|
681
|
-
const
|
|
682
|
-
return St[b.namespaceURI] ? b.namespaceURI === Gu ? F.namespaceURI ===
|
|
683
|
-
},
|
|
681
|
+
const M = ot(b.tagName), J = ot(F.tagName);
|
|
682
|
+
return St[b.namespaceURI] ? b.namespaceURI === Gu ? F.namespaceURI === ze ? M === "svg" : F.namespaceURI === Hu ? M === "svg" && (J === "annotation-xml" || Wu[J]) : !!Pn[M] : b.namespaceURI === Hu ? F.namespaceURI === ze ? M === "math" : F.namespaceURI === Gu ? M === "math" && Vu[J] : !!Rn[M] : b.namespaceURI === ze ? F.namespaceURI === Gu && !Vu[J] || F.namespaceURI === Hu && !Wu[J] ? !1 : !Rn[M] && (Ao[M] || !Pn[M]) : !!(ku === "application/xhtml+xml" && St[b.namespaceURI]) : !1;
|
|
683
|
+
}, Re = function(b) {
|
|
684
684
|
vu(u.removed, {
|
|
685
685
|
element: b
|
|
686
686
|
});
|
|
@@ -704,7 +704,7 @@ function Hr() {
|
|
|
704
704
|
if (F.removeAttribute(b), b === "is")
|
|
705
705
|
if (ou || qu)
|
|
706
706
|
try {
|
|
707
|
-
|
|
707
|
+
Re(F);
|
|
708
708
|
} catch {
|
|
709
709
|
}
|
|
710
710
|
else
|
|
@@ -713,29 +713,29 @@ function Hr() {
|
|
|
713
713
|
} catch {
|
|
714
714
|
}
|
|
715
715
|
}, On = function(b) {
|
|
716
|
-
let F = null,
|
|
716
|
+
let F = null, M = null;
|
|
717
717
|
if (wt)
|
|
718
718
|
b = "<remove></remove>" + b;
|
|
719
719
|
else {
|
|
720
|
-
const
|
|
721
|
-
|
|
720
|
+
const ee = Zn(b, /^[\r\n\t ]+/);
|
|
721
|
+
M = ee && ee[0];
|
|
722
722
|
}
|
|
723
|
-
ku === "application/xhtml+xml" && cu ===
|
|
724
|
-
const
|
|
725
|
-
if (cu ===
|
|
723
|
+
ku === "application/xhtml+xml" && cu === ze && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
|
|
724
|
+
const J = g ? g.createHTML(b) : b;
|
|
725
|
+
if (cu === ze)
|
|
726
726
|
try {
|
|
727
|
-
F = new _().parseFromString(
|
|
727
|
+
F = new _().parseFromString(J, ku);
|
|
728
728
|
} catch {
|
|
729
729
|
}
|
|
730
730
|
if (!F || !F.documentElement) {
|
|
731
|
-
F =
|
|
731
|
+
F = x.createDocument(cu, "template", null);
|
|
732
732
|
try {
|
|
733
|
-
F.documentElement.innerHTML = Ft ? m :
|
|
733
|
+
F.documentElement.innerHTML = Ft ? m : J;
|
|
734
734
|
} catch {
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
const fe = F.body || F.documentElement;
|
|
738
|
-
return b &&
|
|
738
|
+
return b && M && fe.insertBefore(t.createTextNode(M), fe.childNodes[0] || null), cu === ze ? D.call(F, eu ? "html" : "body")[0] : eu ? F.documentElement : fe;
|
|
739
739
|
}, Mn = function(b) {
|
|
740
740
|
return w.call(
|
|
741
741
|
b.ownerDocument || b,
|
|
@@ -749,60 +749,60 @@ function Hr() {
|
|
|
749
749
|
}, Ln = function(b) {
|
|
750
750
|
return typeof i == "function" && b instanceof i;
|
|
751
751
|
};
|
|
752
|
-
function
|
|
753
|
-
Qu(
|
|
754
|
-
|
|
752
|
+
function $e(N, b, F) {
|
|
753
|
+
Qu(N, (M) => {
|
|
754
|
+
M.call(u, b, F, su);
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
const Nn = function(b) {
|
|
758
758
|
let F = null;
|
|
759
|
-
if (
|
|
760
|
-
return
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
763
|
-
tagName:
|
|
764
|
-
allowedTags:
|
|
765
|
-
}),
|
|
766
|
-
return
|
|
767
|
-
if (!
|
|
768
|
-
if (!te[
|
|
759
|
+
if ($e($.beforeSanitizeElements, b, null), Pt(b))
|
|
760
|
+
return Re(b), !0;
|
|
761
|
+
const M = ne(b.nodeName);
|
|
762
|
+
if ($e($.uponSanitizeElement, b, {
|
|
763
|
+
tagName: M,
|
|
764
|
+
allowedTags: O
|
|
765
|
+
}), We && b.hasChildNodes() && !Ln(b.firstElementChild) && me(/<[/\w!]/g, b.innerHTML) && me(/<[/\w!]/g, b.textContent) || b.nodeType === wu.progressingInstruction || We && b.nodeType === wu.comment && me(/<[/\w]/g, b.data))
|
|
766
|
+
return Re(b), !0;
|
|
767
|
+
if (!O[M] || te[M]) {
|
|
768
|
+
if (!te[M] && zn(M) && (B.tagNameCheck instanceof RegExp && me(B.tagNameCheck, M) || B.tagNameCheck instanceof Function && B.tagNameCheck(M)))
|
|
769
769
|
return !1;
|
|
770
|
-
if (Ct && !au[
|
|
771
|
-
const
|
|
772
|
-
if (fe &&
|
|
773
|
-
const
|
|
774
|
-
for (let ve =
|
|
775
|
-
const
|
|
776
|
-
|
|
770
|
+
if (Ct && !au[M]) {
|
|
771
|
+
const J = p(b) || b.parentNode, fe = h(b) || b.childNodes;
|
|
772
|
+
if (fe && J) {
|
|
773
|
+
const ee = fe.length;
|
|
774
|
+
for (let ve = ee - 1; ve >= 0; --ve) {
|
|
775
|
+
const Be = E(fe[ve], !0);
|
|
776
|
+
Be.__removalCount = (b.__removalCount || 0) + 1, J.insertBefore(Be, y(b));
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
return
|
|
780
|
+
return Re(b), !0;
|
|
781
781
|
}
|
|
782
|
-
return b instanceof c && !Fo(b) || (
|
|
783
|
-
F = yu(F,
|
|
782
|
+
return b instanceof c && !Fo(b) || (M === "noscript" || M === "noembed" || M === "noframes") && me(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Re(b), !0) : (Ge && b.nodeType === wu.text && (F = b.textContent, Qu([K, ue, S], (J) => {
|
|
783
|
+
F = yu(F, J, " ");
|
|
784
784
|
}), b.textContent !== F && (vu(u.removed, {
|
|
785
785
|
element: b.cloneNode()
|
|
786
|
-
}), b.textContent = F)),
|
|
787
|
-
}, In = function(b, F,
|
|
788
|
-
if (An && (F === "id" || F === "name") && (
|
|
786
|
+
}), b.textContent = F)), $e($.afterSanitizeElements, b, null), !1);
|
|
787
|
+
}, In = function(b, F, M) {
|
|
788
|
+
if (An && (F === "id" || F === "name") && (M in t || M in Do))
|
|
789
789
|
return !1;
|
|
790
|
-
if (!(nu && !
|
|
791
|
-
if (!(
|
|
792
|
-
if (
|
|
790
|
+
if (!(nu && !le[F] && me(W, F))) {
|
|
791
|
+
if (!(Pe && me(be, F))) {
|
|
792
|
+
if (!j[F] || le[F]) {
|
|
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
|
-
!(zn(b) && (
|
|
797
|
+
!(zn(b) && (B.tagNameCheck instanceof RegExp && me(B.tagNameCheck, b) || B.tagNameCheck instanceof Function && B.tagNameCheck(b)) && (B.attributeNameCheck instanceof RegExp && me(B.attributeNameCheck, F) || B.attributeNameCheck instanceof Function && B.attributeNameCheck(F)) || // 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
|
-
F === "is" &&
|
|
799
|
+
F === "is" && B.allowCustomizedBuiltInElements && (B.tagNameCheck instanceof RegExp && me(B.tagNameCheck, M) || B.tagNameCheck instanceof Function && B.tagNameCheck(M)))
|
|
800
800
|
) return !1;
|
|
801
801
|
} else if (!Dt[F]) {
|
|
802
|
-
if (!me(
|
|
803
|
-
if (!((F === "src" || F === "xlink:href" || F === "href") && b !== "script" && ea(
|
|
804
|
-
if (!(ru && !me(
|
|
805
|
-
if (
|
|
802
|
+
if (!me(C, yu(M, V, ""))) {
|
|
803
|
+
if (!((F === "src" || F === "xlink:href" || F === "href") && b !== "script" && ea(M, "data:") === 0 && Dn[b])) {
|
|
804
|
+
if (!(ru && !me(Ae, yu(M, V, "")))) {
|
|
805
|
+
if (M)
|
|
806
806
|
return !1;
|
|
807
807
|
}
|
|
808
808
|
}
|
|
@@ -812,53 +812,53 @@ function Hr() {
|
|
|
812
812
|
}
|
|
813
813
|
return !0;
|
|
814
814
|
}, zn = function(b) {
|
|
815
|
-
return b !== "annotation-xml" && Zn(b,
|
|
815
|
+
return b !== "annotation-xml" && Zn(b, Q);
|
|
816
816
|
}, $n = function(b) {
|
|
817
|
-
|
|
817
|
+
$e($.beforeSanitizeAttributes, b, null);
|
|
818
818
|
const {
|
|
819
819
|
attributes: F
|
|
820
820
|
} = b;
|
|
821
821
|
if (!F || Pt(b))
|
|
822
822
|
return;
|
|
823
|
-
const
|
|
823
|
+
const M = {
|
|
824
824
|
attrName: "",
|
|
825
825
|
attrValue: "",
|
|
826
826
|
keepAttr: !0,
|
|
827
|
-
allowedAttributes:
|
|
827
|
+
allowedAttributes: j,
|
|
828
828
|
forceKeepAttr: void 0
|
|
829
829
|
};
|
|
830
|
-
let
|
|
831
|
-
for (;
|
|
832
|
-
const fe = F[
|
|
833
|
-
name:
|
|
830
|
+
let J = F.length;
|
|
831
|
+
for (; J--; ) {
|
|
832
|
+
const fe = F[J], {
|
|
833
|
+
name: ee,
|
|
834
834
|
namespaceURI: ve,
|
|
835
|
-
value:
|
|
836
|
-
} = fe, _u = ne(
|
|
837
|
-
let de =
|
|
838
|
-
if (
|
|
839
|
-
lu(
|
|
835
|
+
value: Be
|
|
836
|
+
} = fe, _u = ne(ee), Rt = Be;
|
|
837
|
+
let de = ee === "value" ? Rt : ua(Rt);
|
|
838
|
+
if (M.attrName = _u, M.attrValue = de, M.keepAttr = !0, M.forceKeepAttr = void 0, $e($.uponSanitizeAttribute, b, M), de = M.attrValue, wn && (_u === "id" || _u === "name") && (lu(ee, b), de = yo + de), We && me(/((--!?|])>)|<\/(style|title)/i, de)) {
|
|
839
|
+
lu(ee, b);
|
|
840
840
|
continue;
|
|
841
841
|
}
|
|
842
|
-
if (
|
|
842
|
+
if (M.forceKeepAttr)
|
|
843
843
|
continue;
|
|
844
|
-
if (!
|
|
845
|
-
lu(
|
|
844
|
+
if (!M.keepAttr) {
|
|
845
|
+
lu(ee, b);
|
|
846
846
|
continue;
|
|
847
847
|
}
|
|
848
848
|
if (!Ke && me(/\/>/i, de)) {
|
|
849
|
-
lu(
|
|
849
|
+
lu(ee, b);
|
|
850
850
|
continue;
|
|
851
851
|
}
|
|
852
|
-
|
|
852
|
+
Ge && Qu([K, ue, S], (Un) => {
|
|
853
853
|
de = yu(de, Un, " ");
|
|
854
854
|
});
|
|
855
855
|
const Bn = ne(b.nodeName);
|
|
856
856
|
if (!In(Bn, _u, de)) {
|
|
857
|
-
lu(
|
|
857
|
+
lu(ee, b);
|
|
858
858
|
continue;
|
|
859
859
|
}
|
|
860
|
-
if (g && typeof
|
|
861
|
-
switch (
|
|
860
|
+
if (g && typeof k == "object" && typeof k.getAttributeType == "function" && !ve)
|
|
861
|
+
switch (k.getAttributeType(Bn, _u)) {
|
|
862
862
|
case "TrustedHTML": {
|
|
863
863
|
de = g.createHTML(de);
|
|
864
864
|
break;
|
|
@@ -870,84 +870,84 @@ function Hr() {
|
|
|
870
870
|
}
|
|
871
871
|
if (de !== Rt)
|
|
872
872
|
try {
|
|
873
|
-
ve ? b.setAttributeNS(ve,
|
|
873
|
+
ve ? b.setAttributeNS(ve, ee, de) : b.setAttribute(ee, de), Pt(b) ? Re(b) : Vn(u.removed);
|
|
874
874
|
} catch {
|
|
875
|
-
lu(
|
|
875
|
+
lu(ee, b);
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
|
|
879
|
-
}, So = function
|
|
878
|
+
$e($.afterSanitizeAttributes, b, null);
|
|
879
|
+
}, So = function N(b) {
|
|
880
880
|
let F = null;
|
|
881
|
-
const
|
|
882
|
-
for (
|
|
883
|
-
|
|
884
|
-
|
|
881
|
+
const M = Mn(b);
|
|
882
|
+
for ($e($.beforeSanitizeShadowDOM, b, null); F = M.nextNode(); )
|
|
883
|
+
$e($.uponSanitizeShadowNode, F, null), Nn(F), $n(F), F.content instanceof o && N(F.content);
|
|
884
|
+
$e($.afterSanitizeShadowDOM, b, null);
|
|
885
885
|
};
|
|
886
|
-
return u.sanitize = function(
|
|
887
|
-
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, F = null,
|
|
888
|
-
if (Ft = !
|
|
889
|
-
if (typeof
|
|
890
|
-
if (
|
|
886
|
+
return u.sanitize = function(N) {
|
|
887
|
+
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, F = null, M = null, J = null, fe = null;
|
|
888
|
+
if (Ft = !N, Ft && (N = "<!-->"), typeof N != "string" && !Ln(N))
|
|
889
|
+
if (typeof N.toString == "function") {
|
|
890
|
+
if (N = N.toString(), typeof N != "string")
|
|
891
891
|
throw Eu("dirty is not a string, aborting");
|
|
892
892
|
} else
|
|
893
893
|
throw Eu("toString is not a function");
|
|
894
894
|
if (!u.isSupported)
|
|
895
|
-
return
|
|
896
|
-
if (At || Tt(b), u.removed = [], typeof
|
|
897
|
-
if (
|
|
898
|
-
const
|
|
899
|
-
if (!
|
|
895
|
+
return N;
|
|
896
|
+
if (At || Tt(b), u.removed = [], typeof N == "string" && (xu = !1), xu) {
|
|
897
|
+
if (N.nodeName) {
|
|
898
|
+
const Be = ne(N.nodeName);
|
|
899
|
+
if (!O[Be] || te[Be])
|
|
900
900
|
throw Eu("root node is forbidden and cannot be sanitized in-place");
|
|
901
901
|
}
|
|
902
|
-
} else if (
|
|
903
|
-
F = On("<!---->"),
|
|
902
|
+
} else if (N instanceof i)
|
|
903
|
+
F = On("<!---->"), M = F.ownerDocument.importNode(N, !0), M.nodeType === wu.element && M.nodeName === "BODY" || M.nodeName === "HTML" ? F = M : F.appendChild(M);
|
|
904
904
|
else {
|
|
905
|
-
if (!ou && !
|
|
906
|
-
|
|
907
|
-
return g && ju ? g.createHTML(
|
|
908
|
-
if (F = On(
|
|
905
|
+
if (!ou && !Ge && !eu && // eslint-disable-next-line unicorn/prefer-includes
|
|
906
|
+
N.indexOf("<") === -1)
|
|
907
|
+
return g && ju ? g.createHTML(N) : N;
|
|
908
|
+
if (F = On(N), !F)
|
|
909
909
|
return ou ? null : ju ? m : "";
|
|
910
910
|
}
|
|
911
|
-
F && wt &&
|
|
912
|
-
const
|
|
913
|
-
for (;
|
|
914
|
-
Nn(
|
|
911
|
+
F && wt && Re(F.firstChild);
|
|
912
|
+
const ee = Mn(xu ? N : F);
|
|
913
|
+
for (; J = ee.nextNode(); )
|
|
914
|
+
Nn(J), $n(J), J.content instanceof o && So(J.content);
|
|
915
915
|
if (xu)
|
|
916
|
-
return
|
|
916
|
+
return N;
|
|
917
917
|
if (ou) {
|
|
918
918
|
if (qu)
|
|
919
919
|
for (fe = P.call(F.ownerDocument); F.firstChild; )
|
|
920
920
|
fe.appendChild(F.firstChild);
|
|
921
921
|
else
|
|
922
922
|
fe = F;
|
|
923
|
-
return (
|
|
923
|
+
return (j.shadowroot || j.shadowrootmode) && (fe = z.call(n, fe, !0)), fe;
|
|
924
924
|
}
|
|
925
925
|
let ve = eu ? F.outerHTML : F.innerHTML;
|
|
926
|
-
return eu &&
|
|
927
|
-
` + ve),
|
|
928
|
-
ve = yu(ve,
|
|
926
|
+
return eu && O["!doctype"] && F.ownerDocument && F.ownerDocument.doctype && F.ownerDocument.doctype.name && me(jr, F.ownerDocument.doctype.name) && (ve = "<!DOCTYPE " + F.ownerDocument.doctype.name + `>
|
|
927
|
+
` + ve), Ge && Qu([K, ue, S], (Be) => {
|
|
928
|
+
ve = yu(ve, Be, " ");
|
|
929
929
|
}), g && ju ? g.createHTML(ve) : ve;
|
|
930
930
|
}, u.setConfig = function() {
|
|
931
|
-
let
|
|
932
|
-
Tt(
|
|
931
|
+
let N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
932
|
+
Tt(N), At = !0;
|
|
933
933
|
}, u.clearConfig = function() {
|
|
934
934
|
su = null, At = !1;
|
|
935
|
-
}, u.isValidAttribute = function(
|
|
935
|
+
}, u.isValidAttribute = function(N, b, F) {
|
|
936
936
|
su || Tt({});
|
|
937
|
-
const
|
|
938
|
-
return In(
|
|
939
|
-
}, u.addHook = function(
|
|
940
|
-
typeof b == "function" && vu(
|
|
941
|
-
}, u.removeHook = function(
|
|
937
|
+
const M = ne(N), J = ne(b);
|
|
938
|
+
return In(M, J, F);
|
|
939
|
+
}, u.addHook = function(N, b) {
|
|
940
|
+
typeof b == "function" && vu($[N], b);
|
|
941
|
+
}, u.removeHook = function(N, b) {
|
|
942
942
|
if (b !== void 0) {
|
|
943
|
-
const F = Ji(
|
|
944
|
-
return F === -1 ? void 0 : Ki(
|
|
943
|
+
const F = Ji($[N], b);
|
|
944
|
+
return F === -1 ? void 0 : Ki($[N], F, 1)[0];
|
|
945
945
|
}
|
|
946
|
-
return Vn(
|
|
947
|
-
}, u.removeHooks = function(
|
|
948
|
-
|
|
946
|
+
return Vn($[N]);
|
|
947
|
+
}, u.removeHooks = function(N) {
|
|
948
|
+
$[N] = [];
|
|
949
949
|
}, u.removeAllHooks = function() {
|
|
950
|
-
|
|
950
|
+
$ = er();
|
|
951
951
|
}, u;
|
|
952
952
|
}
|
|
953
953
|
var ma = Hr();
|
|
@@ -1101,8 +1101,8 @@ ft.prototype.parse = function(e, u) {
|
|
|
1101
1101
|
s === -1 && (s = o.length), o[s - 1] === ":" && s--;
|
|
1102
1102
|
const _ = o.slice(0, s);
|
|
1103
1103
|
o = o.slice(s), this.parseHost(_), this.hostname = this.hostname || "";
|
|
1104
|
-
const
|
|
1105
|
-
if (!
|
|
1104
|
+
const k = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
1105
|
+
if (!k) {
|
|
1106
1106
|
const d = this.hostname.split(/\./);
|
|
1107
1107
|
for (let E = 0, A = d.length; E < A; E++) {
|
|
1108
1108
|
const y = d[E];
|
|
@@ -1118,7 +1118,7 @@ ft.prototype.parse = function(e, u) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
|
-
this.hostname.length > wa && (this.hostname = ""),
|
|
1121
|
+
this.hostname.length > wa && (this.hostname = ""), k && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
1122
1122
|
}
|
|
1123
1123
|
const i = o.indexOf("#");
|
|
1124
1124
|
i !== -1 && (this.hash = o.substr(i), o = o.slice(0, i));
|
|
@@ -1524,7 +1524,7 @@ const e0 = /[.?*+^$[\]\\(){}|-]/g;
|
|
|
1524
1524
|
function u0(e) {
|
|
1525
1525
|
return e.replace(e0, "\\$&");
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Y(e) {
|
|
1528
1528
|
switch (e) {
|
|
1529
1529
|
case 9:
|
|
1530
1530
|
case 32:
|
|
@@ -1611,7 +1611,7 @@ const t0 = { mdurl: Da, ucmicro: Sa }, n0 = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1611
1611
|
has: Ha,
|
|
1612
1612
|
isMdAsciiPunct: Ou,
|
|
1613
1613
|
isPunctChar: Ru,
|
|
1614
|
-
isSpace:
|
|
1614
|
+
isSpace: Y,
|
|
1615
1615
|
isString: bn,
|
|
1616
1616
|
isValidEntityCode: mn,
|
|
1617
1617
|
isWhiteSpace: Pu,
|
|
@@ -1716,17 +1716,17 @@ const a0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1716
1716
|
parseLinkDestination: o0,
|
|
1717
1717
|
parseLinkLabel: r0,
|
|
1718
1718
|
parseLinkTitle: i0
|
|
1719
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1720
|
-
|
|
1719
|
+
}, Symbol.toStringTag, { value: "Module" })), Ne = {};
|
|
1720
|
+
Ne.code_inline = function(e, u, t, n, r) {
|
|
1721
1721
|
const o = e[u];
|
|
1722
1722
|
return "<code" + r.renderAttrs(o) + ">" + Je(o.content) + "</code>";
|
|
1723
1723
|
};
|
|
1724
|
-
|
|
1724
|
+
Ne.code_block = function(e, u, t, n, r) {
|
|
1725
1725
|
const o = e[u];
|
|
1726
1726
|
return "<pre" + r.renderAttrs(o) + "><code>" + Je(e[u].content) + `</code></pre>
|
|
1727
1727
|
`;
|
|
1728
1728
|
};
|
|
1729
|
-
|
|
1729
|
+
Ne.fence = function(e, u, t, n, r) {
|
|
1730
1730
|
const o = e[u], a = o.info ? bu(o.info).trim() : "";
|
|
1731
1731
|
let i = "", c = "";
|
|
1732
1732
|
if (a) {
|
|
@@ -1749,32 +1749,32 @@ Le.fence = function(e, u, t, n, r) {
|
|
|
1749
1749
|
return `<pre><code${r.renderAttrs(o)}>${s}</code></pre>
|
|
1750
1750
|
`;
|
|
1751
1751
|
};
|
|
1752
|
-
|
|
1752
|
+
Ne.image = function(e, u, t, n, r) {
|
|
1753
1753
|
const o = e[u];
|
|
1754
1754
|
return o.attrs[o.attrIndex("alt")][1] = r.renderInlineAsText(o.children, t, n), r.renderToken(e, u, t);
|
|
1755
1755
|
};
|
|
1756
|
-
|
|
1756
|
+
Ne.hardbreak = function(e, u, t) {
|
|
1757
1757
|
return t.xhtmlOut ? `<br />
|
|
1758
1758
|
` : `<br>
|
|
1759
1759
|
`;
|
|
1760
1760
|
};
|
|
1761
|
-
|
|
1761
|
+
Ne.softbreak = function(e, u, t) {
|
|
1762
1762
|
return t.breaks ? t.xhtmlOut ? `<br />
|
|
1763
1763
|
` : `<br>
|
|
1764
1764
|
` : `
|
|
1765
1765
|
`;
|
|
1766
1766
|
};
|
|
1767
|
-
|
|
1767
|
+
Ne.text = function(e, u) {
|
|
1768
1768
|
return Je(e[u].content);
|
|
1769
1769
|
};
|
|
1770
|
-
|
|
1770
|
+
Ne.html_block = function(e, u) {
|
|
1771
1771
|
return e[u].content;
|
|
1772
1772
|
};
|
|
1773
|
-
|
|
1773
|
+
Ne.html_inline = function(e, u) {
|
|
1774
1774
|
return e[u].content;
|
|
1775
1775
|
};
|
|
1776
1776
|
function gu() {
|
|
1777
|
-
this.rules = _t({},
|
|
1777
|
+
this.rules = _t({}, Ne);
|
|
1778
1778
|
}
|
|
1779
1779
|
gu.prototype.renderAttrs = function(u) {
|
|
1780
1780
|
let t, n, r;
|
|
@@ -2006,13 +2006,13 @@ function b0(e) {
|
|
|
2006
2006
|
const l = [];
|
|
2007
2007
|
let f = i.level, _ = 0;
|
|
2008
2008
|
s.length > 0 && s[0].index === 0 && a > 0 && r[a - 1].type === "text_special" && (s = s.slice(1));
|
|
2009
|
-
for (let
|
|
2010
|
-
const d = s[
|
|
2009
|
+
for (let k = 0; k < s.length; k++) {
|
|
2010
|
+
const d = s[k].url, E = e.md.normalizeLink(d);
|
|
2011
2011
|
if (!e.md.validateLink(E))
|
|
2012
2012
|
continue;
|
|
2013
|
-
let A = s[
|
|
2014
|
-
s[
|
|
2015
|
-
const y = s[
|
|
2013
|
+
let A = s[k].text;
|
|
2014
|
+
s[k].schema ? s[k].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 y = s[k].index;
|
|
2016
2016
|
if (y > _) {
|
|
2017
2017
|
const m = new e.Token("text", "", 0);
|
|
2018
2018
|
m.content = c.slice(_, y), m.level = f, l.push(m);
|
|
@@ -2022,11 +2022,11 @@ function b0(e) {
|
|
|
2022
2022
|
const p = new e.Token("text", "", 0);
|
|
2023
2023
|
p.content = A, p.level = f, l.push(p);
|
|
2024
2024
|
const g = new e.Token("link_close", "a", -1);
|
|
2025
|
-
g.level = --f, g.markup = "linkify", g.info = "auto", l.push(g), _ = s[
|
|
2025
|
+
g.level = --f, g.markup = "linkify", g.info = "auto", l.push(g), _ = s[k].lastIndex;
|
|
2026
2026
|
}
|
|
2027
2027
|
if (_ < c.length) {
|
|
2028
|
-
const
|
|
2029
|
-
|
|
2028
|
+
const k = new e.Token("text", "", 0);
|
|
2029
|
+
k.content = c.slice(_), k.level = f, l.push(k);
|
|
2030
2030
|
}
|
|
2031
2031
|
u[t].children = r = Qr(r, a, l);
|
|
2032
2032
|
}
|
|
@@ -2083,7 +2083,7 @@ function A0(e, u) {
|
|
|
2083
2083
|
break;
|
|
2084
2084
|
let f = !0, _ = !0;
|
|
2085
2085
|
c = l.index + 1;
|
|
2086
|
-
const
|
|
2086
|
+
const k = l[0] === "'";
|
|
2087
2087
|
let d = 32;
|
|
2088
2088
|
if (l.index - 1 >= 0)
|
|
2089
2089
|
d = i.charCodeAt(l.index - 1);
|
|
@@ -2104,7 +2104,7 @@ function A0(e, u) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
const A = Ou(d) || Ru(String.fromCharCode(d)), y = Ou(E) || Ru(String.fromCharCode(E)), h = Pu(d), p = Pu(E);
|
|
2106
2106
|
if (p ? f = !1 : y && (h || A || (f = !1)), h ? _ = !1 : A && (p || y || (_ = !1)), E === 34 && l[0] === '"' && d >= 48 && d <= 57 && (_ = f = !1), f && _ && (f = A, _ = y), !f && !_) {
|
|
2107
|
-
|
|
2107
|
+
k && (o.content = Ku(o.content, l.index, sr));
|
|
2108
2108
|
continue;
|
|
2109
2109
|
}
|
|
2110
2110
|
if (_)
|
|
@@ -2112,23 +2112,23 @@ function A0(e, u) {
|
|
|
2112
2112
|
let g = n[t];
|
|
2113
2113
|
if (n[t].level < a)
|
|
2114
2114
|
break;
|
|
2115
|
-
if (g.single ===
|
|
2115
|
+
if (g.single === k && n[t].level === a) {
|
|
2116
2116
|
g = n[t];
|
|
2117
|
-
let m,
|
|
2118
|
-
|
|
2117
|
+
let m, x;
|
|
2118
|
+
k ? (m = u.md.options.quotes[2], x = u.md.options.quotes[3]) : (m = u.md.options.quotes[0], x = u.md.options.quotes[1]), o.content = Ku(o.content, l.index, x), e[g.token].content = Ku(
|
|
2119
2119
|
e[g.token].content,
|
|
2120
2120
|
g.pos,
|
|
2121
2121
|
m
|
|
2122
|
-
), c +=
|
|
2122
|
+
), c += x.length - 1, g.token === r && (c += m.length - 1), i = o.content, s = i.length, n.length = t;
|
|
2123
2123
|
continue e;
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
2126
2126
|
f ? n.push({
|
|
2127
2127
|
token: r,
|
|
2128
2128
|
pos: l.index,
|
|
2129
|
-
single:
|
|
2129
|
+
single: k,
|
|
2130
2130
|
level: a
|
|
2131
|
-
}) : _ &&
|
|
2131
|
+
}) : _ && k && (o.content = Ku(o.content, l.index, sr));
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
}
|
|
@@ -2172,13 +2172,13 @@ gn.prototype.process = function(e) {
|
|
|
2172
2172
|
u[t](e);
|
|
2173
2173
|
};
|
|
2174
2174
|
gn.prototype.State = Kr;
|
|
2175
|
-
function
|
|
2175
|
+
function Ie(e, u, t, n) {
|
|
2176
2176
|
this.src = e, this.md = u, this.env = t, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
|
|
2177
2177
|
const r = this.src;
|
|
2178
2178
|
for (let o = 0, a = 0, i = 0, c = 0, s = r.length, l = !1; a < s; a++) {
|
|
2179
2179
|
const f = r.charCodeAt(a);
|
|
2180
2180
|
if (!l)
|
|
2181
|
-
if (
|
|
2181
|
+
if (Y(f)) {
|
|
2182
2182
|
i++, f === 9 ? c += 4 - c % 4 : c++;
|
|
2183
2183
|
continue;
|
|
2184
2184
|
} else
|
|
@@ -2187,40 +2187,40 @@ function Ne(e, u, t, n) {
|
|
|
2187
2187
|
}
|
|
2188
2188
|
this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
2189
2189
|
}
|
|
2190
|
-
|
|
2190
|
+
Ie.prototype.push = function(e, u, t) {
|
|
2191
2191
|
const n = new Te(e, u, t);
|
|
2192
2192
|
return n.block = !0, t < 0 && this.level--, n.level = this.level, t > 0 && this.level++, this.tokens.push(n), n;
|
|
2193
2193
|
};
|
|
2194
|
-
|
|
2194
|
+
Ie.prototype.isEmpty = function(u) {
|
|
2195
2195
|
return this.bMarks[u] + this.tShift[u] >= this.eMarks[u];
|
|
2196
2196
|
};
|
|
2197
|
-
|
|
2197
|
+
Ie.prototype.skipEmptyLines = function(u) {
|
|
2198
2198
|
for (let t = this.lineMax; u < t && !(this.bMarks[u] + this.tShift[u] < this.eMarks[u]); u++)
|
|
2199
2199
|
;
|
|
2200
2200
|
return u;
|
|
2201
2201
|
};
|
|
2202
|
-
|
|
2202
|
+
Ie.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 (!Y(n))
|
|
2206
2206
|
break;
|
|
2207
2207
|
}
|
|
2208
2208
|
return u;
|
|
2209
2209
|
};
|
|
2210
|
-
|
|
2210
|
+
Ie.prototype.skipSpacesBack = function(u, t) {
|
|
2211
2211
|
if (u <= t)
|
|
2212
2212
|
return u;
|
|
2213
2213
|
for (; u > t; )
|
|
2214
|
-
if (!
|
|
2214
|
+
if (!Y(this.src.charCodeAt(--u)))
|
|
2215
2215
|
return u + 1;
|
|
2216
2216
|
return u;
|
|
2217
2217
|
};
|
|
2218
|
-
|
|
2218
|
+
Ie.prototype.skipChars = function(u, t) {
|
|
2219
2219
|
for (let n = this.src.length; u < n && this.src.charCodeAt(u) === t; u++)
|
|
2220
2220
|
;
|
|
2221
2221
|
return u;
|
|
2222
2222
|
};
|
|
2223
|
-
|
|
2223
|
+
Ie.prototype.skipCharsBack = function(u, t, n) {
|
|
2224
2224
|
if (u <= n)
|
|
2225
2225
|
return u;
|
|
2226
2226
|
for (; u > n; )
|
|
@@ -2228,7 +2228,7 @@ Ne.prototype.skipCharsBack = function(u, t, n) {
|
|
|
2228
2228
|
return u + 1;
|
|
2229
2229
|
return u;
|
|
2230
2230
|
};
|
|
2231
|
-
|
|
2231
|
+
Ie.prototype.getLines = function(u, t, n, r) {
|
|
2232
2232
|
if (u >= t)
|
|
2233
2233
|
return "";
|
|
2234
2234
|
const o = new Array(t - u);
|
|
@@ -2238,7 +2238,7 @@ Ne.prototype.getLines = function(u, t, n, r) {
|
|
|
2238
2238
|
let l = s, f;
|
|
2239
2239
|
for (i + 1 < t || r ? f = this.eMarks[i] + 1 : f = this.eMarks[i]; l < f && c < n; ) {
|
|
2240
2240
|
const _ = this.src.charCodeAt(l);
|
|
2241
|
-
if (
|
|
2241
|
+
if (Y(_))
|
|
2242
2242
|
_ === 9 ? c += 4 - (c + this.bsCount[i]) % 4 : c++;
|
|
2243
2243
|
else if (l - s < this.tShift[i])
|
|
2244
2244
|
c++;
|
|
@@ -2250,7 +2250,7 @@ Ne.prototype.getLines = function(u, t, n, r) {
|
|
|
2250
2250
|
}
|
|
2251
2251
|
return o.join("");
|
|
2252
2252
|
};
|
|
2253
|
-
|
|
2253
|
+
Ie.prototype.Token = Te;
|
|
2254
2254
|
const D0 = 65536;
|
|
2255
2255
|
function Bt(e, u) {
|
|
2256
2256
|
const t = e.bMarks[u] + e.tShift[u], n = e.eMarks[u];
|
|
@@ -2276,11 +2276,11 @@ function F0(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 && !Y(i) || a === 45 && Y(i))
|
|
2280
2280
|
return !1;
|
|
2281
2281
|
for (; o < e.eMarks[r]; ) {
|
|
2282
2282
|
const g = e.src.charCodeAt(o);
|
|
2283
|
-
if (g !== 124 && g !== 45 && g !== 58 && !
|
|
2283
|
+
if (g !== 124 && g !== 45 && g !== 58 && !Y(g))
|
|
2284
2284
|
return !1;
|
|
2285
2285
|
o++;
|
|
2286
2286
|
}
|
|
@@ -2307,7 +2307,7 @@ function F0(e, u, t, n) {
|
|
|
2307
2307
|
return !0;
|
|
2308
2308
|
const _ = e.parentType;
|
|
2309
2309
|
e.parentType = "table";
|
|
2310
|
-
const
|
|
2310
|
+
const k = e.md.block.ruler.getRules("blockquote"), d = e.push("table_open", "table", 1), E = [u, 0];
|
|
2311
2311
|
d.map = E;
|
|
2312
2312
|
const A = e.push("thead_open", "thead", 1);
|
|
2313
2313
|
A.map = [u, u + 1];
|
|
@@ -2316,31 +2316,31 @@ function F0(e, u, t, n) {
|
|
|
2316
2316
|
for (let g = 0; g < s.length; g++) {
|
|
2317
2317
|
const m = e.push("th_open", "th", 1);
|
|
2318
2318
|
l[g] && (m.attrs = [["style", "text-align:" + l[g]]]);
|
|
2319
|
-
const
|
|
2320
|
-
|
|
2319
|
+
const x = e.push("inline", "", 0);
|
|
2320
|
+
x.content = s[g].trim(), x.children = [], e.push("th_close", "th", -1);
|
|
2321
2321
|
}
|
|
2322
2322
|
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
|
2323
2323
|
let h, p = 0;
|
|
2324
2324
|
for (r = u + 2; r < t && !(e.sCount[r] < e.blkIndent); r++) {
|
|
2325
2325
|
let g = !1;
|
|
2326
|
-
for (let
|
|
2327
|
-
if (x
|
|
2326
|
+
for (let x = 0, w = k.length; x < w; x++)
|
|
2327
|
+
if (k[x](e, r, t, !0)) {
|
|
2328
2328
|
g = !0;
|
|
2329
2329
|
break;
|
|
2330
2330
|
}
|
|
2331
2331
|
if (g || (c = Bt(e, r).trim(), !c) || e.sCount[r] - e.blkIndent >= 4 || (s = lr(c), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), p += f - s.length, p > D0))
|
|
2332
2332
|
break;
|
|
2333
2333
|
if (r === u + 2) {
|
|
2334
|
-
const
|
|
2335
|
-
|
|
2334
|
+
const x = e.push("tbody_open", "tbody", 1);
|
|
2335
|
+
x.map = h = [u + 2, 0];
|
|
2336
2336
|
}
|
|
2337
2337
|
const m = e.push("tr_open", "tr", 1);
|
|
2338
2338
|
m.map = [r, r + 1];
|
|
2339
|
-
for (let
|
|
2339
|
+
for (let x = 0; x < f; x++) {
|
|
2340
2340
|
const w = e.push("td_open", "td", 1);
|
|
2341
|
-
l[
|
|
2341
|
+
l[x] && (w.attrs = [["style", "text-align:" + l[x]]]);
|
|
2342
2342
|
const P = e.push("inline", "", 0);
|
|
2343
|
-
P.content = s[
|
|
2343
|
+
P.content = s[x] ? s[x].trim() : "", P.children = [], e.push("td_close", "td", -1);
|
|
2344
2344
|
}
|
|
2345
2345
|
e.push("tr_close", "tr", -1);
|
|
2346
2346
|
}
|
|
@@ -2390,8 +2390,8 @@ function T0(e, u, t, n) {
|
|
|
2390
2390
|
break;
|
|
2391
2391
|
}
|
|
2392
2392
|
c = e.sCount[u], e.line = f + (_ ? 1 : 0);
|
|
2393
|
-
const
|
|
2394
|
-
return
|
|
2393
|
+
const k = e.push("fence", "code", 0);
|
|
2394
|
+
return k.info = l, k.content = e.getLines(u + 1, f, c, !0), k.markup = s, k.map = [u, e.line], !0;
|
|
2395
2395
|
}
|
|
2396
2396
|
function P0(e, u, t, n) {
|
|
2397
2397
|
let r = e.bMarks[u] + e.tShift[u], o = e.eMarks[u];
|
|
@@ -2402,30 +2402,30 @@ function P0(e, u, t, n) {
|
|
|
2402
2402
|
return !0;
|
|
2403
2403
|
const i = [], c = [], s = [], l = [], f = e.md.block.ruler.getRules("blockquote"), _ = e.parentType;
|
|
2404
2404
|
e.parentType = "blockquote";
|
|
2405
|
-
let
|
|
2405
|
+
let k = !1, d;
|
|
2406
2406
|
for (d = u; d < t; d++) {
|
|
2407
2407
|
const p = 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
2410
|
if (e.src.charCodeAt(r++) === 62 && !p) {
|
|
2411
|
-
let m = e.sCount[d] + 1,
|
|
2412
|
-
e.src.charCodeAt(r) === 32 ? (r++, m++, w = !1,
|
|
2411
|
+
let m = e.sCount[d] + 1, x, w;
|
|
2412
|
+
e.src.charCodeAt(r) === 32 ? (r++, m++, w = !1, x = !0) : e.src.charCodeAt(r) === 9 ? (x = !0, (e.bsCount[d] + m) % 4 === 3 ? (r++, m++, w = !1) : w = !0) : x = !1;
|
|
2413
2413
|
let P = m;
|
|
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 (Y(D))
|
|
2417
2417
|
D === 9 ? P += 4 - (P + e.bsCount[d] + (w ? 1 : 0)) % 4 : P++;
|
|
2418
2418
|
else
|
|
2419
2419
|
break;
|
|
2420
2420
|
r++;
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2422
|
+
k = r >= o, c.push(e.bsCount[d]), e.bsCount[d] = e.sCount[d] + 1 + (x ? 1 : 0), s.push(e.sCount[d]), e.sCount[d] = P - m, l.push(e.tShift[d]), e.tShift[d] = r - e.bMarks[d];
|
|
2423
2423
|
continue;
|
|
2424
2424
|
}
|
|
2425
|
-
if (
|
|
2425
|
+
if (k)
|
|
2426
2426
|
break;
|
|
2427
2427
|
let g = !1;
|
|
2428
|
-
for (let m = 0,
|
|
2428
|
+
for (let m = 0, x = f.length; m < x; m++)
|
|
2429
2429
|
if (f[m](e, d, t, !0)) {
|
|
2430
2430
|
g = !0;
|
|
2431
2431
|
break;
|
|
@@ -2459,7 +2459,7 @@ function R0(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 && !Y(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 (!Y(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), !Y(o)) ? -1 : r;
|
|
2508
2508
|
}
|
|
2509
2509
|
function O0(e, u) {
|
|
2510
2510
|
const t = e.level + 2;
|
|
@@ -2517,62 +2517,62 @@ function M0(e, u, t, n) {
|
|
|
2517
2517
|
return !1;
|
|
2518
2518
|
let l = !1;
|
|
2519
2519
|
n && e.parentType === "paragraph" && e.sCount[c] >= e.blkIndent && (l = !0);
|
|
2520
|
-
let f, _,
|
|
2521
|
-
if ((
|
|
2522
|
-
if (f = !0, a = e.bMarks[c] + e.tShift[c], _ = Number(e.src.slice(a,
|
|
2523
|
-
} else if ((
|
|
2520
|
+
let f, _, k;
|
|
2521
|
+
if ((k = dr(e, c)) >= 0) {
|
|
2522
|
+
if (f = !0, a = e.bMarks[c] + e.tShift[c], _ = Number(e.src.slice(a, k - 1)), l && _ !== 1) return !1;
|
|
2523
|
+
} else if ((k = fr(e, c)) >= 0)
|
|
2524
2524
|
f = !1;
|
|
2525
2525
|
else
|
|
2526
2526
|
return !1;
|
|
2527
|
-
if (l && e.skipSpaces(
|
|
2527
|
+
if (l && e.skipSpaces(k) >= e.eMarks[c])
|
|
2528
2528
|
return !1;
|
|
2529
2529
|
if (n)
|
|
2530
2530
|
return !0;
|
|
2531
|
-
const d = e.src.charCodeAt(
|
|
2531
|
+
const d = e.src.charCodeAt(k - 1), E = e.tokens.length;
|
|
2532
2532
|
f ? (i = e.push("ordered_list_open", "ol", 1), _ !== 1 && (i.attrs = [["start", _]])) : i = e.push("bullet_list_open", "ul", 1);
|
|
2533
2533
|
const A = [c, 0];
|
|
2534
2534
|
i.map = A, i.markup = String.fromCharCode(d);
|
|
2535
2535
|
let y = !1;
|
|
2536
2536
|
const h = e.md.block.ruler.getRules("list"), p = e.parentType;
|
|
2537
2537
|
for (e.parentType = "list"; c < t; ) {
|
|
2538
|
-
o =
|
|
2539
|
-
const g = e.sCount[c] +
|
|
2538
|
+
o = k, r = e.eMarks[c];
|
|
2539
|
+
const g = e.sCount[c] + k - (e.bMarks[c] + e.tShift[c]);
|
|
2540
2540
|
let m = g;
|
|
2541
2541
|
for (; o < r; ) {
|
|
2542
|
-
const
|
|
2543
|
-
if (
|
|
2542
|
+
const W = e.src.charCodeAt(o);
|
|
2543
|
+
if (W === 9)
|
|
2544
2544
|
m += 4 - (m + e.bsCount[c]) % 4;
|
|
2545
|
-
else if (
|
|
2545
|
+
else if (W === 32)
|
|
2546
2546
|
m++;
|
|
2547
2547
|
else
|
|
2548
2548
|
break;
|
|
2549
2549
|
o++;
|
|
2550
2550
|
}
|
|
2551
|
-
const
|
|
2551
|
+
const x = o;
|
|
2552
2552
|
let w;
|
|
2553
|
-
|
|
2553
|
+
x >= r ? w = 1 : w = m - g, w > 4 && (w = 1);
|
|
2554
2554
|
const P = g + w;
|
|
2555
2555
|
i = e.push("list_item_open", "li", 1), i.markup = String.fromCharCode(d);
|
|
2556
2556
|
const D = [c, 0];
|
|
2557
|
-
i.map = D, f && (i.info = e.src.slice(a,
|
|
2558
|
-
const
|
|
2559
|
-
if (e.listIndent = e.blkIndent, e.blkIndent = P, e.tight = !0, e.tShift[c] =
|
|
2557
|
+
i.map = D, f && (i.info = e.src.slice(a, k - 1));
|
|
2558
|
+
const z = e.tight, $ = e.tShift[c], K = e.sCount[c], ue = e.listIndent;
|
|
2559
|
+
if (e.listIndent = e.blkIndent, e.blkIndent = P, e.tight = !0, e.tShift[c] = x - e.bMarks[c], e.sCount[c] = m, x >= r && e.isEmpty(c + 1) ? e.line = Math.min(e.line + 2, t) : e.md.block.tokenize(e, c, t, !0), (!e.tight || y) && (s = !1), y = e.line - c > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = ue, e.tShift[c] = $, e.sCount[c] = K, e.tight = z, i = e.push("list_item_close", "li", -1), i.markup = String.fromCharCode(d), c = e.line, D[1] = c, c >= t || e.sCount[c] < e.blkIndent || e.sCount[c] - e.blkIndent >= 4)
|
|
2560
2560
|
break;
|
|
2561
2561
|
let S = !1;
|
|
2562
|
-
for (let
|
|
2563
|
-
if (h[
|
|
2562
|
+
for (let W = 0, be = h.length; W < be; W++)
|
|
2563
|
+
if (h[W](e, c, t, !0)) {
|
|
2564
2564
|
S = !0;
|
|
2565
2565
|
break;
|
|
2566
2566
|
}
|
|
2567
2567
|
if (S)
|
|
2568
2568
|
break;
|
|
2569
2569
|
if (f) {
|
|
2570
|
-
if (
|
|
2570
|
+
if (k = dr(e, c), k < 0)
|
|
2571
2571
|
break;
|
|
2572
2572
|
a = e.bMarks[c] + e.tShift[c];
|
|
2573
|
-
} else if (
|
|
2573
|
+
} else if (k = fr(e, c), k < 0)
|
|
2574
2574
|
break;
|
|
2575
|
-
if (d !== e.src.charCodeAt(
|
|
2575
|
+
if (d !== e.src.charCodeAt(k - 1))
|
|
2576
2576
|
break;
|
|
2577
2577
|
}
|
|
2578
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] = c, e.line = c, e.parentType = p, s && O0(e, E), !0;
|
|
@@ -2590,16 +2590,16 @@ function L0(e, u, t, n) {
|
|
|
2590
2590
|
const w = e.md.block.ruler.getRules("reference"), P = e.parentType;
|
|
2591
2591
|
e.parentType = "reference";
|
|
2592
2592
|
let D = !1;
|
|
2593
|
-
for (let
|
|
2594
|
-
if (w[
|
|
2593
|
+
for (let z = 0, $ = w.length; z < $; z++)
|
|
2594
|
+
if (w[z](e, h, p, !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 m = e.bMarks[h] + e.tShift[h],
|
|
2602
|
-
return e.src.slice(m,
|
|
2601
|
+
const m = e.bMarks[h] + e.tShift[h], x = e.eMarks[h];
|
|
2602
|
+
return e.src.slice(m, x + 1);
|
|
2603
2603
|
}
|
|
2604
2604
|
let c = e.src.slice(r, o + 1);
|
|
2605
2605
|
o = c.length;
|
|
@@ -2626,7 +2626,7 @@ function L0(e, u, t, n) {
|
|
|
2626
2626
|
if (h === 10) {
|
|
2627
2627
|
const p = i(a);
|
|
2628
2628
|
p !== null && (c += p, o = c.length, a++);
|
|
2629
|
-
} else if (!
|
|
2629
|
+
} else if (!Y(h)) break;
|
|
2630
2630
|
}
|
|
2631
2631
|
const l = e.md.helpers.parseLinkDestination(c, r, o);
|
|
2632
2632
|
if (!l.ok)
|
|
@@ -2635,13 +2635,13 @@ function L0(e, u, t, n) {
|
|
|
2635
2635
|
if (!e.md.validateLink(f))
|
|
2636
2636
|
return !1;
|
|
2637
2637
|
r = l.pos;
|
|
2638
|
-
const _ = r,
|
|
2638
|
+
const _ = r, k = a, d = r;
|
|
2639
2639
|
for (; r < o; r++) {
|
|
2640
2640
|
const h = c.charCodeAt(r);
|
|
2641
2641
|
if (h === 10) {
|
|
2642
2642
|
const p = i(a);
|
|
2643
2643
|
p !== null && (c += p, o = c.length, a++);
|
|
2644
|
-
} else if (!
|
|
2644
|
+
} else if (!Y(h)) break;
|
|
2645
2645
|
}
|
|
2646
2646
|
let E = e.md.helpers.parseLinkTitle(c, r, o);
|
|
2647
2647
|
for (; E.can_continue; ) {
|
|
@@ -2650,16 +2650,16 @@ function L0(e, u, t, n) {
|
|
|
2650
2650
|
c += h, r = o, o = c.length, a++, E = e.md.helpers.parseLinkTitle(c, r, o, E);
|
|
2651
2651
|
}
|
|
2652
2652
|
let A;
|
|
2653
|
-
for (r < o && d !== r && E.ok ? (A = E.str, r = E.pos) : (A = "", r = _, a =
|
|
2653
|
+
for (r < o && d !== r && E.ok ? (A = E.str, r = E.pos) : (A = "", r = _, a = k); r < o; ) {
|
|
2654
2654
|
const h = c.charCodeAt(r);
|
|
2655
|
-
if (!
|
|
2655
|
+
if (!Y(h))
|
|
2656
2656
|
break;
|
|
2657
2657
|
r++;
|
|
2658
2658
|
}
|
|
2659
2659
|
if (r < o && c.charCodeAt(r) !== 10 && A)
|
|
2660
|
-
for (A = "", r = _, a =
|
|
2660
|
+
for (A = "", r = _, a = k; r < o; ) {
|
|
2661
2661
|
const h = c.charCodeAt(r);
|
|
2662
|
-
if (!
|
|
2662
|
+
if (!Y(h))
|
|
2663
2663
|
break;
|
|
2664
2664
|
r++;
|
|
2665
2665
|
}
|
|
@@ -2773,13 +2773,13 @@ function X0(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 && !Y(a))
|
|
2777
2777
|
return !1;
|
|
2778
2778
|
if (n)
|
|
2779
2779
|
return !0;
|
|
2780
2780
|
o = e.skipSpacesBack(o, r);
|
|
2781
2781
|
const c = e.skipCharsBack(o, 35, r);
|
|
2782
|
-
c > r &&
|
|
2782
|
+
c > r && Y(e.src.charCodeAt(c - 1)) && (o = c), 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 l = e.push("inline", "", 0);
|
|
@@ -2798,9 +2798,9 @@ function Q0(e, u, t) {
|
|
|
2798
2798
|
if (e.sCount[i] - e.blkIndent > 3)
|
|
2799
2799
|
continue;
|
|
2800
2800
|
if (e.sCount[i] >= e.blkIndent) {
|
|
2801
|
-
let
|
|
2801
|
+
let k = e.bMarks[i] + e.tShift[i];
|
|
2802
2802
|
const d = e.eMarks[i];
|
|
2803
|
-
if (
|
|
2803
|
+
if (k < d && (a = e.src.charCodeAt(k), (a === 45 || a === 61) && (k = e.skipChars(k, a), k = e.skipSpaces(k), k >= d))) {
|
|
2804
2804
|
o = a === 61 ? 1 : 2;
|
|
2805
2805
|
break;
|
|
2806
2806
|
}
|
|
@@ -2808,8 +2808,8 @@ function Q0(e, u, t) {
|
|
|
2808
2808
|
if (e.sCount[i] < 0)
|
|
2809
2809
|
continue;
|
|
2810
2810
|
let _ = !1;
|
|
2811
|
-
for (let
|
|
2812
|
-
if (n[
|
|
2811
|
+
for (let k = 0, d = n.length; k < d; k++)
|
|
2812
|
+
if (n[k](e, i, t, !0)) {
|
|
2813
2813
|
_ = !0;
|
|
2814
2814
|
break;
|
|
2815
2815
|
}
|
|
@@ -2895,7 +2895,7 @@ yt.prototype.parse = function(e, u, t, n) {
|
|
|
2895
2895
|
const r = new this.State(e, u, t, n);
|
|
2896
2896
|
this.tokenize(r, r.line, r.lineMax);
|
|
2897
2897
|
};
|
|
2898
|
-
yt.prototype.State =
|
|
2898
|
+
yt.prototype.State = Ie;
|
|
2899
2899
|
function Bu(e, u, t, n) {
|
|
2900
2900
|
this.src = e, this.env = t, this.md = u, this.tokens = n, this.tokens_meta = Array(n.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
|
|
2901
2901
|
}
|
|
@@ -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, c = Ou(r) || Ru(String.fromCharCode(r)), s = Ou(i) || Ru(String.fromCharCode(i)), l = Pu(r), f = Pu(i), _ = !f && (!s || l || c),
|
|
2918
|
-
return { can_open: _ && (u || !
|
|
2917
|
+
const a = o - e, i = o < t ? this.src.charCodeAt(o) : 32, c = Ou(r) || Ru(String.fromCharCode(r)), s = Ou(i) || Ru(String.fromCharCode(i)), l = Pu(r), f = Pu(i), _ = !f && (!s || l || c), k = !l && (!c || f || s);
|
|
2918
|
+
return { can_open: _ && (u || !k || c), can_close: k && (u || !_ || s), length: a };
|
|
2919
2919
|
};
|
|
2920
2920
|
Bu.prototype.Token = Te;
|
|
2921
2921
|
function K0(e) {
|
|
@@ -2994,7 +2994,7 @@ function nc(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 && Y(e.src.charCodeAt(t)); )
|
|
2998
2998
|
t++;
|
|
2999
2999
|
return e.pos = t, !0;
|
|
3000
3000
|
}
|
|
@@ -3010,7 +3010,7 @@ function rc(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), !!Y(r)); )
|
|
3014
3014
|
t++;
|
|
3015
3015
|
return e.pos = t, !0;
|
|
3016
3016
|
}
|
|
@@ -3163,20 +3163,20 @@ function lc(e, u) {
|
|
|
3163
3163
|
let t, n, r, o, a = "", i = "", c = e.pos, s = !0;
|
|
3164
3164
|
if (e.src.charCodeAt(e.pos) !== 91)
|
|
3165
3165
|
return !1;
|
|
3166
|
-
const l = e.pos, f = e.posMax, _ = e.pos + 1,
|
|
3167
|
-
if (
|
|
3166
|
+
const l = e.pos, f = e.posMax, _ = e.pos + 1, k = e.md.helpers.parseLinkLabel(e, e.pos, !0);
|
|
3167
|
+
if (k < 0)
|
|
3168
3168
|
return !1;
|
|
3169
|
-
let d =
|
|
3169
|
+
let d = k + 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), !(!Y(t) && t !== 10)); d++)
|
|
3172
3172
|
;
|
|
3173
3173
|
if (d >= f)
|
|
3174
3174
|
return !1;
|
|
3175
3175
|
if (c = 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 = "", c = d; d < f && (t = e.src.charCodeAt(d), !(!
|
|
3176
|
+
for (a = e.md.normalizeLink(r.str), e.md.validateLink(a) ? d = r.pos : a = "", c = d; d < f && (t = e.src.charCodeAt(d), !(!Y(t) && t !== 10)); d++)
|
|
3177
3177
|
;
|
|
3178
3178
|
if (r = e.md.helpers.parseLinkTitle(e.src, d, e.posMax), d < f && c !== 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), !(!Y(t) && t !== 10)); d++)
|
|
3180
3180
|
;
|
|
3181
3181
|
}
|
|
3182
3182
|
(d >= f || e.src.charCodeAt(d) !== 41) && (s = !0), d++;
|
|
@@ -3184,12 +3184,12 @@ function lc(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 ? (c = d + 1, d = e.md.helpers.parseLinkLabel(e, d), d >= 0 ? n = e.src.slice(c, d++) : d =
|
|
3187
|
+
if (d < f && e.src.charCodeAt(d) === 91 ? (c = d + 1, d = e.md.helpers.parseLinkLabel(e, d), d >= 0 ? n = e.src.slice(c, d++) : d = k + 1) : d = k + 1, n || (n = e.src.slice(_, k)), o = e.env.references[vt(n)], !o)
|
|
3188
3188
|
return e.pos = l, !1;
|
|
3189
3189
|
a = o.href, i = o.title;
|
|
3190
3190
|
}
|
|
3191
3191
|
if (!u) {
|
|
3192
|
-
e.pos = _, e.posMax =
|
|
3192
|
+
e.pos = _, e.posMax = k;
|
|
3193
3193
|
const E = e.push("link_open", "a", 1), A = [["href", a]];
|
|
3194
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
|
}
|
|
@@ -3200,18 +3200,18 @@ function fc(e, u) {
|
|
|
3200
3200
|
const f = e.pos, _ = e.posMax;
|
|
3201
3201
|
if (e.src.charCodeAt(e.pos) !== 33 || e.src.charCodeAt(e.pos + 1) !== 91)
|
|
3202
3202
|
return !1;
|
|
3203
|
-
const
|
|
3203
|
+
const k = e.pos + 2, d = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1);
|
|
3204
3204
|
if (d < 0)
|
|
3205
3205
|
return !1;
|
|
3206
3206
|
if (o = d + 1, o < _ && e.src.charCodeAt(o) === 40) {
|
|
3207
|
-
for (o++; o < _ && (t = e.src.charCodeAt(o), !(!
|
|
3207
|
+
for (o++; o < _ && (t = e.src.charCodeAt(o), !(!Y(t) && t !== 10)); o++)
|
|
3208
3208
|
;
|
|
3209
3209
|
if (o >= _)
|
|
3210
3210
|
return !1;
|
|
3211
|
-
for (s = o, i = e.md.helpers.parseLinkDestination(e.src, o, e.posMax), i.ok && (l = e.md.normalizeLink(i.str), e.md.validateLink(l) ? o = i.pos : l = ""), s = o; o < _ && (t = e.src.charCodeAt(o), !(!
|
|
3211
|
+
for (s = o, i = e.md.helpers.parseLinkDestination(e.src, o, e.posMax), i.ok && (l = e.md.normalizeLink(i.str), e.md.validateLink(l) ? o = i.pos : l = ""), s = o; o < _ && (t = e.src.charCodeAt(o), !(!Y(t) && t !== 10)); o++)
|
|
3212
3212
|
;
|
|
3213
3213
|
if (i = e.md.helpers.parseLinkTitle(e.src, o, e.posMax), o < _ && s !== o && i.ok)
|
|
3214
|
-
for (c = i.str, o = i.pos; o < _ && (t = e.src.charCodeAt(o), !(!
|
|
3214
|
+
for (c = i.str, o = i.pos; o < _ && (t = e.src.charCodeAt(o), !(!Y(t) && t !== 10)); o++)
|
|
3215
3215
|
;
|
|
3216
3216
|
else
|
|
3217
3217
|
c = "";
|
|
@@ -3221,12 +3221,12 @@ function fc(e, u) {
|
|
|
3221
3221
|
} else {
|
|
3222
3222
|
if (typeof e.env.references > "u")
|
|
3223
3223
|
return !1;
|
|
3224
|
-
if (o < _ && 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(
|
|
3224
|
+
if (o < _ && 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(k, d)), a = e.env.references[vt(r)], !a)
|
|
3225
3225
|
return e.pos = f, !1;
|
|
3226
3226
|
l = a.href, c = a.title;
|
|
3227
3227
|
}
|
|
3228
3228
|
if (!u) {
|
|
3229
|
-
n = e.src.slice(
|
|
3229
|
+
n = e.src.slice(k, d);
|
|
3230
3230
|
const E = [];
|
|
3231
3231
|
e.md.inline.parse(
|
|
3232
3232
|
n,
|
|
@@ -3354,8 +3354,8 @@ function br(e) {
|
|
|
3354
3354
|
if (f.marker === i.marker && f.open && f.end < 0) {
|
|
3355
3355
|
let _ = !1;
|
|
3356
3356
|
if ((f.close || i.open) && (f.length + i.length) % 3 === 0 && (f.length % 3 !== 0 || i.length % 3 !== 0) && (_ = !0), !_) {
|
|
3357
|
-
const
|
|
3358
|
-
o[a] = a - s +
|
|
3357
|
+
const k = s > 0 && !e[s - 1].open ? o[s - 1] + 1 : 0;
|
|
3358
|
+
o[a] = a - s + k, o[s] = k, i.open = !1, f.end = a, f.close = !1, l = -1, r = -2;
|
|
3359
3359
|
break;
|
|
3360
3360
|
}
|
|
3361
3361
|
}
|
|
@@ -3592,18 +3592,18 @@ function nn(e, u) {
|
|
|
3592
3592
|
const t = new Lc(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 Ce(e, u) {
|
|
3596
|
+
if (!(this instanceof Ce))
|
|
3597
|
+
return new Ce(e, u);
|
|
3598
3598
|
u || Sc(e) && (u = e, e = {}), this.__opts__ = tn({}, oo, u), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = tn({}, Tc, e), this.__compiled__ = {}, this.__tlds__ = Rc, this.__tlds_replaced__ = !1, this.re = {}, pt(this);
|
|
3599
3599
|
}
|
|
3600
|
-
|
|
3600
|
+
Ce.prototype.add = function(u, t) {
|
|
3601
3601
|
return this.__schemas__[u] = t, pt(this), this;
|
|
3602
3602
|
};
|
|
3603
|
-
|
|
3603
|
+
Ce.prototype.set = function(u) {
|
|
3604
3604
|
return this.__opts__ = tn(this.__opts__, u), this;
|
|
3605
3605
|
};
|
|
3606
|
-
|
|
3606
|
+
Ce.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, c, s, l;
|
|
@@ -3616,13 +3616,13 @@ we.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:"] && (l = u.indexOf("@"), l >= 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
|
+
Ce.prototype.pretest = function(u) {
|
|
3620
3620
|
return this.re.pretest.test(u);
|
|
3621
3621
|
};
|
|
3622
|
-
|
|
3622
|
+
Ce.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
|
+
Ce.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,29 +3631,29 @@ we.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
|
+
Ce.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
|
+
Ce.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
|
+
Ce.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
|
+
Ce.prototype.onCompile = function() {
|
|
3650
3650
|
};
|
|
3651
|
-
const pu = 2147483647,
|
|
3651
|
+
const pu = 2147483647, Oe = 36, kn = 1, Mu = 26, Nc = 38, Ic = 700, io = 72, ao = 128, co = "-", zc = /^xn--/, $c = /[^\0-\x7F]/, Bc = /[\x2E\u3002\uFF0E\uFF61]/g, Uc = {
|
|
3652
3652
|
overflow: "Overflow: input needs wider integers to process",
|
|
3653
3653
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3654
3654
|
"invalid-input": "Invalid input"
|
|
3655
|
-
}, jt =
|
|
3656
|
-
function
|
|
3655
|
+
}, jt = Oe - kn, Me = Math.floor, Ht = String.fromCharCode;
|
|
3656
|
+
function Ve(e) {
|
|
3657
3657
|
throw new RangeError(Uc[e]);
|
|
3658
3658
|
}
|
|
3659
3659
|
function qc(e, u) {
|
|
@@ -3685,34 +3685,34 @@ function lo(e) {
|
|
|
3685
3685
|
return u;
|
|
3686
3686
|
}
|
|
3687
3687
|
const jc = (e) => String.fromCodePoint(...e), Hc = function(e) {
|
|
3688
|
-
return e >= 48 && e < 58 ? 26 + (e - 48) : e >= 65 && e < 91 ? e - 65 : e >= 97 && e < 123 ? e - 97 :
|
|
3688
|
+
return e >= 48 && e < 58 ? 26 + (e - 48) : e >= 65 && e < 91 ? e - 65 : e >= 97 && e < 123 ? e - 97 : Oe;
|
|
3689
3689
|
}, xr = function(e, u) {
|
|
3690
3690
|
return e + 22 + 75 * (e < 26) - ((u != 0) << 5);
|
|
3691
3691
|
}, fo = function(e, u, t) {
|
|
3692
3692
|
let n = 0;
|
|
3693
|
-
for (e = t ?
|
|
3694
|
-
e =
|
|
3695
|
-
return
|
|
3693
|
+
for (e = t ? Me(e / Ic) : e >> 1, e += Me(e / u); e > jt * Mu >> 1; n += Oe)
|
|
3694
|
+
e = Me(e / jt);
|
|
3695
|
+
return Me(n + (jt + 1) * e / (e + Nc));
|
|
3696
3696
|
}, po = function(e) {
|
|
3697
3697
|
const u = [], t = e.length;
|
|
3698
3698
|
let n = 0, r = ao, o = io, a = e.lastIndexOf(co);
|
|
3699
3699
|
a < 0 && (a = 0);
|
|
3700
3700
|
for (let i = 0; i < a; ++i)
|
|
3701
|
-
e.charCodeAt(i) >= 128 &&
|
|
3701
|
+
e.charCodeAt(i) >= 128 && Ve("not-basic"), u.push(e.charCodeAt(i));
|
|
3702
3702
|
for (let i = a > 0 ? a + 1 : 0; i < t; ) {
|
|
3703
3703
|
const c = n;
|
|
3704
|
-
for (let l = 1, f =
|
|
3705
|
-
i >= t &&
|
|
3704
|
+
for (let l = 1, f = Oe; ; f += Oe) {
|
|
3705
|
+
i >= t && Ve("invalid-input");
|
|
3706
3706
|
const _ = Hc(e.charCodeAt(i++));
|
|
3707
|
-
_ >=
|
|
3708
|
-
const
|
|
3709
|
-
if (_ <
|
|
3707
|
+
_ >= Oe && Ve("invalid-input"), _ > Me((pu - n) / l) && Ve("overflow"), n += _ * l;
|
|
3708
|
+
const k = f <= o ? kn : f >= o + Mu ? Mu : f - o;
|
|
3709
|
+
if (_ < k)
|
|
3710
3710
|
break;
|
|
3711
|
-
const d =
|
|
3712
|
-
l >
|
|
3711
|
+
const d = Oe - k;
|
|
3712
|
+
l > Me(pu / d) && Ve("overflow"), l *= d;
|
|
3713
3713
|
}
|
|
3714
3714
|
const s = u.length + 1;
|
|
3715
|
-
o = fo(n - c, s, c == 0),
|
|
3715
|
+
o = fo(n - c, s, c == 0), Me(n / s) > pu - r && Ve("overflow"), r += Me(n / s), n %= s, u.splice(n++, 0, r);
|
|
3716
3716
|
}
|
|
3717
3717
|
return String.fromCodePoint(...u);
|
|
3718
3718
|
}, ho = function(e) {
|
|
@@ -3729,18 +3729,18 @@ const jc = (e) => String.fromCodePoint(...e), Hc = function(e) {
|
|
|
3729
3729
|
for (const l of e)
|
|
3730
3730
|
l >= n && l < c && (c = l);
|
|
3731
3731
|
const s = i + 1;
|
|
3732
|
-
c - n >
|
|
3732
|
+
c - n > Me((pu - r) / s) && Ve("overflow"), r += (c - n) * s, n = c;
|
|
3733
3733
|
for (const l of e)
|
|
3734
|
-
if (l < n && ++r > pu &&
|
|
3734
|
+
if (l < n && ++r > pu && Ve("overflow"), l === n) {
|
|
3735
3735
|
let f = r;
|
|
3736
|
-
for (let _ =
|
|
3737
|
-
const
|
|
3738
|
-
if (f <
|
|
3736
|
+
for (let _ = Oe; ; _ += Oe) {
|
|
3737
|
+
const k = _ <= o ? kn : _ >= o + Mu ? Mu : _ - o;
|
|
3738
|
+
if (f < k)
|
|
3739
3739
|
break;
|
|
3740
|
-
const d = f -
|
|
3740
|
+
const d = f - k, E = Oe - k;
|
|
3741
3741
|
u.push(
|
|
3742
|
-
Ht(xr(
|
|
3743
|
-
), f =
|
|
3742
|
+
Ht(xr(k + d % E, 0))
|
|
3743
|
+
), f = Me(d / E);
|
|
3744
3744
|
}
|
|
3745
3745
|
u.push(Ht(xr(f, 0))), o = fo(r, s, i === a), r = 0, ++i;
|
|
3746
3746
|
}
|
|
@@ -3973,7 +3973,7 @@ function us(e) {
|
|
|
3973
3973
|
function Fe(e, u) {
|
|
3974
3974
|
if (!(this instanceof Fe))
|
|
3975
3975
|
return new Fe(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 gu(), 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 gu(), this.linkify = new Ce(), this.validateLink = Kc, this.normalizeLink = es, this.normalizeLinkText = us, this.utils = n0, this.helpers = _t({}, a0), this.options = {}, this.configure(e), u && this.set(u);
|
|
3977
3977
|
}
|
|
3978
3978
|
Fe.prototype.set = function(e) {
|
|
3979
3979
|
return _t(this.options, e), this;
|
|
@@ -4037,7 +4037,7 @@ Fe.prototype.renderInline = function(e, u) {
|
|
|
4037
4037
|
};
|
|
4038
4038
|
function ts(e, u) {
|
|
4039
4039
|
const { manual: t = !1, domPurify: n = !0, ...r } = u ?? {}, o = G(Qt(e) ? du(e.value) : Ro(e) ? du(e) : e);
|
|
4040
|
-
Qt(e) &&
|
|
4040
|
+
Qt(e) && Le(() => {
|
|
4041
4041
|
o.value = du(e.value);
|
|
4042
4042
|
});
|
|
4043
4043
|
const a = G(""), i = G(), c = Fe({ ...r });
|
|
@@ -4045,13 +4045,13 @@ function ts(e, u) {
|
|
|
4045
4045
|
const f = c.render(l);
|
|
4046
4046
|
if (a.value = n ? ma.sanitize(f) : f, i.value) i.value.innerHTML = a.value;
|
|
4047
4047
|
else {
|
|
4048
|
-
const _ =
|
|
4049
|
-
|
|
4048
|
+
const _ = He(i, (k) => {
|
|
4049
|
+
k && (k.innerHTML = a.value, _());
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
4052
|
return a.value;
|
|
4053
4053
|
}
|
|
4054
|
-
return t || (s(o.value ?? ""),
|
|
4054
|
+
return t || (s(o.value ?? ""), He(o, (l) => {
|
|
4055
4055
|
s(l ?? "");
|
|
4056
4056
|
})), {
|
|
4057
4057
|
value: o,
|
|
@@ -4064,17 +4064,17 @@ function ts(e, u) {
|
|
|
4064
4064
|
function ns(e, u) {
|
|
4065
4065
|
const { step: t = 1, interval: n = 50, enabled: r = !0 } = u ?? {}, o = G(0), a = G(!1), i = G(!1), c = G(!1), s = ge(() => r ? e.value.slice(0, o.value) : e.value), l = ge(() => Number(Math.min(o.value / e.value.length * 100, 100).toFixed(2)));
|
|
4066
4066
|
let f = null;
|
|
4067
|
-
const _ = rt(),
|
|
4068
|
-
|
|
4069
|
-
if (!
|
|
4067
|
+
const _ = rt(), k = rt(), d = rt();
|
|
4068
|
+
He(e, (m, x) => {
|
|
4069
|
+
if (!x) {
|
|
4070
4070
|
o.value = 0, E();
|
|
4071
4071
|
return;
|
|
4072
4072
|
}
|
|
4073
|
-
m.startsWith(
|
|
4073
|
+
m.startsWith(x) || (o.value = 0), E();
|
|
4074
4074
|
}, { immediate: !0 });
|
|
4075
4075
|
function E() {
|
|
4076
4076
|
if (f && clearTimeout(f), !r) {
|
|
4077
|
-
o.value = e.value.length, i.value = !0, c.value = !1, a.value = !1,
|
|
4077
|
+
o.value = e.value.length, i.value = !0, c.value = !1, a.value = !1, k.trigger(s.value);
|
|
4078
4078
|
return;
|
|
4079
4079
|
}
|
|
4080
4080
|
c.value = !0, a.value = !1, i.value = !1, _.trigger();
|
|
@@ -4083,7 +4083,7 @@ function ns(e, u) {
|
|
|
4083
4083
|
index: o.value,
|
|
4084
4084
|
value: s.value
|
|
4085
4085
|
}), o.value >= e.value.length) {
|
|
4086
|
-
o.value = e.value.length, i.value = !0, c.value = !1,
|
|
4086
|
+
o.value = e.value.length, i.value = !0, c.value = !1, k.trigger(s.value);
|
|
4087
4087
|
return;
|
|
4088
4088
|
}
|
|
4089
4089
|
f = setTimeout(m, n);
|
|
@@ -4102,7 +4102,7 @@ function ns(e, u) {
|
|
|
4102
4102
|
});
|
|
4103
4103
|
}
|
|
4104
4104
|
function p() {
|
|
4105
|
-
f && clearTimeout(f), c.value = !1, a.value = !1, i.value = !0, o.value = e.value.length,
|
|
4105
|
+
f && clearTimeout(f), c.value = !1, a.value = !1, i.value = !0, o.value = e.value.length, k.trigger(s.value);
|
|
4106
4106
|
}
|
|
4107
4107
|
function g() {
|
|
4108
4108
|
f && clearTimeout(f), f = null, c.value = !1, a.value = !1, i.value = !1, o.value = 0;
|
|
@@ -4121,7 +4121,7 @@ function ns(e, u) {
|
|
|
4121
4121
|
stop: p,
|
|
4122
4122
|
destroy: g,
|
|
4123
4123
|
onStat: _.on,
|
|
4124
|
-
onStop:
|
|
4124
|
+
onStop: k.on,
|
|
4125
4125
|
onUpdate: d.on
|
|
4126
4126
|
};
|
|
4127
4127
|
}
|
|
@@ -4240,13 +4240,13 @@ function os() {
|
|
|
4240
4240
|
*/
|
|
4241
4241
|
clone: function h(p, g) {
|
|
4242
4242
|
g = g || {};
|
|
4243
|
-
var m,
|
|
4243
|
+
var m, x;
|
|
4244
4244
|
switch (i.util.type(p)) {
|
|
4245
4245
|
case "Object":
|
|
4246
|
-
if (
|
|
4247
|
-
return g[
|
|
4246
|
+
if (x = i.util.objId(p), g[x])
|
|
4247
|
+
return g[x];
|
|
4248
4248
|
m = /** @type {Record<string, any>} */
|
|
4249
|
-
{}, g[
|
|
4249
|
+
{}, g[x] = m;
|
|
4250
4250
|
for (var w in p)
|
|
4251
4251
|
p.hasOwnProperty(w) && (m[w] = h(p[w], g));
|
|
4252
4252
|
return (
|
|
@@ -4254,7 +4254,7 @@ function os() {
|
|
|
4254
4254
|
m
|
|
4255
4255
|
);
|
|
4256
4256
|
case "Array":
|
|
4257
|
-
return
|
|
4257
|
+
return x = i.util.objId(p), g[x] ? g[x] : (m = [], g[x] = m, /** @type {Array} */
|
|
4258
4258
|
/** @type {any} */
|
|
4259
4259
|
p.forEach(function(P, D) {
|
|
4260
4260
|
m[D] = h(P, g);
|
|
@@ -4340,10 +4340,10 @@ function os() {
|
|
|
4340
4340
|
*/
|
|
4341
4341
|
isActive: function(h, p, g) {
|
|
4342
4342
|
for (var m = "no-" + p; h; ) {
|
|
4343
|
-
var
|
|
4344
|
-
if (
|
|
4343
|
+
var x = h.classList;
|
|
4344
|
+
if (x.contains(p))
|
|
4345
4345
|
return !0;
|
|
4346
|
-
if (
|
|
4346
|
+
if (x.contains(m))
|
|
4347
4347
|
return !1;
|
|
4348
4348
|
h = h.parentElement;
|
|
4349
4349
|
}
|
|
@@ -4477,28 +4477,28 @@ function os() {
|
|
|
4477
4477
|
insertBefore: function(h, p, g, m) {
|
|
4478
4478
|
m = m || /** @type {any} */
|
|
4479
4479
|
i.languages;
|
|
4480
|
-
var
|
|
4481
|
-
for (var P in
|
|
4482
|
-
if (
|
|
4480
|
+
var x = m[h], w = {};
|
|
4481
|
+
for (var P in x)
|
|
4482
|
+
if (x.hasOwnProperty(P)) {
|
|
4483
4483
|
if (P == p)
|
|
4484
4484
|
for (var D in g)
|
|
4485
4485
|
g.hasOwnProperty(D) && (w[D] = g[D]);
|
|
4486
|
-
g.hasOwnProperty(P) || (w[P] =
|
|
4486
|
+
g.hasOwnProperty(P) || (w[P] = x[P]);
|
|
4487
4487
|
}
|
|
4488
|
-
var
|
|
4489
|
-
return m[h] = w, i.languages.DFS(i.languages, function(
|
|
4490
|
-
|
|
4488
|
+
var z = m[h];
|
|
4489
|
+
return m[h] = w, i.languages.DFS(i.languages, function($, K) {
|
|
4490
|
+
K === z && $ != h && (this[$] = w);
|
|
4491
4491
|
}), w;
|
|
4492
4492
|
},
|
|
4493
4493
|
// Traverse a language definition with Depth First Search
|
|
4494
|
-
DFS: function h(p, g, m,
|
|
4495
|
-
|
|
4494
|
+
DFS: function h(p, g, m, x) {
|
|
4495
|
+
x = x || {};
|
|
4496
4496
|
var w = i.util.objId;
|
|
4497
4497
|
for (var P in p)
|
|
4498
4498
|
if (p.hasOwnProperty(P)) {
|
|
4499
4499
|
g.call(p, P, p[P], m || P);
|
|
4500
|
-
var D = p[P],
|
|
4501
|
-
|
|
4500
|
+
var D = p[P], z = i.util.type(D);
|
|
4501
|
+
z === "Object" && !x[w(D)] ? (x[w(D)] = !0, h(D, g, null, x)) : z === "Array" && !x[w(D)] && (x[w(D)] = !0, h(D, g, P, x));
|
|
4502
4502
|
}
|
|
4503
4503
|
}
|
|
4504
4504
|
},
|
|
@@ -4540,7 +4540,7 @@ function os() {
|
|
|
4540
4540
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
4541
4541
|
};
|
|
4542
4542
|
i.hooks.run("before-highlightall", m), m.elements = Array.prototype.slice.apply(m.container.querySelectorAll(m.selector)), i.hooks.run("before-all-elements-highlight", m);
|
|
4543
|
-
for (var
|
|
4543
|
+
for (var x = 0, w; w = m.elements[x++]; )
|
|
4544
4544
|
i.highlightElement(w, p === !0, m.callback);
|
|
4545
4545
|
},
|
|
4546
4546
|
/**
|
|
@@ -4572,38 +4572,38 @@ function os() {
|
|
|
4572
4572
|
* @public
|
|
4573
4573
|
*/
|
|
4574
4574
|
highlightElement: function(h, p, g) {
|
|
4575
|
-
var m = i.util.getLanguage(h),
|
|
4575
|
+
var m = i.util.getLanguage(h), x = i.languages[m];
|
|
4576
4576
|
i.util.setLanguage(h, m);
|
|
4577
4577
|
var w = h.parentElement;
|
|
4578
4578
|
w && w.nodeName.toLowerCase() === "pre" && i.util.setLanguage(w, m);
|
|
4579
4579
|
var P = h.textContent, D = {
|
|
4580
4580
|
element: h,
|
|
4581
4581
|
language: m,
|
|
4582
|
-
grammar:
|
|
4582
|
+
grammar: x,
|
|
4583
4583
|
code: P
|
|
4584
4584
|
};
|
|
4585
|
-
function
|
|
4586
|
-
D.highlightedCode =
|
|
4585
|
+
function z(K) {
|
|
4586
|
+
D.highlightedCode = K, i.hooks.run("before-insert", D), D.element.innerHTML = D.highlightedCode, i.hooks.run("after-highlight", D), i.hooks.run("complete", D), g && g.call(D.element);
|
|
4587
4587
|
}
|
|
4588
4588
|
if (i.hooks.run("before-sanity-check", D), w = D.element.parentElement, w && w.nodeName.toLowerCase() === "pre" && !w.hasAttribute("tabindex") && w.setAttribute("tabindex", "0"), !D.code) {
|
|
4589
4589
|
i.hooks.run("complete", D), g && g.call(D.element);
|
|
4590
4590
|
return;
|
|
4591
4591
|
}
|
|
4592
4592
|
if (i.hooks.run("before-highlight", D), !D.grammar) {
|
|
4593
|
-
|
|
4593
|
+
z(i.util.encode(D.code));
|
|
4594
4594
|
return;
|
|
4595
4595
|
}
|
|
4596
4596
|
if (p && n.Worker) {
|
|
4597
|
-
var
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
},
|
|
4597
|
+
var $ = new Worker(i.filename);
|
|
4598
|
+
$.onmessage = function(K) {
|
|
4599
|
+
z(K.data);
|
|
4600
|
+
}, $.postMessage(JSON.stringify({
|
|
4601
4601
|
language: D.language,
|
|
4602
4602
|
code: D.code,
|
|
4603
4603
|
immediateClose: !0
|
|
4604
4604
|
}));
|
|
4605
4605
|
} else
|
|
4606
|
-
|
|
4606
|
+
z(i.highlight(D.code, D.grammar, D.language));
|
|
4607
4607
|
},
|
|
4608
4608
|
/**
|
|
4609
4609
|
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
|
@@ -4666,8 +4666,8 @@ function os() {
|
|
|
4666
4666
|
p[m] = g[m];
|
|
4667
4667
|
delete p.rest;
|
|
4668
4668
|
}
|
|
4669
|
-
var
|
|
4670
|
-
return _(
|
|
4669
|
+
var x = new f();
|
|
4670
|
+
return _(x, x.head, h), l(h, x, p, x.head, 0), d(x);
|
|
4671
4671
|
},
|
|
4672
4672
|
/**
|
|
4673
4673
|
* @namespace
|
|
@@ -4704,8 +4704,8 @@ function os() {
|
|
|
4704
4704
|
run: function(h, p) {
|
|
4705
4705
|
var g = i.hooks.all[h];
|
|
4706
4706
|
if (!(!g || !g.length))
|
|
4707
|
-
for (var m = 0,
|
|
4708
|
-
|
|
4707
|
+
for (var m = 0, x; x = g[m++]; )
|
|
4708
|
+
x(p);
|
|
4709
4709
|
}
|
|
4710
4710
|
},
|
|
4711
4711
|
Token: c
|
|
@@ -4719,11 +4719,11 @@ function os() {
|
|
|
4719
4719
|
return p;
|
|
4720
4720
|
if (Array.isArray(p)) {
|
|
4721
4721
|
var m = "";
|
|
4722
|
-
return p.forEach(function(
|
|
4723
|
-
m += h(
|
|
4722
|
+
return p.forEach(function(z) {
|
|
4723
|
+
m += h(z, g);
|
|
4724
4724
|
}), m;
|
|
4725
4725
|
}
|
|
4726
|
-
var
|
|
4726
|
+
var x = {
|
|
4727
4727
|
type: p.type,
|
|
4728
4728
|
content: h(p.content, g),
|
|
4729
4729
|
tag: "span",
|
|
@@ -4731,64 +4731,64 @@ function os() {
|
|
|
4731
4731
|
attributes: {},
|
|
4732
4732
|
language: g
|
|
4733
4733
|
}, w = p.alias;
|
|
4734
|
-
w && (Array.isArray(w) ? Array.prototype.push.apply(
|
|
4734
|
+
w && (Array.isArray(w) ? Array.prototype.push.apply(x.classes, w) : x.classes.push(w)), i.hooks.run("wrap", x);
|
|
4735
4735
|
var P = "";
|
|
4736
|
-
for (var D in
|
|
4737
|
-
P += " " + D + '="' + (
|
|
4738
|
-
return "<" +
|
|
4736
|
+
for (var D in x.attributes)
|
|
4737
|
+
P += " " + D + '="' + (x.attributes[D] || "").replace(/"/g, """) + '"';
|
|
4738
|
+
return "<" + x.tag + ' class="' + x.classes.join(" ") + '"' + P + ">" + x.content + "</" + x.tag + ">";
|
|
4739
4739
|
};
|
|
4740
4740
|
function s(h, p, g, m) {
|
|
4741
4741
|
h.lastIndex = p;
|
|
4742
|
-
var
|
|
4743
|
-
if (
|
|
4744
|
-
var w =
|
|
4745
|
-
|
|
4742
|
+
var x = h.exec(g);
|
|
4743
|
+
if (x && m && x[1]) {
|
|
4744
|
+
var w = x[1].length;
|
|
4745
|
+
x.index += w, x[0] = x[0].slice(w);
|
|
4746
4746
|
}
|
|
4747
|
-
return
|
|
4747
|
+
return x;
|
|
4748
4748
|
}
|
|
4749
|
-
function l(h, p, g, m,
|
|
4749
|
+
function l(h, p, g, m, x, w) {
|
|
4750
4750
|
for (var P in g)
|
|
4751
4751
|
if (!(!g.hasOwnProperty(P) || !g[P])) {
|
|
4752
4752
|
var D = g[P];
|
|
4753
4753
|
D = Array.isArray(D) ? D : [D];
|
|
4754
|
-
for (var
|
|
4755
|
-
if (w && w.cause == P + "," +
|
|
4754
|
+
for (var z = 0; z < D.length; ++z) {
|
|
4755
|
+
if (w && w.cause == P + "," + z)
|
|
4756
4756
|
return;
|
|
4757
|
-
var
|
|
4758
|
-
if (S &&
|
|
4759
|
-
var be =
|
|
4760
|
-
|
|
4757
|
+
var $ = D[z], K = $.inside, ue = !!$.lookbehind, S = !!$.greedy, W = $.alias;
|
|
4758
|
+
if (S && !$.pattern.global) {
|
|
4759
|
+
var be = $.pattern.toString().match(/[imsuy]*$/)[0];
|
|
4760
|
+
$.pattern = RegExp($.pattern.source, be + "g");
|
|
4761
4761
|
}
|
|
4762
|
-
for (var
|
|
4763
|
-
var
|
|
4762
|
+
for (var Ae = $.pattern || $, V = m.next, Q = x; V !== p.tail && !(w && Q >= w.reach); Q += V.value.length, V = V.next) {
|
|
4763
|
+
var C = V.value;
|
|
4764
4764
|
if (p.length > h.length)
|
|
4765
4765
|
return;
|
|
4766
|
-
if (!(
|
|
4767
|
-
var
|
|
4766
|
+
if (!(C instanceof c)) {
|
|
4767
|
+
var O = 1, T;
|
|
4768
4768
|
if (S) {
|
|
4769
|
-
if (
|
|
4769
|
+
if (T = s(Ae, Q, h, ue), !T || T.index >= h.length)
|
|
4770
4770
|
break;
|
|
4771
|
-
var te =
|
|
4772
|
-
for (
|
|
4773
|
-
|
|
4774
|
-
if (
|
|
4771
|
+
var te = T.index, j = T.index + T[0].length, U = Q;
|
|
4772
|
+
for (U += V.value.length; te >= U; )
|
|
4773
|
+
V = V.next, U += V.value.length;
|
|
4774
|
+
if (U -= V.value.length, Q = U, V.value instanceof c)
|
|
4775
4775
|
continue;
|
|
4776
|
-
for (var
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
} else if (
|
|
4776
|
+
for (var B = V; B !== p.tail && (U < j || typeof B.value == "string"); B = B.next)
|
|
4777
|
+
O++, U += B.value.length;
|
|
4778
|
+
O--, C = h.slice(Q, U), T.index -= Q;
|
|
4779
|
+
} else if (T = s(Ae, 0, C, ue), !T)
|
|
4780
4780
|
continue;
|
|
4781
|
-
var te =
|
|
4781
|
+
var te = T.index, le = T[0], Pe = C.slice(0, te), nu = C.slice(te + le.length), ru = Q + C.length;
|
|
4782
4782
|
w && ru > w.reach && (w.reach = ru);
|
|
4783
|
-
var Ke =
|
|
4784
|
-
|
|
4785
|
-
var
|
|
4786
|
-
if (
|
|
4787
|
-
var
|
|
4788
|
-
cause: P + "," +
|
|
4783
|
+
var Ke = V.prev;
|
|
4784
|
+
Pe && (Ke = _(p, Ke, Pe), Q += Pe.length), k(p, Ke, O);
|
|
4785
|
+
var Ge = new c(P, K ? i.tokenize(le, K) : le, W, le);
|
|
4786
|
+
if (V = _(p, Ke, Ge), nu && _(p, V, nu), O > 1) {
|
|
4787
|
+
var We = {
|
|
4788
|
+
cause: P + "," + z,
|
|
4789
4789
|
reach: ru
|
|
4790
4790
|
};
|
|
4791
|
-
l(h, p, g,
|
|
4791
|
+
l(h, p, g, V.prev, Q, We), w && We.reach > w.reach && (w.reach = We.reach);
|
|
4792
4792
|
}
|
|
4793
4793
|
}
|
|
4794
4794
|
}
|
|
@@ -4800,13 +4800,13 @@ function os() {
|
|
|
4800
4800
|
h.next = p, this.head = h, this.tail = p, this.length = 0;
|
|
4801
4801
|
}
|
|
4802
4802
|
function _(h, p, g) {
|
|
4803
|
-
var m = p.next,
|
|
4804
|
-
return p.next =
|
|
4803
|
+
var m = p.next, x = { value: g, prev: p, next: m };
|
|
4804
|
+
return p.next = x, m.prev = x, h.length++, x;
|
|
4805
4805
|
}
|
|
4806
|
-
function
|
|
4807
|
-
for (var m = p.next,
|
|
4806
|
+
function k(h, p, g) {
|
|
4807
|
+
for (var m = p.next, x = 0; x < g && m !== h.tail; x++)
|
|
4808
4808
|
m = m.next;
|
|
4809
|
-
p.next = m, m.prev = p, h.length -=
|
|
4809
|
+
p.next = m, m.prev = p, h.length -= x;
|
|
4810
4810
|
}
|
|
4811
4811
|
function d(h) {
|
|
4812
4812
|
for (var p = [], g = h.head.next; g !== h.tail; )
|
|
@@ -4815,8 +4815,8 @@ function os() {
|
|
|
4815
4815
|
}
|
|
4816
4816
|
if (!n.document)
|
|
4817
4817
|
return n.addEventListener && (i.disableWorkerMessageHandler || n.addEventListener("message", function(h) {
|
|
4818
|
-
var p = JSON.parse(h.data), g = p.language, m = p.code,
|
|
4819
|
-
n.postMessage(i.highlight(m, i.languages[g], g)),
|
|
4818
|
+
var p = JSON.parse(h.data), g = p.language, m = p.code, x = p.immediateClose;
|
|
4819
|
+
n.postMessage(i.highlight(m, i.languages[g], g)), x && n.close();
|
|
4820
4820
|
}, !1)), i;
|
|
4821
4821
|
var E = i.util.currentScript();
|
|
4822
4822
|
E && (i.filename = E.src, E.hasAttribute("data-manual") && (i.manual = !0));
|
|
@@ -5226,7 +5226,7 @@ function os() {
|
|
|
5226
5226
|
h.readyState == 4 && (h.status < 400 && h.responseText ? A(h.responseText) : h.status >= 400 ? y(r(h.status, h.statusText)) : y(o));
|
|
5227
5227
|
}, h.send(null);
|
|
5228
5228
|
}
|
|
5229
|
-
function
|
|
5229
|
+
function k(E) {
|
|
5230
5230
|
var A = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(E || "");
|
|
5231
5231
|
if (A) {
|
|
5232
5232
|
var y = Number(A[1]), h = A[2], p = A[3];
|
|
@@ -5253,18 +5253,18 @@ function os() {
|
|
|
5253
5253
|
var m = t.plugins.autoloader;
|
|
5254
5254
|
m && m.loadLanguages(p), _(
|
|
5255
5255
|
h,
|
|
5256
|
-
function(
|
|
5256
|
+
function(x) {
|
|
5257
5257
|
A.setAttribute(i, s);
|
|
5258
|
-
var w =
|
|
5258
|
+
var w = k(A.getAttribute("data-range"));
|
|
5259
5259
|
if (w) {
|
|
5260
|
-
var P =
|
|
5261
|
-
D < 0 && (D += P.length), D = Math.max(0, Math.min(D - 1, P.length)),
|
|
5260
|
+
var P = x.split(/\r\n?|\n/g), D = w[0], z = w[1] == null ? P.length : w[1];
|
|
5261
|
+
D < 0 && (D += P.length), D = Math.max(0, Math.min(D - 1, P.length)), z < 0 && (z += P.length), z = Math.max(0, Math.min(z, P.length)), x = P.slice(D, z).join(`
|
|
5262
5262
|
`), A.hasAttribute("data-start") || A.setAttribute("data-start", String(D + 1));
|
|
5263
5263
|
}
|
|
5264
|
-
y.textContent =
|
|
5264
|
+
y.textContent = x, t.highlightElement(y);
|
|
5265
5265
|
},
|
|
5266
|
-
function(
|
|
5267
|
-
A.setAttribute(i, l), y.textContent =
|
|
5266
|
+
function(x) {
|
|
5267
|
+
A.setAttribute(i, l), y.textContent = x;
|
|
5268
5268
|
}
|
|
5269
5269
|
);
|
|
5270
5270
|
}
|
|
@@ -5365,11 +5365,11 @@ const fs = ["innerHTML"], ds = /* @__PURE__ */ xe({
|
|
|
5365
5365
|
breaks: !0,
|
|
5366
5366
|
highlight: as
|
|
5367
5367
|
}), s = ge(() => e.markdown ? c.value : n.value);
|
|
5368
|
-
return (l, f) => (R(),
|
|
5368
|
+
return (l, f) => (R(), I(v(cn), {
|
|
5369
5369
|
tag: "div",
|
|
5370
5370
|
class: Su([v(ut)])
|
|
5371
5371
|
}, {
|
|
5372
|
-
default:
|
|
5372
|
+
default: L(() => [
|
|
5373
5373
|
Lu("div", {
|
|
5374
5374
|
class: Su([v(r) && !l.markdown ? `${v(ut)}__cursor` : void 0, l.markdown ? `${v(ut)}__markdown` : void 0]),
|
|
5375
5375
|
style: on([l.markdown ? void 0 : { "--cursor-content": `'${l.suffix}'` }]),
|
|
@@ -5414,35 +5414,35 @@ const Vl = /* @__PURE__ */ xe({
|
|
|
5414
5414
|
emits: ["typingComplete"],
|
|
5415
5415
|
setup(e, { emit: u }) {
|
|
5416
5416
|
const t = u;
|
|
5417
|
-
return gt("n-bubble", gs()), (n, r) => (R(),
|
|
5417
|
+
return gt("n-bubble", gs()), (n, r) => (R(), I(v(cn), {
|
|
5418
5418
|
tag: "div",
|
|
5419
5419
|
class: Su([v(Zt), n.placement === "end" ? `${v(Zt)}--reverse` : ""])
|
|
5420
5420
|
}, {
|
|
5421
|
-
default:
|
|
5421
|
+
default: L(() => [
|
|
5422
5422
|
H(n.$slots, "avatar", {}, () => [
|
|
5423
|
-
n.avatar ? (R(),
|
|
5423
|
+
n.avatar ? (R(), I(v(qo), X({
|
|
5424
5424
|
key: 0,
|
|
5425
5425
|
round: ""
|
|
5426
5426
|
}, n.avatar.props), {
|
|
5427
|
-
default:
|
|
5428
|
-
(R(),
|
|
5427
|
+
default: L(() => [
|
|
5428
|
+
(R(), I(oe(n.avatar.icon)))
|
|
5429
5429
|
]),
|
|
5430
5430
|
_: 1
|
|
5431
5431
|
}, 16)) : ie("", !0)
|
|
5432
5432
|
]),
|
|
5433
|
-
|
|
5434
|
-
default:
|
|
5433
|
+
Z(v(je), { vertical: "" }, {
|
|
5434
|
+
default: L(() => [
|
|
5435
5435
|
H(n.$slots, "header"),
|
|
5436
|
-
|
|
5437
|
-
default:
|
|
5436
|
+
Z(v($r), null, {
|
|
5437
|
+
default: L(() => [
|
|
5438
5438
|
n.loading ? H(n.$slots, "loading", { key: 0 }, () => [
|
|
5439
|
-
|
|
5439
|
+
Z(v(Tr), { style: { height: "44px" } })
|
|
5440
5440
|
]) : H(n.$slots, "default", { key: 1 }, () => [
|
|
5441
5441
|
Lu("div", {
|
|
5442
5442
|
class: Su([`${v(Zt)}__content`, n.contentClass]),
|
|
5443
5443
|
style: on(n.contentStyle)
|
|
5444
5444
|
}, [
|
|
5445
|
-
|
|
5445
|
+
Z(v(ds), {
|
|
5446
5446
|
typing: n.typing,
|
|
5447
5447
|
markdown: n.markdown,
|
|
5448
5448
|
value: n.content,
|
|
@@ -5495,31 +5495,31 @@ const vs = /* @__PURE__ */ xe({
|
|
|
5495
5495
|
setup(e) {
|
|
5496
5496
|
gt(tt, _s());
|
|
5497
5497
|
const u = G("auto");
|
|
5498
|
-
return
|
|
5498
|
+
return Le(() => {
|
|
5499
5499
|
if (e.disableScroll) {
|
|
5500
5500
|
const t = e.scrollSelector instanceof HTMLElement ? e.scrollSelector : document.querySelector(e.scrollSelector);
|
|
5501
5501
|
t && (e.show && (u.value = t.style.overflow), t.style.overflow = e.show ? "hidden" : u.value);
|
|
5502
5502
|
}
|
|
5503
|
-
}), (t, n) => (R(),
|
|
5504
|
-
default:
|
|
5505
|
-
(R(),
|
|
5506
|
-
t.show ? (R(),
|
|
5503
|
+
}), (t, n) => (R(), I(v($r), null, {
|
|
5504
|
+
default: L(() => [
|
|
5505
|
+
(R(), I(Oo, { to: t.appendTo }, [
|
|
5506
|
+
t.show ? (R(), I(v(cn), {
|
|
5507
5507
|
key: 0,
|
|
5508
5508
|
class: Su([v(tt), { [`${v(tt)}--mask`]: t.mask }, { [`${v(tt)}--blur`]: t.blur }]),
|
|
5509
5509
|
style: on(typeof t.mask == "object" ? t.mask : {})
|
|
5510
5510
|
}, {
|
|
5511
|
-
default:
|
|
5512
|
-
|
|
5511
|
+
default: L(() => [
|
|
5512
|
+
Z(v(Tr), ce(qe(t.spinProps)), Mo({ _: 2 }, [
|
|
5513
5513
|
t.$slots.description ? {
|
|
5514
5514
|
name: "description",
|
|
5515
|
-
fn:
|
|
5515
|
+
fn: L(() => [
|
|
5516
5516
|
H(t.$slots, "description")
|
|
5517
5517
|
]),
|
|
5518
5518
|
key: "0"
|
|
5519
5519
|
} : void 0,
|
|
5520
5520
|
t.$slots.icon ? {
|
|
5521
5521
|
name: "icon",
|
|
5522
|
-
fn:
|
|
5522
|
+
fn: L(() => [
|
|
5523
5523
|
H(t.$slots, "icon")
|
|
5524
5524
|
]),
|
|
5525
5525
|
key: "1"
|
|
@@ -5567,20 +5567,20 @@ const vs = /* @__PURE__ */ xe({
|
|
|
5567
5567
|
return null;
|
|
5568
5568
|
}
|
|
5569
5569
|
});
|
|
5570
|
-
return (r, o) => (R(),
|
|
5571
|
-
default:
|
|
5572
|
-
|
|
5573
|
-
default:
|
|
5574
|
-
|
|
5575
|
-
default:
|
|
5576
|
-
|
|
5577
|
-
default:
|
|
5578
|
-
|
|
5579
|
-
default:
|
|
5580
|
-
|
|
5581
|
-
default:
|
|
5570
|
+
return (r, o) => (R(), I(v(jo), ce(qe(r.configProviderProps)), {
|
|
5571
|
+
default: L(() => [
|
|
5572
|
+
Z(v(Ho), ce(qe(r.loadingBarProps)), {
|
|
5573
|
+
default: L(() => [
|
|
5574
|
+
Z(v(Go), ce(qe(r.dialogProviderProps)), {
|
|
5575
|
+
default: L(() => [
|
|
5576
|
+
Z(v(Wo), ce(qe(r.modalProviderProps)), {
|
|
5577
|
+
default: L(() => [
|
|
5578
|
+
Z(v(Vo), ce(qe(r.notificationProviderProps)), {
|
|
5579
|
+
default: L(() => [
|
|
5580
|
+
Z(v(Zo), ce(qe(r.messageProviderProps)), {
|
|
5581
|
+
default: L(() => [
|
|
5582
5582
|
H(r.$slots, "default"),
|
|
5583
|
-
|
|
5583
|
+
Z(v(n))
|
|
5584
5584
|
]),
|
|
5585
5585
|
_: 3
|
|
5586
5586
|
}, 16)
|
|
@@ -5596,8 +5596,8 @@ const vs = /* @__PURE__ */ xe({
|
|
|
5596
5596
|
]),
|
|
5597
5597
|
_: 3
|
|
5598
5598
|
}, 16),
|
|
5599
|
-
r.globalStyle ? (R(),
|
|
5600
|
-
|
|
5599
|
+
r.globalStyle ? (R(), I(v(Yo), { key: 0 })) : ie("", !0),
|
|
5600
|
+
Z(v(vs), X({ show: u.value }, r.fullLoadingProps), null, 16, ["show"])
|
|
5601
5601
|
]),
|
|
5602
5602
|
_: 3
|
|
5603
5603
|
}, 16));
|
|
@@ -5637,26 +5637,26 @@ const ws = /* @__PURE__ */ _n(ys, [["render", As]]), Yl = /* @__PURE__ */ xe({
|
|
|
5637
5637
|
source: e.value,
|
|
5638
5638
|
...e.config
|
|
5639
5639
|
});
|
|
5640
|
-
|
|
5640
|
+
He(n, () => {
|
|
5641
5641
|
n.value && t("copied", e.value);
|
|
5642
5642
|
});
|
|
5643
5643
|
function o(a) {
|
|
5644
5644
|
a.preventDefault(), r();
|
|
5645
5645
|
}
|
|
5646
|
-
return (a, i) => (R(),
|
|
5647
|
-
trigger:
|
|
5646
|
+
return (a, i) => (R(), I(v(Pr), ce(qe(a.tooltipProps)), {
|
|
5647
|
+
trigger: L(() => [
|
|
5648
5648
|
Lu("div", {
|
|
5649
5649
|
style: { cursor: "pointer" },
|
|
5650
5650
|
onClick: o
|
|
5651
5651
|
}, [
|
|
5652
5652
|
H(a.$slots, "default", {}, () => [
|
|
5653
|
-
|
|
5653
|
+
Z(v(mu), X({
|
|
5654
5654
|
quaternary: "",
|
|
5655
5655
|
size: "tiny"
|
|
5656
5656
|
}, a.buttonProps), {
|
|
5657
|
-
icon:
|
|
5657
|
+
icon: L(() => [
|
|
5658
5658
|
H(a.$slots, "icon", {}, () => [
|
|
5659
|
-
|
|
5659
|
+
Z(ws)
|
|
5660
5660
|
])
|
|
5661
5661
|
]),
|
|
5662
5662
|
_: 3
|
|
@@ -5664,7 +5664,7 @@ const ws = /* @__PURE__ */ _n(ys, [["render", As]]), Yl = /* @__PURE__ */ xe({
|
|
|
5664
5664
|
])
|
|
5665
5665
|
])
|
|
5666
5666
|
]),
|
|
5667
|
-
default:
|
|
5667
|
+
default: L(() => [
|
|
5668
5668
|
H(a.$slots, "tooltip", {}, () => [
|
|
5669
5669
|
Nu(Iu(v(n) ? "复制成功" : "复制"), 1)
|
|
5670
5670
|
])
|
|
@@ -5674,9 +5674,9 @@ const ws = /* @__PURE__ */ _n(ys, [["render", As]]), Yl = /* @__PURE__ */ xe({
|
|
|
5674
5674
|
}
|
|
5675
5675
|
}), go = (e, { manual: u, ready: t = !0, refreshDeps: n = [], refreshDepsAction: r }) => {
|
|
5676
5676
|
const o = G(!1);
|
|
5677
|
-
return
|
|
5677
|
+
return Le(() => {
|
|
5678
5678
|
!u && e.options.refreshDeps !== !0 && (o.value = v(t));
|
|
5679
|
-
}), n instanceof Array ?
|
|
5679
|
+
}), n instanceof Array ? He(
|
|
5680
5680
|
[o, ...n],
|
|
5681
5681
|
([a]) => {
|
|
5682
5682
|
a && !u && a && (r ? r() : e.refresh());
|
|
@@ -5685,7 +5685,7 @@ const ws = /* @__PURE__ */ _n(ys, [["render", As]]), Yl = /* @__PURE__ */ xe({
|
|
|
5685
5685
|
deep: !0,
|
|
5686
5686
|
immediate: !1
|
|
5687
5687
|
}
|
|
5688
|
-
) :
|
|
5688
|
+
) : He(o, (a) => {
|
|
5689
5689
|
!u && a && (r ? r() : e.refresh());
|
|
5690
5690
|
}), {
|
|
5691
5691
|
name: "autoRunPlugin",
|
|
@@ -5732,7 +5732,7 @@ const at = /* @__PURE__ */ new Map(), Cs = (e, u, t) => {
|
|
|
5732
5732
|
const a = G(), i = G(), c = (l, f) => {
|
|
5733
5733
|
r ? r(f) : Cs(l, t, f), Ps(l, f.data);
|
|
5734
5734
|
}, s = (l, f = []) => o ? o(f) : Ds(l);
|
|
5735
|
-
return
|
|
5735
|
+
return Le(() => {
|
|
5736
5736
|
if (!u)
|
|
5737
5737
|
return;
|
|
5738
5738
|
const l = s(u);
|
|
@@ -5764,8 +5764,8 @@ const at = /* @__PURE__ */ new Map(), Cs = (e, u, t) => {
|
|
|
5764
5764
|
data: l,
|
|
5765
5765
|
params: f,
|
|
5766
5766
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
5767
|
-
}), a.value = Yt(u, (
|
|
5768
|
-
e.setState({ data:
|
|
5767
|
+
}), a.value = Yt(u, (k) => {
|
|
5768
|
+
e.setState({ data: k });
|
|
5769
5769
|
}));
|
|
5770
5770
|
},
|
|
5771
5771
|
onMutate: (l) => {
|
|
@@ -5844,29 +5844,29 @@ function _o(e, u, t) {
|
|
|
5844
5844
|
if (typeof e != "function")
|
|
5845
5845
|
throw new TypeError(ul);
|
|
5846
5846
|
u = Ar(u) || 0, ht(t) && (l = !!t.leading, f = "maxWait" in t, o = f ? tl(Ar(t.maxWait) || 0, u) : o, _ = "trailing" in t ? !!t.trailing : _);
|
|
5847
|
-
function x
|
|
5847
|
+
function k(x) {
|
|
5848
5848
|
var w = n, P = r;
|
|
5849
|
-
return n = r = void 0, s =
|
|
5849
|
+
return n = r = void 0, s = x, a = e.apply(P, w), a;
|
|
5850
5850
|
}
|
|
5851
|
-
function d(
|
|
5852
|
-
return s =
|
|
5851
|
+
function d(x) {
|
|
5852
|
+
return s = x, i = setTimeout(y, u), l ? k(x) : a;
|
|
5853
5853
|
}
|
|
5854
|
-
function E(
|
|
5855
|
-
var w =
|
|
5854
|
+
function E(x) {
|
|
5855
|
+
var w = x - c, P = x - s, D = u - w;
|
|
5856
5856
|
return f ? nl(D, o - P) : D;
|
|
5857
5857
|
}
|
|
5858
|
-
function A(
|
|
5859
|
-
var w =
|
|
5858
|
+
function A(x) {
|
|
5859
|
+
var w = x - c, P = x - s;
|
|
5860
5860
|
return c === void 0 || w >= u || w < 0 || f && P >= o;
|
|
5861
5861
|
}
|
|
5862
5862
|
function y() {
|
|
5863
|
-
var
|
|
5864
|
-
if (A(
|
|
5865
|
-
return h(
|
|
5866
|
-
i = setTimeout(y, E(
|
|
5863
|
+
var x = Xt();
|
|
5864
|
+
if (A(x))
|
|
5865
|
+
return h(x);
|
|
5866
|
+
i = setTimeout(y, E(x));
|
|
5867
5867
|
}
|
|
5868
|
-
function h(
|
|
5869
|
-
return i = void 0, _ && n ? x
|
|
5868
|
+
function h(x) {
|
|
5869
|
+
return i = void 0, _ && n ? k(x) : (n = r = void 0, a);
|
|
5870
5870
|
}
|
|
5871
5871
|
function p() {
|
|
5872
5872
|
i !== void 0 && clearTimeout(i), s = 0, n = c = r = i = void 0;
|
|
@@ -5875,12 +5875,12 @@ function _o(e, u, t) {
|
|
|
5875
5875
|
return i === void 0 ? a : h(Xt());
|
|
5876
5876
|
}
|
|
5877
5877
|
function m() {
|
|
5878
|
-
var
|
|
5879
|
-
if (n = arguments, r = this, c =
|
|
5878
|
+
var x = Xt(), w = A(x);
|
|
5879
|
+
if (n = arguments, r = this, c = x, w) {
|
|
5880
5880
|
if (i === void 0)
|
|
5881
5881
|
return d(c);
|
|
5882
5882
|
if (f)
|
|
5883
|
-
return clearTimeout(i), i = setTimeout(y, u),
|
|
5883
|
+
return clearTimeout(i), i = setTimeout(y, u), k(c);
|
|
5884
5884
|
}
|
|
5885
5885
|
return i === void 0 && (i = setTimeout(y, u)), a;
|
|
5886
5886
|
}
|
|
@@ -5891,7 +5891,7 @@ const rl = (e, { debounceWait: u, debounceLeading: t, debounceTrailing: n, debou
|
|
|
5891
5891
|
const i = {}, c = v(t), s = v(n), l = v(r);
|
|
5892
5892
|
return c !== void 0 && (i.leading = c), s !== void 0 && (i.trailing = s), l !== void 0 && (i.maxWait = l), i;
|
|
5893
5893
|
});
|
|
5894
|
-
return
|
|
5894
|
+
return Le((i) => {
|
|
5895
5895
|
if (v(u)) {
|
|
5896
5896
|
const c = e.runAsync.bind(e);
|
|
5897
5897
|
o.value = _o(
|
|
@@ -5992,7 +5992,7 @@ const ye = new dl(), pl = (e, { ready: u = !0, debugKey: t, ...n }) => {
|
|
|
5992
5992
|
Object.entries({ ready: u, ...n }).map(([a, i]) => [a, v(i)])
|
|
5993
5993
|
)
|
|
5994
5994
|
);
|
|
5995
|
-
return
|
|
5995
|
+
return Le(() => {
|
|
5996
5996
|
t && ye.has(t) && ye.emit({
|
|
5997
5997
|
...e,
|
|
5998
5998
|
options: { ...e.options, ...o.value }
|
|
@@ -6103,7 +6103,7 @@ const gl = (e, { pollingInterval: u, pollingWhenHidden: t = !0, pollingErrorRetr
|
|
|
6103
6103
|
var c;
|
|
6104
6104
|
r && clearTimeout(r), (c = o.value) == null || c.call(o);
|
|
6105
6105
|
};
|
|
6106
|
-
return
|
|
6106
|
+
return Le(() => {
|
|
6107
6107
|
v(u) || i();
|
|
6108
6108
|
}), v(u) ? {
|
|
6109
6109
|
name: "pollingPlugin",
|
|
@@ -6161,7 +6161,7 @@ const vl = (e, { refreshOnWindowFocus: u, focusTimespan: t = 5e3 }) => {
|
|
|
6161
6161
|
var o;
|
|
6162
6162
|
(o = n.value) == null || o.call(n);
|
|
6163
6163
|
};
|
|
6164
|
-
return
|
|
6164
|
+
return Le((o) => {
|
|
6165
6165
|
if (v(u)) {
|
|
6166
6166
|
const a = xl(
|
|
6167
6167
|
e.refresh.bind(e),
|
|
@@ -6220,19 +6220,19 @@ const wl = (e, { throttleWait: u, throttleLeading: t, throttleTrailing: n }) =>
|
|
|
6220
6220
|
const s = {};
|
|
6221
6221
|
return v(t) !== void 0 && (s.leading = v(t)), v(n) !== void 0 && (s.trailing = v(n)), s;
|
|
6222
6222
|
}), a = e.runAsync.bind(e), i = G(), c = ge(() => v(u));
|
|
6223
|
-
return
|
|
6223
|
+
return He([c, o], (s) => {
|
|
6224
6224
|
r && (r.cancel(), e.runAsync = a);
|
|
6225
6225
|
const [l, f] = s, _ = Al(
|
|
6226
|
-
(
|
|
6227
|
-
|
|
6226
|
+
(k) => {
|
|
6227
|
+
k();
|
|
6228
6228
|
},
|
|
6229
6229
|
v(l),
|
|
6230
6230
|
f
|
|
6231
6231
|
);
|
|
6232
|
-
r = _, i.value = _, e.runAsync = (...
|
|
6232
|
+
r = _, i.value = _, e.runAsync = (...k) => new Promise((d, E) => {
|
|
6233
6233
|
var A;
|
|
6234
6234
|
(A = i.value) == null || A.call(i, () => {
|
|
6235
|
-
a(...
|
|
6235
|
+
a(...k).then(d).catch(E);
|
|
6236
6236
|
});
|
|
6237
6237
|
});
|
|
6238
6238
|
}, {
|
|
@@ -6289,7 +6289,7 @@ class Sl {
|
|
|
6289
6289
|
async runAsync(...u) {
|
|
6290
6290
|
var t, n, r, o, a, i, c, s, l, f, _;
|
|
6291
6291
|
this.count += 1;
|
|
6292
|
-
const
|
|
6292
|
+
const k = this.count, { stopNow: d = !1, returnNow: E = !1, ...A } = this.runPluginHandler(
|
|
6293
6293
|
"onBefore",
|
|
6294
6294
|
u
|
|
6295
6295
|
);
|
|
@@ -6314,24 +6314,24 @@ class Sl {
|
|
|
6314
6314
|
try {
|
|
6315
6315
|
let { servicePromise: y } = this.runPluginHandler("onRequest", this.serviceRef.value, u);
|
|
6316
6316
|
const h = (g) => {
|
|
6317
|
-
var m,
|
|
6318
|
-
if (!this.options.concurrent &&
|
|
6317
|
+
var m, x, w, P;
|
|
6318
|
+
if (!this.options.concurrent && k !== this.count)
|
|
6319
6319
|
return new Promise(() => {
|
|
6320
6320
|
});
|
|
6321
|
-
const D = this.options.formatResult ? this.options.formatResult(g) : g,
|
|
6321
|
+
const D = this.options.formatResult ? this.options.formatResult(g) : g, z = {
|
|
6322
6322
|
data: g
|
|
6323
6323
|
};
|
|
6324
6324
|
return this.setState({
|
|
6325
6325
|
data: D,
|
|
6326
6326
|
error: void 0,
|
|
6327
6327
|
loading: !1
|
|
6328
|
-
}), (
|
|
6328
|
+
}), (x = (m = this.options).onSuccess) == null || x.call(m, D, u), this.runPluginHandler("onSuccess", D, u, z), this.previousValidData = D, (P = (w = this.options).onFinally) == null || P.call(w, u, D, void 0), (this.options.concurrent || k === this.count) && this.runPluginHandler("onFinally", u, D, void 0), D;
|
|
6329
6329
|
};
|
|
6330
6330
|
y || (y = this.serviceRef.value(...u));
|
|
6331
6331
|
const p = await y;
|
|
6332
6332
|
return h(p);
|
|
6333
6333
|
} catch (y) {
|
|
6334
|
-
if (!this.options.concurrent &&
|
|
6334
|
+
if (!this.options.concurrent && k !== this.count)
|
|
6335
6335
|
return new Promise(() => {
|
|
6336
6336
|
});
|
|
6337
6337
|
throw this.setState({
|
|
@@ -6339,7 +6339,7 @@ class Sl {
|
|
|
6339
6339
|
loading: !1
|
|
6340
6340
|
}), (i = (a = this.options).onError) == null || i.call(a, y, u), this.runPluginHandler("onError", y, u), (Dr((c = this.options) == null ? void 0 : c.rollbackOnError) && ((s = this.options) != null && s.rollbackOnError(u)) || Cl((l = this.options) == null ? void 0 : l.rollbackOnError) && this.options.rollbackOnError) && this.setState({
|
|
6341
6341
|
data: this.previousValidData
|
|
6342
|
-
}), (_ = (f = this.options).onFinally) == null || _.call(f, u, void 0, y), (this.options.concurrent ||
|
|
6342
|
+
}), (_ = (f = this.options).onFinally) == null || _.call(f, u, void 0, y), (this.options.concurrent || k === this.count) && this.runPluginHandler("onFinally", u, void 0, y), y;
|
|
6343
6343
|
}
|
|
6344
6344
|
}
|
|
6345
6345
|
run(...u) {
|
|
@@ -6393,33 +6393,33 @@ function Rl(e, u = {}, t = []) {
|
|
|
6393
6393
|
}, _ = t.map((E) => {
|
|
6394
6394
|
var A;
|
|
6395
6395
|
return (A = E?.onInit) == null ? void 0 : A.call(E, c);
|
|
6396
|
-
}).filter(Boolean),
|
|
6396
|
+
}).filter(Boolean), k = new Sl(
|
|
6397
6397
|
s,
|
|
6398
6398
|
c,
|
|
6399
6399
|
f,
|
|
6400
6400
|
Object.assign({}, ..._, l)
|
|
6401
6401
|
);
|
|
6402
|
-
|
|
6402
|
+
k.options = c, k.pluginImpls = t.map((E) => E(k, c));
|
|
6403
6403
|
const d = ge(() => Qt(a) ? a.value : a);
|
|
6404
|
-
if (
|
|
6404
|
+
if (Le(() => {
|
|
6405
6405
|
if (!o) {
|
|
6406
|
-
const E =
|
|
6407
|
-
d.value &&
|
|
6406
|
+
const E = k.state.params || u.defaultParams || [];
|
|
6407
|
+
d.value && k.options.refreshDeps === !0 && s.value && k.run(...E);
|
|
6408
6408
|
}
|
|
6409
|
-
}), !o &&
|
|
6410
|
-
const E =
|
|
6411
|
-
v(a) &&
|
|
6409
|
+
}), !o && k.options.refreshDeps !== !0) {
|
|
6410
|
+
const E = k.state.params || u.defaultParams || [];
|
|
6411
|
+
v(a) && k.run(...E);
|
|
6412
6412
|
}
|
|
6413
6413
|
return an(() => {
|
|
6414
|
-
|
|
6414
|
+
k.cancel();
|
|
6415
6415
|
}), {
|
|
6416
6416
|
...Io(l),
|
|
6417
|
-
cancel:
|
|
6418
|
-
refresh:
|
|
6419
|
-
refreshAsync:
|
|
6420
|
-
run:
|
|
6421
|
-
runAsync:
|
|
6422
|
-
mutate:
|
|
6417
|
+
cancel: k.cancel.bind(k),
|
|
6418
|
+
refresh: k.refresh.bind(k),
|
|
6419
|
+
refreshAsync: k.refreshAsync.bind(k),
|
|
6420
|
+
run: k.run.bind(k),
|
|
6421
|
+
runAsync: k.runAsync.bind(k),
|
|
6422
|
+
mutate: k.mutate.bind(k)
|
|
6423
6423
|
};
|
|
6424
6424
|
}
|
|
6425
6425
|
const Ol = (e, u) => function(n, r = {}, o = []) {
|
|
@@ -6500,13 +6500,13 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6500
6500
|
setup(e, { emit: u }) {
|
|
6501
6501
|
const t = u, n = mt("input-ref"), r = G(e.value), { isPending: o, start: a } = ki(() => {
|
|
6502
6502
|
}, typeof e.autoTrigger == "number" ? e.autoTrigger : 500);
|
|
6503
|
-
|
|
6503
|
+
He(() => e.value, (l) => {
|
|
6504
6504
|
r.value = l;
|
|
6505
6505
|
});
|
|
6506
6506
|
const i = Lr(() => {
|
|
6507
6507
|
t("update:value", r.value);
|
|
6508
6508
|
}, typeof e.autoTrigger == "number" ? e.autoTrigger : 500);
|
|
6509
|
-
|
|
6509
|
+
He(r, () => {
|
|
6510
6510
|
a(), e.autoTrigger && i();
|
|
6511
6511
|
});
|
|
6512
6512
|
function c() {
|
|
@@ -6515,38 +6515,38 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6515
6515
|
function s(l) {
|
|
6516
6516
|
l.key === "Enter" && c();
|
|
6517
6517
|
}
|
|
6518
|
-
return
|
|
6518
|
+
return Le(() => {
|
|
6519
6519
|
!e.loading && r.value && n.value?.focus();
|
|
6520
|
-
}), (l, f) => (R(),
|
|
6521
|
-
default:
|
|
6522
|
-
|
|
6520
|
+
}), (l, f) => (R(), I(v(ti), null, {
|
|
6521
|
+
default: L(() => [
|
|
6522
|
+
Z(v(sn), X({
|
|
6523
6523
|
ref: "input-ref",
|
|
6524
6524
|
value: r.value,
|
|
6525
6525
|
"onUpdate:value": f[0] || (f[0] = (_) => r.value = _),
|
|
6526
6526
|
disabled: l.loading,
|
|
6527
6527
|
clearable: ""
|
|
6528
6528
|
}, l.inputProps, { onKeydown: s }), {
|
|
6529
|
-
prefix:
|
|
6529
|
+
prefix: L(() => [
|
|
6530
6530
|
H(l.$slots, "prefix", {}, () => [
|
|
6531
6531
|
H(l.$slots, "prefix-icon", {}, () => [
|
|
6532
|
-
|
|
6532
|
+
Z(Fr)
|
|
6533
6533
|
])
|
|
6534
6534
|
])
|
|
6535
6535
|
]),
|
|
6536
|
-
suffix:
|
|
6537
|
-
v(o) ? (R(),
|
|
6536
|
+
suffix: L(() => [
|
|
6537
|
+
v(o) ? (R(), I(Il, { key: 0 })) : ie("", !0)
|
|
6538
6538
|
]),
|
|
6539
6539
|
_: 3
|
|
6540
6540
|
}, 16, ["value", "disabled"]),
|
|
6541
6541
|
H(l.$slots, "button", {}, () => [
|
|
6542
|
-
l.searchButton ? (R(),
|
|
6542
|
+
l.searchButton ? (R(), I(v(mu), X({
|
|
6543
6543
|
key: 0,
|
|
6544
6544
|
type: l.type,
|
|
6545
6545
|
loading: l.loading
|
|
6546
6546
|
}, l.buttonProps, { onClick: c }), {
|
|
6547
|
-
icon:
|
|
6547
|
+
icon: L(() => [
|
|
6548
6548
|
H(l.$slots, "button-icon", {}, () => [
|
|
6549
|
-
|
|
6549
|
+
Z(Fr)
|
|
6550
6550
|
])
|
|
6551
6551
|
]),
|
|
6552
6552
|
_: 3
|
|
@@ -6630,7 +6630,7 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6630
6630
|
...a
|
|
6631
6631
|
});
|
|
6632
6632
|
}
|
|
6633
|
-
return (o, a) => (R(),
|
|
6633
|
+
return (o, a) => (R(), I(oe(r())));
|
|
6634
6634
|
}
|
|
6635
6635
|
}), Xl = /* @__PURE__ */ xe({
|
|
6636
6636
|
__name: "DataTablePlus",
|
|
@@ -6676,7 +6676,7 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6676
6676
|
[i.page]: s.value.page,
|
|
6677
6677
|
[i.pageSize]: s.value.pageSize,
|
|
6678
6678
|
...e.defaultParams
|
|
6679
|
-
}, { loading: f, data: _, error:
|
|
6679
|
+
}, { loading: f, data: _, error: k, params: d, run: E, runAsync: A, refresh: y, refreshAsync: h, cancel: p, mutate: g } = En(e.api, {
|
|
6680
6680
|
defaultParams: [
|
|
6681
6681
|
l
|
|
6682
6682
|
],
|
|
@@ -6685,97 +6685,100 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6685
6685
|
onBefore: (C) => {
|
|
6686
6686
|
e.requestOptions?.onBefore?.(C), n("before", C);
|
|
6687
6687
|
},
|
|
6688
|
-
onSuccess: (C,
|
|
6689
|
-
e.requestOptions?.onSuccess?.(C,
|
|
6688
|
+
onSuccess: (C, O) => {
|
|
6689
|
+
e.requestOptions?.onSuccess?.(C, O), n("success", C, O), P(C, O);
|
|
6690
6690
|
},
|
|
6691
|
-
onError: (C,
|
|
6692
|
-
e.requestOptions?.onError?.(C,
|
|
6691
|
+
onError: (C, O) => {
|
|
6692
|
+
e.requestOptions?.onError?.(C, O), n("error", C, O);
|
|
6693
6693
|
},
|
|
6694
|
-
onFinally: (C,
|
|
6695
|
-
e.requestOptions?.onFinally?.(C,
|
|
6694
|
+
onFinally: (C, O, T) => {
|
|
6695
|
+
e.requestOptions?.onFinally?.(C, O, T), n("finally", C, O, T);
|
|
6696
6696
|
}
|
|
6697
|
-
}, e.requestPlugins), m = ge(() => _.value ? Array.isArray(_.value[i.list]) ? _.value[i.list] : (console.warn(`DataTablePlus: data[${i.list}] must be an array`), []) : []),
|
|
6698
|
-
function
|
|
6699
|
-
|
|
6700
|
-
|
|
6697
|
+
}, e.requestPlugins), m = [], x = ge(() => _.value ? Array.isArray(_.value[i.list]) ? _.value[i.list] : (console.warn(`DataTablePlus: data[${i.list}] must be an array`), []) : []), w = ge(() => e.columns?.reduce((C, O) => C + Number(O.width ?? 100), 0));
|
|
6698
|
+
function P(C, O) {
|
|
6699
|
+
C[i.list]?.forEach((U) => {
|
|
6700
|
+
m.some((B) => B[i.rowKey] === U[i.rowKey]) || m.push(U);
|
|
6701
|
+
}), s.value.page = i.page in O[0] ? Number(O[0][i.page]) : 1, s.value.pageSize = i.pageSize in O[0] ? Number(O[0][i.pageSize]) : 10, s.value.itemCount = i.count in C ? Number(C[i.count]) : 0;
|
|
6702
|
+
const T = O[0]?.[i.filter], j = O[0]?.[i.sorter];
|
|
6701
6703
|
if (o) {
|
|
6702
|
-
for (const
|
|
6703
|
-
if ("key" in
|
|
6704
|
-
if (T &&
|
|
6705
|
-
const
|
|
6706
|
-
"filter" in
|
|
6704
|
+
for (const U of o)
|
|
6705
|
+
if ("key" in U) {
|
|
6706
|
+
if (T && U.key in T) {
|
|
6707
|
+
const B = T[U.key];
|
|
6708
|
+
"filter" in U && U.filter && (U.filterMultiple ? Array.isArray(B) && (U.filterOptionValues = B) : Array.isArray(B) || (U.filterOptionValue = B));
|
|
6707
6709
|
}
|
|
6708
|
-
if ("sorter" in
|
|
6709
|
-
const
|
|
6710
|
-
"sorter" in
|
|
6710
|
+
if ("sorter" in U && typeof U.sorter == "boolean" && (U.sortOrder = !1), j && U.key in j) {
|
|
6711
|
+
const B = j[U.key];
|
|
6712
|
+
"sorter" in U && U.sorter && (U.sortOrder = B);
|
|
6711
6713
|
}
|
|
6712
6714
|
}
|
|
6713
6715
|
}
|
|
6714
6716
|
}
|
|
6715
|
-
function
|
|
6717
|
+
function D(C) {
|
|
6716
6718
|
return E({
|
|
6717
6719
|
...d.value[0],
|
|
6718
6720
|
...C
|
|
6719
6721
|
});
|
|
6720
6722
|
}
|
|
6721
|
-
const
|
|
6723
|
+
const z = {
|
|
6722
6724
|
onUpdatePage: (C) => {
|
|
6723
|
-
n("update:page", C), !f.value &&
|
|
6725
|
+
n("update:page", C), !f.value && D({
|
|
6724
6726
|
[i.page]: C
|
|
6725
6727
|
});
|
|
6726
6728
|
},
|
|
6727
6729
|
onUpdatePageSize: (C) => {
|
|
6728
|
-
n("update:pageSize", C), !f.value &&
|
|
6730
|
+
n("update:pageSize", C), !f.value && D({
|
|
6729
6731
|
[i.pageSize]: C
|
|
6730
6732
|
});
|
|
6731
6733
|
},
|
|
6732
|
-
onUpdateFilters: (C,
|
|
6733
|
-
n("update:filters", C,
|
|
6734
|
+
onUpdateFilters: (C, O) => {
|
|
6735
|
+
n("update:filters", C, O), D({
|
|
6734
6736
|
[i.page]: 1,
|
|
6735
6737
|
[i.filter]: C
|
|
6736
6738
|
});
|
|
6737
6739
|
},
|
|
6738
6740
|
onUpdateSorter: (C) => {
|
|
6739
6741
|
n("update:sorter", C);
|
|
6740
|
-
const
|
|
6742
|
+
const O = {};
|
|
6741
6743
|
if (Array.isArray(C))
|
|
6742
6744
|
for (const T of C)
|
|
6743
|
-
|
|
6744
|
-
else C && (
|
|
6745
|
-
|
|
6745
|
+
O[T.columnKey] = T.order;
|
|
6746
|
+
else C && (O[C.columnKey] = C.order);
|
|
6747
|
+
D({
|
|
6746
6748
|
[i.page]: 1,
|
|
6747
|
-
[i.sorter]:
|
|
6749
|
+
[i.sorter]: O
|
|
6748
6750
|
});
|
|
6749
6751
|
},
|
|
6750
6752
|
onLoad: (C) => n("load", C),
|
|
6751
6753
|
onScroll: (C) => {
|
|
6752
6754
|
n("scroll", C);
|
|
6753
6755
|
},
|
|
6754
|
-
onUpdateCheckedRowKeys: (C,
|
|
6755
|
-
|
|
6756
|
+
onUpdateCheckedRowKeys: (C, O, T) => {
|
|
6757
|
+
const j = C.map((U) => m.find((B) => B[i.rowKey] === U));
|
|
6758
|
+
n("update:checkedRowKeys", C, j, { row: tu(T.row), action: T.action });
|
|
6756
6759
|
},
|
|
6757
6760
|
onUpdateExpandedRowKeys: (C) => {
|
|
6758
6761
|
n("update:expandedRowKeys", C);
|
|
6759
6762
|
}
|
|
6760
|
-
},
|
|
6763
|
+
}, $ = G(!1), K = G(), ue = G({
|
|
6761
6764
|
x: 0,
|
|
6762
6765
|
y: 0
|
|
6763
6766
|
});
|
|
6764
|
-
function
|
|
6765
|
-
|
|
6767
|
+
function S(C, O) {
|
|
6768
|
+
$.value = !1, n("contextMenuSelect", {
|
|
6766
6769
|
key: C,
|
|
6767
|
-
option:
|
|
6768
|
-
row:
|
|
6770
|
+
option: O,
|
|
6771
|
+
row: tu(du(K))
|
|
6769
6772
|
});
|
|
6770
6773
|
}
|
|
6771
|
-
function
|
|
6774
|
+
function W(C, O) {
|
|
6772
6775
|
return {
|
|
6773
6776
|
onClick: (T) => {
|
|
6774
|
-
n("clickRow", { row:
|
|
6777
|
+
n("clickRow", { row: tu(C), index: O, event: T });
|
|
6775
6778
|
},
|
|
6776
6779
|
onContextmenu: (T) => {
|
|
6777
|
-
n("contextMenuRow", { row:
|
|
6778
|
-
|
|
6780
|
+
n("contextMenuRow", { row: tu(C), index: O, event: T }), e.contextMenuOptions && (T.preventDefault(), $.value = !1, K.value = C, rn(() => {
|
|
6781
|
+
$.value = !0, ue.value = {
|
|
6779
6782
|
x: T.x,
|
|
6780
6783
|
y: T.y
|
|
6781
6784
|
};
|
|
@@ -6783,21 +6786,21 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6783
6786
|
}
|
|
6784
6787
|
};
|
|
6785
6788
|
}
|
|
6786
|
-
const
|
|
6787
|
-
function
|
|
6788
|
-
|
|
6789
|
-
[
|
|
6789
|
+
const be = G(!1);
|
|
6790
|
+
function Ae(C, O) {
|
|
6791
|
+
O && D({
|
|
6792
|
+
[O]: C
|
|
6790
6793
|
});
|
|
6791
6794
|
}
|
|
6792
|
-
const
|
|
6795
|
+
const V = {
|
|
6793
6796
|
loading: f,
|
|
6794
6797
|
data: _,
|
|
6795
|
-
error:
|
|
6798
|
+
error: k,
|
|
6796
6799
|
params: d,
|
|
6797
6800
|
pagination: s,
|
|
6798
|
-
rawList:
|
|
6801
|
+
rawList: x,
|
|
6799
6802
|
dataTableRef: a
|
|
6800
|
-
},
|
|
6803
|
+
}, Q = {
|
|
6801
6804
|
run: E,
|
|
6802
6805
|
runAsync: A,
|
|
6803
6806
|
refresh: y,
|
|
@@ -6811,30 +6814,30 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6811
6814
|
runParamsAsync: async (C) => A(Object.assign(d.value[0], C))
|
|
6812
6815
|
};
|
|
6813
6816
|
return u({
|
|
6814
|
-
refs:
|
|
6815
|
-
actions:
|
|
6816
|
-
}), (C,
|
|
6817
|
-
default:
|
|
6817
|
+
refs: V,
|
|
6818
|
+
actions: Q
|
|
6819
|
+
}), (C, O) => (R(), I(v(je), { vertical: "" }, {
|
|
6820
|
+
default: L(() => [
|
|
6818
6821
|
H(C.$slots, "filter", {
|
|
6819
|
-
refs:
|
|
6820
|
-
actions:
|
|
6822
|
+
refs: V,
|
|
6823
|
+
actions: Q
|
|
6821
6824
|
}, () => [
|
|
6822
|
-
|
|
6823
|
-
default:
|
|
6824
|
-
r.value.grid ? (R(),
|
|
6825
|
-
default:
|
|
6826
|
-
(R(!0), se(
|
|
6827
|
-
key:
|
|
6825
|
+
Z(v(je), { vertical: "" }, {
|
|
6826
|
+
default: L(() => [
|
|
6827
|
+
r.value.grid ? (R(), I(v(st), ce(X({ key: 0 }, C.filterGridProps)), {
|
|
6828
|
+
default: L(() => [
|
|
6829
|
+
(R(!0), se(we, null, Ye(C.filterOptions?.filter((T) => !T.collapsed), ({ key: T, gridItemProps: j, render: U, label: B, ...te }, le) => (R(), I(v(lt), X({
|
|
6830
|
+
key: le,
|
|
6828
6831
|
span: 12
|
|
6829
|
-
}, { ref_for: !0 },
|
|
6830
|
-
default:
|
|
6831
|
-
|
|
6832
|
+
}, { ref_for: !0 }, j), {
|
|
6833
|
+
default: L(() => [
|
|
6834
|
+
U ? (R(), I(oe(v(pe)(U(V, Q), B, { path: T, labelPlacement: "left" })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
6832
6835
|
he(v(Qe), {
|
|
6833
|
-
options:
|
|
6836
|
+
options: te,
|
|
6834
6837
|
value: T ? v(d)[0][T] : void 0,
|
|
6835
|
-
"onUpdate:value": (
|
|
6838
|
+
"onUpdate:value": (Pe) => Ae(Pe, T)
|
|
6836
6839
|
}),
|
|
6837
|
-
|
|
6840
|
+
B,
|
|
6838
6841
|
{ path: T, labelPlacement: "left" }
|
|
6839
6842
|
)), { key: 1 }))
|
|
6840
6843
|
]),
|
|
@@ -6843,55 +6846,55 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6843
6846
|
]),
|
|
6844
6847
|
_: 1
|
|
6845
6848
|
}, 16)) : ie("", !0),
|
|
6846
|
-
r.value.flex ? (R(),
|
|
6847
|
-
default:
|
|
6848
|
-
(R(!0), se(
|
|
6849
|
-
|
|
6849
|
+
r.value.flex ? (R(), I(v(je), ce(X({ key: 1 }, C.filterFlexProps)), {
|
|
6850
|
+
default: L(() => [
|
|
6851
|
+
(R(!0), se(we, null, Ye(C.filterOptions?.filter((T) => !T.collapsed), ({ key: T, render: j, label: U, ...B }, te) => (R(), se(we, { key: te }, [
|
|
6852
|
+
j ? (R(), I(oe(v(pe)(j(V, Q), U, { path: T, labelPlacement: "left" })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
6850
6853
|
he(v(Qe), {
|
|
6851
|
-
options:
|
|
6854
|
+
options: B,
|
|
6852
6855
|
value: T ? v(d)[0][T] : void 0,
|
|
6853
|
-
"onUpdate:value": (
|
|
6856
|
+
"onUpdate:value": (le) => Ae(le, T)
|
|
6854
6857
|
}),
|
|
6855
|
-
|
|
6858
|
+
U,
|
|
6856
6859
|
{ path: T, labelPlacement: "left" }
|
|
6857
6860
|
)), { key: 1 }))
|
|
6858
6861
|
], 64))), 128))
|
|
6859
6862
|
]),
|
|
6860
6863
|
_: 1
|
|
6861
6864
|
}, 16)) : ie("", !0),
|
|
6862
|
-
C.filterOptions?.filter((T) => T.collapsed) && C.filterOptions?.filter((T) => T.collapsed)?.length > 0 ? (R(),
|
|
6865
|
+
C.filterOptions?.filter((T) => T.collapsed) && C.filterOptions?.filter((T) => T.collapsed)?.length > 0 ? (R(), I(v(ln), {
|
|
6863
6866
|
key: 2,
|
|
6864
6867
|
style: { margin: "5px 0" }
|
|
6865
6868
|
}, {
|
|
6866
|
-
default:
|
|
6867
|
-
|
|
6869
|
+
default: L(() => [
|
|
6870
|
+
Z(v(mu), {
|
|
6868
6871
|
size: "tiny",
|
|
6869
|
-
onClick:
|
|
6872
|
+
onClick: O[0] || (O[0] = (T) => be.value = !be.value)
|
|
6870
6873
|
}, {
|
|
6871
|
-
default:
|
|
6872
|
-
Nu(Iu(
|
|
6874
|
+
default: L(() => [
|
|
6875
|
+
Nu(Iu(be.value ? "折叠" : "展开"), 1)
|
|
6873
6876
|
]),
|
|
6874
6877
|
_: 1
|
|
6875
6878
|
})
|
|
6876
6879
|
]),
|
|
6877
6880
|
_: 1
|
|
6878
6881
|
})) : ie("", !0),
|
|
6879
|
-
|
|
6880
|
-
default:
|
|
6881
|
-
r.value.collapsedGrid ? (R(),
|
|
6882
|
-
default:
|
|
6883
|
-
(R(!0), se(
|
|
6884
|
-
key:
|
|
6882
|
+
Z(v(Or), { show: be.value }, {
|
|
6883
|
+
default: L(() => [
|
|
6884
|
+
r.value.collapsedGrid ? (R(), I(v(st), ce(X({ key: 0 }, C.filterGridProps)), {
|
|
6885
|
+
default: L(() => [
|
|
6886
|
+
(R(!0), se(we, null, Ye(C.filterOptions?.filter((T) => T.collapsed), ({ key: T, gridItemProps: j, render: U, label: B, ...te }, le) => (R(), I(v(lt), X({
|
|
6887
|
+
key: le,
|
|
6885
6888
|
span: 12
|
|
6886
|
-
}, { ref_for: !0 },
|
|
6887
|
-
default:
|
|
6888
|
-
|
|
6889
|
+
}, { ref_for: !0 }, j), {
|
|
6890
|
+
default: L(() => [
|
|
6891
|
+
U ? (R(), I(oe(v(pe)(U(V, Q), B, { path: T, labelPlacement: "left" })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
6889
6892
|
he(v(Qe), {
|
|
6890
|
-
options:
|
|
6893
|
+
options: te,
|
|
6891
6894
|
value: T ? v(d)[0][T] : void 0,
|
|
6892
|
-
"onUpdate:value": (
|
|
6895
|
+
"onUpdate:value": (Pe) => Ae(Pe, T)
|
|
6893
6896
|
}),
|
|
6894
|
-
|
|
6897
|
+
B,
|
|
6895
6898
|
{ path: T, labelPlacement: "left" }
|
|
6896
6899
|
)), { key: 1 }))
|
|
6897
6900
|
]),
|
|
@@ -6900,16 +6903,16 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6900
6903
|
]),
|
|
6901
6904
|
_: 1
|
|
6902
6905
|
}, 16)) : ie("", !0),
|
|
6903
|
-
r.value.collapsedFlex ? (R(),
|
|
6904
|
-
default:
|
|
6905
|
-
(R(!0), se(
|
|
6906
|
-
|
|
6906
|
+
r.value.collapsedFlex ? (R(), I(v(je), ce(X({ key: 1 }, C.filterFlexProps)), {
|
|
6907
|
+
default: L(() => [
|
|
6908
|
+
(R(!0), se(we, null, Ye(C.filterOptions?.filter((T) => T.collapsed), ({ key: T, render: j, label: U, ...B }, te) => (R(), se(we, { key: te }, [
|
|
6909
|
+
j ? (R(), I(oe(v(pe)(j(V, Q), U, { path: T, labelPlacement: "left" })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
6907
6910
|
he(v(Qe), {
|
|
6908
|
-
options:
|
|
6911
|
+
options: B,
|
|
6909
6912
|
value: T ? v(d)[0][T] : void 0,
|
|
6910
|
-
"onUpdate:value": (
|
|
6913
|
+
"onUpdate:value": (le) => Ae(le, T)
|
|
6911
6914
|
}),
|
|
6912
|
-
|
|
6915
|
+
U,
|
|
6913
6916
|
{ path: T, labelPlacement: "left" }
|
|
6914
6917
|
)), { key: 1 }))
|
|
6915
6918
|
], 64))), 128))
|
|
@@ -6923,78 +6926,78 @@ const Fr = /* @__PURE__ */ _n(zl, [["render", Bl]]), Ul = /* @__PURE__ */ xe({
|
|
|
6923
6926
|
_: 1
|
|
6924
6927
|
})
|
|
6925
6928
|
]),
|
|
6926
|
-
|
|
6929
|
+
Z(v(bi), X({
|
|
6927
6930
|
ref: "data-table-ref",
|
|
6928
6931
|
remote: "",
|
|
6929
6932
|
"flex-height": "",
|
|
6930
6933
|
"single-line": !1,
|
|
6931
|
-
"scroll-x":
|
|
6934
|
+
"scroll-x": w.value,
|
|
6932
6935
|
style: { flex: 1, ...C.customStyle },
|
|
6933
6936
|
class: C.customClass,
|
|
6934
6937
|
"row-key": (T) => T[i.rowKey],
|
|
6935
6938
|
loading: v(f),
|
|
6936
6939
|
columns: o,
|
|
6937
|
-
data:
|
|
6938
|
-
"row-props":
|
|
6940
|
+
data: x.value,
|
|
6941
|
+
"row-props": W
|
|
6939
6942
|
}, C.dataTableProps, {
|
|
6940
|
-
"onUpdate:filters":
|
|
6941
|
-
"onUpdate:sorter":
|
|
6942
|
-
onLoad:
|
|
6943
|
-
onScroll:
|
|
6944
|
-
"onUpdate:checkedRowKeys":
|
|
6945
|
-
"onUpdate:expandedRowKeys":
|
|
6943
|
+
"onUpdate:filters": z.onUpdateFilters,
|
|
6944
|
+
"onUpdate:sorter": z.onUpdateSorter,
|
|
6945
|
+
onLoad: z.onLoad,
|
|
6946
|
+
onScroll: z.onScroll,
|
|
6947
|
+
"onUpdate:checkedRowKeys": z.onUpdateCheckedRowKeys,
|
|
6948
|
+
"onUpdate:expandedRowKeys": z.onUpdateExpandedRowKeys
|
|
6946
6949
|
}), {
|
|
6947
|
-
empty:
|
|
6950
|
+
empty: L(() => [
|
|
6948
6951
|
H(C.$slots, "empty", {
|
|
6949
|
-
refs:
|
|
6950
|
-
actions:
|
|
6952
|
+
refs: V,
|
|
6953
|
+
actions: Q
|
|
6951
6954
|
})
|
|
6952
6955
|
]),
|
|
6953
|
-
loading:
|
|
6956
|
+
loading: L(() => [
|
|
6954
6957
|
H(C.$slots, "loading", {
|
|
6955
|
-
refs:
|
|
6956
|
-
actions:
|
|
6958
|
+
refs: V,
|
|
6959
|
+
actions: Q
|
|
6957
6960
|
})
|
|
6958
6961
|
]),
|
|
6959
6962
|
_: 3
|
|
6960
6963
|
}, 16, ["scroll-x", "style", "class", "row-key", "loading", "columns", "data", "onUpdate:filters", "onUpdate:sorter", "onLoad", "onScroll", "onUpdate:checkedRowKeys", "onUpdate:expandedRowKeys"]),
|
|
6961
6964
|
H(C.$slots, "actions", {
|
|
6962
|
-
refs:
|
|
6963
|
-
actions:
|
|
6965
|
+
refs: V,
|
|
6966
|
+
actions: Q
|
|
6964
6967
|
}, () => [
|
|
6965
|
-
|
|
6966
|
-
default:
|
|
6968
|
+
Z(v(je), null, {
|
|
6969
|
+
default: L(() => [
|
|
6967
6970
|
H(C.$slots, "extra", {
|
|
6968
|
-
refs:
|
|
6969
|
-
actions:
|
|
6971
|
+
refs: V,
|
|
6972
|
+
actions: Q
|
|
6970
6973
|
}),
|
|
6971
6974
|
H(C.$slots, "pagination", {
|
|
6972
|
-
refs:
|
|
6973
|
-
actions:
|
|
6975
|
+
refs: V,
|
|
6976
|
+
actions: Q
|
|
6974
6977
|
}, () => [
|
|
6975
|
-
C.pagination ? (R(),
|
|
6978
|
+
C.pagination ? (R(), I(v(Mr), X({
|
|
6976
6979
|
key: 0,
|
|
6977
6980
|
style: { "margin-left": "auto" },
|
|
6978
6981
|
disabled: v(f)
|
|
6979
6982
|
}, { ...c, ...s.value }, {
|
|
6980
|
-
"onUpdate:page":
|
|
6981
|
-
"onUpdate:pageSize":
|
|
6983
|
+
"onUpdate:page": z.onUpdatePage,
|
|
6984
|
+
"onUpdate:pageSize": z.onUpdatePageSize
|
|
6982
6985
|
}), null, 16, ["disabled", "onUpdate:page", "onUpdate:pageSize"])) : ie("", !0)
|
|
6983
6986
|
])
|
|
6984
6987
|
]),
|
|
6985
6988
|
_: 3
|
|
6986
6989
|
})
|
|
6987
6990
|
]),
|
|
6988
|
-
C.contextMenuOptions ? (R(),
|
|
6991
|
+
C.contextMenuOptions ? (R(), I(v(mi), {
|
|
6989
6992
|
key: 0,
|
|
6990
6993
|
placement: "bottom-start",
|
|
6991
6994
|
trigger: "manual",
|
|
6992
|
-
x:
|
|
6993
|
-
y:
|
|
6994
|
-
show:
|
|
6995
|
+
x: ue.value.x,
|
|
6996
|
+
y: ue.value.y,
|
|
6997
|
+
show: $.value,
|
|
6995
6998
|
options: C.contextMenuOptions,
|
|
6996
|
-
onClickoutside:
|
|
6997
|
-
onSelect:
|
|
6999
|
+
onClickoutside: O[1] || (O[1] = (T) => $.value = !1),
|
|
7000
|
+
onSelect: S
|
|
6998
7001
|
}, null, 8, ["x", "y", "show", "options"])) : ie("", !0)
|
|
6999
7002
|
]),
|
|
7000
7003
|
_: 3
|
|
@@ -7013,7 +7016,7 @@ function vo(e, u) {
|
|
|
7013
7016
|
return typeof e == "string" ? t : typeof e == "number" ? n : typeof e == "boolean" ? r : e;
|
|
7014
7017
|
}
|
|
7015
7018
|
function ql(e, u) {
|
|
7016
|
-
const { rules: t, clearRules: n } = u ?? {}, r = Tu(e ? structuredClone(
|
|
7019
|
+
const { rules: t, clearRules: n } = u ?? {}, r = Tu(e ? structuredClone(tu(e)) : {}), o = t, a = G(), i = {
|
|
7017
7020
|
ref: a,
|
|
7018
7021
|
model: r,
|
|
7019
7022
|
rules: o
|
|
@@ -7022,7 +7025,7 @@ function ql(e, u) {
|
|
|
7022
7025
|
return new Promise((d, E) => {
|
|
7023
7026
|
if (!a.value)
|
|
7024
7027
|
return E(new Error("formRef:undefined"));
|
|
7025
|
-
a.value.validate().then((A) => (c.trigger(
|
|
7028
|
+
a.value.validate().then((A) => (c.trigger(tu(du(r))), d(A))).catch(E);
|
|
7026
7029
|
});
|
|
7027
7030
|
}
|
|
7028
7031
|
function l() {
|
|
@@ -7034,7 +7037,7 @@ function ql(e, u) {
|
|
|
7034
7037
|
function _() {
|
|
7035
7038
|
f(), Object.assign(r, structuredClone(e));
|
|
7036
7039
|
}
|
|
7037
|
-
function
|
|
7040
|
+
function k() {
|
|
7038
7041
|
l(), _();
|
|
7039
7042
|
}
|
|
7040
7043
|
return {
|
|
@@ -7045,7 +7048,7 @@ function ql(e, u) {
|
|
|
7045
7048
|
validate: s,
|
|
7046
7049
|
resetValidation: l,
|
|
7047
7050
|
resetForm: _,
|
|
7048
|
-
reset:
|
|
7051
|
+
reset: k,
|
|
7049
7052
|
clear: f,
|
|
7050
7053
|
onValidated: c.on
|
|
7051
7054
|
};
|
|
@@ -7080,7 +7083,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7080
7083
|
collapsedGrid: p[1] === "grid",
|
|
7081
7084
|
collapsedFlex: p[1] === "flex"
|
|
7082
7085
|
};
|
|
7083
|
-
}), o = e.rules ? { ...e.rules, ...jl(e.options) } : void 0, { formValue: a, formRules: i, formRef: c, validate: s, resetValidation: l, resetForm: f, reset: _, clear:
|
|
7086
|
+
}), o = e.rules ? { ...e.rules, ...jl(e.options) } : void 0, { formValue: a, formRules: i, formRef: c, validate: s, resetValidation: l, resetForm: f, reset: _, clear: k, onValidated: d } = ql(e.values, {
|
|
7084
7087
|
rules: o,
|
|
7085
7088
|
clearRules: e.clearRules
|
|
7086
7089
|
});
|
|
@@ -7096,7 +7099,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7096
7099
|
resetValidation: l,
|
|
7097
7100
|
resetForm: f,
|
|
7098
7101
|
reset: _,
|
|
7099
|
-
clear:
|
|
7102
|
+
clear: k,
|
|
7100
7103
|
onValidated: d,
|
|
7101
7104
|
setValues: (p) => {
|
|
7102
7105
|
Object.assign(a.value, p);
|
|
@@ -7109,13 +7112,13 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7109
7112
|
function h(p, g) {
|
|
7110
7113
|
g && y.setValues({ [g]: p });
|
|
7111
7114
|
}
|
|
7112
|
-
return (p, g) => (R(),
|
|
7115
|
+
return (p, g) => (R(), I(v(gi), X({
|
|
7113
7116
|
ref_key: "formRef",
|
|
7114
7117
|
ref: c,
|
|
7115
7118
|
model: v(a),
|
|
7116
7119
|
rules: v(i)
|
|
7117
7120
|
}, e.formProps), {
|
|
7118
|
-
default:
|
|
7121
|
+
default: L(() => [
|
|
7119
7122
|
H(p.$slots, "header", {
|
|
7120
7123
|
refs: A,
|
|
7121
7124
|
actions: y
|
|
@@ -7124,18 +7127,18 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7124
7127
|
refs: A,
|
|
7125
7128
|
actions: y
|
|
7126
7129
|
}, () => [
|
|
7127
|
-
r.value.grid ? (R(),
|
|
7128
|
-
default:
|
|
7129
|
-
(R(!0), se(
|
|
7130
|
-
key:
|
|
7130
|
+
r.value.grid ? (R(), I(v(st), ce(X({ key: 0 }, p.gridProps)), {
|
|
7131
|
+
default: L(() => [
|
|
7132
|
+
(R(!0), se(we, null, Ye(p.options?.filter((m) => !m.collapsed), ({ key: m, gridItemProps: x, render: w, label: P, ...D }, z) => (R(), I(v(lt), X({
|
|
7133
|
+
key: z,
|
|
7131
7134
|
span: 12
|
|
7132
|
-
}, { ref_for: !0 },
|
|
7133
|
-
default:
|
|
7134
|
-
w ? (R(),
|
|
7135
|
+
}, { ref_for: !0 }, x), {
|
|
7136
|
+
default: L(() => [
|
|
7137
|
+
w ? (R(), I(oe(v(pe)(w(A, y), P, { path: m })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
7135
7138
|
he(v(Qe), {
|
|
7136
7139
|
options: D,
|
|
7137
7140
|
value: m ? v(a)[m] : void 0,
|
|
7138
|
-
"onUpdate:value": (
|
|
7141
|
+
"onUpdate:value": ($) => h($, m)
|
|
7139
7142
|
}),
|
|
7140
7143
|
P,
|
|
7141
7144
|
{ path: m }
|
|
@@ -7146,14 +7149,14 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7146
7149
|
]),
|
|
7147
7150
|
_: 1
|
|
7148
7151
|
}, 16)) : ie("", !0),
|
|
7149
|
-
r.value.flex ? (R(),
|
|
7150
|
-
default:
|
|
7151
|
-
(R(!0), se(
|
|
7152
|
-
|
|
7152
|
+
r.value.flex ? (R(), I(v(je), ce(X({ key: 1 }, p.flexProps)), {
|
|
7153
|
+
default: L(() => [
|
|
7154
|
+
(R(!0), se(we, null, Ye(p.options?.filter((m) => !m.collapsed), ({ key: m, render: x, label: w, ...P }, D) => (R(), se(we, { key: D }, [
|
|
7155
|
+
x ? (R(), I(oe(v(pe)(x(A, y), w, { path: m })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
7153
7156
|
he(v(Qe), {
|
|
7154
7157
|
options: P,
|
|
7155
7158
|
value: m ? v(a)[m] : void 0,
|
|
7156
|
-
"onUpdate:value": (
|
|
7159
|
+
"onUpdate:value": (z) => h(z, m)
|
|
7157
7160
|
}),
|
|
7158
7161
|
w,
|
|
7159
7162
|
{ path: m }
|
|
@@ -7162,16 +7165,16 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7162
7165
|
]),
|
|
7163
7166
|
_: 1
|
|
7164
7167
|
}, 16)) : ie("", !0),
|
|
7165
|
-
p.options?.filter((m) => m.collapsed) && p.options?.filter((m) => m.collapsed)?.length > 0 ? (R(),
|
|
7168
|
+
p.options?.filter((m) => m.collapsed) && p.options?.filter((m) => m.collapsed)?.length > 0 ? (R(), I(v(ln), {
|
|
7166
7169
|
key: 2,
|
|
7167
7170
|
style: { margin: "5px 0" }
|
|
7168
7171
|
}, {
|
|
7169
|
-
default:
|
|
7170
|
-
|
|
7172
|
+
default: L(() => [
|
|
7173
|
+
Z(v(mu), {
|
|
7171
7174
|
size: "tiny",
|
|
7172
7175
|
onClick: g[0] || (g[0] = (m) => E.value = !E.value)
|
|
7173
7176
|
}, {
|
|
7174
|
-
default:
|
|
7177
|
+
default: L(() => [
|
|
7175
7178
|
Nu(Iu(E.value ? "折叠" : "展开"), 1)
|
|
7176
7179
|
]),
|
|
7177
7180
|
_: 1
|
|
@@ -7179,20 +7182,20 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7179
7182
|
]),
|
|
7180
7183
|
_: 1
|
|
7181
7184
|
})) : ie("", !0),
|
|
7182
|
-
|
|
7183
|
-
default:
|
|
7184
|
-
r.value.collapsedGrid ? (R(),
|
|
7185
|
-
default:
|
|
7186
|
-
(R(!0), se(
|
|
7187
|
-
key:
|
|
7185
|
+
Z(v(Or), { show: E.value }, {
|
|
7186
|
+
default: L(() => [
|
|
7187
|
+
r.value.collapsedGrid ? (R(), I(v(st), ce(X({ key: 0 }, p.gridProps)), {
|
|
7188
|
+
default: L(() => [
|
|
7189
|
+
(R(!0), se(we, null, Ye(p.options?.filter((m) => m.collapsed), ({ key: m, gridItemProps: x, render: w, label: P, ...D }, z) => (R(), I(v(lt), X({
|
|
7190
|
+
key: z,
|
|
7188
7191
|
span: 12
|
|
7189
|
-
}, { ref_for: !0 },
|
|
7190
|
-
default:
|
|
7191
|
-
w ? (R(),
|
|
7192
|
+
}, { ref_for: !0 }, x), {
|
|
7193
|
+
default: L(() => [
|
|
7194
|
+
w ? (R(), I(oe(v(pe)(w(A, y), P, { path: m })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
7192
7195
|
he(v(Qe), {
|
|
7193
7196
|
options: D,
|
|
7194
7197
|
value: m ? v(a)[m] : void 0,
|
|
7195
|
-
"onUpdate:value": (
|
|
7198
|
+
"onUpdate:value": ($) => h($, m)
|
|
7196
7199
|
}),
|
|
7197
7200
|
P,
|
|
7198
7201
|
{ path: m }
|
|
@@ -7203,14 +7206,14 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7203
7206
|
]),
|
|
7204
7207
|
_: 1
|
|
7205
7208
|
}, 16)) : ie("", !0),
|
|
7206
|
-
r.value.collapsedFlex ? (R(),
|
|
7207
|
-
default:
|
|
7208
|
-
(R(!0), se(
|
|
7209
|
-
|
|
7209
|
+
r.value.collapsedFlex ? (R(), I(v(je), ce(X({ key: 1 }, p.flexProps)), {
|
|
7210
|
+
default: L(() => [
|
|
7211
|
+
(R(!0), se(we, null, Ye(p.options?.filter((m) => m.collapsed), ({ key: m, render: x, label: w, ...P }, D) => (R(), se(we, { key: D }, [
|
|
7212
|
+
x ? (R(), I(oe(v(pe)(x(A, y), w, { path: m })), { key: 0 })) : (R(), I(oe(v(pe)(
|
|
7210
7213
|
he(v(Qe), {
|
|
7211
7214
|
options: P,
|
|
7212
7215
|
value: m ? v(a)[m] : void 0,
|
|
7213
|
-
"onUpdate:value": (
|
|
7216
|
+
"onUpdate:value": (z) => h(z, m)
|
|
7214
7217
|
}),
|
|
7215
7218
|
w,
|
|
7216
7219
|
{ path: m }
|
|
@@ -7266,7 +7269,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7266
7269
|
[o.pageSize]: i.value.pageSize,
|
|
7267
7270
|
[o.search]: "",
|
|
7268
7271
|
...e.defaultParams
|
|
7269
|
-
}, { data: s, error: l, loading: f, params: _, run:
|
|
7272
|
+
}, { data: s, error: l, loading: f, params: _, run: k, runAsync: d, refresh: E, refreshAsync: A, cancel: y, mutate: h } = En(e.api, {
|
|
7270
7273
|
defaultParams: [
|
|
7271
7274
|
c
|
|
7272
7275
|
],
|
|
@@ -7275,14 +7278,14 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7275
7278
|
onBefore: (S) => {
|
|
7276
7279
|
e.requestOptions?.onBefore?.(S), n("before", S);
|
|
7277
7280
|
},
|
|
7278
|
-
onSuccess: (S,
|
|
7279
|
-
e.requestOptions?.onSuccess?.(S,
|
|
7281
|
+
onSuccess: (S, W) => {
|
|
7282
|
+
e.requestOptions?.onSuccess?.(S, W), n("success", S, W), m(S, W);
|
|
7280
7283
|
},
|
|
7281
|
-
onError: (S,
|
|
7282
|
-
e.requestOptions?.onError?.(S,
|
|
7284
|
+
onError: (S, W) => {
|
|
7285
|
+
e.requestOptions?.onError?.(S, W), n("error", S, W);
|
|
7283
7286
|
},
|
|
7284
|
-
onFinally: (S,
|
|
7285
|
-
e.requestOptions?.onFinally?.(S,
|
|
7287
|
+
onFinally: (S, W, be) => {
|
|
7288
|
+
e.requestOptions?.onFinally?.(S, W, be), n("finally", S, W, be);
|
|
7286
7289
|
}
|
|
7287
7290
|
}, e.requestPlugins), p = ge(() => s.value ? Array.isArray(s.value[o.list]) ? s.value[o.list] : (console.warn(`DataTablePlus: data[${o.list}] must be an array`), []) : []), g = ge(() => typeof e.optionFormat == "function" ? p.value.map((S) => e.optionFormat(S)).filter((S) => !!S) : p.value.map((S) => ({
|
|
7288
7291
|
[o.label]: S[o.label],
|
|
@@ -7290,17 +7293,17 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7290
7293
|
[o.children]: S[o.children],
|
|
7291
7294
|
key: S[o.rowKey]
|
|
7292
7295
|
})));
|
|
7293
|
-
function m(S,
|
|
7294
|
-
i.value.page =
|
|
7296
|
+
function m(S, W) {
|
|
7297
|
+
i.value.page = W[0] && o.page in W[0] ? Number(W[0][o.page]) : 1, i.value.pageSize = W[0] && o.pageSize in W[0] ? Number(W[0][o.pageSize]) : 10, i.value.itemCount = o.count in S ? Number(S[o.count]) : 0;
|
|
7295
7298
|
}
|
|
7296
|
-
function
|
|
7297
|
-
return
|
|
7299
|
+
function x(S) {
|
|
7300
|
+
return k({
|
|
7298
7301
|
..._.value[0],
|
|
7299
7302
|
...S
|
|
7300
7303
|
});
|
|
7301
7304
|
}
|
|
7302
7305
|
const w = G(""), P = Lr(() => {
|
|
7303
|
-
|
|
7306
|
+
x({
|
|
7304
7307
|
[o.page]: 1,
|
|
7305
7308
|
[o.search]: w.value
|
|
7306
7309
|
});
|
|
@@ -7318,38 +7321,38 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7318
7321
|
onScroll: (S) => {
|
|
7319
7322
|
n("scroll", S);
|
|
7320
7323
|
},
|
|
7321
|
-
onUpdateValue: (S,
|
|
7322
|
-
const be = Array.isArray(S) ? p.value.filter((
|
|
7323
|
-
n("update:value", S,
|
|
7324
|
+
onUpdateValue: (S, W) => {
|
|
7325
|
+
const be = Array.isArray(S) ? p.value.filter((Ae) => S.includes(Ae[o.rowKey])) : p.value.find((Ae) => Ae[o.rowKey] === S) ?? null;
|
|
7326
|
+
n("update:value", S, W, tu(du(be)));
|
|
7324
7327
|
},
|
|
7325
7328
|
onSearch: (S) => {
|
|
7326
|
-
w.value = S, !f.value && (e.debounce ? P() :
|
|
7329
|
+
w.value = S, !f.value && (e.debounce ? P() : x({
|
|
7327
7330
|
[o.page]: 1,
|
|
7328
7331
|
[o.search]: w.value
|
|
7329
7332
|
}));
|
|
7330
7333
|
},
|
|
7331
7334
|
onUpdateShow: (S) => {
|
|
7332
|
-
S && (s.value || e.manual &&
|
|
7335
|
+
S && (s.value || e.manual && k(c));
|
|
7333
7336
|
}
|
|
7334
|
-
},
|
|
7337
|
+
}, z = {
|
|
7335
7338
|
onUpdatePage: (S) => {
|
|
7336
|
-
n("update:page", S), !f.value &&
|
|
7339
|
+
n("update:page", S), !f.value && x({
|
|
7337
7340
|
[o.page]: S
|
|
7338
7341
|
});
|
|
7339
7342
|
},
|
|
7340
7343
|
onUpdatePageSize: (S) => {
|
|
7341
|
-
n("update:pageSize", S), !f.value &&
|
|
7344
|
+
n("update:pageSize", S), !f.value && x({
|
|
7342
7345
|
[o.pageSize]: S
|
|
7343
7346
|
});
|
|
7344
7347
|
}
|
|
7345
7348
|
};
|
|
7346
|
-
function
|
|
7349
|
+
function $(S) {
|
|
7347
7350
|
return {
|
|
7348
7351
|
[o.label]: e.fallbackLabel ?? `${S}`,
|
|
7349
7352
|
[o.value]: S
|
|
7350
7353
|
};
|
|
7351
7354
|
}
|
|
7352
|
-
const
|
|
7355
|
+
const K = {
|
|
7353
7356
|
loading: f,
|
|
7354
7357
|
data: s,
|
|
7355
7358
|
error: l,
|
|
@@ -7357,8 +7360,8 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7357
7360
|
pagination: i,
|
|
7358
7361
|
rawList: p,
|
|
7359
7362
|
selectRef: r
|
|
7360
|
-
},
|
|
7361
|
-
run:
|
|
7363
|
+
}, ue = {
|
|
7364
|
+
run: k,
|
|
7362
7365
|
runAsync: d,
|
|
7363
7366
|
refresh: E,
|
|
7364
7367
|
refreshAsync: A,
|
|
@@ -7367,13 +7370,13 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7367
7370
|
setParams: (S) => {
|
|
7368
7371
|
Object.assign(_.value[0], S);
|
|
7369
7372
|
},
|
|
7370
|
-
runParams: (S) =>
|
|
7373
|
+
runParams: (S) => k(Object.assign(_.value[0], S)),
|
|
7371
7374
|
runParamsAsync: async (S) => d(Object.assign(_.value[0], S))
|
|
7372
7375
|
};
|
|
7373
7376
|
return u({
|
|
7374
|
-
refs:
|
|
7375
|
-
actions:
|
|
7376
|
-
}), (S,
|
|
7377
|
+
refs: K,
|
|
7378
|
+
actions: ue
|
|
7379
|
+
}), (S, W) => (R(), I(v(Rr), X({
|
|
7377
7380
|
ref: "select-ref",
|
|
7378
7381
|
remote: "",
|
|
7379
7382
|
filterable: "",
|
|
@@ -7384,7 +7387,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7384
7387
|
"value-field": o.value,
|
|
7385
7388
|
"children-field": o.children,
|
|
7386
7389
|
value: S.value,
|
|
7387
|
-
"fallback-option":
|
|
7390
|
+
"fallback-option": $,
|
|
7388
7391
|
loading: v(f)
|
|
7389
7392
|
}, S.selectProps, {
|
|
7390
7393
|
onBlur: D.onBlur,
|
|
@@ -7396,35 +7399,35 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7396
7399
|
"onUpdate:show": D.onUpdateShow,
|
|
7397
7400
|
"onUpdate:value": D.onUpdateValue
|
|
7398
7401
|
}), {
|
|
7399
|
-
header:
|
|
7402
|
+
header: L(() => [
|
|
7400
7403
|
H(S.$slots, "header", {
|
|
7401
|
-
refs:
|
|
7402
|
-
actions:
|
|
7404
|
+
refs: K,
|
|
7405
|
+
actions: ue
|
|
7403
7406
|
})
|
|
7404
7407
|
]),
|
|
7405
|
-
action:
|
|
7408
|
+
action: L(() => [
|
|
7406
7409
|
H(S.$slots, "action", {
|
|
7407
|
-
refs:
|
|
7408
|
-
actions:
|
|
7410
|
+
refs: K,
|
|
7411
|
+
actions: ue
|
|
7409
7412
|
}, () => [
|
|
7410
|
-
|
|
7411
|
-
default:
|
|
7413
|
+
Z(v(je), null, {
|
|
7414
|
+
default: L(() => [
|
|
7412
7415
|
H(S.$slots, "extra", {
|
|
7413
|
-
refs:
|
|
7414
|
-
actions:
|
|
7416
|
+
refs: K,
|
|
7417
|
+
actions: ue
|
|
7415
7418
|
}),
|
|
7416
7419
|
H(S.$slots, "pagination", {
|
|
7417
|
-
refs:
|
|
7418
|
-
actions:
|
|
7420
|
+
refs: K,
|
|
7421
|
+
actions: ue
|
|
7419
7422
|
}, () => [
|
|
7420
|
-
S.pagination ? (R(),
|
|
7423
|
+
S.pagination ? (R(), I(v(Mr), X({
|
|
7421
7424
|
key: 0,
|
|
7422
7425
|
style: { "margin-left": "auto" },
|
|
7423
7426
|
simple: "",
|
|
7424
7427
|
disabled: v(f)
|
|
7425
7428
|
}, { ...a, ...i.value }, {
|
|
7426
|
-
"onUpdate:page":
|
|
7427
|
-
"onUpdate:pageSize":
|
|
7429
|
+
"onUpdate:page": z.onUpdatePage,
|
|
7430
|
+
"onUpdate:pageSize": z.onUpdatePageSize
|
|
7428
7431
|
}), null, 16, ["disabled", "onUpdate:page", "onUpdate:pageSize"])) : ie("", !0)
|
|
7429
7432
|
])
|
|
7430
7433
|
]),
|
|
@@ -7432,10 +7435,10 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7432
7435
|
})
|
|
7433
7436
|
])
|
|
7434
7437
|
]),
|
|
7435
|
-
empty:
|
|
7438
|
+
empty: L(() => [
|
|
7436
7439
|
H(S.$slots, "empty")
|
|
7437
7440
|
]),
|
|
7438
|
-
arrow:
|
|
7441
|
+
arrow: L(() => [
|
|
7439
7442
|
H(S.$slots, "arrow")
|
|
7440
7443
|
]),
|
|
7441
7444
|
_: 3
|
|
@@ -7453,7 +7456,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7453
7456
|
},
|
|
7454
7457
|
emits: ["before", "success", "error", "finally"],
|
|
7455
7458
|
setup(e, { expose: u, emit: t }) {
|
|
7456
|
-
const n = t, r = { page: "page", pageSize: "pageSize", search: "search", ...e.fields }, { loading: o, data: a, error: i, params: c, run: s, runAsync: l, refresh: f, refreshAsync: _, cancel:
|
|
7459
|
+
const n = t, r = { page: "page", pageSize: "pageSize", search: "search", ...e.fields }, { loading: o, data: a, error: i, params: c, run: s, runAsync: l, refresh: f, refreshAsync: _, cancel: k, mutate: d } = En(e.api, {
|
|
7457
7460
|
defaultParams: [
|
|
7458
7461
|
{
|
|
7459
7462
|
[r.page]: 1,
|
|
@@ -7486,7 +7489,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7486
7489
|
runAsync: l,
|
|
7487
7490
|
refresh: f,
|
|
7488
7491
|
refreshAsync: _,
|
|
7489
|
-
cancel:
|
|
7492
|
+
cancel: k,
|
|
7490
7493
|
mutate: d,
|
|
7491
7494
|
setParam: (y) => {
|
|
7492
7495
|
Object.assign(c.value[0], y);
|
|
@@ -7519,7 +7522,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7519
7522
|
t.value = !1, u.value = r.value;
|
|
7520
7523
|
}
|
|
7521
7524
|
return (i, c) => (R(), se("div", { onClick: o }, [
|
|
7522
|
-
t.value ? (R(),
|
|
7525
|
+
t.value ? (R(), I(v(sn), X({
|
|
7523
7526
|
key: 0,
|
|
7524
7527
|
ref_key: "inputRef",
|
|
7525
7528
|
ref: n,
|
|
@@ -7528,7 +7531,7 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7528
7531
|
"onUpdate:value": c[0] || (c[0] = (s) => r.value = s),
|
|
7529
7532
|
onChange: a,
|
|
7530
7533
|
onBlur: a
|
|
7531
|
-
}), null, 16, ["value"])) : (R(), se(
|
|
7534
|
+
}), null, 16, ["value"])) : (R(), se(we, { key: 1 }, [
|
|
7532
7535
|
Nu(Iu(r.value), 1)
|
|
7533
7536
|
], 64))
|
|
7534
7537
|
]));
|
|
@@ -7543,21 +7546,21 @@ const Ql = /* @__PURE__ */ xe({
|
|
|
7543
7546
|
emits: ["click"],
|
|
7544
7547
|
setup(e, { emit: u }) {
|
|
7545
7548
|
const t = u;
|
|
7546
|
-
return (n, r) => (R(),
|
|
7547
|
-
trigger:
|
|
7548
|
-
|
|
7549
|
+
return (n, r) => (R(), I(v(Pr), ce(qe(n.tooltipProps)), {
|
|
7550
|
+
trigger: L(() => [
|
|
7551
|
+
Z(v(mu), X(n.buttonProps, {
|
|
7549
7552
|
onClick: r[0] || (r[0] = (o) => t("click", o))
|
|
7550
7553
|
}), {
|
|
7551
|
-
icon:
|
|
7554
|
+
icon: L(() => [
|
|
7552
7555
|
H(n.$slots, "icon")
|
|
7553
7556
|
]),
|
|
7554
|
-
default:
|
|
7557
|
+
default: L(() => [
|
|
7555
7558
|
H(n.$slots, "default")
|
|
7556
7559
|
]),
|
|
7557
7560
|
_: 3
|
|
7558
7561
|
}, 16)
|
|
7559
7562
|
]),
|
|
7560
|
-
default:
|
|
7563
|
+
default: L(() => [
|
|
7561
7564
|
H(n.$slots, "tooltip", {}, () => [
|
|
7562
7565
|
Nu(Iu(n.value), 1)
|
|
7563
7566
|
])
|