@m2s2/vue-lib 2.4.1 → 2.5.1
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/index14.cjs +1 -1
- package/dist/index14.mjs +1 -1
- package/dist/index16.cjs +1 -1
- package/dist/index16.mjs +1 -1
- package/dist/index2.cjs +1 -1
- package/dist/index2.mjs +12 -12
- package/dist/index24.cjs +1 -1
- package/dist/index24.mjs +20 -26
- package/dist/index26.cjs +2 -6
- package/dist/index26.mjs +214 -176
- package/dist/index28.cjs +1 -1
- package/dist/index28.mjs +33 -32
- package/dist/index30.cjs +1 -1
- package/dist/index30.mjs +29 -28
- package/dist/index32.cjs +1 -1
- package/dist/index32.mjs +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.mjs +4 -4
- package/dist/index46.cjs +1 -1
- package/dist/index46.mjs +2 -2
- package/dist/index75.cjs +1 -1
- package/dist/index75.mjs +4 -51
- package/dist/index76.cjs +1 -59
- package/dist/index76.mjs +18 -1146
- package/dist/index77.cjs +1 -1
- package/dist/index77.mjs +6 -2
- package/dist/index78.cjs +59 -0
- package/dist/index78.mjs +1152 -0
- package/dist/index79.cjs +5 -0
- package/dist/index79.mjs +21 -0
- package/dist/index8.cjs +1 -1
- package/dist/index8.mjs +5 -5
- package/dist/index80.cjs +1 -0
- package/dist/index80.mjs +53 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.mjs +4 -0
- package/dist/storybook-shared/src/globals.d.ts +2 -0
- package/dist/storybook-shared/src/globals.d.ts.map +1 -1
- package/dist/vue-lib/src/BrandConfigurator.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/Welcome.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/BlogEditor/BlogEditor.vue.d.ts +4 -1
- package/dist/vue-lib/src/components/BlogEditor/BlogEditor.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Chat/Chat.vue.d.ts +2 -0
- package/dist/vue-lib/src/components/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/CtaSection/CtaSection.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Dropdown/DropdownItem.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Footer/Footer.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Footer/SocialIcon.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/LoadingButton/LoadingButton.vue.d.ts +1 -0
- package/dist/vue-lib/src/components/LoadingButton/LoadingButton.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Navbar/Navbar.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/PageHeader/PageHeader.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/Panel/Panel.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/ProcessSteps/ProcessSteps.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/SectionHeader/SectionHeader.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/StatRow/StatRow.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/StatusBadge/StatusBadge.vue.d.ts +1 -0
- package/dist/vue-lib/src/components/StatusBadge/StatusBadge.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/SubscribeForm/SubscribeForm.vue.d.ts +3 -0
- package/dist/vue-lib/src/components/SubscribeForm/SubscribeForm.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/cards/BlogCard/BlogCard.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/components/cards/FeatureCard/FeatureCard.vue.d.ts.map +1 -1
- package/dist/vue-lib.css +1 -1
- package/package.json +10 -7
package/dist/index30.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),b={key:0,class:"sub-form"},
|
|
1
|
+
"use strict";const e=require("vue"),b=require("./index77.cjs"),d={key:0,class:"sub-form"},m=["disabled"],v=["disabled"],p=["disabled"],k={key:0,class:"sub-feedback sub-feedback--error"},g={key:1,class:"sub-success"},f={key:1,class:"sub-auth"},y=["disabled"],h={key:0,class:"sub-feedback sub-feedback--success"},B=["disabled"],E={key:2,class:"sub-feedback sub-feedback--error"},_=e.defineComponent({__name:"SubscribeForm",props:{mode:{default:"anon"},subscribeAnon:{type:Function,default:void 0},subscribeAuth:{type:Function,default:void 0},unsubscribeAuth:{type:Function,default:void 0}},setup(c){const u=c,n=e.ref(""),l=e.ref(""),t=e.ref("idle"),o=e.ref(!1),r=e.computed(()=>b.validateEmail(n.value));async function a(){if(t.value!=="submitting")if(u.mode==="auth")if(o.value){if(!u.unsubscribeAuth)return;t.value="submitting";try{await u.unsubscribeAuth(),o.value=!1,t.value="idle"}catch{t.value="error"}}else{if(!u.subscribeAuth)return;t.value="submitting";try{await u.subscribeAuth(),o.value=!0,t.value="done"}catch{t.value="error"}}else{if(!r.value||!u.subscribeAnon)return;t.value="submitting";try{await u.subscribeAnon(n.value.trim(),l.value.trim()),t.value="done"}catch{t.value="error"}}}return(V,s)=>c.mode==="anon"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value!=="done"?(e.openBlock(),e.createElementBlock("div",d,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>l.value=i),class:"sub-input",type:"text",placeholder:"Your name (optional)",disabled:t.value==="submitting"},null,8,m),[[e.vModelText,l.value]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[1]||(s[1]=i=>n.value=i),class:"sub-input",type:"email",placeholder:"your@email.com",disabled:t.value==="submitting"},null,8,v),[[e.vModelText,n.value]]),e.createElementVNode("button",{class:"sub-btn",disabled:!r.value||t.value==="submitting",onClick:a},e.toDisplayString(t.value==="submitting"?"Submitting…":"Subscribe"),9,p),t.value==="error"?(e.openBlock(),e.createElementBlock("p",k," Something went wrong — please try again. ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",g,[...s[2]||(s[2]=[e.createElementVNode("span",{class:"sub-success-icon"},"✓",-1),e.createElementVNode("p",{class:"sub-success-text"}," Check your email to confirm your subscription. ",-1)])]))],64)):(e.openBlock(),e.createElementBlock("div",f,[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s[3]||(s[3]=e.createElementVNode("span",{class:"sub-subscribed-label"},"✓ Subscribed to blog updates",-1)),e.createElementVNode("button",{class:"sub-btn sub-btn--unsub",disabled:t.value==="submitting",onClick:a},e.toDisplayString(t.value==="submitting"?"Unsubscribing…":"Unsubscribe"),9,B)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{class:"sub-btn",disabled:t.value==="submitting",onClick:a},e.toDisplayString(t.value==="submitting"?"Subscribing…":"Subscribe to Blog Updates"),9,y),t.value==="done"?(e.openBlock(),e.createElementBlock("p",h," You're subscribed! ")):e.createCommentVNode("",!0)],64)),t.value==="error"?(e.openBlock(),e.createElementBlock("p",E," Something went wrong — please try again. ")):e.createCommentVNode("",!0)]))}});module.exports=_;
|
package/dist/index30.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as h, ref as o, computed as k, openBlock as s, createElementBlock as t, Fragment as d, withDirectives as g, createElementVNode as i, vModelText as y, toDisplayString as m, createCommentVNode as v } from "vue";
|
|
2
|
+
import { validateEmail as _ } from "./index77.mjs";
|
|
3
|
+
const A = {
|
|
3
4
|
key: 0,
|
|
4
5
|
class: "sub-form"
|
|
5
|
-
},
|
|
6
|
+
}, S = ["disabled"], w = ["disabled"], C = ["disabled"], x = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "sub-feedback sub-feedback--error"
|
|
8
|
-
},
|
|
9
|
+
}, F = {
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "sub-success"
|
|
11
12
|
}, U = {
|
|
@@ -14,19 +15,19 @@ const _ = {
|
|
|
14
15
|
}, V = ["disabled"], B = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "sub-feedback sub-feedback--success"
|
|
17
|
-
},
|
|
18
|
+
}, E = ["disabled"], D = {
|
|
18
19
|
key: 2,
|
|
19
20
|
class: "sub-feedback sub-feedback--error"
|
|
20
|
-
},
|
|
21
|
+
}, T = /* @__PURE__ */ h({
|
|
21
22
|
__name: "SubscribeForm",
|
|
22
23
|
props: {
|
|
23
24
|
mode: { default: "anon" },
|
|
24
|
-
subscribeAnon: {},
|
|
25
|
-
subscribeAuth: {},
|
|
26
|
-
unsubscribeAuth: {}
|
|
25
|
+
subscribeAnon: { type: Function, default: void 0 },
|
|
26
|
+
subscribeAuth: { type: Function, default: void 0 },
|
|
27
|
+
unsubscribeAuth: { type: Function, default: void 0 }
|
|
27
28
|
},
|
|
28
29
|
setup(p) {
|
|
29
|
-
const a = p, n = o(""), b = o(""), e = o("idle"), l = o(!1),
|
|
30
|
+
const a = p, n = o(""), b = o(""), e = o("idle"), l = o(!1), f = k(() => _(n.value));
|
|
30
31
|
async function r() {
|
|
31
32
|
if (e.value !== "submitting")
|
|
32
33
|
if (a.mode === "auth")
|
|
@@ -48,7 +49,7 @@ const _ = {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
else {
|
|
51
|
-
if (!
|
|
52
|
+
if (!f.value || !a.subscribeAnon) return;
|
|
52
53
|
e.value = "submitting";
|
|
53
54
|
try {
|
|
54
55
|
await a.subscribeAnon(n.value.trim(), b.value.trim()), e.value = "done";
|
|
@@ -57,35 +58,35 @@ const _ = {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
return (
|
|
61
|
-
e.value !== "done" ? (s(), t("div",
|
|
62
|
-
|
|
61
|
+
return (N, u) => p.mode === "anon" ? (s(), t(d, { key: 0 }, [
|
|
62
|
+
e.value !== "done" ? (s(), t("div", A, [
|
|
63
|
+
g(i("input", {
|
|
63
64
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => b.value = c),
|
|
64
65
|
class: "sub-input",
|
|
65
66
|
type: "text",
|
|
66
67
|
placeholder: "Your name (optional)",
|
|
67
68
|
disabled: e.value === "submitting"
|
|
68
|
-
}, null, 8,
|
|
69
|
-
[
|
|
69
|
+
}, null, 8, S), [
|
|
70
|
+
[y, b.value]
|
|
70
71
|
]),
|
|
71
|
-
|
|
72
|
+
g(i("input", {
|
|
72
73
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => n.value = c),
|
|
73
74
|
class: "sub-input",
|
|
74
75
|
type: "email",
|
|
75
76
|
placeholder: "your@email.com",
|
|
76
77
|
disabled: e.value === "submitting"
|
|
77
|
-
}, null, 8,
|
|
78
|
-
[
|
|
78
|
+
}, null, 8, w), [
|
|
79
|
+
[y, n.value]
|
|
79
80
|
]),
|
|
80
81
|
i("button", {
|
|
81
82
|
class: "sub-btn",
|
|
82
|
-
disabled: !
|
|
83
|
+
disabled: !f.value || e.value === "submitting",
|
|
83
84
|
onClick: r
|
|
84
|
-
}, m(e.value === "submitting" ? "Submitting…" : "Subscribe"), 9,
|
|
85
|
-
e.value === "error" ? (s(), t("p",
|
|
86
|
-
])) : (s(), t("div",
|
|
85
|
+
}, m(e.value === "submitting" ? "Submitting…" : "Subscribe"), 9, C),
|
|
86
|
+
e.value === "error" ? (s(), t("p", x, " Something went wrong — please try again. ")) : v("", !0)
|
|
87
|
+
])) : (s(), t("div", F, [...u[2] || (u[2] = [
|
|
87
88
|
i("span", { class: "sub-success-icon" }, "✓", -1),
|
|
88
|
-
i("p", { class: "sub-success-text" }, "Check your email to confirm your subscription.", -1)
|
|
89
|
+
i("p", { class: "sub-success-text" }, " Check your email to confirm your subscription. ", -1)
|
|
89
90
|
])]))
|
|
90
91
|
], 64)) : (s(), t("div", U, [
|
|
91
92
|
l.value ? (s(), t(d, { key: 1 }, [
|
|
@@ -94,19 +95,19 @@ const _ = {
|
|
|
94
95
|
class: "sub-btn sub-btn--unsub",
|
|
95
96
|
disabled: e.value === "submitting",
|
|
96
97
|
onClick: r
|
|
97
|
-
}, m(e.value === "submitting" ? "Unsubscribing…" : "Unsubscribe"), 9,
|
|
98
|
+
}, m(e.value === "submitting" ? "Unsubscribing…" : "Unsubscribe"), 9, E)
|
|
98
99
|
], 64)) : (s(), t(d, { key: 0 }, [
|
|
99
100
|
i("button", {
|
|
100
101
|
class: "sub-btn",
|
|
101
102
|
disabled: e.value === "submitting",
|
|
102
103
|
onClick: r
|
|
103
104
|
}, m(e.value === "submitting" ? "Subscribing…" : "Subscribe to Blog Updates"), 9, V),
|
|
104
|
-
e.value === "done" ? (s(), t("p", B, "You're subscribed!")) : v("", !0)
|
|
105
|
+
e.value === "done" ? (s(), t("p", B, " You're subscribed! ")) : v("", !0)
|
|
105
106
|
], 64)),
|
|
106
|
-
e.value === "error" ? (s(), t("p",
|
|
107
|
+
e.value === "error" ? (s(), t("p", D, " Something went wrong — please try again. ")) : v("", !0)
|
|
107
108
|
]));
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
111
|
export {
|
|
111
|
-
|
|
112
|
+
T as default
|
|
112
113
|
};
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),m={class:"m2s2-dialog-content",role:"dialog","aria-modal":!0,"aria-labelledby":"dialog-title"},k={class:"dialog-header"},g={id:"dialog-title",class:"dialog-title"},u={class:"dialog-body"},y={key:0,class:"dialog-message"},B={key:0,class:"dialog-footer"},f=["onClick"],C=e.defineComponent({__name:"Dialog",props:{data:{},open:{type:Boolean}},emits:["action","close"],setup(t,{emit:i}){const n=t,l=i;function s(o){l("action",o.value)}function d(){n.data.modal||l("close")}function r(o){o.key==="Escape"&&!n.data.modal&&l("close")}return(o,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dialog-fade"},{default:e.withCtx(()=>[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m2s2-dialog-overlay",onClick:e.withModifiers(d,["self"]),onKeydown:r},[e.createElementVNode("div",m,[e.createElementVNode("div",k,[e.createElementVNode("h2",g,e.toDisplayString(t.data.title),1),t.data.modal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dialog-close","aria-label":"Close",onClick:c[0]||(c[0]=a=>l("close"))},"✕"))]),e.createElementVNode("div",u,[t.data.message?(e.openBlock(),e.createElementBlock("p",y,e.toDisplayString(t.data.message),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),t.data.actions.length?(e.openBlock(),e.createElementBlock("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.actions,a=>(e.openBlock(),e.createElementBlock("button",{key:a.label,class:e.normalizeClass(["dialog-btn",`dialog-btn--${a.variant??"secondary"}`]),onClick:b=>s(a)},e.toDisplayString(a.label),11,f))),128))])):e.createCommentVNode("",!0)])],32)):e.createCommentVNode("",!0)]),_:3})]))}});module.exports=C;
|
|
1
|
+
"use strict";const e=require("vue"),m={class:"m2s2-dialog-content",role:"dialog","aria-modal":!0,"aria-labelledby":"dialog-title"},k={class:"dialog-header"},g={id:"dialog-title",class:"dialog-title"},u={class:"dialog-body"},y={key:0,class:"dialog-message"},B={key:0,class:"dialog-footer"},f=["onClick"],C=e.defineComponent({__name:"Dialog",props:{data:{},open:{type:Boolean}},emits:["action","close"],setup(t,{emit:i}){const n=t,l=i;function s(o){l("action",o.value)}function d(){n.data.modal||l("close")}function r(o){o.key==="Escape"&&!n.data.modal&&l("close")}return(o,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dialog-fade"},{default:e.withCtx(()=>[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m2s2-dialog-overlay",onClick:e.withModifiers(d,["self"]),onKeydown:r},[e.createElementVNode("div",m,[e.createElementVNode("div",k,[e.createElementVNode("h2",g,e.toDisplayString(t.data.title),1),t.data.modal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"dialog-close","aria-label":"Close",onClick:c[0]||(c[0]=a=>l("close"))}," ✕ "))]),e.createElementVNode("div",u,[t.data.message?(e.openBlock(),e.createElementBlock("p",y,e.toDisplayString(t.data.message),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),t.data.actions.length?(e.openBlock(),e.createElementBlock("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.actions,a=>(e.openBlock(),e.createElementBlock("button",{key:a.label,class:e.normalizeClass(["dialog-btn",`dialog-btn--${a.variant??"secondary"}`]),onClick:b=>s(a)},e.toDisplayString(a.label),11,f))),128))])):e.createCommentVNode("",!0)])],32)):e.createCommentVNode("",!0)]),_:3})]))}});module.exports=C;
|
package/dist/index32.mjs
CHANGED
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),k={class:"panel-header"},u={class:"panel-header-text"},p={id:"panel-title",class:"panel-title"},y={key:0,class:"panel-subtitle"},B={class:"panel-body"},h={key:0,class:"panel-message"},C={key:0,class:"panel-footer"},b=["onClick"],f=e.defineComponent({__name:"Panel",props:{data:{},open:{type:Boolean}},emits:["action","close"],setup(t,{emit:d}){const o=t,n=d,s=()=>o.data.side??"right";function r(l){n("action",l.value)}function m(){o.data.modal||n("close")}return(l,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"panel-overlay-fade"},{default:e.withCtx(()=>[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m2s2-panel-overlay",onClick:e.withModifiers(m,["self"])})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:`panel-slide-${s()}`},{default:e.withCtx(()=>{var i;return[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["m2s2-panel-content",`m2s2-panel-content--${s()}`]),style:e.normalizeStyle(t.data.width?{"--panel-width":t.data.width}:{}),role:"dialog","aria-modal":!0,"aria-labelledby":"panel-title"},[e.createElementVNode("div",k,[e.createElementVNode("div",u,[e.createElementVNode("h2",p,e.toDisplayString(t.data.title),1),t.data.subtitle?(e.openBlock(),e.createElementBlock("p",y,e.toDisplayString(t.data.subtitle),1)):e.createCommentVNode("",!0)]),t.data.modal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"panel-close","aria-label":"Close",onClick:c[0]||(c[0]=a=>n("close"))},"✕"))]),e.createElementVNode("div",B,[t.data.message&&!l.$slots.default?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(t.data.message),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")]),(i=t.data.actions)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.actions,a=>(e.openBlock(),e.createElementBlock("button",{key:a.label,class:e.normalizeClass(["panel-btn",`panel-btn--${a.variant??"secondary"}`]),onClick:v=>r(a)},e.toDisplayString(a.label),11,b))),128))])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)]}),_:3},8,["name"])]))}});module.exports=f;
|
|
1
|
+
"use strict";const e=require("vue"),k={class:"panel-header"},u={class:"panel-header-text"},p={id:"panel-title",class:"panel-title"},y={key:0,class:"panel-subtitle"},B={class:"panel-body"},h={key:0,class:"panel-message"},C={key:0,class:"panel-footer"},b=["onClick"],f=e.defineComponent({__name:"Panel",props:{data:{},open:{type:Boolean}},emits:["action","close"],setup(t,{emit:d}){const o=t,n=d,s=()=>o.data.side??"right";function r(l){n("action",l.value)}function m(){o.data.modal||n("close")}return(l,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"panel-overlay-fade"},{default:e.withCtx(()=>[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m2s2-panel-overlay",onClick:e.withModifiers(m,["self"])})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:`panel-slide-${s()}`},{default:e.withCtx(()=>{var i;return[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["m2s2-panel-content",`m2s2-panel-content--${s()}`]),style:e.normalizeStyle(t.data.width?{"--panel-width":t.data.width}:{}),role:"dialog","aria-modal":!0,"aria-labelledby":"panel-title"},[e.createElementVNode("div",k,[e.createElementVNode("div",u,[e.createElementVNode("h2",p,e.toDisplayString(t.data.title),1),t.data.subtitle?(e.openBlock(),e.createElementBlock("p",y,e.toDisplayString(t.data.subtitle),1)):e.createCommentVNode("",!0)]),t.data.modal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"panel-close","aria-label":"Close",onClick:c[0]||(c[0]=a=>n("close"))}," ✕ "))]),e.createElementVNode("div",B,[t.data.message&&!l.$slots.default?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(t.data.message),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")]),(i=t.data.actions)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.actions,a=>(e.openBlock(),e.createElementBlock("button",{key:a.label,class:e.normalizeClass(["panel-btn",`panel-btn--${a.variant??"secondary"}`]),onClick:v=>r(a)},e.toDisplayString(a.label),11,b))),128))])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)]}),_:3},8,["name"])]))}});module.exports=f;
|
package/dist/index36.mjs
CHANGED
|
@@ -61,7 +61,7 @@ const x = { class: "panel-header" }, z = { class: "panel-header-text" }, E = {
|
|
|
61
61
|
class: "panel-close",
|
|
62
62
|
"aria-label": "Close",
|
|
63
63
|
onClick: m[0] || (m[0] = (n) => d("close"))
|
|
64
|
-
}, "✕"))
|
|
64
|
+
}, " ✕ "))
|
|
65
65
|
]),
|
|
66
66
|
o("div", A, [
|
|
67
67
|
e.data.message && !s.$slots.default ? (t(), a("p", D, i(e.data.message), 1)) : l("", !0),
|
package/dist/index40.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=["disabled","aria-busy"],l={key:0,class:"m2s2-btn-spinner","aria-hidden":"true"},
|
|
1
|
+
"use strict";const e=require("vue"),o=["disabled","aria-busy"],l={key:0,class:"m2s2-btn-spinner","aria-hidden":"true"},i=e.defineComponent({inheritAttrs:!1,__name:"LoadingButton",props:{loading:{type:Boolean,default:!1},loadingText:{default:void 0}},setup(t){const n=e.useAttrs();return(a,s)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps(e.unref(n),{disabled:t.loading||e.unref(n).disabled,"aria-busy":t.loading}),[t.loading?(e.openBlock(),e.createElementBlock("span",l)):e.createCommentVNode("",!0),!t.loading||!t.loadingText?e.renderSlot(a.$slots,"default",{key:1}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(t.loadingText),1)],64))],16,o))}});module.exports=i;
|
package/dist/index40.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as i, useAttrs as
|
|
1
|
+
import { defineComponent as i, useAttrs as l, openBlock as t, createElementBlock as a, mergeProps as s, unref as o, createCommentVNode as r, renderSlot as u, Fragment as c, createTextVNode as g, toDisplayString as m } from "vue";
|
|
2
2
|
const f = ["disabled", "aria-busy"], b = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "m2s2-btn-spinner",
|
|
@@ -8,11 +8,11 @@ const f = ["disabled", "aria-busy"], b = {
|
|
|
8
8
|
__name: "LoadingButton",
|
|
9
9
|
props: {
|
|
10
10
|
loading: { type: Boolean, default: !1 },
|
|
11
|
-
loadingText: {}
|
|
11
|
+
loadingText: { default: void 0 }
|
|
12
12
|
},
|
|
13
13
|
setup(e) {
|
|
14
|
-
const n =
|
|
15
|
-
return (d, y) => (t(), a("button",
|
|
14
|
+
const n = l();
|
|
15
|
+
return (d, y) => (t(), a("button", s(o(n), {
|
|
16
16
|
disabled: e.loading || o(n).disabled,
|
|
17
17
|
"aria-busy": e.loading
|
|
18
18
|
}), [
|
package/dist/index46.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("./index48.cjs");;/* empty css */const i=["aria-expanded"],c=e.defineComponent({__name:"Dropdown",props:{items:{},align:{default:"left"}},setup(s){const n=e.ref(!1),r=e.ref(null);function u(o){r.value&&!r.value.contains(o.target)&&(n.value=!1)}function a(o){o.key==="Escape"&&(n.value=!1)}return e.onMounted(()=>{document.addEventListener("mousedown",u),document.addEventListener("keydown",a)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",a)}),(o,t)=>(e.openBlock(),e.createElementBlock("div",{
|
|
1
|
+
"use strict";const e=require("vue"),d=require("./index48.cjs");;/* empty css */const i=["aria-expanded"],c=e.defineComponent({__name:"Dropdown",props:{items:{},align:{default:"left"}},setup(s){const n=e.ref(!1),r=e.ref(null);function u(o){r.value&&!r.value.contains(o.target)&&(n.value=!1)}function a(o){o.key==="Escape"&&(n.value=!1)}return e.onMounted(()=>{document.addEventListener("mousedown",u),document.addEventListener("keydown",a)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",a)}),(o,t)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:r,class:"m2s2-dropdown"},[e.createElementVNode("div",{class:"m2s2-dropdown__trigger","aria-haspopup":"menu","aria-expanded":n.value,onClick:t[0]||(t[0]=l=>n.value=!n.value)},[e.renderSlot(o.$slots,"default")],8,i),n.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass(["m2s2-dropdown__menu",`m2s2-dropdown__menu--${s.align}`]),role:"menu"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,l=>(e.openBlock(),e.createBlock(d,{key:l.id,item:l,onSelect:t[1]||(t[1]=m=>n.value=!1)},null,8,["item"]))),128))],2)):e.createCommentVNode("",!0)],512))}});module.exports=c;
|
package/dist/index46.mjs
CHANGED
|
@@ -20,9 +20,9 @@ const L = ["aria-expanded"], N = /* @__PURE__ */ i({
|
|
|
20
20
|
}), f(() => {
|
|
21
21
|
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", u);
|
|
22
22
|
}), (n, o) => (t(), l("div", {
|
|
23
|
-
class: "m2s2-dropdown",
|
|
24
23
|
ref_key: "root",
|
|
25
|
-
ref: r
|
|
24
|
+
ref: r,
|
|
25
|
+
class: "m2s2-dropdown"
|
|
26
26
|
}, [
|
|
27
27
|
p("div", {
|
|
28
28
|
class: "m2s2-dropdown__trigger",
|
package/dist/index75.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(e,t){return e==="all"?"All":t[e]??e}exports.getStatusLabel=l;
|
package/dist/index75.mjs
CHANGED
|
@@ -1,53 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class: "social-icon",
|
|
5
|
-
viewBox: "0 0 98 96",
|
|
6
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
-
"aria-hidden": "true",
|
|
8
|
-
fill: "currentColor"
|
|
9
|
-
}, c = {
|
|
10
|
-
key: 1,
|
|
11
|
-
class: "social-icon",
|
|
12
|
-
viewBox: "0 0 24 24",
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
-
"aria-hidden": "true",
|
|
15
|
-
fill: "currentColor"
|
|
16
|
-
}, d = {
|
|
17
|
-
key: 2,
|
|
18
|
-
class: "social-icon",
|
|
19
|
-
viewBox: "0 0 24 24",
|
|
20
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
-
"aria-hidden": "true",
|
|
22
|
-
fill: "currentColor"
|
|
23
|
-
}, a = {
|
|
24
|
-
key: 3,
|
|
25
|
-
class: "social-icon",
|
|
26
|
-
viewBox: "0 0 24 24",
|
|
27
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
-
"aria-hidden": "true",
|
|
29
|
-
fill: "currentColor"
|
|
30
|
-
}, u = /* @__PURE__ */ i({
|
|
31
|
-
__name: "SocialIcon",
|
|
32
|
-
props: {
|
|
33
|
-
type: {}
|
|
34
|
-
},
|
|
35
|
-
setup(t) {
|
|
36
|
-
return (v, e) => t.type === "github" ? (l(), o("svg", s, [...e[0] || (e[0] = [
|
|
37
|
-
n("path", {
|
|
38
|
-
"fill-rule": "evenodd",
|
|
39
|
-
"clip-rule": "evenodd",
|
|
40
|
-
d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
|
|
41
|
-
}, null, -1)
|
|
42
|
-
])])) : t.type === "linkedin" ? (l(), o("svg", c, [...e[1] || (e[1] = [
|
|
43
|
-
n("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }, null, -1)
|
|
44
|
-
])])) : t.type === "twitter" ? (l(), o("svg", d, [...e[2] || (e[2] = [
|
|
45
|
-
n("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.747l7.73-8.835L1.254 2.25H8.08l4.253 5.622 5.91-5.622Zm-1.161 17.52h1.833L7.084 4.126H5.117z" }, null, -1)
|
|
46
|
-
])])) : t.type === "email" ? (l(), o("svg", a, [...e[3] || (e[3] = [
|
|
47
|
-
n("path", { d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z" }, null, -1)
|
|
48
|
-
])])) : r("", !0);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
1
|
+
function r(e, l) {
|
|
2
|
+
return e === "all" ? "All" : l[e] ?? e;
|
|
3
|
+
}
|
|
51
4
|
export {
|
|
52
|
-
|
|
5
|
+
r as getStatusLabel
|
|
53
6
|
};
|
package/dist/index76.cjs
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
]`).replace("lheading",he).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ze=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ue=/^( {2,}|\\)\n(?!\s*$)/,De=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,P=/[\p{P}\p{S}]/u,H=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,Me=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H).getRegex(),ge=/(?!~)[\p{P}\p{S}]/u,Qe=/(?!~)[\s\p{P}\p{S}]/u,He=/(?:[^\s\p{P}\p{S}]|~)/u,je=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Se?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ke=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ne=f(ke,"u").replace(/punct/g,P).getRegex(),Oe=f(ke,"u").replace(/punct/g,ge).getRegex(),fe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ge=f(fe,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,H).replace(/punct/g,P).getRegex(),Xe=f(fe,"gu").replace(/notPunctSpace/g,He).replace(/punctSpace/g,Qe).replace(/punct/g,ge).getRegex(),We=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,H).replace(/punct/g,P).getRegex(),Fe=f(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,P).getRegex(),Ue="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Je=f(Ue,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,H).replace(/punct/g,P).getRegex(),Ke=f(/\\(punct)/,"gu").replace(/punct/g,P).getRegex(),Ve=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ye=f(J).replace("(?:-->|$)","-->").getRegex(),et=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ye).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,tt=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",D).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),de=f(/^!?\[(label)\]\[(ref)\]/).replace("label",D).replace("ref",U).getRegex(),xe=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),rt=f("reflink|nolink(?!\\()","g").replace("reflink",de).replace("nolink",xe).getRegex(),ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Y={_backpedal:$,anyPunctuation:Ke,autolink:Ve,blockSkip:je,br:ue,code:Ze,del:$,delLDelim:$,delRDelim:$,emStrongLDelim:Ne,emStrongRDelimAst:Ge,emStrongRDelimUnd:We,escape:ve,link:tt,nolink:xe,punctuation:Me,reflink:de,reflinkSearch:rt,tag:et,text:De,url:$},nt={...Y,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",D).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D).getRegex()},O={...Y,emStrongRDelimAst:Xe,emStrongLDelim:Oe,delLDelim:Fe,delRDelim:Je,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ne).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ne).getRegex()},st={...O,br:f(ue).replace("{2,}","*").getRegex(),text:f(O.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},v={normal:K,gfm:qe,pedantic:Ee},I={normal:Y,gfm:O,breaks:st,pedantic:nt},lt={"&":"&","<":"<",">":">",'"':""","'":"'"},se=r=>lt[r];function S(r,e){if(e){if(m.escapeTest.test(r))return r.replace(m.escapeReplace,se)}else if(m.escapeTestNoEncode.test(r))return r.replace(m.escapeReplaceNoEncode,se);return r}function le(r){try{r=encodeURI(r).replace(m.percentDecode,"%")}catch{return null}return r}function ie(r,e){var i;let t=r.replace(m.findPipe,(a,l,h)=>{let o=!1,p=l;for(;--p>=0&&h[p]==="\\";)o=!o;return o?"|":" |"}),s=t.split(m.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(m.slashPipe,"|");return s}function L(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s&&r.charAt(s-n-1)===e;)n++;return r.slice(0,s-n)}function it(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function at(r,e=0){let t=e,s="";for(let n of r)if(n===" "){let i=4-t%4;s+=" ".repeat(i),t+=i}else s+=n,t++;return s}function ae(r,e,t,s,n){let i=e.href,a=e.title||null,l=r[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let h={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:a,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,h}function ot(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
|
|
3
|
-
`).map(i=>{let a=i.match(t.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=n.length?i.slice(n.length):i}).join(`
|
|
4
|
-
`)}var B=class{constructor(r){x(this,"options");x(this,"rules");x(this,"lexer");this.options=r||exports.defaults}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:L(t,`
|
|
5
|
-
`)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=ot(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=L(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:L(e[0],`
|
|
6
|
-
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=L(e[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),s="",n="",i=[];for(;t.length>0;){let a=!1,l=[],h;for(h=0;h<t.length;h++)if(this.rules.other.blockquoteStart.test(t[h]))l.push(t[h]),a=!0;else if(!a)l.push(t[h]);else break;t=t.slice(h);let o=l.join(`
|
|
9
|
-
`),p=o.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
11
|
-
${o}`:o,n=n?`${n}
|
|
12
|
-
${p}`:p;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=g,t.length===0)break;let u=i.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let c=u,b=c.raw+`
|
|
13
|
-
`+t.join(`
|
|
14
|
-
`),k=this.blockquote(b);i[i.length-1]=k,s=s.substring(0,s.length-c.raw.length)+k.raw,n=n.substring(0,n.length-c.text.length)+k.text;break}else if((u==null?void 0:u.type)==="list"){let c=u,b=c.raw+`
|
|
15
|
-
`+t.join(`
|
|
16
|
-
`),k=this.list(b);i[i.length-1]=k,s=s.substring(0,s.length-u.raw.length)+k.raw,n=n.substring(0,n.length-c.raw.length)+k.raw,t=b.substring(i.at(-1).raw.length).split(`
|
|
17
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(r){var t,s;let e=this.rules.block.list.exec(r);if(e){let n=e[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;r;){let p=!1,g="",u="";if(!(e=l.exec(r))||this.rules.block.hr.test(r))break;g=e[0],r=r.substring(g.length);let c=at(e[2].split(`
|
|
18
|
-
`,1)[0],e[1].length),b=r.split(`
|
|
19
|
-
`,1)[0],k=!c.trim(),w=0;if(this.options.pedantic?(w=2,u=c.trimStart()):k?w=e[1].length+1:(w=c.search(this.rules.other.nonSpaceChar),w=w>4?1:w,u=c.slice(w),w+=e[1].length),k&&this.rules.other.blankLine.test(b)&&(g+=b+`
|
|
20
|
-
`,r=r.substring(b.length+1),p=!0),!p){let z=this.rules.other.nextBulletRegex(w),E=this.rules.other.hrRegex(w),ee=this.rules.other.fencesBeginRegex(w),te=this.rules.other.headingBeginRegex(w),we=this.rules.other.htmlBeginRegex(w),me=this.rules.other.blockquoteBeginRegex(w);for(;r;){let N=r.split(`
|
|
21
|
-
`,1)[0],_;if(b=N,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),_=b):_=b.replace(this.rules.other.tabCharGlobal," "),ee.test(b)||te.test(b)||we.test(b)||me.test(b)||z.test(b)||E.test(b))break;if(_.search(this.rules.other.nonSpaceChar)>=w||!b.trim())u+=`
|
|
22
|
-
`+_.slice(w);else{if(k||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ee.test(c)||te.test(c)||E.test(c))break;u+=`
|
|
23
|
-
`+b}k=!b.trim(),g+=N+`
|
|
24
|
-
`,r=r.substring(N.length+1),c=_.slice(w)}}a.loose||(h?a.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(h=!0)),a.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),a.raw+=g}let o=a.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let p of a.items){if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),p.task){if(p.text=p.text.replace(this.rules.other.listReplaceTask,""),((t=p.tokens[0])==null?void 0:t.type)==="text"||((s=p.tokens[0])==null?void 0:s.type)==="paragraph"){p.tokens[0].raw=p.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),p.tokens[0].text=p.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(p.raw);if(g){let u={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};p.checked=u.checked,a.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=u.raw+p.tokens[0].raw,p.tokens[0].text=u.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(u)):p.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):p.tokens.unshift(u)}}if(!a.loose){let g=p.tokens.filter(c=>c.type==="space"),u=g.length>0&&g.some(c=>this.rules.other.anyLine.test(c.raw));a.loose=u}}if(a.loose)for(let p of a.items){p.loose=!0;for(let g of p.tokens)g.type==="text"&&(g.type="paragraph")}return a}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:n}}}table(r){var a;let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=ie(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
-
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<t.length;l++)i.header.push({text:t[l],tokens:this.lexer.inline(t[l]),header:!0,align:i.align[l]});for(let l of n)i.rows.push(ie(l,i.header.length).map((h,o)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:i.align[o]})));return i}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
26
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=L(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=it(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),ae(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return ae(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,a,l=n,h=0,o=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*r.length+n);(s=o.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){l+=a;continue}else if((s[5]||s[6])&&n%3&&!((n+a)%3)){h+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+h);let p=[...s[0]][0].length,g=r.slice(0,n+s.index+p+a);if(Math.min(n,a)%2){let c=g.slice(1,-1);return{type:"em",raw:g,text:c,tokens:this.lexer.inlineTokens(c)}}let u=g.slice(2,-2);return{type:"strong",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,a,l=n,h=this.rules.inline.delRDelim;for(h.lastIndex=0,e=e.slice(-1*r.length+n);(s=h.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(a=[...i].length,a!==n))continue;if(s[3]||s[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let o=[...s[0]][0].length,p=r.slice(0,n+s.index+o+a),g=p.slice(n,-n);return{type:"del",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){var t;let e;if(e=this.rules.inline.url.exec(r)){let s,n;if(e[2]==="@")s=e[0],n="mailto:"+s;else{let i;do i=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(i!==e[0]);s=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},y=class G{constructor(e){x(this,"tokens");x(this,"options");x(this,"state");x(this,"inlineQueue");x(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||exports.defaults,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:m,block:v.normal,inline:I.normal};this.options.pedantic?(t.block=v.pedantic,t.inline=I.pedantic):this.options.gfm&&(t.block=v.gfm,this.options.breaks?t.inline=I.breaks:t.inline=I.gfm),this.tokenizer.rules=t}static get rules(){return{block:v,inline:I}}static lex(e,t){return new G(t).lex(e)}static lexInline(e,t){return new G(t).inlineTokens(e)}lex(e){e=e.replace(m.carriageReturn,`
|
|
27
|
-
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){var n,i,a;for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(m.tabCharGlobal," ").replace(m.spaceLine,""));e;){let l;if((i=(n=this.options.extensions)==null?void 0:n.block)!=null&&i.some(o=>(l=o.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);let o=t.at(-1);l.raw.length===1&&o!==void 0?o.raw+=`
|
|
28
|
-
`:t.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);let o=t.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
29
|
-
`)?"":`
|
|
30
|
-
`)+l.raw,o.text+=`
|
|
31
|
-
`+l.text,this.inlineQueue.at(-1).src=o.text):t.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);let o=t.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
32
|
-
`)?"":`
|
|
33
|
-
`)+l.raw,o.text+=`
|
|
34
|
-
`+l.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},t.push(l));continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let h=e;if((a=this.options.extensions)!=null&&a.startBlock){let o=1/0,p=e.slice(1),g;this.options.extensions.startBlock.forEach(u=>{g=u.call({lexer:this},p),typeof g=="number"&&g>=0&&(o=Math.min(o,g))}),o<1/0&&o>=0&&(h=e.substring(0,o+1))}if(this.state.top&&(l=this.tokenizer.paragraph(h))){let o=t.at(-1);s&&(o==null?void 0:o.type)==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
35
|
-
`)?"":`
|
|
36
|
-
`)+l.raw,o.text+=`
|
|
37
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(l),s=h.length!==e.length,e=e.substring(l.raw.length);continue}if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);let o=t.at(-1);(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
38
|
-
`)?"":`
|
|
39
|
-
`)+l.raw,o.text+=`
|
|
40
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(l);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var h,o,p,g,u;this.tokenizer.lexer=this;let s=e,n=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)c.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=n[2]?n[2].length:0,s=s.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=((o=(h=this.options.hooks)==null?void 0:h.emStrongMask)==null?void 0:o.call({lexer:this},s))??s;let a=!1,l="";for(;e;){a||(l=""),a=!1;let c;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(k=>(c=k.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let k=t.at(-1);c.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=c.raw,k.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,s,l)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e,s,l)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let b=e;if((u=this.options.extensions)!=null&&u.startInline){let k=1/0,w=e.slice(1),z;this.options.extensions.startInline.forEach(E=>{z=E.call({lexer:this},w),typeof z=="number"&&z>=0&&(k=Math.min(k,z))}),k<1/0&&k>=0&&(b=e.substring(0,k+1))}if(c=this.tokenizer.inlineText(b)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(l=c.raw.slice(-1)),a=!0;let k=t.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=c.raw,k.text+=c.text):t.push(c);continue}if(e){let k="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return t}},C=class{constructor(r){x(this,"options");x(this,"parser");this.options=r||exports.defaults}space(r){return""}code({text:r,lang:e,escaped:t}){var i;let s=(i=(e||"").match(m.notSpaceStart))==null?void 0:i[0],n=r.replace(m.endingNewline,"")+`
|
|
41
|
-
`;return s?'<pre><code class="language-'+S(s)+'">'+(t?n:S(n,!0))+`</code></pre>
|
|
42
|
-
`:"<pre><code>"+(t?n:S(n,!0))+`</code></pre>
|
|
43
|
-
`}blockquote({tokens:r}){return`<blockquote>
|
|
44
|
-
${this.parser.parse(r)}</blockquote>
|
|
45
|
-
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
46
|
-
`}hr(r){return`<hr>
|
|
47
|
-
`}list(r){let e=r.ordered,t=r.start,s="";for(let a=0;a<r.items.length;a++){let l=r.items[a];s+=this.listitem(l)}let n=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+n+i+`>
|
|
48
|
-
`+s+"</"+n+`>
|
|
49
|
-
`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
|
|
50
|
-
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
51
|
-
`}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let i=r.rows[n];t="";for(let a=0;a<i.length;a++)t+=this.tablecell(i[a]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
52
|
-
<thead>
|
|
53
|
-
`+e+`</thead>
|
|
54
|
-
`+s+`</table>
|
|
55
|
-
`}tablerow({text:r}){return`<tr>
|
|
56
|
-
${r}</tr>
|
|
57
|
-
`}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
|
|
58
|
-
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${S(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),n=le(r);if(n===null)return s;r=n;let i='<a href="'+r+'"';return e&&(i+=' title="'+S(e)+'"'),i+=">"+s+"</a>",i}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=le(r);if(n===null)return S(t);r=n;let i=`<img src="${r}" alt="${S(t)}"`;return e&&(i+=` title="${S(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:S(r.text)}},j=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},R=class X{constructor(e){x(this,"options");x(this,"renderer");x(this,"textRenderer");this.options=e||exports.defaults,this.options.renderer=this.options.renderer||new C,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new j}static parse(e,t){return new X(t).parse(e)}static parseInline(e,t){return new X(t).parseInline(e)}parse(e){var s,n;this.renderer.parser=this;let t="";for(let i=0;i<e.length;i++){let a=e[i];if((n=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&n[a.type]){let h=a,o=this.options.extensions.renderers[h.type].call({parser:this},h);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){t+=o||"";continue}}let l=a;switch(l.type){case"space":{t+=this.renderer.space(l);break}case"hr":{t+=this.renderer.hr(l);break}case"heading":{t+=this.renderer.heading(l);break}case"code":{t+=this.renderer.code(l);break}case"table":{t+=this.renderer.table(l);break}case"blockquote":{t+=this.renderer.blockquote(l);break}case"list":{t+=this.renderer.list(l);break}case"checkbox":{t+=this.renderer.checkbox(l);break}case"html":{t+=this.renderer.html(l);break}case"def":{t+=this.renderer.def(l);break}case"paragraph":{t+=this.renderer.paragraph(l);break}case"text":{t+=this.renderer.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return t}parseInline(e,t=this.renderer){var n,i;this.renderer.parser=this;let s="";for(let a=0;a<e.length;a++){let l=e[a];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[l.type]){let o=this.options.extensions.renderers[l.type].call({parser:this},l);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=o||"";continue}}let h=l;switch(h.type){case"escape":{s+=t.text(h);break}case"html":{s+=t.html(h);break}case"link":{s+=t.link(h);break}case"image":{s+=t.image(h);break}case"checkbox":{s+=t.checkbox(h);break}case"strong":{s+=t.strong(h);break}case"em":{s+=t.em(h);break}case"codespan":{s+=t.codespan(h);break}case"br":{s+=t.br(h);break}case"del":{s+=t.del(h);break}case"text":{s+=t.text(h);break}default:{let o='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},Z,A=(Z=class{constructor(r){x(this,"options");x(this,"block");this.options=r||exports.defaults}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?y.lex:y.lexInline}provideParser(r=this.block){return r?R.parse:R.parseInline}},x(Z,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),x(Z,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Z),be=class{constructor(...r){x(this,"defaults",M());x(this,"options",this.setOptions);x(this,"parse",this.parseMarkdown(!0));x(this,"parseInline",this.parseMarkdown(!1));x(this,"Parser",R);x(this,"Renderer",C);x(this,"TextRenderer",j);x(this,"Lexer",y);x(this,"Tokenizer",B);x(this,"Hooks",A);this.use(...r)}walkTokens(r,e){var s,n;let t=[];for(let i of r)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let a=i;for(let l of a.header)t=t.concat(this.walkTokens(l.tokens,e));for(let l of a.rows)for(let h of l)t=t.concat(this.walkTokens(h.tokens,e));break}case"list":{let a=i;t=t.concat(this.walkTokens(a.items,e));break}default:{let a=i;(n=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&n[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let h=a[l].flat(1/0);t=t.concat(this.walkTokens(h,e))}):a.tokens&&(t=t.concat(this.walkTokens(a.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...a){let l=n.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new C(this.defaults);for(let i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=t.renderer[a],h=n[a];n[a]=(...o)=>{let p=l.apply(n,o);return p===!1&&(p=h.apply(n,o)),p||""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new B(this.defaults);for(let i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=t.tokenizer[a],h=n[a];n[a]=(...o)=>{let p=l.apply(n,o);return p===!1&&(p=h.apply(n,o)),p}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new A;for(let i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=t.hooks[a],h=n[a];A.passThroughHooks.has(i)?n[a]=o=>{if(this.defaults.async&&A.passThroughHooksRespectAsync.has(i))return(async()=>{let g=await l.call(n,o);return h.call(n,g)})();let p=l.call(n,o);return h.call(n,p)}:n[a]=(...o)=>{if(this.defaults.async)return(async()=>{let g=await l.apply(n,o);return g===!1&&(g=await h.apply(n,o)),g})();let p=l.apply(n,o);return p===!1&&(p=h.apply(n,o)),p}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),n&&(l=l.concat(n.call(this,a))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return y.lex(r,e??this.defaults)}parser(r,e){return R.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,l=await(n.hooks?await n.hooks.provideLexer(r):r?y.lex:y.lexInline)(a,n),h=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(h,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser(r):r?R.parse:R.parseInline)(h,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer(r):r?y.lex:y.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(r):r?R.parse:R.parseInline)(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return i(a)}}}onError(r,e){return t=>{if(t.message+=`
|
|
59
|
-
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+S(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},T=new be;function d(r,e){return T.parse(r,e)}d.options=d.setOptions=function(r){return T.setOptions(r),d.defaults=T.defaults,oe(d.defaults),d};d.getDefaults=M;d.defaults=exports.defaults;d.use=function(...r){return T.use(...r),d.defaults=T.defaults,oe(d.defaults),d};d.walkTokens=function(r,e){return T.walkTokens(r,e)};d.parseInline=T.parseInline;d.Parser=R;d.parser=R.parse;d.Renderer=C;d.TextRenderer=j;d.Lexer=y;d.lexer=y.lex;d.Tokenizer=B;d.Hooks=A;d.parse=d;d.options;d.setOptions;d.use;d.walkTokens;d.parseInline;R.parse;y.lex;exports.Hooks=A;exports.Lexer=y;exports.Marked=be;exports.Parser=R;exports.Renderer=C;exports.TextRenderer=j;exports.Tokenizer=B;exports.getDefaults=M;exports.marked=d;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){const[t,a,n]=e.split("-").map(Number);return new Date(t,a-1,n).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function o(){return new Date().toISOString().split("T")[0]}function i(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-").replace(/-+/g,"-")}function l(e){const t=e.trim().split(/\s+/).filter(Boolean).length;return Math.max(1,Math.ceil(t/200))}exports.calcReadingTime=l;exports.formatBlogDate=r;exports.generateSlug=i;exports.todayAsIsoDate=o;
|