@tempots/beatui 0.53.0 → 0.54.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/{2019-BiSy3dQP.cjs → 2019-5RIscTOv.cjs} +1 -1
- package/dist/{2019-Djx2f_nO.js → 2019-i1LHsYdK.js} +2 -2
- package/dist/{2020-BgJxYgaO.cjs → 2020-DeCezjWf.cjs} +1 -1
- package/dist/{2020-C1wOj1GM.js → 2020-S7qY95wq.js} +2 -2
- package/dist/{ar-BEbbig_x.cjs → ar-BqnDsD9v.cjs} +1 -1
- package/dist/{ar-Djuleurf.js → ar-DrBp_VwJ.js} +7 -12
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +353 -360
- package/dist/{de-E8u7Hbc0.js → de-B5oZoraI.js} +5 -10
- package/dist/{de-Br3MCGtv.cjs → de-C_N0wtxQ.cjs} +1 -1
- package/dist/{es-BN0iaBgJ.js → es-DRc5dc_G.js} +1 -6
- package/dist/{es-CAwGEj_N.cjs → es-JnLMDtzg.cjs} +1 -1
- package/dist/{fa-3Qfo8ZXh.js → fa-B0VDVs5B.js} +6 -11
- package/dist/{fa-CEz8tGnY.cjs → fa-BC16IdRL.cjs} +1 -1
- package/dist/{fr-Dbn62iEL.cjs → fr-BupZ6YnU.cjs} +1 -1
- package/dist/{fr-D1ndk0A5.js → fr-DXlfWwI6.js} +8 -13
- package/dist/{he-CIV7rntE.js → he-BX-Az8As.js} +8 -13
- package/dist/{he-OtaTg9wg.cjs → he-C-aQ2yoO.cjs} +1 -1
- package/dist/{hi-CnbarThz.cjs → hi-L3y3Aedb.cjs} +1 -1
- package/dist/{hi-tzWREPMb.js → hi-w4uL7LN1.js} +8 -13
- package/dist/{index-nRXzduHm.cjs → index-B7gVxeO9.cjs} +1 -1
- package/dist/{index-CBT2SLat.js → index-BI5w0jSz.js} +223 -224
- package/dist/{index-B9y4N11q.js → index-BnQvOXw8.js} +3019 -3004
- package/dist/{index-ClFVnBUS.cjs → index-Bv2gn_kV.cjs} +3 -3
- package/dist/{index-BjQW8AsK.cjs → index-CFOxIBGJ.cjs} +12 -12
- package/dist/{index-KPHFBjQB.cjs → index-CKyH3jwP.cjs} +1 -1
- package/dist/{index-TiMfhF1U.cjs → index-C_71zSeN.cjs} +1 -1
- package/dist/index-CkNcU-jd.cjs +8 -0
- package/dist/{index-qWS4IYZX.js → index-CyoxPiTg.js} +1 -1
- package/dist/{index-UMbs0jPr.js → index-DKwuTFYj.js} +377 -378
- package/dist/{index-DDhLWdaz.js → index-DNUXf4K4.js} +1 -1
- package/dist/{index-CAeOFdez.js → index-DjShJtXp.js} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +2413 -2522
- package/dist/{it-1Hy_Ay2j.js → it-BCKQ5Tu8.js} +6 -11
- package/dist/{it-FOaX_rku.cjs → it-CnHaoq-X.cjs} +1 -1
- package/dist/{ja-C7_PK2VE.js → ja-DC47Nkza.js} +13 -18
- package/dist/{ja-DW4_3EWp.cjs → ja-DpDF4IgX.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-C-jXKweM.cjs → ko-BMmVJHzm.cjs} +1 -1
- package/dist/{ko-BDOp6dFE.js → ko-ejUHA0Sw.js} +8 -13
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/{modal-BBaPJhi-.js → modal-CKyUdeEz.js} +54 -58
- package/dist/modal-rou7pM0r.cjs +1 -0
- package/dist/{nl-CF5W2Rt4.js → nl-WjgpPUel.js} +6 -11
- package/dist/{nl-Ui8TT45t.cjs → nl-viDlnQWK.cjs} +1 -1
- package/dist/{notice-DTTyRbwh.js → notice-BS0d903Q.js} +385 -387
- package/dist/notice-MF7whf3_.cjs +2 -0
- package/dist/{pl-oLzT5Ole.js → pl-Cw4CYjK_.js} +3 -8
- package/dist/{pl-8PM7rn2L.cjs → pl-Vrfv_fGt.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-Bb0T3Cx1.js → pt-B4Rh_ZBF.js} +10 -15
- package/dist/{pt-kRRsG9-4.cjs → pt-CxQV74vS.cjs} +1 -1
- package/dist/{ru-C5AMF9a6.cjs → ru-BB3GRr_J.cjs} +1 -1
- package/dist/{ru-DwLv1myc.js → ru-DFHsLJ9b.js} +14 -19
- package/dist/{toolbar-D_LSJCtv.js → toolbar-D2J_NkKD.js} +1 -1
- package/dist/{toolbar-D6_MB1QI.cjs → toolbar-DRdm9W7H.cjs} +1 -1
- package/dist/{tr-DBQNjaPN.js → tr-Dbktyawl.js} +7 -12
- package/dist/{tr-BwgU2BAj.cjs → tr-mBiHcEl1.cjs} +1 -1
- package/dist/{translations-CG5-f9U8.js → translations-CaTkLRHu.js} +85 -93
- package/dist/{translations-t57jdjWu.js → translations-CpTeFtvW.js} +1 -1
- package/dist/{translations-D77sU1Wl.cjs → translations-ggnrzaCG.cjs} +1 -1
- package/dist/translations-h_OJS1Ut.cjs +1 -0
- package/dist/types/components/data/icon.d.ts +1 -1
- package/dist/types/components/data/page-drop-zone.d.ts +1 -1
- package/dist/types/components/data/unstyled-drop-zone.d.ts +1 -1
- package/dist/types/components/form/input/create-nullable-string-input.d.ts +24 -0
- package/dist/types/components/form/input/create-temporal-input.d.ts +54 -0
- package/dist/types/components/form/input/nullable-email-input.d.ts +1 -2
- package/dist/types/components/form/input/nullable-password-input.d.ts +1 -2
- package/dist/types/components/form/input/nullable-plain-date-input.d.ts +19 -3
- package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +19 -3
- package/dist/types/components/form/input/nullable-plain-time-input.d.ts +19 -3
- package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +19 -3
- package/dist/types/components/form/input/nullable-text-area.d.ts +6 -4
- package/dist/types/components/form/input/nullable-text-input.d.ts +3 -4
- package/dist/types/components/form/input/nullable-url-input.d.ts +1 -2
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +1 -2
- package/dist/types/components/form/input/plain-date-input.d.ts +19 -3
- package/dist/types/components/form/input/plain-date-time-input.d.ts +19 -3
- package/dist/types/components/form/input/plain-time-input.d.ts +19 -3
- package/dist/types/components/form/input/plain-year-month-input.d.ts +19 -3
- package/dist/types/components/json-schema/controls/shared-utils.d.ts +8 -0
- package/dist/types/components/json-schema/schema-conditionals.d.ts +26 -0
- package/dist/types/components/json-schema/schema-context.d.ts +4 -107
- package/dist/types/components/json-schema/schema-merge.d.ts +9 -0
- package/dist/types/components/json-schema/schema-types.d.ts +85 -0
- package/dist/{ur-s32jv4mP.cjs → ur-CZ5sgUP1.cjs} +1 -1
- package/dist/{ur-BmK_ieRn.js → ur-Cqh7AYnd.js} +9 -14
- package/dist/utils-U1aNOU3o.cjs +1 -0
- package/dist/utils-w_vUChhV.js +2454 -0
- package/dist/{vi-DK0Fj95H.js → vi-CLBp2oaY.js} +11 -16
- package/dist/{vi-B4qRKlRd.cjs → vi-Ki_Urj_E.cjs} +1 -1
- package/dist/{zh-CUEpc9yf.cjs → zh-C78OkbS0.cjs} +1 -1
- package/dist/{zh-Db8COSme.js → zh-CT4aGkgD.js} +8 -13
- package/package.json +5 -4
- package/dist/index-ClqyVDXY.cjs +0 -8
- package/dist/modal-O7QoP7Zv.cjs +0 -1
- package/dist/notice-DLDzwKkw.cjs +0 -2
- package/dist/translations-BAk3j4bi.cjs +0 -1
- package/dist/utils-CYMdxKSM.js +0 -2516
- package/dist/utils-DI_H4_Gm.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
`)}function T(){const k=u[u.length-1],w=k[k.length-1],Q=w?w.charCodeAt(w.length-1):null;Q===10||Q===13||Q===null||P()}function x(k){return E("ignoreEncode")?k:Jn(k)}function L(){S()}function N(k){l.push(!k._loose),T(),I("<ol"),b("expectFirstItem",!0)}function D(k){l.push(!k._loose),T(),I("<ul"),b("expectFirstItem",!0)}function q(k){if(E("expectFirstItem")){const w=Number.parseInt(this.sliceSerialize(k),10);w!==1&&I(' start="'+x(String(w))+'"')}}function z(){E("expectFirstItem")?I(">"):M(),T(),I("<li>"),b("expectFirstItem"),b("lastWasTag")}function C(){M(),l.pop(),P(),I("</ol>")}function O(){M(),l.pop(),P(),I("</ul>")}function M(){E("lastWasTag")&&!E("slurpAllLineEndings")&&T(),I("</li>"),b("slurpAllLineEndings")}function A(){l.push(!1),T(),I("<blockquote>")}function V(){l.pop(),T(),I("</blockquote>"),b("slurpAllLineEndings")}function R(){l[l.length-1]||(T(),I("<p>")),b("slurpAllLineEndings")}function Y(){l[l.length-1]?b("slurpAllLineEndings",!0):I("</p>")}function tn(){T(),I("<pre><code"),b("fencesCount",0)}function o(){const k=S();I(' class="language-'+k+'"')}function Z(){const k=E("fencesCount")||0;k||(I(">"),b("slurpOneLineEnding",!0)),b("fencesCount",k+1)}function en(){T(),I("<pre><code>")}function s(){const k=E("fencesCount");k!==void 0&&k<2&&h.tightStack.length>0&&!E("lastWasTag")&&P(),E("flowCodeSeenData")&&T(),I("</code></pre>"),k!==void 0&&k<2&&T(),b("flowCodeSeenData"),b("fencesCount"),b("slurpOneLineEnding")}function G(){i.push({image:!0}),t=void 0}function on(){i.push({})}function H(k){i[i.length-1].labelId=this.sliceSerialize(k)}function fn(){i[i.length-1].label=S()}function un(k){i[i.length-1].referenceId=this.sliceSerialize(k)}function sn(){F(),i[i.length-1].destination=""}function cn(){F(),b("ignoreEncode",!0)}function In(){i[i.length-1].destination=S(),b("ignoreEncode")}function ot(){i[i.length-1].title=S()}function An(){let k=i.length-1;const w=i[k],Q=w.referenceId||w.labelId,J=w.destination===void 0?e[hn(Q)]:w;for(t=!0;k--;)if(i[k].image){t=void 0;break}w.image?(I('<img src="'+gn(J.destination,r.allowDangerousProtocol?void 0:jt)+'" alt="'),d(w.label),I('"')):I('<a href="'+gn(J.destination,r.allowDangerousProtocol?void 0:Rn)+'"'),I(J.title?' title="'+J.title+'"':""),w.image?I(" />"):(I(">"),d(w.label),I("</a>")),i.pop()}function st(){F(),i.push({})}function ct(k){S(),i[i.length-1].labelId=this.sliceSerialize(k)}function ht(){F(),b("ignoreEncode",!0)}function ft(){i[i.length-1].destination=S(),b("ignoreEncode")}function pt(){i[i.length-1].title=S()}function mt(){const k=i[i.length-1],w=hn(k.labelId);S(),qn.call(e,w)||(e[w]=i[i.length-1]),i.pop()}function gt(){b("slurpAllLineEndings",!0)}function xt(k){E("headingRank")||(b("headingRank",this.sliceSerialize(k).length),T(),I("<h"+E("headingRank")+">"))}function kt(){F(),b("slurpAllLineEndings")}function St(){b("slurpAllLineEndings",!0)}function bt(){I("</h"+E("headingRank")+">"),b("headingRank")}function dt(k){b("headingRank",this.sliceSerialize(k).charCodeAt(0)===61?1:2)}function It(){const k=S();T(),I("<h"+E("headingRank")+">"),d(k),I("</h"+E("headingRank")+">"),b("slurpAllLineEndings"),b("headingRank")}function pn(k){d(x(this.sliceSerialize(k)))}function wt(k){if(!E("slurpAllLineEndings")){if(E("slurpOneLineEnding")){b("slurpOneLineEnding");return}if(E("inCodeText")){d(" ");return}d(x(this.sliceSerialize(k)))}}function Ct(k){d(x(this.sliceSerialize(k))),b("flowCodeSeenData",!0)}function _n(){I("<br />")}function zt(){T(),Pn()}function Ln(){b("ignoreEncode")}function Pn(){r.allowDangerousHtml&&b("ignoreEncode",!0)}function yt(){I("<em>")}function Et(){I("<strong>")}function Tt(){b("inCodeText",!0),I("<code>")}function Ft(){b("inCodeText"),I("</code>")}function At(){I("</em>")}function _t(){I("</strong>")}function Lt(){T(),I("<hr />")}function Bn(k){b("characterReferenceType",k.type)}function Pt(k){const w=this.sliceSerialize(k),Q=E("characterReferenceType")?Rt(w,E("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):Yn(w);d(x(Q)),b("characterReferenceType")}function Bt(k){const w=this.sliceSerialize(k);I('<a href="'+gn(w,r.allowDangerousProtocol?void 0:Rn)+'">'),d(x(w)),I("</a>")}function Ot(k){const w=this.sliceSerialize(k);I('<a href="'+gn("mailto:"+w)+'">'),d(x(w)),I("</a>")}}function B(n,r,t,e){const u=e?e-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(m){return _(m)?(n.enter(t),a(m)):r(m)}function a(m){return _(m)&&i++<u?(n.consume(m),a):(n.exit(t),r(m))}}const Yt={tokenize:Zt};function Zt(n){const r=n.attempt(this.parser.constructs.contentInitial,e,u);let t;return r;function e(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),B(n,r,"linePrefix")}function u(a){return n.enter("paragraph"),i(a)}function i(a){const m=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=m),t=m,l(a)}function l(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return y(a)?(n.consume(a),n.exit("chunkText"),i):(n.consume(a),l)}}const Gt={tokenize:Jt},Hn={tokenize:Kt};function Jt(n){const r=this,t=[];let e=0,u,i,l;return a;function a(d){if(e<t.length){const P=t[e];return r.containerState=P[1],n.attempt(P[0].continuation,m,h)(d)}return h(d)}function m(d){if(e++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&I();const P=r.events.length;let T=P,x;for(;T--;)if(r.events[T][0]==="exit"&&r.events[T][1].type==="chunkFlow"){x=r.events[T][1].end;break}S(e);let L=P;for(;L<r.events.length;)r.events[L][1].end={...x},L++;return X(r.events,T+1,0,r.events.slice(P)),r.events.length=L,h(d)}return a(d)}function h(d){if(e===t.length){if(!u)return g(d);if(u.currentConstruct&&u.currentConstruct.concrete)return b(d);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Hn,p,f)(d)}function p(d){return u&&I(),S(e),g(d)}function f(d){return r.parser.lazy[r.now().line]=e!==t.length,l=r.now().offset,b(d)}function g(d){return r.containerState={},n.attempt(Hn,c,b)(d)}function c(d){return e++,t.push([r.currentConstruct,r.containerState]),g(d)}function b(d){if(d===null){u&&I(),S(0),n.consume(d);return}return u=u||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:i}),E(d)}function E(d){if(d===null){F(n.exit("chunkFlow"),!0),S(0),n.consume(d);return}return y(d)?(n.consume(d),F(n.exit("chunkFlow")),e=0,r.interrupt=void 0,a):(n.consume(d),E)}function F(d,P){const T=r.sliceStream(d);if(P&&T.push(null),d.previous=i,i&&(i.next=d),i=d,u.defineSkip(d.start),u.write(T),r.parser.lazy[d.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<l&&(!u.events[x][1].end||u.events[x][1].end.offset>l))return;const L=r.events.length;let N=L,D,q;for(;N--;)if(r.events[N][0]==="exit"&&r.events[N][1].type==="chunkFlow"){if(D){q=r.events[N][1].end;break}D=!0}for(S(e),x=L;x<r.events.length;)r.events[x][1].end={...q},x++;X(r.events,N+1,0,r.events.slice(L)),r.events.length=x}}function S(d){let P=t.length;for(;P-- >d;){const T=t[P];r.containerState=T[1],T[0].exit.call(r,n)}t.length=d}function I(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Kt(n,r,t){return B(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function En(n){if(n===null||U(n)||Xn(n))return 1;if(Kn(n))return 2}function dn(n,r,t){const e=[];let u=-1;for(;++u<n.length;){const i=n[u].resolveAll;i&&!e.includes(i)&&(r=i(r,t),e.push(i))}return r}const Tn={name:"attention",resolveAll:Xt,tokenize:vt};function Xt(n,r){let t=-1,e,u,i,l,a,m,h,p;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(e=t;e--;)if(n[e][0]==="exit"&&n[e][1].type==="attentionSequence"&&n[e][1]._open&&r.sliceSerialize(n[e][1]).charCodeAt(0)===r.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[e][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[e][1].end.offset-n[e][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;m=n[e][1].end.offset-n[e][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f={...n[e][1].end},g={...n[t][1].start};Vn(f,-m),Vn(g,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:{...n[e][1].end}},a={type:m>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:g},i={type:m>1?"strongText":"emphasisText",start:{...n[e][1].end},end:{...n[t][1].start}},u={type:m>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},n[e][1].end={...l.start},n[t][1].start={...a.end},h=[],n[e][1].end.offset-n[e][1].start.offset&&(h=W(h,[["enter",n[e][1],r],["exit",n[e][1],r]])),h=W(h,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),h=W(h,dn(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),h=W(h,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,h=W(h,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,X(n,e-1,t-e+3,h),t=e+h.length-p-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function vt(n,r){const t=this.parser.constructs.attentionMarkers.null,e=this.previous,u=En(e);let i;return l;function l(m){return i=m,n.enter("attentionSequence"),a(m)}function a(m){if(m===i)return n.consume(m),a;const h=n.exit("attentionSequence"),p=En(m),f=!p||p===2&&u||t.includes(m),g=!u||u===2&&p||t.includes(e);return h._open=!!(i===42?f:f&&(u||!g)),h._close=!!(i===42?g:g&&(p||!f)),r(m)}}function Vn(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const ne={name:"autolink",tokenize:te};function te(n,r,t){let e=0;return u;function u(c){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),i}function i(c){return K(c)?(n.consume(c),l):c===64?t(c):h(c)}function l(c){return c===43||c===45||c===46||$(c)?(e=1,a(c)):h(c)}function a(c){return c===58?(n.consume(c),e=0,m):(c===43||c===45||c===46||$(c))&&e++<32?(n.consume(c),a):(e=0,h(c))}function m(c){return c===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):c===null||c===32||c===60||bn(c)?t(c):(n.consume(c),m)}function h(c){return c===64?(n.consume(c),p):Vt(c)?(n.consume(c),h):t(c)}function p(c){return $(c)?f(c):t(c)}function f(c){return c===46?(n.consume(c),e=0,p):c===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):g(c)}function g(c){if((c===45||$(c))&&e++<63){const b=c===45?g:f;return n.consume(c),b}return t(c)}}const kn={partial:!0,tokenize:ee};function ee(n,r,t){return e;function e(i){return _(i)?B(n,u,"linePrefix")(i):u(i)}function u(i){return i===null||y(i)?r(i):t(i)}}const vn={continuation:{tokenize:ie},exit:ue,name:"blockQuote",tokenize:re};function re(n,r,t){const e=this;return u;function u(l){if(l===62){const a=e.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(l),n.exit("blockQuoteMarker"),i}return t(l)}function i(l){return _(l)?(n.enter("blockQuotePrefixWhitespace"),n.consume(l),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(l))}}function ie(n,r,t){const e=this;return u;function u(l){return _(l)?B(n,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return n.attempt(vn,r,t)(l)}}function ue(n){n.exit("blockQuote")}const nt={name:"characterEscape",tokenize:le};function le(n,r,t){return e;function e(i){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(i),n.exit("escapeMarker"),u}function u(i){return Wt(i)?(n.enter("characterEscapeValue"),n.consume(i),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):t(i)}}const tt={name:"characterReference",tokenize:ae};function ae(n,r,t){const e=this;let u=0,i,l;return a;function a(f){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),m}function m(f){return f===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(f),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),i=31,l=$,p(f))}function h(f){return f===88||f===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(f),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),i=6,l=Qt,p):(n.enter("characterReferenceValue"),i=7,l=yn,p(f))}function p(f){if(f===59&&u){const g=n.exit("characterReferenceValue");return l===$&&!Yn(e.sliceSerialize(g))?t(f):(n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return l(f)&&u++<i?(n.consume(f),p):t(f)}}const Qn={partial:!0,tokenize:se},Wn={concrete:!0,name:"codeFenced",tokenize:oe};function oe(n,r,t){const e=this,u={partial:!0,tokenize:T};let i=0,l=0,a;return m;function m(x){return h(x)}function h(x){const L=e.events[e.events.length-1];return i=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=x,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(x)}function p(x){return x===a?(l++,n.consume(x),p):l<3?t(x):(n.exit("codeFencedFenceSequence"),_(x)?B(n,f,"whitespace")(x):f(x))}function f(x){return x===null||y(x)?(n.exit("codeFencedFence"),e.interrupt?r(x):n.check(Qn,E,P)(x)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),f(x)):_(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),B(n,c,"whitespace")(x)):x===96&&x===a?t(x):(n.consume(x),g)}function c(x){return x===null||y(x)?f(x):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),f(x)):x===96&&x===a?t(x):(n.consume(x),b)}function E(x){return n.attempt(u,P,F)(x)}function F(x){return n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),S}function S(x){return i>0&&_(x)?B(n,I,"linePrefix",i+1)(x):I(x)}function I(x){return x===null||y(x)?n.check(Qn,E,P)(x):(n.enter("codeFlowValue"),d(x))}function d(x){return x===null||y(x)?(n.exit("codeFlowValue"),I(x)):(n.consume(x),d)}function P(x){return n.exit("codeFenced"),r(x)}function T(x,L,N){let D=0;return q;function q(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),z}function z(A){return x.enter("codeFencedFence"),_(A)?B(x,C,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):C(A)}function C(A){return A===a?(x.enter("codeFencedFenceSequence"),O(A)):N(A)}function O(A){return A===a?(D++,x.consume(A),O):D>=l?(x.exit("codeFencedFenceSequence"),_(A)?B(x,M,"whitespace")(A):M(A)):N(A)}function M(A){return A===null||y(A)?(x.exit("codeFencedFence"),L(A)):N(A)}}}function se(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const wn={name:"codeIndented",tokenize:he},ce={partial:!0,tokenize:fe};function he(n,r,t){const e=this;return u;function u(h){return n.enter("codeIndented"),B(n,i,"linePrefix",5)(h)}function i(h){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):t(h)}function l(h){return h===null?m(h):y(h)?n.attempt(ce,l,m)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||y(h)?(n.exit("codeFlowValue"),l(h)):(n.consume(h),a)}function m(h){return n.exit("codeIndented"),r(h)}}function fe(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):B(n,i,"linePrefix",5)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):y(l)?u(l):t(l)}}const pe={name:"codeText",previous:ge,resolve:me,tokenize:xe};function me(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e<r;)if(n[e][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(e=t-1,r++;++e<=r;)u===void 0?e!==r&&n[e][1].type!=="lineEnding"&&(u=e):(e===r||n[e][1].type==="lineEnding")&&(n[u][1].type="codeTextData",e!==u+2&&(n[u][1].end=n[e-1][1].end,n.splice(u+2,e-u-2),r-=e-u-2,e=u+2),u=void 0);return n}function ge(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xe(n,r,t){let e=0,u,i;return l;function l(f){return n.enter("codeText"),n.enter("codeTextSequence"),a(f)}function a(f){return f===96?(n.consume(f),e++,a):(n.exit("codeTextSequence"),m(f))}function m(f){return f===null?t(f):f===32?(n.enter("space"),n.consume(f),n.exit("space"),m):f===96?(i=n.enter("codeTextSequence"),u=0,p(f)):y(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):(n.enter("codeTextData"),h(f))}function h(f){return f===null||f===32||f===96||y(f)?(n.exit("codeTextData"),m(f)):(n.consume(f),h)}function p(f){return f===96?(n.consume(f),u++,p):u===e?(n.exit("codeTextSequence"),n.exit("codeText"),r(f)):(i.type="codeTextData",h(f))}}class ke{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,t){const e=t??Number.POSITIVE_INFINITY;return e<this.left.length?this.left.slice(r,e):r>this.left.length?this.right.slice(this.right.length-e+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-e+this.left.length).reverse())}splice(r,t,e){const u=t||0;this.setCursor(Math.trunc(r));const i=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return e&&mn(this.left,e),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),mn(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),mn(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const t=this.left.splice(r,Number.POSITIVE_INFINITY);mn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);mn(this.left,t.reverse())}}}function mn(n,r){let t=0;if(r.length<1e4)n.push(...r);else for(;t<r.length;)n.push(...r.slice(t,t+1e4)),t+=1e4}function et(n){const r={};let t=-1,e,u,i,l,a,m,h;const p=new ke(n);for(;++t<p.length;){for(;t in r;)t=r[t];if(e=p.get(t),t&&e[1].type==="chunkFlow"&&p.get(t-1)[1].type==="listItemPrefix"&&(m=e[1]._tokenizer.events,i=0,i<m.length&&m[i][1].type==="lineEndingBlank"&&(i+=2),i<m.length&&m[i][1].type==="content"))for(;++i<m.length&&m[i][1].type!=="content";)m[i][1].type==="chunkText"&&(m[i][1]._isInFirstContentOfListItem=!0,i++);if(e[0]==="enter")e[1].contentType&&(Object.assign(r,Se(p,t)),t=r[t],h=!0);else if(e[1]._container){for(i=t,u=void 0;i--;)if(l=p.get(i),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(u&&(p.get(u)[1].type="lineEndingBlank"),l[1].type="lineEnding",u=i);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;u&&(e[1].end={...p.get(u)[1].start},a=p.slice(u,t),a.unshift(e),p.splice(u,t-u+1,a))}}return X(n,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Se(n,r){const t=n.get(r)[1],e=n.get(r)[2];let u=r-1;const i=[];let l=t._tokenizer;l||(l=e.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,m=[],h={};let p,f,g=-1,c=t,b=0,E=0;const F=[E];for(;c;){for(;n.get(++u)[1]!==c;);i.push(u),c._tokenizer||(p=e.sliceStream(c),c.next||p.push(null),f&&l.defineSkip(c.start),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=c,c=c.next}for(c=t;++g<a.length;)a[g][0]==="exit"&&a[g-1][0]==="enter"&&a[g][1].type===a[g-1][1].type&&a[g][1].start.line!==a[g][1].end.line&&(E=g+1,F.push(E),c._tokenizer=void 0,c.previous=void 0,c=c.next);for(l.events=[],c?(c._tokenizer=void 0,c.previous=void 0):F.pop(),g=F.length;g--;){const S=a.slice(F[g],F[g+1]),I=i.pop();m.push([I,I+S.length-1]),n.splice(I,2,S)}for(m.reverse(),g=-1;++g<m.length;)h[b+m[g][0]]=b+m[g][1],b+=m[g][1]-m[g][0]-1;return h}const be={resolve:Ie,tokenize:we},de={partial:!0,tokenize:Ce};function Ie(n){return et(n),n}function we(n,r){let t;return e;function e(a){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),u(a)}function u(a){return a===null?i(a):y(a)?n.check(de,l,i)(a):(n.consume(a),u)}function i(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function l(a){return n.consume(a),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function Ce(n,r,t){const e=this;return u;function u(l){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),B(n,i,"linePrefix")}function i(l){if(l===null||y(l))return t(l);const a=e.events[e.events.length-1];return!e.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function rt(n,r,t,e,u,i,l,a,m){const h=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(S){return S===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(S),n.exit(i),g):S===null||S===32||S===41||bn(S)?t(S):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),E(S))}function g(S){return S===62?(n.enter(i),n.consume(S),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),c(S))}function c(S){return S===62?(n.exit("chunkString"),n.exit(a),g(S)):S===null||S===60||y(S)?t(S):(n.consume(S),S===92?b:c)}function b(S){return S===60||S===62||S===92?(n.consume(S),c):c(S)}function E(S){return!p&&(S===null||S===41||U(S))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(S)):p<h&&S===40?(n.consume(S),p++,E):S===41?(n.consume(S),p--,E):S===null||S===32||S===40||bn(S)?t(S):(n.consume(S),S===92?F:E)}function F(S){return S===40||S===41||S===92?(n.consume(S),E):E(S)}}function it(n,r,t,e,u,i){const l=this;let a=0,m;return h;function h(c){return n.enter(e),n.enter(u),n.consume(c),n.exit(u),n.enter(i),p}function p(c){return a>999||c===null||c===91||c===93&&!m||c===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(c):c===93?(n.exit(i),n.enter(u),n.consume(c),n.exit(u),n.exit(e),r):y(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(c))}function f(c){return c===null||c===91||c===93||y(c)||a++>999?(n.exit("chunkString"),p(c)):(n.consume(c),m||(m=!_(c)),c===92?g:f)}function g(c){return c===91||c===92||c===93?(n.consume(c),a++,f):f(c)}}function ut(n,r,t,e,u,i){let l;return a;function a(g){return g===34||g===39||g===40?(n.enter(e),n.enter(u),n.consume(g),n.exit(u),l=g===40?41:g,m):t(g)}function m(g){return g===l?(n.enter(u),n.consume(g),n.exit(u),n.exit(e),r):(n.enter(i),h(g))}function h(g){return g===l?(n.exit(i),m(l)):g===null?t(g):y(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),B(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||y(g)?(n.exit("chunkString"),h(g)):(n.consume(g),g===92?f:p)}function f(g){return g===l||g===92?(n.consume(g),p):p(g)}}function xn(n,r){let t;return e;function e(u){return y(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):_(u)?B(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}const ze={name:"definition",tokenize:Ee},ye={partial:!0,tokenize:Te};function Ee(n,r,t){const e=this;let u;return i;function i(c){return n.enter("definition"),l(c)}function l(c){return it.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function a(c){return u=hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),c===58?(n.enter("definitionMarker"),n.consume(c),n.exit("definitionMarker"),m):t(c)}function m(c){return U(c)?xn(n,h)(c):h(c)}function h(c){return rt(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function p(c){return n.attempt(ye,f,f)(c)}function f(c){return _(c)?B(n,g,"whitespace")(c):g(c)}function g(c){return c===null||y(c)?(n.exit("definition"),e.parser.defined.push(u),r(c)):t(c)}}function Te(n,r,t){return e;function e(a){return U(a)?xn(n,u)(a):t(a)}function u(a){return ut(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return _(a)?B(n,l,"whitespace")(a):l(a)}function l(a){return a===null||y(a)?r(a):t(a)}}const Fe={name:"hardBreakEscape",tokenize:Ae};function Ae(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return y(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const _e={name:"headingAtx",resolve:Le,tokenize:Pe};function Le(n,r){let t=n.length-2,e=3,u,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},X(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function Pe(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||U(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||y(p)?(n.exit("atxHeading"),r(p)):_(p)?B(n,a,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function h(p){return p===null||p===35||U(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),h)}}const Be=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Un=["pre","script","style","textarea"],Oe={concrete:!0,name:"htmlFlow",resolveTo:De,tokenize:qe},Me={partial:!0,tokenize:He},Ne={partial:!0,tokenize:Re};function De(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function qe(n,r,t){const e=this;let u,i,l,a,m;return h;function h(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),g):s===47?(n.consume(s),i=!0,E):s===63?(n.consume(s),u=3,e.interrupt?r:o):K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function g(s){return s===45?(n.consume(s),u=2,c):s===91?(n.consume(s),u=5,a=0,b):K(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function c(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function b(s){const G="CDATA[";return s===G.charCodeAt(a++)?(n.consume(s),a===G.length?e.interrupt?r:C:b):t(s)}function E(s){return K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function F(s){if(s===null||s===47||s===62||U(s)){const G=s===47,on=l.toLowerCase();return!G&&!i&&Un.includes(on)?(u=1,e.interrupt?r(s):C(s)):Be.includes(l.toLowerCase())?(u=6,G?(n.consume(s),S):e.interrupt?r(s):C(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?I(s):d(s))}return s===45||$(s)?(n.consume(s),l+=String.fromCharCode(s),F):t(s)}function S(s){return s===62?(n.consume(s),e.interrupt?r:C):t(s)}function I(s){return _(s)?(n.consume(s),I):q(s)}function d(s){return s===47?(n.consume(s),q):s===58||s===95||K(s)?(n.consume(s),P):_(s)?(n.consume(s),d):q(s)}function P(s){return s===45||s===46||s===58||s===95||$(s)?(n.consume(s),P):T(s)}function T(s){return s===61?(n.consume(s),x):_(s)?(n.consume(s),T):d(s)}function x(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,L):_(s)?(n.consume(s),x):N(s)}function L(s){return s===m?(n.consume(s),m=null,D):s===null||y(s)?t(s):(n.consume(s),L)}function N(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||U(s)?T(s):(n.consume(s),N)}function D(s){return s===47||s===62||_(s)?d(s):t(s)}function q(s){return s===62?(n.consume(s),z):t(s)}function z(s){return s===null||y(s)?C(s):_(s)?(n.consume(s),z):t(s)}function C(s){return s===45&&u===2?(n.consume(s),V):s===60&&u===1?(n.consume(s),R):s===62&&u===4?(n.consume(s),Z):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),tn):y(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Me,en,O)(s)):s===null||y(s)?(n.exit("htmlFlowData"),O(s)):(n.consume(s),C)}function O(s){return n.check(Ne,M,en)(s)}function M(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),A}function A(s){return s===null||y(s)?O(s):(n.enter("htmlFlowData"),C(s))}function V(s){return s===45?(n.consume(s),o):C(s)}function R(s){return s===47?(n.consume(s),l="",Y):C(s)}function Y(s){if(s===62){const G=l.toLowerCase();return Un.includes(G)?(n.consume(s),Z):C(s)}return K(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),Y):C(s)}function tn(s){return s===93?(n.consume(s),o):C(s)}function o(s){return s===62?(n.consume(s),Z):s===45&&u===2?(n.consume(s),o):C(s)}function Z(s){return s===null||y(s)?(n.exit("htmlFlowData"),en(s)):(n.consume(s),Z)}function en(s){return n.exit("htmlFlow"),r(s)}}function Re(n,r,t){const e=this;return u;function u(l){return y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function He(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(kn,r,t)}}const Ve={name:"htmlText",tokenize:Qe};function Qe(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),h):o===47?(n.consume(o),T):o===63?(n.consume(o),d):K(o)?(n.consume(o),N):t(o)}function h(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,b):K(o)?(n.consume(o),I):t(o)}function p(o){return o===45?(n.consume(o),c):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),g):y(o)?(l=f,R(o)):(n.consume(o),f)}function g(o){return o===45?(n.consume(o),c):f(o)}function c(o){return o===62?V(o):o===45?g(o):f(o)}function b(o){const Z="CDATA[";return o===Z.charCodeAt(i++)?(n.consume(o),i===Z.length?E:b):t(o)}function E(o){return o===null?t(o):o===93?(n.consume(o),F):y(o)?(l=E,R(o)):(n.consume(o),E)}function F(o){return o===93?(n.consume(o),S):E(o)}function S(o){return o===62?V(o):o===93?(n.consume(o),S):E(o)}function I(o){return o===null||o===62?V(o):y(o)?(l=I,R(o)):(n.consume(o),I)}function d(o){return o===null?t(o):o===63?(n.consume(o),P):y(o)?(l=d,R(o)):(n.consume(o),d)}function P(o){return o===62?V(o):d(o)}function T(o){return K(o)?(n.consume(o),x):t(o)}function x(o){return o===45||$(o)?(n.consume(o),x):L(o)}function L(o){return y(o)?(l=L,R(o)):_(o)?(n.consume(o),L):V(o)}function N(o){return o===45||$(o)?(n.consume(o),N):o===47||o===62||U(o)?D(o):t(o)}function D(o){return o===47?(n.consume(o),V):o===58||o===95||K(o)?(n.consume(o),q):y(o)?(l=D,R(o)):_(o)?(n.consume(o),D):V(o)}function q(o){return o===45||o===46||o===58||o===95||$(o)?(n.consume(o),q):z(o)}function z(o){return o===61?(n.consume(o),C):y(o)?(l=z,R(o)):_(o)?(n.consume(o),z):D(o)}function C(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,O):y(o)?(l=C,R(o)):_(o)?(n.consume(o),C):(n.consume(o),M)}function O(o){return o===u?(n.consume(o),u=void 0,A):o===null?t(o):y(o)?(l=O,R(o)):(n.consume(o),O)}function M(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||U(o)?D(o):(n.consume(o),M)}function A(o){return o===47||o===62||U(o)?D(o):t(o)}function V(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function R(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Y}function Y(o){return _(o)?B(n,tn,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):tn(o)}function tn(o){return n.enter("htmlTextData"),l(o)}}const Fn={name:"labelEnd",resolveAll:$e,resolveTo:Ye,tokenize:Ze},We={tokenize:Ge},Ue={tokenize:Je},je={tokenize:Ke};function $e(n){let r=-1;const t=[];for(;++r<n.length;){const e=n[r][1];if(t.push(n[r]),e.type==="labelImage"||e.type==="labelLink"||e.type==="labelEnd"){const u=e.type==="labelImage"?4:2;e.type="data",r+=u}}return n.length!==t.length&&X(n,0,n.length,t),n}function Ye(n,r){let t=n.length,e=0,u,i,l,a;for(;t--;)if(u=n[t][1],i){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(l){if(n[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(i=t,u.type!=="labelLink")){e=2;break}}else u.type==="labelEnd"&&(l=t);const m={type:n[i][1].type==="labelLink"?"link":"image",start:{...n[i][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[i][1].start},end:{...n[l][1].end}},p={type:"labelText",start:{...n[i+e+2][1].end},end:{...n[l-2][1].start}};return a=[["enter",m,r],["enter",h,r]],a=W(a,n.slice(i+1,i+e+3)),a=W(a,[["enter",p,r]]),a=W(a,dn(r.parser.constructs.insideSpan.null,n.slice(i+e+4,l-3),r)),a=W(a,[["exit",p,r],n[l-2],n[l-1],["exit",h,r]]),a=W(a,n.slice(l+1)),a=W(a,[["exit",m,r]]),X(n,i,n.length,a),n}function Ze(n,r,t){const e=this;let u=e.events.length,i,l;for(;u--;)if((e.events[u][1].type==="labelImage"||e.events[u][1].type==="labelLink")&&!e.events[u][1]._balanced){i=e.events[u][1];break}return a;function a(g){return i?i._inactive?f(g):(l=e.parser.defined.includes(hn(e.sliceSerialize({start:i.end,end:e.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(g),n.exit("labelMarker"),n.exit("labelEnd"),m):t(g)}function m(g){return g===40?n.attempt(We,p,l?p:f)(g):g===91?n.attempt(Ue,p,l?h:f)(g):l?p(g):f(g)}function h(g){return n.attempt(je,p,f)(g)}function p(g){return r(g)}function f(g){return i._balanced=!0,t(g)}}function Ge(n,r,t){return e;function e(f){return n.enter("resource"),n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),u}function u(f){return U(f)?xn(n,i)(f):i(f)}function i(f){return f===41?p(f):rt(n,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return U(f)?xn(n,m)(f):p(f)}function a(f){return t(f)}function m(f){return f===34||f===39||f===40?ut(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):p(f)}function h(f){return U(f)?xn(n,p)(f):p(f)}function p(f){return f===41?(n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),n.exit("resource"),r):t(f)}}function Je(n,r,t){const e=this;return u;function u(a){return it.call(e,n,i,l,"reference","referenceMarker","referenceString")(a)}function i(a){return e.parser.defined.includes(hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)))?r(a):t(a)}function l(a){return t(a)}}function Ke(n,r,t){return e;function e(i){return n.enter("reference"),n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),u}function u(i){return i===93?(n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),n.exit("reference"),r):t(i)}}const Xe={name:"labelStartImage",resolveAll:Fn.resolveAll,tokenize:ve};function ve(n,r,t){const e=this;return u;function u(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),i}function i(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(a):r(a)}}const nr={name:"labelStartLink",resolveAll:Fn.resolveAll,tokenize:tr};function tr(n,r,t){const e=this;return u;function u(l){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelLink"),i}function i(l){return l===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(l):r(l)}}const Cn={name:"lineEnding",tokenize:er};function er(n,r){return t;function t(e){return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),B(n,r,"linePrefix")}}const Sn={name:"thematicBreak",tokenize:rr};function rr(n,r,t){let e=0,u;return i;function i(h){return n.enter("thematicBreak"),l(h)}function l(h){return u=h,a(h)}function a(h){return h===u?(n.enter("thematicBreakSequence"),m(h)):e>=3&&(h===null||y(h))?(n.exit("thematicBreak"),r(h)):t(h)}function m(h){return h===u?(n.consume(h),e++,m):(n.exit("thematicBreakSequence"),_(h)?B(n,a,"whitespace")(h):a(h))}}const j={continuation:{tokenize:ar},exit:sr,name:"list",tokenize:lr},ir={partial:!0,tokenize:cr},ur={partial:!0,tokenize:or};function lr(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(c){const b=e.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!e.containerState.marker||c===e.containerState.marker:yn(c)){if(e.containerState.type||(e.containerState.type=b,n.enter(b,{_container:!0})),b==="listUnordered")return n.enter("listItemPrefix"),c===42||c===45?n.check(Sn,t,h)(c):h(c);if(!e.interrupt||c===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(c)}return t(c)}function m(c){return yn(c)&&++l<10?(n.consume(c),m):(!e.interrupt||l<2)&&(e.containerState.marker?c===e.containerState.marker:c===41||c===46)?(n.exit("listItemValue"),h(c)):t(c)}function h(c){return n.enter("listItemMarker"),n.consume(c),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||c,n.check(kn,e.interrupt?t:p,n.attempt(ir,g,f))}function p(c){return e.containerState.initialBlankLine=!0,i++,g(c)}function f(c){return _(c)?(n.enter("listItemPrefixWhitespace"),n.consume(c),n.exit("listItemPrefixWhitespace"),g):t(c)}function g(c){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(c)}}function ar(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(kn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,B(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!_(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(ur,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,B(n,n.attempt(j,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function or(n,r,t){const e=this;return B(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function sr(n){n.exit(this.containerState.type)}function cr(n,r,t){const e=this;return B(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(i){const l=e.events[e.events.length-1];return!_(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const jn={name:"setextUnderline",resolveTo:hr,tokenize:fr};function hr(n,r){let t=n.length,e,u,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:{...n[e][1].start},end:{...n[n.length-1][1].end}};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end={...n[i][1].end}):n[e][1]=l,n.push(["exit",l,r]),n}function fr(n,r,t){const e=this;let u;return i;function i(h){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=h,l(h)):t(h)}function l(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===u?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),_(h)?B(n,m,"lineSuffix")(h):m(h))}function m(h){return h===null||y(h)?(n.exit("setextHeadingLine"),r(h)):t(h)}}const pr={tokenize:mr};function mr(n){const r=this,t=n.attempt(kn,e,n.attempt(this.parser.constructs.flowInitial,u,B(n,n.attempt(this.parser.constructs.flow,u,n.attempt(be,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const gr={resolveAll:at()},xr=lt("string"),kr=lt("text");function lt(n){return{resolveAll:at(n==="text"?Sr:void 0),tokenize:r};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return h(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return h(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function h(p){if(p===null)return!0;const f=u[p];let g=-1;if(f)for(;++g<f.length;){const c=f[g];if(!c.previous||c.previous.call(e,e.previous))return!0}return!1}}}function at(n){return r;function r(t,e){let u=-1,i;for(;++u<=t.length;)i===void 0?t[u]&&t[u][1].type==="data"&&(i=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==i+2&&(t[i][1].end=t[u-1][1].end,t.splice(i+2,u-i-2),u=i+2),i=void 0);return n?n(t,e):t}}function Sr(n,r){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const e=n[t-1][1],u=r.sliceStream(e);let i=u.length,l=-1,a=0,m;for(;i--;){const h=u[i];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(h===-2)m=!0,a++;else if(h!==-1){i++;break}}if(r._contentTypeTextTrailing&&t===n.length&&(a=0),a){const h={type:t===n.length||m||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:e.start._bufferIndex+l,_index:e.start._index+i,line:e.end.line,column:e.end.column-a,offset:e.end.offset-a},end:{...e.end}};e.end={...h.start},e.start.offset===e.end.offset?Object.assign(e,h):(n.splice(t,0,["enter",h,r],["exit",h,r]),t+=2)}t++}return n}const br={42:j,43:j,45:j,48:j,49:j,50:j,51:j,52:j,53:j,54:j,55:j,56:j,57:j,62:vn},dr={91:ze},Ir={[-2]:wn,[-1]:wn,32:wn},wr={35:_e,42:Sn,45:[jn,Sn],60:Oe,61:jn,95:Sn,96:Wn,126:Wn},Cr={38:tt,92:nt},zr={[-5]:Cn,[-4]:Cn,[-3]:Cn,33:Xe,38:tt,42:Tn,60:[ne,Ve],91:nr,92:[Fe,nt],93:Fn,95:Tn,96:pe},yr={null:[Tn,gr]},Er={null:[42,95]},Tr={null:[]},Fr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Er,contentInitial:dr,disable:Tr,document:br,flow:wr,flowInitial:Ir,insideSpan:yr,string:Cr,text:zr},Symbol.toStringTag,{value:"Module"}));function Ar(n,r,t){let e={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const u={},i=[];let l=[],a=[];const m={attempt:L(T),check:L(x),consume:I,enter:d,exit:P,interrupt:L(x,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:b,parser:n,previous:null,sliceSerialize:g,sliceStream:c,write:f};let p=r.tokenize.call(h,m);return r.resolveAll&&i.push(r),h;function f(z){return l=W(l,z),F(),l[l.length-1]!==null?[]:(N(r,0),h.events=dn(i,h.events,h),h.events)}function g(z,C){return Lr(c(z),C)}function c(z){return _r(l,z)}function b(){const{_bufferIndex:z,_index:C,line:O,column:M,offset:A}=e;return{_bufferIndex:z,_index:C,line:O,column:M,offset:A}}function E(z){u[z.line]=z.column,q()}function F(){let z;for(;e._index<l.length;){const C=l[e._index];if(typeof C=="string")for(z=e._index,e._bufferIndex<0&&(e._bufferIndex=0);e._index===z&&e._bufferIndex<C.length;)S(C.charCodeAt(e._bufferIndex));else S(C)}}function S(z){p=p(z)}function I(z){y(z)?(e.line++,e.column=1,e.offset+=z===-3?2:1,q()):z!==-1&&(e.column++,e.offset++),e._bufferIndex<0?e._index++:(e._bufferIndex++,e._bufferIndex===l[e._index].length&&(e._bufferIndex=-1,e._index++)),h.previous=z}function d(z,C){const O=C||{};return O.type=z,O.start=b(),h.events.push(["enter",O,h]),a.push(O),O}function P(z){const C=a.pop();return C.end=b(),h.events.push(["exit",C,h]),C}function T(z,C){N(z,C.from)}function x(z,C){C.restore()}function L(z,C){return O;function O(M,A,V){let R,Y,tn,o;return Array.isArray(M)?en(M):"tokenize"in M?en([M]):Z(M);function Z(H){return fn;function fn(un){const sn=un!==null&&H[un],cn=un!==null&&H.null,In=[...Array.isArray(sn)?sn:sn?[sn]:[],...Array.isArray(cn)?cn:cn?[cn]:[]];return en(In)(un)}}function en(H){return R=H,Y=0,H.length===0?V:s(H[Y])}function s(H){return fn;function fn(un){return o=D(),tn=H,H.partial||(h.currentConstruct=H),H.name&&h.parser.constructs.disable.null.includes(H.name)?on():H.tokenize.call(C?Object.assign(Object.create(h),C):h,m,G,on)(un)}}function G(H){return z(tn,o),A}function on(H){return o.restore(),++Y<R.length?s(R[Y]):V}}}function N(z,C){z.resolveAll&&!i.includes(z)&&i.push(z),z.resolve&&X(h.events,C,h.events.length-C,z.resolve(h.events.slice(C),h)),z.resolveTo&&(h.events=z.resolveTo(h.events,h))}function D(){const z=b(),C=h.previous,O=h.currentConstruct,M=h.events.length,A=Array.from(a);return{from:M,restore:V};function V(){e=z,h.previous=C,h.currentConstruct=O,h.events.length=M,a=A,q()}}function q(){e.line in u&&e.column<2&&(e.column=u[e.line],e.offset+=u[e.line]-1)}}function _r(n,r){const t=r.start._index,e=r.start._bufferIndex,u=r.end._index,i=r.end._bufferIndex;let l;if(t===u)l=[n[t].slice(e,i)];else{if(l=n.slice(t,u),e>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function Lr(n,r){let t=-1;const e=[];let u;for(;++t<n.length;){const i=n[t];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=`
|
|
1
|
+
"use strict";const an=require("@tempots/dom"),Mt=require("./link-portal-_tiDFZqh.cjs"),qn=document.createElement("i");function Yn(n){const r="&"+n+";";qn.innerHTML=r;const t=qn.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===r?!1:t}function X(n,r,t,e){const u=n.length;let i=0,l;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)l=Array.from(e),l.unshift(r,t),n.splice(...l);else for(t&&n.splice(r,t);i<e.length;)l=e.slice(i,i+1e4),l.unshift(r,0),n.splice(...l),i+=1e4,r+=1e4}function W(n,r){return n.length>0?(X(n,n.length,0,r),n):r}const zn={}.hasOwnProperty;function Zn(n){const r={};let t=-1;for(;++t<n.length;)Nt(r,n[t]);return r}function Nt(n,r){let t;for(t in r){const u=(zn.call(n,t)?n[t]:void 0)||(n[t]={}),i=r[t];let l;if(i)for(l in i){zn.call(u,l)||(u[l]=[]);const a=i[l];qt(u[l],Array.isArray(a)?a:a?[a]:[])}}}function qt(n,r){let t=-1;const e=[];for(;++t<r.length;)(r[t].add==="after"?n:e).push(r[t]);X(n,0,0,e)}function Gn(n){const r={};let t=-1;for(;++t<n.length;)Dt(r,n[t]);return r}function Dt(n,r){let t;for(t in r){const u=(zn.call(n,t)?n[t]:void 0)||(n[t]={}),i=r[t];let l;if(i)for(l in i)u[l]=i[l]}}function Rt(n,r){const t=Number.parseInt(n,r);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}const Ht={'"':"quot","&":"amp","<":"lt",">":"gt"};function Jn(n){return n.replace(/["&<>]/g,r);function r(t){return"&"+Ht[t]+";"}}function hn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const K=ln(/[A-Za-z]/),$=ln(/[\dA-Za-z]/),Vt=ln(/[#-'*+\--9=?A-Z^-~]/);function bn(n){return n!==null&&(n<32||n===127)}const yn=ln(/\d/),Qt=ln(/[\dA-Fa-f]/),Wt=ln(/[!-/:-@[-`{-~]/);function y(n){return n!==null&&n<-2}function U(n){return n!==null&&(n<0||n===32)}function _(n){return n===-2||n===-1||n===32}const Kn=ln(new RegExp("\\p{P}|\\p{S}","u")),Xn=ln(/\s/);function ln(n){return r;function r(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function gn(n,r){const t=Jn(Ut(n||""));if(!r)return t;const e=t.indexOf(":"),u=t.indexOf("?"),i=t.indexOf("#"),l=t.indexOf("/");return e<0||l>-1&&e>l||u>-1&&e>u||i>-1&&e>i||r.test(t.slice(0,e))?t:""}function Ut(n){const r=[];let t=-1,e=0,u=0;for(;++t<n.length;){const i=n.charCodeAt(t);let l="";if(i===37&&$(n.charCodeAt(t+1))&&$(n.charCodeAt(t+2)))u=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const a=n.charCodeAt(t+1);i<56320&&a>56319&&a<57344?(l=String.fromCharCode(i,a),u=1):l="�"}else l=String.fromCharCode(i);l&&(r.push(n.slice(e,t),encodeURIComponent(l)),e=t+u+1,l=""),u&&(t+=u,u=0)}return r.join("")+n.slice(e)}const Dn={}.hasOwnProperty,Rn=/^(https?|ircs?|mailto|xmpp)$/i,jt=/^https?$/i;function $t(n){const r=n||{};let t=!0;const e={},u=[[]],i=[],l=[],m=Gn([{enter:{blockQuote:A,codeFenced:tn,codeFencedFenceInfo:F,codeFencedFenceMeta:F,codeIndented:en,codeText:Tt,content:gt,definition:st,definitionDestinationString:ht,definitionLabelString:F,definitionTitleString:F,emphasis:yt,htmlFlow:zt,htmlText:Pn,image:G,label:F,link:on,listItemMarker:z,listItemValue:D,listOrdered:N,listUnordered:q,paragraph:R,reference:F,resource:sn,resourceDestinationString:cn,resourceTitleString:F,setextHeading:kt,strong:Et},exit:{atxHeading:bt,atxHeadingSequence:xt,autolinkEmail:Ot,autolinkProtocol:Bt,blockQuote:V,characterEscapeValue:pn,characterReferenceMarkerHexadecimal:Bn,characterReferenceMarkerNumeric:Bn,characterReferenceValue:Pt,codeFenced:s,codeFencedFence:Z,codeFencedFenceInfo:o,codeFencedFenceMeta:L,codeFlowValue:Ct,codeIndented:s,codeText:Ft,codeTextData:pn,data:pn,definition:mt,definitionDestinationString:ft,definitionLabelString:ct,definitionTitleString:pt,emphasis:At,hardBreakEscape:_n,hardBreakTrailing:_n,htmlFlow:Ln,htmlFlowData:pn,htmlText:Ln,htmlTextData:pn,image:An,label:fn,labelText:H,lineEnding:wt,link:An,listOrdered:C,listUnordered:O,paragraph:Y,reference:L,referenceString:un,resource:L,resourceDestinationString:In,resourceTitleString:ot,setextHeading:It,setextHeadingLineSequence:dt,setextHeadingText:St,strong:_t,thematicBreak:Lt}},...r.htmlExtensions||[]]),h={definitions:e,tightStack:l},p={buffer:F,encode:x,getData:E,lineEndingIfNeeded:T,options:r,raw:d,resume:S,setData:b,tag:I};let f=r.defaultLineEnding;return g;function g(k){let w=-1,Q=0;const J=[];let v=[],rn=[];for(;++w<k.length;)!f&&(k[w][1].type==="lineEnding"||k[w][1].type==="lineEndingBlank")&&(f=k[w][2].sliceSerialize(k[w][1])),(k[w][1].type==="listOrdered"||k[w][1].type==="listUnordered")&&(k[w][0]==="enter"?J.push(w):c(k.slice(J.pop(),w))),k[w][1].type==="definition"&&(k[w][0]==="enter"?(rn=W(rn,k.slice(Q,w)),Q=w):(v=W(v,k.slice(Q,w+1)),Q=w+1));v=W(v,rn),v=W(v,k.slice(Q)),w=-1;const nn=v;for(m.enter.null&&m.enter.null.call(p);++w<k.length;){const On=m[nn[w][0]],Mn=nn[w][1].type,Nn=On[Mn];Dn.call(On,Mn)&&Nn&&Nn.call({sliceSerialize:nn[w][2].sliceSerialize,...p},nn[w][1])}return m.exit.null&&m.exit.null.call(p),u[0].join("")}function c(k){const w=k.length;let Q=0,J=0,v=!1,rn;for(;++Q<w;){const nn=k[Q];if(nn[1]._container)rn=void 0,nn[0]==="enter"?J++:J--;else switch(nn[1].type){case"listItemPrefix":{nn[0]==="exit"&&(rn=!0);break}case"linePrefix":break;case"lineEndingBlank":{nn[0]==="enter"&&!J&&(rn?rn=void 0:v=!0);break}default:rn=void 0}}k[0][1]._loose=v}function b(k,w){h[k]=w}function E(k){return h[k]}function F(){u.push([])}function S(){return u.pop().join("")}function I(k){t&&(b("lastWasTag",!0),u[u.length-1].push(k))}function d(k){b("lastWasTag"),u[u.length-1].push(k)}function P(){d(f||`
|
|
2
|
+
`)}function T(){const k=u[u.length-1],w=k[k.length-1],Q=w?w.charCodeAt(w.length-1):null;Q===10||Q===13||Q===null||P()}function x(k){return E("ignoreEncode")?k:Jn(k)}function L(){S()}function N(k){l.push(!k._loose),T(),I("<ol"),b("expectFirstItem",!0)}function q(k){l.push(!k._loose),T(),I("<ul"),b("expectFirstItem",!0)}function D(k){if(E("expectFirstItem")){const w=Number.parseInt(this.sliceSerialize(k),10);w!==1&&I(' start="'+x(String(w))+'"')}}function z(){E("expectFirstItem")?I(">"):M(),T(),I("<li>"),b("expectFirstItem"),b("lastWasTag")}function C(){M(),l.pop(),P(),I("</ol>")}function O(){M(),l.pop(),P(),I("</ul>")}function M(){E("lastWasTag")&&!E("slurpAllLineEndings")&&T(),I("</li>"),b("slurpAllLineEndings")}function A(){l.push(!1),T(),I("<blockquote>")}function V(){l.pop(),T(),I("</blockquote>"),b("slurpAllLineEndings")}function R(){l[l.length-1]||(T(),I("<p>")),b("slurpAllLineEndings")}function Y(){l[l.length-1]?b("slurpAllLineEndings",!0):I("</p>")}function tn(){T(),I("<pre><code"),b("fencesCount",0)}function o(){const k=S();I(' class="language-'+k+'"')}function Z(){const k=E("fencesCount")||0;k||(I(">"),b("slurpOneLineEnding",!0)),b("fencesCount",k+1)}function en(){T(),I("<pre><code>")}function s(){const k=E("fencesCount");k!==void 0&&k<2&&h.tightStack.length>0&&!E("lastWasTag")&&P(),E("flowCodeSeenData")&&T(),I("</code></pre>"),k!==void 0&&k<2&&T(),b("flowCodeSeenData"),b("fencesCount"),b("slurpOneLineEnding")}function G(){i.push({image:!0}),t=void 0}function on(){i.push({})}function H(k){i[i.length-1].labelId=this.sliceSerialize(k)}function fn(){i[i.length-1].label=S()}function un(k){i[i.length-1].referenceId=this.sliceSerialize(k)}function sn(){F(),i[i.length-1].destination=""}function cn(){F(),b("ignoreEncode",!0)}function In(){i[i.length-1].destination=S(),b("ignoreEncode")}function ot(){i[i.length-1].title=S()}function An(){let k=i.length-1;const w=i[k],Q=w.referenceId||w.labelId,J=w.destination===void 0?e[hn(Q)]:w;for(t=!0;k--;)if(i[k].image){t=void 0;break}w.image?(I('<img src="'+gn(J.destination,r.allowDangerousProtocol?void 0:jt)+'" alt="'),d(w.label),I('"')):I('<a href="'+gn(J.destination,r.allowDangerousProtocol?void 0:Rn)+'"'),I(J.title?' title="'+J.title+'"':""),w.image?I(" />"):(I(">"),d(w.label),I("</a>")),i.pop()}function st(){F(),i.push({})}function ct(k){S(),i[i.length-1].labelId=this.sliceSerialize(k)}function ht(){F(),b("ignoreEncode",!0)}function ft(){i[i.length-1].destination=S(),b("ignoreEncode")}function pt(){i[i.length-1].title=S()}function mt(){const k=i[i.length-1],w=hn(k.labelId);S(),Dn.call(e,w)||(e[w]=i[i.length-1]),i.pop()}function gt(){b("slurpAllLineEndings",!0)}function xt(k){E("headingRank")||(b("headingRank",this.sliceSerialize(k).length),T(),I("<h"+E("headingRank")+">"))}function kt(){F(),b("slurpAllLineEndings")}function St(){b("slurpAllLineEndings",!0)}function bt(){I("</h"+E("headingRank")+">"),b("headingRank")}function dt(k){b("headingRank",this.sliceSerialize(k).charCodeAt(0)===61?1:2)}function It(){const k=S();T(),I("<h"+E("headingRank")+">"),d(k),I("</h"+E("headingRank")+">"),b("slurpAllLineEndings"),b("headingRank")}function pn(k){d(x(this.sliceSerialize(k)))}function wt(k){if(!E("slurpAllLineEndings")){if(E("slurpOneLineEnding")){b("slurpOneLineEnding");return}if(E("inCodeText")){d(" ");return}d(x(this.sliceSerialize(k)))}}function Ct(k){d(x(this.sliceSerialize(k))),b("flowCodeSeenData",!0)}function _n(){I("<br />")}function zt(){T(),Pn()}function Ln(){b("ignoreEncode")}function Pn(){r.allowDangerousHtml&&b("ignoreEncode",!0)}function yt(){I("<em>")}function Et(){I("<strong>")}function Tt(){b("inCodeText",!0),I("<code>")}function Ft(){b("inCodeText"),I("</code>")}function At(){I("</em>")}function _t(){I("</strong>")}function Lt(){T(),I("<hr />")}function Bn(k){b("characterReferenceType",k.type)}function Pt(k){const w=this.sliceSerialize(k),Q=E("characterReferenceType")?Rt(w,E("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):Yn(w);d(x(Q)),b("characterReferenceType")}function Bt(k){const w=this.sliceSerialize(k);I('<a href="'+gn(w,r.allowDangerousProtocol?void 0:Rn)+'">'),d(x(w)),I("</a>")}function Ot(k){const w=this.sliceSerialize(k);I('<a href="'+gn("mailto:"+w)+'">'),d(x(w)),I("</a>")}}function B(n,r,t,e){const u=e?e-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(m){return _(m)?(n.enter(t),a(m)):r(m)}function a(m){return _(m)&&i++<u?(n.consume(m),a):(n.exit(t),r(m))}}const Yt={tokenize:Zt};function Zt(n){const r=n.attempt(this.parser.constructs.contentInitial,e,u);let t;return r;function e(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),B(n,r,"linePrefix")}function u(a){return n.enter("paragraph"),i(a)}function i(a){const m=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=m),t=m,l(a)}function l(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return y(a)?(n.consume(a),n.exit("chunkText"),i):(n.consume(a),l)}}const Gt={tokenize:Jt},Hn={tokenize:Kt};function Jt(n){const r=this,t=[];let e=0,u,i,l;return a;function a(d){if(e<t.length){const P=t[e];return r.containerState=P[1],n.attempt(P[0].continuation,m,h)(d)}return h(d)}function m(d){if(e++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&I();const P=r.events.length;let T=P,x;for(;T--;)if(r.events[T][0]==="exit"&&r.events[T][1].type==="chunkFlow"){x=r.events[T][1].end;break}S(e);let L=P;for(;L<r.events.length;)r.events[L][1].end={...x},L++;return X(r.events,T+1,0,r.events.slice(P)),r.events.length=L,h(d)}return a(d)}function h(d){if(e===t.length){if(!u)return g(d);if(u.currentConstruct&&u.currentConstruct.concrete)return b(d);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Hn,p,f)(d)}function p(d){return u&&I(),S(e),g(d)}function f(d){return r.parser.lazy[r.now().line]=e!==t.length,l=r.now().offset,b(d)}function g(d){return r.containerState={},n.attempt(Hn,c,b)(d)}function c(d){return e++,t.push([r.currentConstruct,r.containerState]),g(d)}function b(d){if(d===null){u&&I(),S(0),n.consume(d);return}return u=u||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:i}),E(d)}function E(d){if(d===null){F(n.exit("chunkFlow"),!0),S(0),n.consume(d);return}return y(d)?(n.consume(d),F(n.exit("chunkFlow")),e=0,r.interrupt=void 0,a):(n.consume(d),E)}function F(d,P){const T=r.sliceStream(d);if(P&&T.push(null),d.previous=i,i&&(i.next=d),i=d,u.defineSkip(d.start),u.write(T),r.parser.lazy[d.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<l&&(!u.events[x][1].end||u.events[x][1].end.offset>l))return;const L=r.events.length;let N=L,q,D;for(;N--;)if(r.events[N][0]==="exit"&&r.events[N][1].type==="chunkFlow"){if(q){D=r.events[N][1].end;break}q=!0}for(S(e),x=L;x<r.events.length;)r.events[x][1].end={...D},x++;X(r.events,N+1,0,r.events.slice(L)),r.events.length=x}}function S(d){let P=t.length;for(;P-- >d;){const T=t[P];r.containerState=T[1],T[0].exit.call(r,n)}t.length=d}function I(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Kt(n,r,t){return B(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function En(n){if(n===null||U(n)||Xn(n))return 1;if(Kn(n))return 2}function dn(n,r,t){const e=[];let u=-1;for(;++u<n.length;){const i=n[u].resolveAll;i&&!e.includes(i)&&(r=i(r,t),e.push(i))}return r}const Tn={name:"attention",resolveAll:Xt,tokenize:vt};function Xt(n,r){let t=-1,e,u,i,l,a,m,h,p;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(e=t;e--;)if(n[e][0]==="exit"&&n[e][1].type==="attentionSequence"&&n[e][1]._open&&r.sliceSerialize(n[e][1]).charCodeAt(0)===r.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[e][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[e][1].end.offset-n[e][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;m=n[e][1].end.offset-n[e][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f={...n[e][1].end},g={...n[t][1].start};Vn(f,-m),Vn(g,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:{...n[e][1].end}},a={type:m>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:g},i={type:m>1?"strongText":"emphasisText",start:{...n[e][1].end},end:{...n[t][1].start}},u={type:m>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},n[e][1].end={...l.start},n[t][1].start={...a.end},h=[],n[e][1].end.offset-n[e][1].start.offset&&(h=W(h,[["enter",n[e][1],r],["exit",n[e][1],r]])),h=W(h,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),h=W(h,dn(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),h=W(h,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,h=W(h,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,X(n,e-1,t-e+3,h),t=e+h.length-p-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function vt(n,r){const t=this.parser.constructs.attentionMarkers.null,e=this.previous,u=En(e);let i;return l;function l(m){return i=m,n.enter("attentionSequence"),a(m)}function a(m){if(m===i)return n.consume(m),a;const h=n.exit("attentionSequence"),p=En(m),f=!p||p===2&&u||t.includes(m),g=!u||u===2&&p||t.includes(e);return h._open=!!(i===42?f:f&&(u||!g)),h._close=!!(i===42?g:g&&(p||!f)),r(m)}}function Vn(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const ne={name:"autolink",tokenize:te};function te(n,r,t){let e=0;return u;function u(c){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),i}function i(c){return K(c)?(n.consume(c),l):c===64?t(c):h(c)}function l(c){return c===43||c===45||c===46||$(c)?(e=1,a(c)):h(c)}function a(c){return c===58?(n.consume(c),e=0,m):(c===43||c===45||c===46||$(c))&&e++<32?(n.consume(c),a):(e=0,h(c))}function m(c){return c===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):c===null||c===32||c===60||bn(c)?t(c):(n.consume(c),m)}function h(c){return c===64?(n.consume(c),p):Vt(c)?(n.consume(c),h):t(c)}function p(c){return $(c)?f(c):t(c)}function f(c){return c===46?(n.consume(c),e=0,p):c===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):g(c)}function g(c){if((c===45||$(c))&&e++<63){const b=c===45?g:f;return n.consume(c),b}return t(c)}}const kn={partial:!0,tokenize:ee};function ee(n,r,t){return e;function e(i){return _(i)?B(n,u,"linePrefix")(i):u(i)}function u(i){return i===null||y(i)?r(i):t(i)}}const vn={continuation:{tokenize:ie},exit:ue,name:"blockQuote",tokenize:re};function re(n,r,t){const e=this;return u;function u(l){if(l===62){const a=e.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(l),n.exit("blockQuoteMarker"),i}return t(l)}function i(l){return _(l)?(n.enter("blockQuotePrefixWhitespace"),n.consume(l),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(l))}}function ie(n,r,t){const e=this;return u;function u(l){return _(l)?B(n,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return n.attempt(vn,r,t)(l)}}function ue(n){n.exit("blockQuote")}const nt={name:"characterEscape",tokenize:le};function le(n,r,t){return e;function e(i){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(i),n.exit("escapeMarker"),u}function u(i){return Wt(i)?(n.enter("characterEscapeValue"),n.consume(i),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):t(i)}}const tt={name:"characterReference",tokenize:ae};function ae(n,r,t){const e=this;let u=0,i,l;return a;function a(f){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),m}function m(f){return f===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(f),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),i=31,l=$,p(f))}function h(f){return f===88||f===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(f),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),i=6,l=Qt,p):(n.enter("characterReferenceValue"),i=7,l=yn,p(f))}function p(f){if(f===59&&u){const g=n.exit("characterReferenceValue");return l===$&&!Yn(e.sliceSerialize(g))?t(f):(n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return l(f)&&u++<i?(n.consume(f),p):t(f)}}const Qn={partial:!0,tokenize:se},Wn={concrete:!0,name:"codeFenced",tokenize:oe};function oe(n,r,t){const e=this,u={partial:!0,tokenize:T};let i=0,l=0,a;return m;function m(x){return h(x)}function h(x){const L=e.events[e.events.length-1];return i=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=x,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(x)}function p(x){return x===a?(l++,n.consume(x),p):l<3?t(x):(n.exit("codeFencedFenceSequence"),_(x)?B(n,f,"whitespace")(x):f(x))}function f(x){return x===null||y(x)?(n.exit("codeFencedFence"),e.interrupt?r(x):n.check(Qn,E,P)(x)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),f(x)):_(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),B(n,c,"whitespace")(x)):x===96&&x===a?t(x):(n.consume(x),g)}function c(x){return x===null||y(x)?f(x):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),f(x)):x===96&&x===a?t(x):(n.consume(x),b)}function E(x){return n.attempt(u,P,F)(x)}function F(x){return n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),S}function S(x){return i>0&&_(x)?B(n,I,"linePrefix",i+1)(x):I(x)}function I(x){return x===null||y(x)?n.check(Qn,E,P)(x):(n.enter("codeFlowValue"),d(x))}function d(x){return x===null||y(x)?(n.exit("codeFlowValue"),I(x)):(n.consume(x),d)}function P(x){return n.exit("codeFenced"),r(x)}function T(x,L,N){let q=0;return D;function D(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),z}function z(A){return x.enter("codeFencedFence"),_(A)?B(x,C,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):C(A)}function C(A){return A===a?(x.enter("codeFencedFenceSequence"),O(A)):N(A)}function O(A){return A===a?(q++,x.consume(A),O):q>=l?(x.exit("codeFencedFenceSequence"),_(A)?B(x,M,"whitespace")(A):M(A)):N(A)}function M(A){return A===null||y(A)?(x.exit("codeFencedFence"),L(A)):N(A)}}}function se(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const wn={name:"codeIndented",tokenize:he},ce={partial:!0,tokenize:fe};function he(n,r,t){const e=this;return u;function u(h){return n.enter("codeIndented"),B(n,i,"linePrefix",5)(h)}function i(h){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):t(h)}function l(h){return h===null?m(h):y(h)?n.attempt(ce,l,m)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||y(h)?(n.exit("codeFlowValue"),l(h)):(n.consume(h),a)}function m(h){return n.exit("codeIndented"),r(h)}}function fe(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):B(n,i,"linePrefix",5)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):y(l)?u(l):t(l)}}const pe={name:"codeText",previous:ge,resolve:me,tokenize:xe};function me(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e<r;)if(n[e][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(e=t-1,r++;++e<=r;)u===void 0?e!==r&&n[e][1].type!=="lineEnding"&&(u=e):(e===r||n[e][1].type==="lineEnding")&&(n[u][1].type="codeTextData",e!==u+2&&(n[u][1].end=n[e-1][1].end,n.splice(u+2,e-u-2),r-=e-u-2,e=u+2),u=void 0);return n}function ge(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xe(n,r,t){let e=0,u,i;return l;function l(f){return n.enter("codeText"),n.enter("codeTextSequence"),a(f)}function a(f){return f===96?(n.consume(f),e++,a):(n.exit("codeTextSequence"),m(f))}function m(f){return f===null?t(f):f===32?(n.enter("space"),n.consume(f),n.exit("space"),m):f===96?(i=n.enter("codeTextSequence"),u=0,p(f)):y(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):(n.enter("codeTextData"),h(f))}function h(f){return f===null||f===32||f===96||y(f)?(n.exit("codeTextData"),m(f)):(n.consume(f),h)}function p(f){return f===96?(n.consume(f),u++,p):u===e?(n.exit("codeTextSequence"),n.exit("codeText"),r(f)):(i.type="codeTextData",h(f))}}class ke{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,t){const e=t??Number.POSITIVE_INFINITY;return e<this.left.length?this.left.slice(r,e):r>this.left.length?this.right.slice(this.right.length-e+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-e+this.left.length).reverse())}splice(r,t,e){const u=t||0;this.setCursor(Math.trunc(r));const i=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return e&&mn(this.left,e),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),mn(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),mn(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const t=this.left.splice(r,Number.POSITIVE_INFINITY);mn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);mn(this.left,t.reverse())}}}function mn(n,r){let t=0;if(r.length<1e4)n.push(...r);else for(;t<r.length;)n.push(...r.slice(t,t+1e4)),t+=1e4}function et(n){const r={};let t=-1,e,u,i,l,a,m,h;const p=new ke(n);for(;++t<p.length;){for(;t in r;)t=r[t];if(e=p.get(t),t&&e[1].type==="chunkFlow"&&p.get(t-1)[1].type==="listItemPrefix"&&(m=e[1]._tokenizer.events,i=0,i<m.length&&m[i][1].type==="lineEndingBlank"&&(i+=2),i<m.length&&m[i][1].type==="content"))for(;++i<m.length&&m[i][1].type!=="content";)m[i][1].type==="chunkText"&&(m[i][1]._isInFirstContentOfListItem=!0,i++);if(e[0]==="enter")e[1].contentType&&(Object.assign(r,Se(p,t)),t=r[t],h=!0);else if(e[1]._container){for(i=t,u=void 0;i--;)if(l=p.get(i),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(u&&(p.get(u)[1].type="lineEndingBlank"),l[1].type="lineEnding",u=i);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;u&&(e[1].end={...p.get(u)[1].start},a=p.slice(u,t),a.unshift(e),p.splice(u,t-u+1,a))}}return X(n,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Se(n,r){const t=n.get(r)[1],e=n.get(r)[2];let u=r-1;const i=[];let l=t._tokenizer;l||(l=e.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,m=[],h={};let p,f,g=-1,c=t,b=0,E=0;const F=[E];for(;c;){for(;n.get(++u)[1]!==c;);i.push(u),c._tokenizer||(p=e.sliceStream(c),c.next||p.push(null),f&&l.defineSkip(c.start),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=c,c=c.next}for(c=t;++g<a.length;)a[g][0]==="exit"&&a[g-1][0]==="enter"&&a[g][1].type===a[g-1][1].type&&a[g][1].start.line!==a[g][1].end.line&&(E=g+1,F.push(E),c._tokenizer=void 0,c.previous=void 0,c=c.next);for(l.events=[],c?(c._tokenizer=void 0,c.previous=void 0):F.pop(),g=F.length;g--;){const S=a.slice(F[g],F[g+1]),I=i.pop();m.push([I,I+S.length-1]),n.splice(I,2,S)}for(m.reverse(),g=-1;++g<m.length;)h[b+m[g][0]]=b+m[g][1],b+=m[g][1]-m[g][0]-1;return h}const be={resolve:Ie,tokenize:we},de={partial:!0,tokenize:Ce};function Ie(n){return et(n),n}function we(n,r){let t;return e;function e(a){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),u(a)}function u(a){return a===null?i(a):y(a)?n.check(de,l,i)(a):(n.consume(a),u)}function i(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function l(a){return n.consume(a),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function Ce(n,r,t){const e=this;return u;function u(l){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),B(n,i,"linePrefix")}function i(l){if(l===null||y(l))return t(l);const a=e.events[e.events.length-1];return!e.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function rt(n,r,t,e,u,i,l,a,m){const h=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(S){return S===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(S),n.exit(i),g):S===null||S===32||S===41||bn(S)?t(S):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),E(S))}function g(S){return S===62?(n.enter(i),n.consume(S),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),c(S))}function c(S){return S===62?(n.exit("chunkString"),n.exit(a),g(S)):S===null||S===60||y(S)?t(S):(n.consume(S),S===92?b:c)}function b(S){return S===60||S===62||S===92?(n.consume(S),c):c(S)}function E(S){return!p&&(S===null||S===41||U(S))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(S)):p<h&&S===40?(n.consume(S),p++,E):S===41?(n.consume(S),p--,E):S===null||S===32||S===40||bn(S)?t(S):(n.consume(S),S===92?F:E)}function F(S){return S===40||S===41||S===92?(n.consume(S),E):E(S)}}function it(n,r,t,e,u,i){const l=this;let a=0,m;return h;function h(c){return n.enter(e),n.enter(u),n.consume(c),n.exit(u),n.enter(i),p}function p(c){return a>999||c===null||c===91||c===93&&!m||c===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(c):c===93?(n.exit(i),n.enter(u),n.consume(c),n.exit(u),n.exit(e),r):y(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(c))}function f(c){return c===null||c===91||c===93||y(c)||a++>999?(n.exit("chunkString"),p(c)):(n.consume(c),m||(m=!_(c)),c===92?g:f)}function g(c){return c===91||c===92||c===93?(n.consume(c),a++,f):f(c)}}function ut(n,r,t,e,u,i){let l;return a;function a(g){return g===34||g===39||g===40?(n.enter(e),n.enter(u),n.consume(g),n.exit(u),l=g===40?41:g,m):t(g)}function m(g){return g===l?(n.enter(u),n.consume(g),n.exit(u),n.exit(e),r):(n.enter(i),h(g))}function h(g){return g===l?(n.exit(i),m(l)):g===null?t(g):y(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),B(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||y(g)?(n.exit("chunkString"),h(g)):(n.consume(g),g===92?f:p)}function f(g){return g===l||g===92?(n.consume(g),p):p(g)}}function xn(n,r){let t;return e;function e(u){return y(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):_(u)?B(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}const ze={name:"definition",tokenize:Ee},ye={partial:!0,tokenize:Te};function Ee(n,r,t){const e=this;let u;return i;function i(c){return n.enter("definition"),l(c)}function l(c){return it.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function a(c){return u=hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),c===58?(n.enter("definitionMarker"),n.consume(c),n.exit("definitionMarker"),m):t(c)}function m(c){return U(c)?xn(n,h)(c):h(c)}function h(c){return rt(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function p(c){return n.attempt(ye,f,f)(c)}function f(c){return _(c)?B(n,g,"whitespace")(c):g(c)}function g(c){return c===null||y(c)?(n.exit("definition"),e.parser.defined.push(u),r(c)):t(c)}}function Te(n,r,t){return e;function e(a){return U(a)?xn(n,u)(a):t(a)}function u(a){return ut(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return _(a)?B(n,l,"whitespace")(a):l(a)}function l(a){return a===null||y(a)?r(a):t(a)}}const Fe={name:"hardBreakEscape",tokenize:Ae};function Ae(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return y(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const _e={name:"headingAtx",resolve:Le,tokenize:Pe};function Le(n,r){let t=n.length-2,e=3,u,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},X(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function Pe(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||U(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||y(p)?(n.exit("atxHeading"),r(p)):_(p)?B(n,a,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function h(p){return p===null||p===35||U(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),h)}}const Be=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Un=["pre","script","style","textarea"],Oe={concrete:!0,name:"htmlFlow",resolveTo:qe,tokenize:De},Me={partial:!0,tokenize:He},Ne={partial:!0,tokenize:Re};function qe(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function De(n,r,t){const e=this;let u,i,l,a,m;return h;function h(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),g):s===47?(n.consume(s),i=!0,E):s===63?(n.consume(s),u=3,e.interrupt?r:o):K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function g(s){return s===45?(n.consume(s),u=2,c):s===91?(n.consume(s),u=5,a=0,b):K(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function c(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function b(s){const G="CDATA[";return s===G.charCodeAt(a++)?(n.consume(s),a===G.length?e.interrupt?r:C:b):t(s)}function E(s){return K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function F(s){if(s===null||s===47||s===62||U(s)){const G=s===47,on=l.toLowerCase();return!G&&!i&&Un.includes(on)?(u=1,e.interrupt?r(s):C(s)):Be.includes(l.toLowerCase())?(u=6,G?(n.consume(s),S):e.interrupt?r(s):C(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?I(s):d(s))}return s===45||$(s)?(n.consume(s),l+=String.fromCharCode(s),F):t(s)}function S(s){return s===62?(n.consume(s),e.interrupt?r:C):t(s)}function I(s){return _(s)?(n.consume(s),I):D(s)}function d(s){return s===47?(n.consume(s),D):s===58||s===95||K(s)?(n.consume(s),P):_(s)?(n.consume(s),d):D(s)}function P(s){return s===45||s===46||s===58||s===95||$(s)?(n.consume(s),P):T(s)}function T(s){return s===61?(n.consume(s),x):_(s)?(n.consume(s),T):d(s)}function x(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,L):_(s)?(n.consume(s),x):N(s)}function L(s){return s===m?(n.consume(s),m=null,q):s===null||y(s)?t(s):(n.consume(s),L)}function N(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||U(s)?T(s):(n.consume(s),N)}function q(s){return s===47||s===62||_(s)?d(s):t(s)}function D(s){return s===62?(n.consume(s),z):t(s)}function z(s){return s===null||y(s)?C(s):_(s)?(n.consume(s),z):t(s)}function C(s){return s===45&&u===2?(n.consume(s),V):s===60&&u===1?(n.consume(s),R):s===62&&u===4?(n.consume(s),Z):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),tn):y(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Me,en,O)(s)):s===null||y(s)?(n.exit("htmlFlowData"),O(s)):(n.consume(s),C)}function O(s){return n.check(Ne,M,en)(s)}function M(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),A}function A(s){return s===null||y(s)?O(s):(n.enter("htmlFlowData"),C(s))}function V(s){return s===45?(n.consume(s),o):C(s)}function R(s){return s===47?(n.consume(s),l="",Y):C(s)}function Y(s){if(s===62){const G=l.toLowerCase();return Un.includes(G)?(n.consume(s),Z):C(s)}return K(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),Y):C(s)}function tn(s){return s===93?(n.consume(s),o):C(s)}function o(s){return s===62?(n.consume(s),Z):s===45&&u===2?(n.consume(s),o):C(s)}function Z(s){return s===null||y(s)?(n.exit("htmlFlowData"),en(s)):(n.consume(s),Z)}function en(s){return n.exit("htmlFlow"),r(s)}}function Re(n,r,t){const e=this;return u;function u(l){return y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function He(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(kn,r,t)}}const Ve={name:"htmlText",tokenize:Qe};function Qe(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),h):o===47?(n.consume(o),T):o===63?(n.consume(o),d):K(o)?(n.consume(o),N):t(o)}function h(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,b):K(o)?(n.consume(o),I):t(o)}function p(o){return o===45?(n.consume(o),c):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),g):y(o)?(l=f,R(o)):(n.consume(o),f)}function g(o){return o===45?(n.consume(o),c):f(o)}function c(o){return o===62?V(o):o===45?g(o):f(o)}function b(o){const Z="CDATA[";return o===Z.charCodeAt(i++)?(n.consume(o),i===Z.length?E:b):t(o)}function E(o){return o===null?t(o):o===93?(n.consume(o),F):y(o)?(l=E,R(o)):(n.consume(o),E)}function F(o){return o===93?(n.consume(o),S):E(o)}function S(o){return o===62?V(o):o===93?(n.consume(o),S):E(o)}function I(o){return o===null||o===62?V(o):y(o)?(l=I,R(o)):(n.consume(o),I)}function d(o){return o===null?t(o):o===63?(n.consume(o),P):y(o)?(l=d,R(o)):(n.consume(o),d)}function P(o){return o===62?V(o):d(o)}function T(o){return K(o)?(n.consume(o),x):t(o)}function x(o){return o===45||$(o)?(n.consume(o),x):L(o)}function L(o){return y(o)?(l=L,R(o)):_(o)?(n.consume(o),L):V(o)}function N(o){return o===45||$(o)?(n.consume(o),N):o===47||o===62||U(o)?q(o):t(o)}function q(o){return o===47?(n.consume(o),V):o===58||o===95||K(o)?(n.consume(o),D):y(o)?(l=q,R(o)):_(o)?(n.consume(o),q):V(o)}function D(o){return o===45||o===46||o===58||o===95||$(o)?(n.consume(o),D):z(o)}function z(o){return o===61?(n.consume(o),C):y(o)?(l=z,R(o)):_(o)?(n.consume(o),z):q(o)}function C(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,O):y(o)?(l=C,R(o)):_(o)?(n.consume(o),C):(n.consume(o),M)}function O(o){return o===u?(n.consume(o),u=void 0,A):o===null?t(o):y(o)?(l=O,R(o)):(n.consume(o),O)}function M(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||U(o)?q(o):(n.consume(o),M)}function A(o){return o===47||o===62||U(o)?q(o):t(o)}function V(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function R(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Y}function Y(o){return _(o)?B(n,tn,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):tn(o)}function tn(o){return n.enter("htmlTextData"),l(o)}}const Fn={name:"labelEnd",resolveAll:$e,resolveTo:Ye,tokenize:Ze},We={tokenize:Ge},Ue={tokenize:Je},je={tokenize:Ke};function $e(n){let r=-1;const t=[];for(;++r<n.length;){const e=n[r][1];if(t.push(n[r]),e.type==="labelImage"||e.type==="labelLink"||e.type==="labelEnd"){const u=e.type==="labelImage"?4:2;e.type="data",r+=u}}return n.length!==t.length&&X(n,0,n.length,t),n}function Ye(n,r){let t=n.length,e=0,u,i,l,a;for(;t--;)if(u=n[t][1],i){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(l){if(n[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(i=t,u.type!=="labelLink")){e=2;break}}else u.type==="labelEnd"&&(l=t);const m={type:n[i][1].type==="labelLink"?"link":"image",start:{...n[i][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[i][1].start},end:{...n[l][1].end}},p={type:"labelText",start:{...n[i+e+2][1].end},end:{...n[l-2][1].start}};return a=[["enter",m,r],["enter",h,r]],a=W(a,n.slice(i+1,i+e+3)),a=W(a,[["enter",p,r]]),a=W(a,dn(r.parser.constructs.insideSpan.null,n.slice(i+e+4,l-3),r)),a=W(a,[["exit",p,r],n[l-2],n[l-1],["exit",h,r]]),a=W(a,n.slice(l+1)),a=W(a,[["exit",m,r]]),X(n,i,n.length,a),n}function Ze(n,r,t){const e=this;let u=e.events.length,i,l;for(;u--;)if((e.events[u][1].type==="labelImage"||e.events[u][1].type==="labelLink")&&!e.events[u][1]._balanced){i=e.events[u][1];break}return a;function a(g){return i?i._inactive?f(g):(l=e.parser.defined.includes(hn(e.sliceSerialize({start:i.end,end:e.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(g),n.exit("labelMarker"),n.exit("labelEnd"),m):t(g)}function m(g){return g===40?n.attempt(We,p,l?p:f)(g):g===91?n.attempt(Ue,p,l?h:f)(g):l?p(g):f(g)}function h(g){return n.attempt(je,p,f)(g)}function p(g){return r(g)}function f(g){return i._balanced=!0,t(g)}}function Ge(n,r,t){return e;function e(f){return n.enter("resource"),n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),u}function u(f){return U(f)?xn(n,i)(f):i(f)}function i(f){return f===41?p(f):rt(n,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return U(f)?xn(n,m)(f):p(f)}function a(f){return t(f)}function m(f){return f===34||f===39||f===40?ut(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):p(f)}function h(f){return U(f)?xn(n,p)(f):p(f)}function p(f){return f===41?(n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),n.exit("resource"),r):t(f)}}function Je(n,r,t){const e=this;return u;function u(a){return it.call(e,n,i,l,"reference","referenceMarker","referenceString")(a)}function i(a){return e.parser.defined.includes(hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)))?r(a):t(a)}function l(a){return t(a)}}function Ke(n,r,t){return e;function e(i){return n.enter("reference"),n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),u}function u(i){return i===93?(n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),n.exit("reference"),r):t(i)}}const Xe={name:"labelStartImage",resolveAll:Fn.resolveAll,tokenize:ve};function ve(n,r,t){const e=this;return u;function u(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),i}function i(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(a):r(a)}}const nr={name:"labelStartLink",resolveAll:Fn.resolveAll,tokenize:tr};function tr(n,r,t){const e=this;return u;function u(l){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelLink"),i}function i(l){return l===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(l):r(l)}}const Cn={name:"lineEnding",tokenize:er};function er(n,r){return t;function t(e){return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),B(n,r,"linePrefix")}}const Sn={name:"thematicBreak",tokenize:rr};function rr(n,r,t){let e=0,u;return i;function i(h){return n.enter("thematicBreak"),l(h)}function l(h){return u=h,a(h)}function a(h){return h===u?(n.enter("thematicBreakSequence"),m(h)):e>=3&&(h===null||y(h))?(n.exit("thematicBreak"),r(h)):t(h)}function m(h){return h===u?(n.consume(h),e++,m):(n.exit("thematicBreakSequence"),_(h)?B(n,a,"whitespace")(h):a(h))}}const j={continuation:{tokenize:ar},exit:sr,name:"list",tokenize:lr},ir={partial:!0,tokenize:cr},ur={partial:!0,tokenize:or};function lr(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(c){const b=e.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!e.containerState.marker||c===e.containerState.marker:yn(c)){if(e.containerState.type||(e.containerState.type=b,n.enter(b,{_container:!0})),b==="listUnordered")return n.enter("listItemPrefix"),c===42||c===45?n.check(Sn,t,h)(c):h(c);if(!e.interrupt||c===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(c)}return t(c)}function m(c){return yn(c)&&++l<10?(n.consume(c),m):(!e.interrupt||l<2)&&(e.containerState.marker?c===e.containerState.marker:c===41||c===46)?(n.exit("listItemValue"),h(c)):t(c)}function h(c){return n.enter("listItemMarker"),n.consume(c),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||c,n.check(kn,e.interrupt?t:p,n.attempt(ir,g,f))}function p(c){return e.containerState.initialBlankLine=!0,i++,g(c)}function f(c){return _(c)?(n.enter("listItemPrefixWhitespace"),n.consume(c),n.exit("listItemPrefixWhitespace"),g):t(c)}function g(c){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(c)}}function ar(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(kn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,B(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!_(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(ur,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,B(n,n.attempt(j,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function or(n,r,t){const e=this;return B(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function sr(n){n.exit(this.containerState.type)}function cr(n,r,t){const e=this;return B(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(i){const l=e.events[e.events.length-1];return!_(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const jn={name:"setextUnderline",resolveTo:hr,tokenize:fr};function hr(n,r){let t=n.length,e,u,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:{...n[e][1].start},end:{...n[n.length-1][1].end}};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end={...n[i][1].end}):n[e][1]=l,n.push(["exit",l,r]),n}function fr(n,r,t){const e=this;let u;return i;function i(h){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=h,l(h)):t(h)}function l(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===u?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),_(h)?B(n,m,"lineSuffix")(h):m(h))}function m(h){return h===null||y(h)?(n.exit("setextHeadingLine"),r(h)):t(h)}}const pr={tokenize:mr};function mr(n){const r=this,t=n.attempt(kn,e,n.attempt(this.parser.constructs.flowInitial,u,B(n,n.attempt(this.parser.constructs.flow,u,n.attempt(be,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const gr={resolveAll:at()},xr=lt("string"),kr=lt("text");function lt(n){return{resolveAll:at(n==="text"?Sr:void 0),tokenize:r};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return h(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return h(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function h(p){if(p===null)return!0;const f=u[p];let g=-1;if(f)for(;++g<f.length;){const c=f[g];if(!c.previous||c.previous.call(e,e.previous))return!0}return!1}}}function at(n){return r;function r(t,e){let u=-1,i;for(;++u<=t.length;)i===void 0?t[u]&&t[u][1].type==="data"&&(i=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==i+2&&(t[i][1].end=t[u-1][1].end,t.splice(i+2,u-i-2),u=i+2),i=void 0);return n?n(t,e):t}}function Sr(n,r){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const e=n[t-1][1],u=r.sliceStream(e);let i=u.length,l=-1,a=0,m;for(;i--;){const h=u[i];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(h===-2)m=!0,a++;else if(h!==-1){i++;break}}if(r._contentTypeTextTrailing&&t===n.length&&(a=0),a){const h={type:t===n.length||m||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:e.start._bufferIndex+l,_index:e.start._index+i,line:e.end.line,column:e.end.column-a,offset:e.end.offset-a},end:{...e.end}};e.end={...h.start},e.start.offset===e.end.offset?Object.assign(e,h):(n.splice(t,0,["enter",h,r],["exit",h,r]),t+=2)}t++}return n}const br={42:j,43:j,45:j,48:j,49:j,50:j,51:j,52:j,53:j,54:j,55:j,56:j,57:j,62:vn},dr={91:ze},Ir={[-2]:wn,[-1]:wn,32:wn},wr={35:_e,42:Sn,45:[jn,Sn],60:Oe,61:jn,95:Sn,96:Wn,126:Wn},Cr={38:tt,92:nt},zr={[-5]:Cn,[-4]:Cn,[-3]:Cn,33:Xe,38:tt,42:Tn,60:[ne,Ve],91:nr,92:[Fe,nt],93:Fn,95:Tn,96:pe},yr={null:[Tn,gr]},Er={null:[42,95]},Tr={null:[]},Fr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Er,contentInitial:dr,disable:Tr,document:br,flow:wr,flowInitial:Ir,insideSpan:yr,string:Cr,text:zr},Symbol.toStringTag,{value:"Module"}));function Ar(n,r,t){let e={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const u={},i=[];let l=[],a=[];const m={attempt:L(T),check:L(x),consume:I,enter:d,exit:P,interrupt:L(x,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:b,parser:n,previous:null,sliceSerialize:g,sliceStream:c,write:f};let p=r.tokenize.call(h,m);return r.resolveAll&&i.push(r),h;function f(z){return l=W(l,z),F(),l[l.length-1]!==null?[]:(N(r,0),h.events=dn(i,h.events,h),h.events)}function g(z,C){return Lr(c(z),C)}function c(z){return _r(l,z)}function b(){const{_bufferIndex:z,_index:C,line:O,column:M,offset:A}=e;return{_bufferIndex:z,_index:C,line:O,column:M,offset:A}}function E(z){u[z.line]=z.column,D()}function F(){let z;for(;e._index<l.length;){const C=l[e._index];if(typeof C=="string")for(z=e._index,e._bufferIndex<0&&(e._bufferIndex=0);e._index===z&&e._bufferIndex<C.length;)S(C.charCodeAt(e._bufferIndex));else S(C)}}function S(z){p=p(z)}function I(z){y(z)?(e.line++,e.column=1,e.offset+=z===-3?2:1,D()):z!==-1&&(e.column++,e.offset++),e._bufferIndex<0?e._index++:(e._bufferIndex++,e._bufferIndex===l[e._index].length&&(e._bufferIndex=-1,e._index++)),h.previous=z}function d(z,C){const O=C||{};return O.type=z,O.start=b(),h.events.push(["enter",O,h]),a.push(O),O}function P(z){const C=a.pop();return C.end=b(),h.events.push(["exit",C,h]),C}function T(z,C){N(z,C.from)}function x(z,C){C.restore()}function L(z,C){return O;function O(M,A,V){let R,Y,tn,o;return Array.isArray(M)?en(M):"tokenize"in M?en([M]):Z(M);function Z(H){return fn;function fn(un){const sn=un!==null&&H[un],cn=un!==null&&H.null,In=[...Array.isArray(sn)?sn:sn?[sn]:[],...Array.isArray(cn)?cn:cn?[cn]:[]];return en(In)(un)}}function en(H){return R=H,Y=0,H.length===0?V:s(H[Y])}function s(H){return fn;function fn(un){return o=q(),tn=H,H.partial||(h.currentConstruct=H),H.name&&h.parser.constructs.disable.null.includes(H.name)?on():H.tokenize.call(C?Object.assign(Object.create(h),C):h,m,G,on)(un)}}function G(H){return z(tn,o),A}function on(H){return o.restore(),++Y<R.length?s(R[Y]):V}}}function N(z,C){z.resolveAll&&!i.includes(z)&&i.push(z),z.resolve&&X(h.events,C,h.events.length-C,z.resolve(h.events.slice(C),h)),z.resolveTo&&(h.events=z.resolveTo(h.events,h))}function q(){const z=b(),C=h.previous,O=h.currentConstruct,M=h.events.length,A=Array.from(a);return{from:M,restore:V};function V(){e=z,h.previous=C,h.currentConstruct=O,h.events.length=M,a=A,D()}}function D(){e.line in u&&e.column<2&&(e.column=u[e.line],e.offset+=u[e.line]-1)}}function _r(n,r){const t=r.start._index,e=r.start._bufferIndex,u=r.end._index,i=r.end._bufferIndex;let l;if(t===u)l=[n[t].slice(e,i)];else{if(l=n.slice(t,u),e>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function Lr(n,r){let t=-1;const e=[];let u;for(;++t<n.length;){const i=n[t];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=`
|
|
3
3
|
`;break}case-3:{l=`\r
|
|
4
|
-
`;break}case-2:{l=r?" ":" ";break}case-1:{if(!r&&u)continue;l=" ";break}default:l=String.fromCharCode(i)}u=i===-2,e.push(l)}return e.join("")}function Pr(n){const e={constructs:Zn([Fr,...(n||{}).extensions||[]]),content:u(Yt),defined:[],document:u(Gt),flow:u(pr),lazy:{},string:u(xr),text:u(kr)};return e;function u(i){return l;function l(a){return Ar(e,i,a)}}}function Br(n){for(;!et(n););return n}const $n=/[\0\t\n\r]/g;function Or(){let n=1,r="",t=!0,e;return u;function u(i,l,a){const m=[];let h,p,f,g,c;for(i=r+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i)),f=0,r="",t&&(i.charCodeAt(0)===65279&&f++,t=void 0);f<i.length;){if($n.lastIndex=f,h=$n.exec(i),g=h&&h.index!==void 0?h.index:i.length,c=i.charCodeAt(g),!h){r=i.slice(f);break}if(c===10&&f===g&&e)m.push(-3),e=void 0;else switch(e&&(m.push(-5),e=void 0),f<g&&(m.push(i.slice(f,g)),n+=g-f),c){case 0:{m.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,m.push(-2);n++<p;)m.push(-1);break}case 10:{m.push(-4),n=1;break}default:e=!0,n=1}f=g+1}return a&&(e&&m.push(-5),r&&m.push(r),m.push(null)),m}}function Mr(n,r,t){return typeof r!="string"&&(t=r,r=void 0),$t(t)(Br(Pr(t).document().write(Or()(n,r,!0))))}async function Nr(n={}){const r=[],t=[];if(n.gfm===!0){const e=await Promise.resolve().then(()=>require("./index-
|
|
4
|
+
`;break}case-2:{l=r?" ":" ";break}case-1:{if(!r&&u)continue;l=" ";break}default:l=String.fromCharCode(i)}u=i===-2,e.push(l)}return e.join("")}function Pr(n){const e={constructs:Zn([Fr,...(n||{}).extensions||[]]),content:u(Yt),defined:[],document:u(Gt),flow:u(pr),lazy:{},string:u(xr),text:u(kr)};return e;function u(i){return l;function l(a){return Ar(e,i,a)}}}function Br(n){for(;!et(n););return n}const $n=/[\0\t\n\r]/g;function Or(){let n=1,r="",t=!0,e;return u;function u(i,l,a){const m=[];let h,p,f,g,c;for(i=r+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i)),f=0,r="",t&&(i.charCodeAt(0)===65279&&f++,t=void 0);f<i.length;){if($n.lastIndex=f,h=$n.exec(i),g=h&&h.index!==void 0?h.index:i.length,c=i.charCodeAt(g),!h){r=i.slice(f);break}if(c===10&&f===g&&e)m.push(-3),e=void 0;else switch(e&&(m.push(-5),e=void 0),f<g&&(m.push(i.slice(f,g)),n+=g-f),c){case 0:{m.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,m.push(-2);n++<p;)m.push(-1);break}case 10:{m.push(-4),n=1;break}default:e=!0,n=1}f=g+1}return a&&(e&&m.push(-5),r&&m.push(r),m.push(null)),m}}function Mr(n,r,t){return typeof r!="string"&&(t=r,r=void 0),$t(t)(Br(Pr(t).document().write(Or()(n,r,!0))))}async function Nr(n={}){const r=[],t=[];if(n.gfm===!0){const e=await Promise.resolve().then(()=>require("./index-CKyH3jwP.cjs"));r.push(e.gfm({})),t.push(e.gfmHtml({}))}return{extensions:r,htmlExtensions:t}}function qr(n,...r){const{content:t,allowHtml:e=!1}=n,u=an.computedOf(t,e,n.features)(async(i="",l=!1,a={})=>{const{extensions:m,htmlExtensions:h}=await Nr(a);return Mr(i,{allowDangerousHtml:l,extensions:m,htmlExtensions:h})});return an.html.div((n.cssInjection??"none")==="none"?null:an.Task(()=>Promise.resolve().then(()=>require("./styles-url-B3p8AqBy.cjs")),({default:i})=>Mt.LinkPortal({id:"beatui-markdown-css",href:i})),an.attr.class("bc-markdown"),an.MapSignal(u,i=>an.Async(i,l=>an.attr.innerHTML(l))),...r)}exports.Markdown=qr;exports.asciiAlpha=K;exports.asciiAlphanumeric=$;exports.asciiControl=bn;exports.blankLine=kn;exports.classifyCharacter=En;exports.combineExtensions=Zn;exports.combineHtmlExtensions=Gn;exports.factorySpace=B;exports.markdownLineEnding=y;exports.markdownLineEndingOrSpace=U;exports.markdownSpace=_;exports.normalizeIdentifier=hn;exports.resolveAll=dn;exports.sanitizeUri=gn;exports.splice=X;exports.unicodePunctuation=Kn;exports.unicodeWhitespace=Xn;
|