md2x 0.7.3 → 0.7.5
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/README.md +17 -7
- package/dist/chunks/chunk-54X5GPSM.js +1552 -0
- package/dist/chunks/chunk-US45GBOT.js +415 -0
- package/dist/chunks/docx-exporter-7C6T4DFB.js +1 -0
- package/dist/core-worker.js +1764 -0
- package/dist/index.js +1 -1
- package/dist/md2x.js +7 -5
- package/dist/renderer/core-worker-browser.js +1775 -0
- package/dist/renderer/live-runtime-canvas.js +24 -0
- package/dist/renderer/live-runtime-core.js +14 -0
- package/dist/renderer/live-runtime-dot.js +27 -0
- package/dist/renderer/live-runtime-html.js +14 -0
- package/dist/renderer/live-runtime-infographic.js +593 -0
- package/dist/renderer/live-runtime-md2x.js +24 -0
- package/dist/renderer/live-runtime-mermaid.js +14 -0
- package/dist/renderer/live-runtime-svg.js +14 -0
- package/dist/renderer/live-runtime-vega.js +218 -0
- package/dist/renderer/puppeteer-render.html +9 -1
- package/dist/renderer/puppeteer-runtime-core.js +14 -0
- package/dist/types/node/src/host/browser-renderer.d.ts +1 -175
- package/dist/types/node/src/host/core.d.ts +59 -0
- package/dist/types/node/src/host/index.d.ts +4 -47
- package/dist/types/node/src/host/node-exporter.d.ts +1 -84
- package/dist/types/node/src/host/node-platform.d.ts +1 -23
- package/dist/types/node/src/host/templates-data.d.ts +5 -0
- package/dist/types/node/src/host/themes-data.d.ts +2385 -0
- package/dist/types/node/src/host/types.d.ts +251 -0
- package/dist/types/node/src/index.d.ts +2 -3
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/render.d.ts +12 -0
- package/package.json +10 -2
- package/dist/chunks/chunk-2LPNL4GA.js +0 -1
- package/dist/chunks/chunk-3P5X57NT.js +0 -262
- package/dist/chunks/chunk-3VL755NO.js +0 -1
- package/dist/chunks/chunk-5DPTQTJJ.js +0 -1
- package/dist/chunks/chunk-AK6TXLWO.js +0 -1
- package/dist/chunks/chunk-CN4F5HOV.js +0 -5
- package/dist/chunks/chunk-CVKZIRZW.js +0 -5
- package/dist/chunks/chunk-DFROP2PD.js +0 -11
- package/dist/chunks/chunk-DJGIYXVP.js +0 -3
- package/dist/chunks/chunk-EFKQH5UR.js +0 -108
- package/dist/chunks/chunk-IENSDROB.js +0 -1
- package/dist/chunks/chunk-LLCWR7UA.js +0 -1
- package/dist/chunks/chunk-MHCTK6WW.js +0 -1
- package/dist/chunks/chunk-NM6J3ND7.js +0 -1
- package/dist/chunks/chunk-PARPCLXM.js +0 -1
- package/dist/chunks/chunk-PUOHPY5L.js +0 -16
- package/dist/chunks/chunk-R65AQGTF.js +0 -1
- package/dist/chunks/chunk-R6G2575A.js +0 -3
- package/dist/chunks/chunk-RLHZRADD.js +0 -1391
- package/dist/chunks/chunk-TRGQPVRY.js +0 -2
- package/dist/chunks/chunk-URO5RPHJ.js +0 -9
- package/dist/chunks/chunk-YFL3W3OS.js +0 -1
- package/dist/chunks/chunk-Z4LVGK7Y.js +0 -1
- package/dist/chunks/docx-exporter-ZZ76JXFU.js +0 -1
- package/dist/chunks/rehype-highlight-Y4Q4RX67.js +0 -1
- package/dist/chunks/rehype-katex-FXTCTSUE.js +0 -1
- package/dist/chunks/rehype-stringify-4CQSSRDL.js +0 -1
- package/dist/chunks/remark-gfm-BUZ4SLP3.js +0 -1
- package/dist/chunks/remark-math-HEZQAPFK.js +0 -1
- package/dist/chunks/remark-parse-QC7TSXTK.js +0 -1
- package/dist/chunks/remark-rehype-C2LX643P.js +0 -1
- package/dist/chunks/remark-super-sub-EP2AQS54.js +0 -1
- package/dist/chunks/theme-manager-AZBU2SLL.js +0 -1
- package/dist/chunks/theme-to-css-GLV3WYDU.js +0 -85
- package/dist/chunks/unified-PU53JLVJ.js +0 -1
- package/dist/chunks/unist-util-visit-SBSD62C6.js +0 -1
- package/dist/renderer/puppeteer-render-worker.js +0 -830
- package/dist/templates/html/example.html +0 -35
- package/dist/templates/svelte/example.svelte +0 -18
- package/dist/templates/vue/PrinterComponent.vue +0 -875
- package/dist/templates/vue/example.vue +0 -17
- package/dist/templates/vue/mapLibre.vue +0 -371
- package/dist/themes/code-themes/business-contrast.json +0 -31
- package/dist/themes/code-themes/colorful.json +0 -32
- package/dist/themes/code-themes/cool-modern.json +0 -31
- package/dist/themes/code-themes/high-contrast.json +0 -31
- package/dist/themes/code-themes/light-clean.json +0 -31
- package/dist/themes/code-themes/warm-book.json +0 -31
- package/dist/themes/color-schemes/candy.json +0 -34
- package/dist/themes/color-schemes/cool.json +0 -34
- package/dist/themes/color-schemes/coral.json +0 -34
- package/dist/themes/color-schemes/dino.json +0 -34
- package/dist/themes/color-schemes/forest.json +0 -34
- package/dist/themes/color-schemes/garden.json +0 -34
- package/dist/themes/color-schemes/neutral.json +0 -34
- package/dist/themes/color-schemes/ocean.json +0 -34
- package/dist/themes/color-schemes/rainbow.json +0 -43
- package/dist/themes/color-schemes/sakura.json +0 -34
- package/dist/themes/color-schemes/sepia.json +0 -34
- package/dist/themes/color-schemes/space.json +0 -34
- package/dist/themes/color-schemes/starry.json +0 -34
- package/dist/themes/color-schemes/sunset.json +0 -34
- package/dist/themes/color-schemes/warm.json +0 -34
- package/dist/themes/font-config.json +0 -184
- package/dist/themes/layout-schemes/academic.json +0 -40
- package/dist/themes/layout-schemes/book.json +0 -40
- package/dist/themes/layout-schemes/document.json +0 -40
- package/dist/themes/layout-schemes/magazine.json +0 -40
- package/dist/themes/layout-schemes/student.json +0 -40
- package/dist/themes/layout-schemes/technical.json +0 -40
- package/dist/themes/presets/academic.json +0 -24
- package/dist/themes/presets/business.json +0 -22
- package/dist/themes/presets/candy.json +0 -23
- package/dist/themes/presets/century.json +0 -22
- package/dist/themes/presets/coral.json +0 -22
- package/dist/themes/presets/default.json +0 -22
- package/dist/themes/presets/dinosaur.json +0 -23
- package/dist/themes/presets/elegant.json +0 -22
- package/dist/themes/presets/forest.json +0 -22
- package/dist/themes/presets/garamond.json +0 -22
- package/dist/themes/presets/garden.json +0 -23
- package/dist/themes/presets/handwritten.json +0 -23
- package/dist/themes/presets/heiti.json +0 -22
- package/dist/themes/presets/magazine.json +0 -24
- package/dist/themes/presets/manuscript.json +0 -22
- package/dist/themes/presets/minimal.json +0 -22
- package/dist/themes/presets/mixed.json +0 -24
- package/dist/themes/presets/newspaper.json +0 -24
- package/dist/themes/presets/ocean.json +0 -22
- package/dist/themes/presets/palatino.json +0 -22
- package/dist/themes/presets/rainbow.json +0 -23
- package/dist/themes/presets/space.json +0 -23
- package/dist/themes/presets/starry.json +0 -23
- package/dist/themes/presets/sunset.json +0 -22
- package/dist/themes/presets/swiss.json +0 -22
- package/dist/themes/presets/technical.json +0 -22
- package/dist/themes/presets/typewriter.json +0 -23
- package/dist/themes/presets/verdana.json +0 -22
- package/dist/themes/presets/water.json +0 -22
- package/dist/themes/registry.json +0 -270
- package/dist/themes/table-styles/academic.json +0 -30
- package/dist/themes/table-styles/borderless.json +0 -26
- package/dist/themes/table-styles/compact.json +0 -24
- package/dist/themes/table-styles/grid.json +0 -22
- package/dist/themes/table-styles/high-contrast.json +0 -22
- package/dist/themes/table-styles/minimal-gray.json +0 -26
- package/dist/themes/table-styles/modern-tech.json +0 -34
- package/dist/themes/table-styles/professional.json +0 -34
- package/dist/themes/table-styles/zebra.json +0 -22
- package/dist/types/src/utils/theme-to-css.d.ts +0 -171
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=t(/[A-Za-z]/),e=t(/[\dA-Za-z]/),u=t(/[#-'*+\--9=?A-Z^-~]/);function c(n){return n!==null&&(n<32||n===127)}var a=t(/\d/),p=t(/[\dA-Fa-f]/),s=t(/[!-/:-@[-`{-~]/);function x(n){return n!==null&&n<-2}function l(n){return n!==null&&(n<0||n===32)}function f(n){return n===-2||n===-1||n===32}var A=t(new RegExp("\\p{P}|\\p{S}","u")),g=t(/\s/);function t(n){return r;function r(i){return i!==null&&i>-1&&n.test(String.fromCharCode(i))}}export{o as a,e as b,u as c,c as d,a as e,p as f,s as g,x as h,l as i,f as j,A as k,g as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function f(l,t){let i=String(l),e=i.indexOf(t),n=e,o=0,r=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;e!==-1;)e===n?++o>r&&(r=o):o=1,n=e+t.length,e=i.indexOf(t,n);return r}export{f as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-AK6TXLWO.js";var o=class extends Error{constructor(e,s,r){super(),typeof s=="string"&&(r=s,s=void 0);let n="",t={},l=!1;if(s&&("line"in s&&"column"in s?t={place:s}:"start"in s&&"end"in s?t={place:s}:"type"in s?t={ancestors:[s],place:s.position}:t={...s}),typeof e=="string"?n=e:!t.cause&&e&&(l=!0,n=e.message,t.cause=e),!t.ruleId&&!t.source&&typeof r=="string"){let d=r.indexOf(":");d===-1?t.ruleId=r:(t.source=r.slice(0,d),t.ruleId=r.slice(d+1))}if(!t.place&&t.ancestors&&t.ancestors){let d=t.ancestors[t.ancestors.length-1];d&&(t.place=d.position)}let h=t.place&&"start"in t.place?t.place.start:t.place;this.ancestors=t.ancestors||void 0,this.cause=t.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=h?h.line:void 0,this.name=y(t.place)||"1:1",this.place=t.place||void 0,this.reason=this.message,this.ruleId=t.ruleId||void 0,this.source=t.source||void 0,this.stack=l&&t.cause&&typeof t.cause.stack=="string"?t.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};o.prototype.file="";o.prototype.name="";o.prototype.reason="";o.prototype.message="";o.prototype.stack="";o.prototype.column=void 0;o.prototype.line=void 0;o.prototype.ancestors=void 0;o.prototype.cause=void 0;o.prototype.fatal=void 0;o.prototype.place=void 0;o.prototype.ruleId=void 0;o.prototype.source=void 0;import{default as a}from"node:path";import{default as g}from"node:process";import{fileURLToPath as x}from"node:url";function f(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}var p=["history","path","basename","stem","extname","dirname"],m=class{constructor(e){let s;e?f(e)?s={path:e}:typeof e=="string"||b(e)?s={value:e}:s=e:s={},this.cwd="cwd"in s?"":g.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<p.length;){let t=p[r];t in s&&s[t]!==void 0&&s[t]!==null&&(this[t]=t==="history"?[...s[t]]:s[t])}let n;for(n in s)p.includes(n)||(this[n]=s[n])}get basename(){return typeof this.path=="string"?a.basename(this.path):void 0}set basename(e){c(e,"basename"),u(e,"basename"),this.path=a.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?a.dirname(this.path):void 0}set dirname(e){w(this.basename,"dirname"),this.path=a.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?a.extname(this.path):void 0}set extname(e){if(u(e,"extname"),w(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=a.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){f(e)&&(e=x(e)),c(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?a.basename(this.path,this.extname):void 0}set stem(e){c(e,"stem"),u(e,"stem"),this.path=a.join(this.dirname||"",e+(this.extname||""))}fail(e,s,r){let n=this.message(e,s,r);throw n.fatal=!0,n}info(e,s,r){let n=this.message(e,s,r);return n.fatal=void 0,n}message(e,s,r){let n=new o(e,s,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function u(i,e){if(i&&i.includes(a.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+a.sep+"`")}function c(i,e){if(!i)throw new Error("`"+e+"` cannot be empty")}function w(i,e){if(!i)throw new Error("Setting `"+e+"` requires `path` to be set too")}function b(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}export{o as a,m as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./chunk-IENSDROB.js";function p(n,i,u,e){let o=e?e-1:Number.POSITIVE_INFINITY,I=0;return a;function a(r){return t(r)?(n.enter(u),m(r)):i(r)}function m(r){return t(r)&&I++<o?(n.consume(r),m):(n.exit(u),i(r))}}export{p as a};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{a as X}from"./chunk-R65AQGTF.js";import{a as V,c as Q,e as Be,f as M,g as P,h as je,k as We}from"./chunk-TRGQPVRY.js";import{a as Ue}from"./chunk-LLCWR7UA.js";import{a as v}from"./chunk-PARPCLXM.js";import{a as E,b as G,d as He,h as z,i as C,j as S,k as W,l as D}from"./chunk-IENSDROB.js";import{a as N,c as qe,e as $e,f as Ve}from"./chunk-Z4LVGK7Y.js";function Y(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ee(e,n,t){let l=N((t||{}).ignore||[]),a=Et(n),r=-1;for(;++r<a.length;)$e(e,"text",u);function u(s,m){let f=-1,p;for(;++f<m.length;){let k=m[f],h=p?p.children:void 0;if(l(k,h?h.indexOf(k):void 0,p))return;p=k}if(p)return o(s,m)}function o(s,m){let f=m[m.length-1],p=a[r][0],k=a[r][1],h=0,b=f.children.indexOf(s),g=!1,d=[];p.lastIndex=0;let w=p.exec(s.value);for(;w;){let F=w.index,A={index:w.index,input:w.input,stack:[...m,s]},y=k(...w,A);if(typeof y=="string"&&(y=y.length>0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=F+1:(h!==F&&d.push({type:"text",value:s.value.slice(h,F)}),Array.isArray(y)?d.push(...y):y&&d.push(y),h=F+w[0].length,g=!0),!p.global)break;w=p.exec(s.value)}return g?(h<s.value.length&&d.push({type:"text",value:s.value.slice(h)}),f.children.splice(b,1,...d)):d=[s],b+d.length}}function Et(e){let n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!e[0]||Array.isArray(e[0])?e:[e],i=-1;for(;++i<t.length;){let l=t[i];n.push([Pt(l[0]),_t(l[1])])}return n}function Pt(e){return typeof e=="string"?new RegExp(Y(e),"g"):e}function _t(e){return typeof e=="function"?e:function(){return e}}var te="phrasing",ne=["autolink","link","image","label"];function ie(){return{transforms:[qt],enter:{literalAutolink:Ot,literalAutolinkEmail:re,literalAutolinkHttp:re,literalAutolinkWww:re},exit:{literalAutolink:Wt,literalAutolinkEmail:jt,literalAutolinkHttp:Bt,literalAutolinkWww:Ht}}}function oe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:te,notInConstruct:ne},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:te,notInConstruct:ne},{character:":",before:"[ps]",after:"\\/",inConstruct:te,notInConstruct:ne}]}}function Ot(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function re(e){this.config.enter.autolinkProtocol.call(this,e)}function Bt(e){this.config.exit.autolinkProtocol.call(this,e)}function Ht(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function jt(e){this.config.exit.autolinkEmail.call(this,e)}function Wt(e){this.exit(e)}function qt(e){ee(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$t],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ut]],{ignore:["link","linkReference"]})}function $t(e,n,t,i,l){let a="";if(!Qe(l)||(/^w/i.test(n)&&(t=n+t,n="",a="http://"),!Vt(t)))return!1;let r=Qt(t+i);if(!r[0])return!1;let u={type:"link",title:null,url:a+n+r[0],children:[{type:"text",value:n+r[0]}]};return r[1]?[u,{type:"text",value:r[1]}]:u}function Ut(e,n,t,i){return!Qe(i,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Vt(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Qt(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")"),l=X(e,"("),a=X(e,")");for(;i!==-1&&l>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function Qe(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||D(t)||W(t))&&(!n||t!==47)}Ge.peek=tn;function Gt(){this.buffer()}function Nt(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zt(){this.buffer()}function Jt(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Kt(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=M(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Xt(e){this.exit(e)}function Yt(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=M(this.sliceSerialize(e)).toLowerCase(),t.label=n}function en(e){this.exit(e)}function tn(){return"["}function Ge(e,n,t,i){let l=t.createTracker(i),a=l.move("[^"),r=t.enter("footnoteReference"),u=t.enter("reference");return a+=l.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=l.move("]"),a}function le(){return{enter:{gfmFootnoteCallString:Gt,gfmFootnoteCall:Nt,gfmFootnoteDefinitionLabelString:Zt,gfmFootnoteDefinition:Jt},exit:{gfmFootnoteCallString:Kt,gfmFootnoteCall:Xt,gfmFootnoteDefinitionLabelString:Yt,gfmFootnoteDefinition:en}}}function ae(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Ge},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,l,a,r){let u=a.createTracker(r),o=u.move("[^"),s=a.enter("footnoteDefinition"),m=a.enter("label");return o+=u.move(a.safe(a.associationId(i),{before:o,after:"]"})),m(),o+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),o+=u.move((n?`
|
|
2
|
-
`:" ")+a.indentLines(a.containerFlow(i,u.current()),n?Ne:nn))),s(),o}}function nn(e,n,t){return n===0?e:Ne(e,n,t)}function Ne(e,n,t){return(t?"":" ")+e}var rn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ze.peek=an;function ue(){return{canContainEols:["delete"],enter:{strikethrough:on},exit:{strikethrough:ln}}}function se(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rn}],handlers:{delete:Ze}}}function on(e){this.enter({type:"delete",children:[]},e)}function ln(e){this.exit(e)}function Ze(e,n,t,i){let l=t.createTracker(i),a=t.enter("strikethrough"),r=l.move("~~");return r+=t.containerPhrasing(e,{...l.current(),before:r,after:"~"}),r+=l.move("~~"),a(),r}function an(){return"~"}function un(e){return e.length}function Ke(e,n){let t=n||{},i=(t.align||[]).concat(),l=t.stringLength||un,a=[],r=[],u=[],o=[],s=0,m=-1;for(;++m<e.length;){let x=[],b=[],g=-1;for(e[m].length>s&&(s=e[m].length);++g<e[m].length;){let d=sn(e[m][g]);if(t.alignDelimiters!==!1){let w=l(d);b[g]=w,(o[g]===void 0||w>o[g])&&(o[g]=w)}x.push(d)}r[m]=x,u[m]=b}let f=-1;if(typeof i=="object"&&"length"in i)for(;++f<s;)a[f]=Je(i[f]);else{let x=Je(i);for(;++f<s;)a[f]=x}f=-1;let p=[],k=[];for(;++f<s;){let x=a[f],b="",g="";x===99?(b=":",g=":"):x===108?b=":":x===114&&(g=":");let d=t.alignDelimiters===!1?1:Math.max(1,o[f]-b.length-g.length),w=b+"-".repeat(d)+g;t.alignDelimiters!==!1&&(d=b.length+d+g.length,d>o[f]&&(o[f]=d),k[f]=d),p[f]=w}r.splice(1,0,p),u.splice(1,0,k),m=-1;let h=[];for(;++m<r.length;){let x=r[m],b=u[m];f=-1;let g=[];for(;++f<s;){let d=x[f]||"",w="",F="";if(t.alignDelimiters!==!1){let A=o[f]-(b[f]||0),y=a[f];y===114?w=" ".repeat(A):y===99?A%2?(w=" ".repeat(A/2+.5),F=" ".repeat(A/2-.5)):(w=" ".repeat(A/2),F=w):F=" ".repeat(A)}t.delimiterStart!==!1&&!f&&g.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&d==="")&&(t.delimiterStart!==!1||f)&&g.push(" "),t.alignDelimiters!==!1&&g.push(w),g.push(d),t.alignDelimiters!==!1&&g.push(F),t.padding!==!1&&g.push(" "),(t.delimiterEnd!==!1||f!==s-1)&&g.push("|")}h.push(t.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return h.join(`
|
|
3
|
-
`)}function sn(e){return e==null?"":String(e)}function Je(e){let n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Xe(e,n,t,i){let l=t.enter("blockquote"),a=t.createTracker(i);a.move("> "),a.shift(2);let r=t.indentLines(t.containerFlow(e,a.current()),fn);return l(),r}function fn(e,n,t){return">"+(t?"":" ")+e}function et(e,n){return Ye(e,n.inConstruct,!0)&&!Ye(e,n.notInConstruct,!1)}function Ye(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++i<n.length;)if(e.includes(n[i]))return!0;return!1}function fe(e,n,t,i){let l=-1;for(;++l<t.unsafe.length;)if(t.unsafe[l].character===`
|
|
4
|
-
`&&et(t.stack,t.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
5
|
-
`}function tt(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function nt(e){let n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function rt(e,n,t,i){let l=nt(t),a=e.value||"",r=l==="`"?"GraveAccent":"Tilde";if(tt(e,t)){let f=t.enter("codeIndented"),p=t.indentLines(a,cn);return f(),p}let u=t.createTracker(i),o=l.repeat(Math.max(Ue(a,l)+1,3)),s=t.enter("codeFenced"),m=u.move(o);if(e.lang){let f=t.enter(`codeFencedLang${r}`);m+=u.move(t.safe(e.lang,{before:m,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){let f=t.enter(`codeFencedMeta${r}`);m+=u.move(" "),m+=u.move(t.safe(e.meta,{before:m,after:`
|
|
6
|
-
`,encode:["`"],...u.current()})),f()}return m+=u.move(`
|
|
7
|
-
`),a&&(m+=u.move(a+`
|
|
8
|
-
`)),m+=u.move(o),s(),m}function cn(e,n,t){return(t?"":" ")+e}function _(e){let n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function it(e,n,t,i){let l=_(t),a=l==='"'?"Quote":"Apostrophe",r=t.enter("definition"),u=t.enter("label"),o=t.createTracker(i),s=o.move("[");return s+=o.move(t.safe(t.associationId(e),{before:s,after:"]",...o.current()})),s+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),s+=o.move("<"),s+=o.move(t.safe(e.url,{before:s,after:">",...o.current()})),s+=o.move(">")):(u=t.enter("destinationRaw"),s+=o.move(t.safe(e.url,{before:s,after:e.title?" ":`
|
|
9
|
-
`,...o.current()}))),u(),e.title&&(u=t.enter(`title${a}`),s+=o.move(" "+l),s+=o.move(t.safe(e.title,{before:s,after:l,...o.current()})),s+=o.move(l),u()),r(),s}function ot(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function I(e){return"&#x"+e.toString(16).toUpperCase()+";"}function O(e,n,t){let i=P(e),l=P(n);return i===void 0?l===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ce.peek=mn;function ce(e,n,t,i){let l=ot(t),a=t.enter("emphasis"),r=t.createTracker(i),u=r.move(l),o=r.move(t.containerPhrasing(e,{after:l,before:u,...r.current()})),s=o.charCodeAt(0),m=O(i.before.charCodeAt(i.before.length-1),s,l);m.inside&&(o=I(s)+o.slice(1));let f=o.charCodeAt(o.length-1),p=O(i.after.charCodeAt(0),f,l);p.inside&&(o=o.slice(0,-1)+I(f));let k=r.move(l);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:m.outside},u+o+k}function mn(e,n,t){return t.options.emphasis||"*"}function lt(e,n){let t=!1;return Ve(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,qe}),!!((!e.depth||e.depth<3)&&V(e)&&(n.options.setext||t))}function at(e,n,t,i){let l=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(lt(e,t)){let m=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:`
|
|
10
|
-
`,after:`
|
|
11
|
-
`});return f(),m(),p+`
|
|
12
|
-
`+(l===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
13
|
-
`))+1))}let r="#".repeat(l),u=t.enter("headingAtx"),o=t.enter("phrasing");a.move(r+" ");let s=t.containerPhrasing(e,{before:"# ",after:`
|
|
14
|
-
`,...a.current()});return/^[\t ]/.test(s)&&(s=I(s.charCodeAt(0))+s.slice(1)),s=s?r+" "+s:r,t.options.closeAtx&&(s+=" "+r),o(),u(),s}me.peek=hn;function me(e){return e.value||""}function hn(){return"<"}he.peek=pn;function he(e,n,t,i){let l=_(t),a=l==='"'?"Quote":"Apostrophe",r=t.enter("image"),u=t.enter("label"),o=t.createTracker(i),s=o.move("![");return s+=o.move(t.safe(e.alt,{before:s,after:"]",...o.current()})),s+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),s+=o.move("<"),s+=o.move(t.safe(e.url,{before:s,after:">",...o.current()})),s+=o.move(">")):(u=t.enter("destinationRaw"),s+=o.move(t.safe(e.url,{before:s,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=t.enter(`title${a}`),s+=o.move(" "+l),s+=o.move(t.safe(e.title,{before:s,after:l,...o.current()})),s+=o.move(l),u()),s+=o.move(")"),r(),s}function pn(){return"!"}pe.peek=kn;function pe(e,n,t,i){let l=e.referenceType,a=t.enter("imageReference"),r=t.enter("label"),u=t.createTracker(i),o=u.move("!["),s=t.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(s+"]["),r();let m=t.stack;t.stack=[],r=t.enter("reference");let f=t.safe(t.associationId(e),{before:o,after:"]",...u.current()});return r(),t.stack=m,a(),l==="full"||!s||s!==f?o+=u.move(f+"]"):l==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function kn(){return"!"}ke.peek=gn;function ke(e,n,t){let i=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<t.unsafe.length;){let r=t.unsafe[a],u=t.compilePattern(r),o;if(r.atBreak)for(;o=u.exec(i);){let s=o.index;i.charCodeAt(s)===10&&i.charCodeAt(s-1)===13&&s--,i=i.slice(0,s)+" "+i.slice(o.index+1)}}return l+i+l}function gn(){return"`"}function ge(e,n){let t=V(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}xe.peek=xn;function xe(e,n,t,i){let l=_(t),a=l==='"'?"Quote":"Apostrophe",r=t.createTracker(i),u,o;if(ge(e,t)){let m=t.stack;t.stack=[],u=t.enter("autolink");let f=r.move("<");return f+=r.move(t.containerPhrasing(e,{before:f,after:">",...r.current()})),f+=r.move(">"),u(),t.stack=m,f}u=t.enter("link"),o=t.enter("label");let s=r.move("[");return s+=r.move(t.containerPhrasing(e,{before:s,after:"](",...r.current()})),s+=r.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),s+=r.move("<"),s+=r.move(t.safe(e.url,{before:s,after:">",...r.current()})),s+=r.move(">")):(o=t.enter("destinationRaw"),s+=r.move(t.safe(e.url,{before:s,after:e.title?" ":")",...r.current()}))),o(),e.title&&(o=t.enter(`title${a}`),s+=r.move(" "+l),s+=r.move(t.safe(e.title,{before:s,after:l,...r.current()})),s+=r.move(l),o()),s+=r.move(")"),u(),s}function xn(e,n,t){return ge(e,t)?"<":"["}be.peek=bn;function be(e,n,t,i){let l=e.referenceType,a=t.enter("linkReference"),r=t.enter("label"),u=t.createTracker(i),o=u.move("["),s=t.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(s+"]["),r();let m=t.stack;t.stack=[],r=t.enter("reference");let f=t.safe(t.associationId(e),{before:o,after:"]",...u.current()});return r(),t.stack=m,a(),l==="full"||!s||s!==f?o+=u.move(f+"]"):l==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function bn(){return"["}function B(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function ut(e){let n=B(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function st(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Z(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function ft(e,n,t,i){let l=t.enter("list"),a=t.bulletCurrent,r=e.ordered?st(t):B(t),u=e.ordered?r==="."?")":".":ut(t),o=n&&t.bulletLastUsed?r===t.bulletLastUsed:!1;if(!e.ordered){let m=e.children?e.children[0]:void 0;if((r==="*"||r==="-")&&m&&(!m.children||!m.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(o=!0),Z(t)===r&&m){let f=-1;for(;++f<e.children.length;){let p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(r=u),t.bulletCurrent=r;let s=t.containerFlow(e,i);return t.bulletLastUsed=r,t.bulletCurrent=a,l(),s}function ct(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function mt(e,n,t,i){let l=ct(t),a=t.bulletCurrent||B(t);n&&n.type==="list"&&n.ordered&&(a=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let r=a.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(r=Math.ceil(r/4)*4);let u=t.createTracker(i);u.move(a+" ".repeat(r-a.length)),u.shift(r);let o=t.enter("listItem"),s=t.indentLines(t.containerFlow(e,u.current()),m);return o(),s;function m(f,p,k){return p?(k?"":" ".repeat(r))+f:(k?a:a+" ".repeat(r-a.length))+f}}function ht(e,n,t,i){let l=t.enter("paragraph"),a=t.enter("phrasing"),r=t.containerPhrasing(e,i);return a(),l(),r}var de=N(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function pt(e,n,t,i){return(e.children.some(function(r){return de(r)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function kt(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}we.peek=dn;function we(e,n,t,i){let l=kt(t),a=t.enter("strong"),r=t.createTracker(i),u=r.move(l+l),o=r.move(t.containerPhrasing(e,{after:l,before:u,...r.current()})),s=o.charCodeAt(0),m=O(i.before.charCodeAt(i.before.length-1),s,l);m.inside&&(o=I(s)+o.slice(1));let f=o.charCodeAt(o.length-1),p=O(i.after.charCodeAt(0),f,l);p.inside&&(o=o.slice(0,-1)+I(f));let k=r.move(l+l);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:m.outside},u+o+k}function dn(e,n,t){return t.options.strong||"*"}function gt(e,n,t,i){return t.safe(e.value,i)}function xt(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function bt(e,n,t){let i=(Z(t)+(t.options.ruleSpaces?" ":"")).repeat(xt(t));return t.options.ruleSpaces?i.slice(0,-1):i}var q={blockquote:Xe,break:fe,code:rt,definition:it,emphasis:ce,hardBreak:fe,heading:at,html:me,image:he,imageReference:pe,inlineCode:ke,link:xe,linkReference:be,list:ft,listItem:mt,paragraph:ht,root:pt,strong:we,text:gt,thematicBreak:bt};function ye(){return{enter:{table:wn,tableData:dt,tableHeader:dt,tableRow:yn},exit:{codeText:An,table:Cn,tableData:Ce,tableHeader:Ce,tableRow:Ce}}}function wn(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Cn(e){this.exit(e),this.data.inTable=void 0}function yn(e){this.enter({type:"tableRow",children:[]},e)}function Ce(e){this.exit(e)}function dt(e){this.enter({type:"tableCell",children:[]},e)}function An(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Fn));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Fn(e,n){return n==="|"?n:e}function Ae(e){let n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,l=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
15
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:r,tableCell:o,tableRow:u}};function r(k,h,x,b){return s(m(k,x,b),k.align)}function u(k,h,x,b){let g=f(k,x,b),d=s([g]);return d.slice(0,d.indexOf(`
|
|
16
|
-
`))}function o(k,h,x,b){let g=x.enter("tableCell"),d=x.enter("phrasing"),w=x.containerPhrasing(k,{...b,before:a,after:a});return d(),g(),w}function s(k,h){return Ke(k,{align:h,alignDelimiters:i,padding:t,stringLength:l})}function m(k,h,x){let b=k.children,g=-1,d=[],w=h.enter("table");for(;++g<b.length;)d[g]=f(b[g],h,x);return w(),d}function f(k,h,x){let b=k.children,g=-1,d=[],w=h.enter("tableRow");for(;++g<b.length;)d[g]=o(b[g],k,h,x);return w(),d}function p(k,h,x){let b=q.inlineCode(k,h,x);return x.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Fe(){return{exit:{taskListCheckValueChecked:wt,taskListCheckValueUnchecked:wt,paragraph:vn}}}function ve(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Tn}}}function wt(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function vn(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let i=t.children[0];if(i&&i.type==="text"){let l=n.children,a=-1,r;for(;++a<l.length;){let u=l[a];if(u.type==="paragraph"){r=u;break}}r===t&&(i.value=i.value.slice(1),i.value.length===0?t.children.shift():t.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,t.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function Tn(e,n,t,i){let l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",r="["+(e.checked?"x":" ")+"] ",u=t.createTracker(i);a&&u.move(r);let o=q.listItem(e,n,t,{...i,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),o;function s(m){return m+r}}function Te(){return[ie(),le(),ue(),ye(),Fe()]}function Le(e){return{extensions:[oe(),ae(e),se(),Ae(e),ve()]}}var Ln={tokenize:zn,partial:!0},Ct={tokenize:Rn,partial:!0},yt={tokenize:En,partial:!0},At={tokenize:Pn,partial:!0},Sn={tokenize:_n,partial:!0},Ft={name:"wwwAutolink",tokenize:In,previous:Tt},vt={name:"protocolAutolink",tokenize:Mn,previous:Lt},L={name:"emailAutolink",tokenize:Dn,previous:St},T={};function De(){return{text:T}}var R=48;for(;R<123;)T[R]=L,R++,R===58?R=65:R===91&&(R=97);T[43]=L;T[45]=L;T[46]=L;T[95]=L;T[72]=[L,vt];T[104]=[L,vt];T[87]=[L,Ft];T[119]=[L,Ft];function Dn(e,n,t){let i=this,l,a;return r;function r(f){return!Se(f)||!St.call(i,i.previous)||Ie(i.events)?t(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return Se(f)?(e.consume(f),u):f===64?(e.consume(f),o):t(f)}function o(f){return f===46?e.check(Sn,m,s)(f):f===45||f===95||G(f)?(a=!0,e.consume(f),o):m(f)}function s(f){return e.consume(f),l=!0,o}function m(f){return a&&l&&E(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(f)):t(f)}}function In(e,n,t){let i=this;return l;function l(r){return r!==87&&r!==119||!Tt.call(i,i.previous)||Ie(i.events)?t(r):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ln,e.attempt(Ct,e.attempt(yt,a),t),t)(r))}function a(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(r)}}function Mn(e,n,t){let i=this,l="",a=!1;return r;function r(f){return(f===72||f===104)&&Lt.call(i,i.previous)&&!Ie(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(f),e.consume(f),u):t(f)}function u(f){if(E(f)&&l.length<5)return l+=String.fromCodePoint(f),e.consume(f),u;if(f===58){let p=l.toLowerCase();if(p==="http"||p==="https")return e.consume(f),o}return t(f)}function o(f){return f===47?(e.consume(f),a?s:(a=!0,o)):t(f)}function s(f){return f===null||He(f)||C(f)||D(f)||W(f)?t(f):e.attempt(Ct,e.attempt(yt,m),t)(f)}function m(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(f)}}function zn(e,n,t){let i=0;return l;function l(r){return(r===87||r===119)&&i<3?(i++,e.consume(r),l):r===46&&i===3?(e.consume(r),a):t(r)}function a(r){return r===null?t(r):n(r)}}function Rn(e,n,t){let i,l,a;return r;function r(s){return s===46||s===95?e.check(At,o,u)(s):s===null||C(s)||D(s)||s!==45&&W(s)?o(s):(a=!0,e.consume(s),r)}function u(s){return s===95?i=!0:(l=i,i=void 0),e.consume(s),r}function o(s){return l||i||!a?t(s):n(s)}}function En(e,n){let t=0,i=0;return l;function l(r){return r===40?(t++,e.consume(r),l):r===41&&i<t?a(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?e.check(At,n,a)(r):r===null||C(r)||D(r)?n(r):(e.consume(r),l)}function a(r){return r===41&&i++,e.consume(r),l}}function Pn(e,n,t){return i;function i(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),i):u===38?(e.consume(u),a):u===93?(e.consume(u),l):u===60||u===null||C(u)||D(u)?n(u):t(u)}function l(u){return u===null||u===40||u===91||C(u)||D(u)?n(u):i(u)}function a(u){return E(u)?r(u):t(u)}function r(u){return u===59?(e.consume(u),i):E(u)?(e.consume(u),r):t(u)}}function _n(e,n,t){return i;function i(a){return e.consume(a),l}function l(a){return G(a)?t(a):n(a)}}function Tt(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||C(e)}function Lt(e){return!E(e)}function St(e){return!(e===47||Se(e))}function Se(e){return e===43||e===45||e===46||e===95||G(e)}function Ie(e){let n=e.length,t=!1;for(;n--;){let i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){t=!0;break}if(i._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var On={tokenize:Un,partial:!0};function Me(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Wn,continuation:{tokenize:qn},exit:$n}},text:{91:{name:"gfmFootnoteCall",tokenize:jn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Bn,resolveTo:Hn}}}}function Bn(e,n,t){let i=this,l=i.events.length,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),r;for(;l--;){let o=i.events[l][1];if(o.type==="labelImage"){r=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!r||!r._balanced)return t(o);let s=M(i.sliceSerialize({start:r.end,end:i.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?t(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),n(o))}}function Hn(e,n){let t=e.length,i;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){i=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let l={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let r={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},r.start),end:Object.assign({},r.end)},o=[e[t+1],e[t+2],["enter",l,n],e[t+3],e[t+4],["enter",a,n],["exit",a,n],["enter",r,n],["enter",u,n],["exit",u,n],["exit",r,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(t,e.length-t+1,...o),e}function jn(e,n,t){let i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),a=0,r;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),o}function o(f){return f!==94?t(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(f){if(a>999||f===93&&!r||f===null||f===91||C(f))return t(f);if(f===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return l.includes(M(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return C(f)||(r=!0),a++,e.consume(f),f===92?m:s}function m(f){return f===91||f===92||f===93?(e.consume(f),a++,s):s(f)}}function Wn(e,n,t){let i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),a,r=0,u;return o;function o(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):t(h)}function m(h){if(r>999||h===93&&!u||h===null||h===91||C(h))return t(h);if(h===93){e.exit("chunkString");let x=e.exit("gfmFootnoteDefinitionLabelString");return a=M(i.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return C(h)||(u=!0),r++,e.consume(h),h===92?f:m}function f(h){return h===91||h===92||h===93?(e.consume(h),r++,m):m(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l.includes(a)||l.push(a),v(e,k,"gfmFootnoteDefinitionWhitespace")):t(h)}function k(h){return n(h)}}function qn(e,n,t){return e.check(We,n,e.attempt(On,n,t))}function $n(e){e.exit("gfmFootnoteDefinition")}function Un(e,n,t){let i=this;return v(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){let r=i.events[i.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?n(a):t(a)}}function ze(e){let t=(e||{}).singleTilde,i={name:"strikethrough",tokenize:a,resolveAll:l};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(r,u){let o=-1;for(;++o<r.length;)if(r[o][0]==="enter"&&r[o][1].type==="strikethroughSequenceTemporary"&&r[o][1]._close){let s=o;for(;s--;)if(r[s][0]==="exit"&&r[s][1].type==="strikethroughSequenceTemporary"&&r[s][1]._open&&r[o][1].end.offset-r[o][1].start.offset===r[s][1].end.offset-r[s][1].start.offset){r[o][1].type="strikethroughSequence",r[s][1].type="strikethroughSequence";let m={type:"strikethrough",start:Object.assign({},r[s][1].start),end:Object.assign({},r[o][1].end)},f={type:"strikethroughText",start:Object.assign({},r[s][1].end),end:Object.assign({},r[o][1].start)},p=[["enter",m,u],["enter",r[s][1],u],["exit",r[s][1],u],["enter",f,u]],k=u.parser.constructs.insideSpan.null;k&&Q(p,p.length,0,je(k,r.slice(s+1,o),u)),Q(p,p.length,0,[["exit",f,u],["enter",r[o][1],u],["exit",r[o][1],u],["exit",m,u]]),Q(r,s-1,o-s+3,p),o=s+p.length-2;break}}for(o=-1;++o<r.length;)r[o][1].type==="strikethroughSequenceTemporary"&&(r[o][1].type="data");return r}function a(r,u,o){let s=this.previous,m=this.events,f=0;return p;function p(h){return s===126&&m[m.length-1][1].type!=="characterEscape"?o(h):(r.enter("strikethroughSequenceTemporary"),k(h))}function k(h){let x=P(s);if(h===126)return f>1?o(h):(r.consume(h),f++,k);if(f<2&&!t)return o(h);let b=r.exit("strikethroughSequenceTemporary"),g=P(h);return b._open=!g||g===2&&!!x,b._close=!x||x===2&&!!g,u(h)}}}var J=class{constructor(){this.map=[]}add(n,t,i){Vn(this,n,t,i)}consume(n){if(this.map.sort(function(a,r){return a[0]-r[0]}),this.map.length===0)return;let t=this.map.length,i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let l=i.pop();for(;l;){for(let a of l)n.push(a);l=i.pop()}this.map.length=0}};function Vn(e,n,t,i){let l=0;if(!(t===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===n){e.map[l][1]+=t,e.map[l][2].push(...i);return}l+=1}e.map.push([n,t,i])}}function Dt(e,n){let t=!1,i=[];for(;n<e.length;){let l=e[n];if(t){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return i}function Re(){return{flow:{null:{name:"table",tokenize:Qn,resolveAll:Gn}}}}function Qn(e,n,t){let i=this,l=0,a=0,r;return u;function u(c){let j=i.events.length-1;for(;j>-1;){let Oe=i.events[j][1].type;if(Oe==="lineEnding"||Oe==="linePrefix")j--;else break}let Pe=j>-1?i.events[j][1].type:null,_e=Pe==="tableHead"||Pe==="tableRow"?y:o;return _e===y&&i.parser.lazy[i.now().line]?t(c):_e(c)}function o(c){return e.enter("tableHead"),e.enter("tableRow"),s(c)}function s(c){return c===124||(r=!0,a+=1),m(c)}function m(c){return c===null?t(c):z(c)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),k):t(c):S(c)?v(e,m,"whitespace")(c):(a+=1,r&&(r=!1,l+=1),c===124?(e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),r=!0,m):(e.enter("data"),f(c)))}function f(c){return c===null||c===124||C(c)?(e.exit("data"),m(c)):(e.consume(c),c===92?p:f)}function p(c){return c===92||c===124?(e.consume(c),f):f(c)}function k(c){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(c):(e.enter("tableDelimiterRow"),r=!1,S(c)?v(e,h,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):h(c))}function h(c){return c===45||c===58?b(c):c===124?(r=!0,e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),x):A(c)}function x(c){return S(c)?v(e,b,"whitespace")(c):b(c)}function b(c){return c===58?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(c),e.exit("tableDelimiterMarker"),g):c===45?(a+=1,g(c)):c===null||z(c)?F(c):A(c)}function g(c){return c===45?(e.enter("tableDelimiterFiller"),d(c)):A(c)}function d(c){return c===45?(e.consume(c),d):c===58?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(c),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(c))}function w(c){return S(c)?v(e,F,"whitespace")(c):F(c)}function F(c){return c===124?h(c):c===null||z(c)?!r||l!==a?A(c):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(c)):A(c)}function A(c){return t(c)}function y(c){return e.enter("tableRow"),$(c)}function $(c){return c===124?(e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),$):c===null||z(c)?(e.exit("tableRow"),n(c)):S(c)?v(e,$,"whitespace")(c):(e.enter("data"),U(c))}function U(c){return c===null||c===124||C(c)?(e.exit("data"),$(c)):(e.consume(c),c===92?Rt:U)}function Rt(c){return c===92||c===124?(e.consume(c),U):U(c)}}function Gn(e,n){let t=-1,i=!0,l=0,a=[0,0,0,0],r=[0,0,0,0],u=!1,o=0,s,m,f,p=new J;for(;++t<e.length;){let k=e[t],h=k[1];k[0]==="enter"?h.type==="tableHead"?(u=!1,o!==0&&(It(p,n,o,s,m),m=void 0,o=0),s={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(t,0,[["enter",s,n]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(i=!0,f=void 0,a=[0,0,0,0],r=[0,t+1,0,0],u&&(u=!1,m={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(t,0,[["enter",m,n]])),l=h.type==="tableDelimiterRow"?2:m?3:1):l&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(i=!1,r[2]===0&&(a[1]!==0&&(r[0]=r[1],f=K(p,n,a,l,void 0,f),a=[0,0,0,0]),r[2]=t)):h.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(r[0]=r[1],f=K(p,n,a,l,void 0,f)),a=r,r=[a[1],t,0,0])):h.type==="tableHead"?(u=!0,o=t):h.type==="tableRow"||h.type==="tableDelimiterRow"?(o=t,a[1]!==0?(r[0]=r[1],f=K(p,n,a,l,t,f)):r[1]!==0&&(f=K(p,n,r,l,t,f)),l=0):l&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(r[3]=t)}for(o!==0&&It(p,n,o,s,m),p.consume(n.events),t=-1;++t<n.events.length;){let k=n.events[t];k[0]==="enter"&&k[1].type==="table"&&(k[1]._align=Dt(n.events,t))}return e}function K(e,n,t,i,l,a){let r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",u="tableContent";t[0]!==0&&(a.end=Object.assign({},H(n.events,t[0])),e.add(t[0],0,[["exit",a,n]]));let o=H(n.events,t[1]);if(a={type:r,start:Object.assign({},o),end:Object.assign({},o)},e.add(t[1],0,[["enter",a,n]]),t[2]!==0){let s=H(n.events,t[2]),m=H(n.events,t[3]),f={type:u,start:Object.assign({},s),end:Object.assign({},m)};if(e.add(t[2],0,[["enter",f,n]]),i!==2){let p=n.events[t[2]],k=n.events[t[3]];if(p[1].end=Object.assign({},k[1].end),p[1].type="chunkText",p[1].contentType="text",t[3]>t[2]+1){let h=t[2]+1,x=t[3]-t[2]-1;e.add(h,x,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return l!==void 0&&(a.end=Object.assign({},H(n.events,l)),e.add(l,0,[["exit",a,n]]),a=void 0),a}function It(e,n,t,i,l){let a=[],r=H(n.events,t);l&&(l.end=Object.assign({},r),a.push(["exit",l,n])),i.end=Object.assign({},r),a.push(["exit",i,n]),e.add(t+1,0,a)}function H(e,n){let t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}var Nn={name:"tasklistCheck",tokenize:Zn};function Ee(){return{text:{91:Nn}}}function Zn(e,n,t){let i=this;return l;function l(o){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return C(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),r):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),r):t(o)}function r(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):t(o)}function u(o){return z(o)?n(o):S(o)?e.check({tokenize:Jn},n,t)(o):t(o)}}function Jn(e,n,t){return v(e,i,"whitespace");function i(l){return l===null?t(l):n(l)}}function Mt(e){return Be([De(),Me(),ze(e),Re(),Ee()])}var Kn={};function zt(e){let n=this,t=e||Kn,i=n.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(Mt(t)),a.push(Te()),r.push(Le(t))}export{ee as a,zt as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function r(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let o=0,n=t.indexOf(e);for(;n!==-1;)o++,n=t.indexOf(e,n+e.length);return o}export{r as a};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-AK6TXLWO.js";import{A as $e,B as me,C as xe,D as E,E as Te,a as Oe,b as de,c as ce,d as He,e as Me,f as fe,h as De,i as he,j as Ne,k as Ve,l as je,m as Se,n as Ie,o as Ce,p as pe,q as Qe,r as Ue,s as qe,t as We,u as Ge,v as Je,w as Ke,x as Xe,y as Ye,z as Ze}from"./chunk-TRGQPVRY.js";import{a as $}from"./chunk-PARPCLXM.js";import{h as Z}from"./chunk-IENSDROB.js";import{c as It}from"./chunk-NM6J3ND7.js";function ke(n,t){let i=Number.parseInt(n,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"\uFFFD":String.fromCodePoint(i)}var et={tokenize:Ct};function Ct(n){let t=n.attempt(this.parser.constructs.contentInitial,r,a),i;return t;function r(d){if(d===null){n.consume(d);return}return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),$(n,t,"linePrefix")}function a(d){return n.enter("paragraph"),o(d)}function o(d){let u=n.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=u),i=u,c(d)}function c(d){if(d===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(d);return}return Z(d)?(n.consume(d),n.exit("chunkText"),o):(n.consume(d),c)}}var nt={tokenize:Tt},tt={tokenize:_t};function Tt(n){let t=this,i=[],r=0,a,o,c;return d;function d(h){if(r<i.length){let C=i[r];return t.containerState=C[1],n.attempt(C[0].continuation,u,x)(h)}return x(h)}function u(h){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&Q();let C=t.events.length,T=C,I;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){I=t.events[T][1].end;break}O(r);let B=C;for(;B<t.events.length;)t.events[B][1].end={...I},B++;return ce(t.events,T+1,0,t.events.slice(C)),t.events.length=B,x(h)}return d(h)}function x(h){if(r===i.length){if(!a)return w(h);if(a.currentConstruct&&a.currentConstruct.concrete)return V(h);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},n.check(tt,l,y)(h)}function l(h){return a&&Q(),O(r),w(h)}function y(h){return t.parser.lazy[t.now().line]=r!==i.length,c=t.now().offset,V(h)}function w(h){return t.containerState={},n.attempt(tt,v,V)(h)}function v(h){return r++,i.push([t.currentConstruct,t.containerState]),w(h)}function V(h){if(h===null){a&&Q(),O(0),n.consume(h);return}return a=a||t.parser.flow(t.now()),n.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),j(h)}function j(h){if(h===null){L(n.exit("chunkFlow"),!0),O(0),n.consume(h);return}return Z(h)?(n.consume(h),L(n.exit("chunkFlow")),r=0,t.interrupt=void 0,d):(n.consume(h),j)}function L(h,C){let T=t.sliceStream(h);if(C&&T.push(null),h.previous=o,o&&(o.next=h),o=h,a.defineSkip(h.start),a.write(T),t.parser.lazy[h.start.line]){let I=a.events.length;for(;I--;)if(a.events[I][1].start.offset<c&&(!a.events[I][1].end||a.events[I][1].end.offset>c))return;let B=t.events.length,P=B,b,_;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(b){_=t.events[P][1].end;break}b=!0}for(O(r),I=B;I<t.events.length;)t.events[I][1].end={..._},I++;ce(t.events,P+1,0,t.events.slice(B)),t.events.length=I}}function O(h){let C=i.length;for(;C-- >h;){let T=i[C];t.containerState=T[1],T[0].exit.call(t,n)}i.length=h}function Q(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function _t(n,t,i){return $(n,n.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var it={tokenize:Et};function Et(n){let t=this,i=n.attempt(Ve,r,n.attempt(this.parser.constructs.flowInitial,a,$(n,n.attempt(this.parser.constructs.flow,a,n.attempt(qe,a)),"linePrefix")));return i;function r(o){if(o===null){n.consume(o);return}return n.enter("lineEndingBlank"),n.consume(o),n.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function a(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),t.currentConstruct=void 0,i}}var rt={resolveAll:ct()},ot=at("string"),st=at("text");function at(n){return{resolveAll:ct(n==="text"?Ft:void 0),tokenize:t};function t(i){let r=this,a=this.parser.constructs[n],o=i.attempt(a,c,d);return c;function c(l){return x(l)?o(l):d(l)}function d(l){if(l===null){i.consume(l);return}return i.enter("data"),i.consume(l),u}function u(l){return x(l)?(i.exit("data"),o(l)):(i.consume(l),u)}function x(l){if(l===null)return!0;let y=a[l],w=-1;if(y)for(;++w<y.length;){let v=y[w];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function ct(n){return t;function t(i,r){let a=-1,o;for(;++a<=i.length;)o===void 0?i[a]&&i[a][1].type==="data"&&(o=a,a++):(!i[a]||i[a][1].type!=="data")&&(a!==o+2&&(i[o][1].end=i[a-1][1].end,i.splice(o+2,a-o-2),a=o+2),o=void 0);return n?n(i,r):i}}function Ft(n,t){let i=0;for(;++i<=n.length;)if((i===n.length||n[i][1].type==="lineEnding")&&n[i-1][1].type==="data"){let r=n[i-1][1],a=t.sliceStream(r),o=a.length,c=-1,d=0,u;for(;o--;){let x=a[o];if(typeof x=="string"){for(c=x.length;x.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(x===-2)u=!0,d++;else if(x!==-1){o++;break}}if(t._contentTypeTextTrailing&&i===n.length&&(d=0),d){let x={type:i===n.length||u||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:r.start._bufferIndex+c,_index:r.start._index+o,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...x.start},r.start.offset===r.end.offset?Object.assign(r,x):(n.splice(i,0,["enter",x,t],["exit",x,t]),i+=2)}i++}return n}var _e={};It(_e,{attentionMarkers:()=>Ot,contentInitial:()=>vt,disable:()=>Ht,document:()=>zt,flow:()=>At,flowInitial:()=>Bt,insideSpan:()=>Lt,string:()=>Rt,text:()=>Pt});var zt={42:E,43:E,45:E,48:E,49:E,50:E,51:E,52:E,53:E,54:E,55:E,56:E,57:E,62:je},vt={91:We},Bt={[-2]:pe,[-1]:pe,32:pe},At={35:Je,42:xe,45:[Te,xe],60:Ke,61:Te,95:xe,96:Ce,126:Ce},Rt={38:Ie,92:Se},Pt={[-5]:me,[-4]:me,[-3]:me,33:Ze,38:Ie,42:he,60:[Ne,Xe],91:$e,92:[Ge,Se],93:Ye,95:he,96:Qe},Lt={null:[he,rt]},Ot={null:[42,95]},Ht={null:[]};function lt(n,t,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0},a={},o=[],c=[],d=[],u=!0,x={attempt:b(B),check:b(P),consume:C,enter:T,exit:I,interrupt:b(P,{interrupt:!0})},l={code:null,containerState:{},defineSkip:O,events:[],now:L,parser:n,previous:null,sliceSerialize:V,sliceStream:j,write:v},y=t.tokenize.call(l,x),w;return t.resolveAll&&o.push(t),l;function v(p){return c=He(c,p),Q(),c[c.length-1]!==null?[]:(_(t,0),l.events=De(o,l.events,l),l.events)}function V(p,k){return Dt(j(p),k)}function j(p){return Mt(c,p)}function L(){let{_bufferIndex:p,_index:k,line:F,column:A,offset:U}=r;return{_bufferIndex:p,_index:k,line:F,column:A,offset:U}}function O(p){a[p.line]=p.column,G()}function Q(){let p;for(;r._index<c.length;){let k=c[r._index];if(typeof k=="string")for(p=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===p&&r._bufferIndex<k.length;)h(k.charCodeAt(r._bufferIndex));else h(k)}}function h(p){u=void 0,w=p,y=y(p)}function C(p){Z(p)?(r.line++,r.column=1,r.offset+=p===-3?2:1,G()):p!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=p,u=!0}function T(p,k){let F=k||{};return F.type=p,F.start=L(),l.events.push(["enter",F,l]),d.push(F),F}function I(p){let k=d.pop();return k.end=L(),l.events.push(["exit",k,l]),k}function B(p,k){_(p,k.from)}function P(p,k){k.restore()}function b(p,k){return F;function F(A,U,J){let ee,K,le,te;return Array.isArray(A)?ne(A):"tokenize"in A?ne([A]):ye(A);function ye(S){return re;function re(H){let q=H!==null&&S[H],X=H!==null&&S.null,be=[...Array.isArray(q)?q:q?[q]:[],...Array.isArray(X)?X:X?[X]:[]];return ne(be)(H)}}function ne(S){return ee=S,K=0,S.length===0?J:ie(S[K])}function ie(S){return re;function re(H){return te=ge(),le=S,S.partial||(l.currentConstruct=S),S.name&&l.parser.constructs.disable.null.includes(S.name)?ue(H):S.tokenize.call(k?Object.assign(Object.create(l),k):l,x,we,ue)(H)}}function we(S){return u=!0,p(le,te),U}function ue(S){return u=!0,te.restore(),++K<ee.length?ie(ee[K]):J}}}function _(p,k){p.resolveAll&&!o.includes(p)&&o.push(p),p.resolve&&ce(l.events,k,l.events.length-k,p.resolve(l.events.slice(k),l)),p.resolveTo&&(l.events=p.resolveTo(l.events,l))}function ge(){let p=L(),k=l.previous,F=l.currentConstruct,A=l.events.length,U=Array.from(d);return{from:A,restore:J};function J(){r=p,l.previous=k,l.currentConstruct=F,l.events.length=A,d=U,G()}}function G(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Mt(n,t){let i=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex,c;if(i===a)c=[n[i].slice(r,o)];else{if(c=n.slice(i,a),r>-1){let d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}o>0&&c.push(n[a].slice(0,o))}return c}function Dt(n,t){let i=-1,r=[],a;for(;++i<n.length;){let o=n[i],c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
2
|
-
`;break}case-3:{c=`\r
|
|
3
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&a)continue;c=" ";break}default:c=String.fromCharCode(o)}a=o===-2,r.push(c)}return r.join("")}function Ee(n){let r={constructs:Me([_e,...(n||{}).extensions||[]]),content:a(et),defined:[],document:a(nt),flow:a(it),lazy:{},string:a(ot),text:a(st)};return r;function a(o){return c;function c(d){return lt(r,o,d)}}}function Fe(n){for(;!Ue(n););return n}var ut=/[\0\t\n\r]/g;function ze(){let n=1,t="",i=!0,r;return a;function a(o,c,d){let u=[],x,l,y,w,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),y=0,t="",i&&(o.charCodeAt(0)===65279&&y++,i=void 0);y<o.length;){if(ut.lastIndex=y,x=ut.exec(o),w=x&&x.index!==void 0?x.index:o.length,v=o.charCodeAt(w),!x){t=o.slice(y);break}if(v===10&&y===w&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),y<w&&(u.push(o.slice(y,w)),n+=w-y),v){case 0:{u.push(65533),n++;break}case 9:{for(l=Math.ceil(n/4)*4,u.push(-2);n++<l;)u.push(-1);break}case 10:{u.push(-4),n=1;break}default:r=!0,n=1}y=w+1}return d&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}var Nt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dt(n){return n.replace(Nt,Vt)}function Vt(n,t,i){if(t)return t;if(i.charCodeAt(0)===35){let a=i.charCodeAt(1),o=a===120||a===88;return ke(i.slice(o?2:1),o?16:10)}return de(i)||n}var ht={}.hasOwnProperty;function ve(n,t,i){return typeof t!="string"&&(i=t,t=void 0),jt(i)(Fe(Ee(i).document().write(ze()(n,t,!0))))}function jt(n){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Pe),autolinkProtocol:b,autolinkEmail:b,atxHeading:o(Be),blockQuote:o(H),characterEscape:b,characterReference:b,codeFenced:o(q),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(q,c),codeText:o(X,c),codeTextData:b,data:b,codeFlowValue:b,definition:o(be),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(xt),hardBreakEscape:o(Ae),hardBreakTrailing:o(Ae),htmlFlow:o(Re,c),htmlFlowData:b,htmlText:o(Re,c),htmlTextData:b,image:o(kt),label:c,link:o(Pe),listItem:o(gt),listItemValue:w,listOrdered:o(Le,y),listUnordered:o(Le),paragraph:o(yt),reference:ye,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Be),strong:o(wt),thematicBreak:o(St)},exit:{atxHeading:u(),atxHeadingSequence:T,autolink:u(),autolinkEmail:re,autolinkProtocol:S,blockQuote:u(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:we,characterReference:ue,codeFenced:u(L),codeFencedFence:j,codeFencedFenceInfo:v,codeFencedFenceMeta:V,codeFlowValue:_,codeIndented:u(O),codeText:u(F),codeTextData:_,data:_,definition:u(),definitionDestinationString:C,definitionLabelString:Q,definitionTitleString:h,emphasis:u(),hardBreakEscape:u(G),hardBreakTrailing:u(G),htmlFlow:u(p),htmlFlowData:_,htmlText:u(k),htmlTextData:_,image:u(U),label:ee,labelText:J,lineEnding:ge,link:u(A),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ne,resourceDestinationString:K,resourceTitleString:le,resource:te,setextHeading:u(P),setextHeadingLineSequence:B,setextHeadingText:I,strong:u(),thematicBreak:u()}};pt(t,(n||{}).mdastExtensions||[]);let i={};return r;function r(e){let s={type:"root",children:[]},f={stack:[s],tokenStack:[],config:t,enter:d,exit:x,buffer:c,resume:l,data:i},m=[],g=-1;for(;++g<e.length;)if(e[g][1].type==="listOrdered"||e[g][1].type==="listUnordered")if(e[g][0]==="enter")m.push(g);else{let R=m.pop();g=a(e,R,g)}for(g=-1;++g<e.length;){let R=t[e[g][0]];ht.call(R,e[g][1].type)&&R[e[g][1].type].call(Object.assign({sliceSerialize:e[g][2].sliceSerialize},f),e[g][1])}if(f.tokenStack.length>0){let R=f.tokenStack[f.tokenStack.length-1];(R[1]||ft).call(f,void 0,R[0])}for(s.position={start:N(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:N(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},g=-1;++g<t.transforms.length;)s=t.transforms[g](s)||s;return s}function a(e,s,f){let m=s-1,g=-1,R=!1,W,M,oe,se;for(;++m<=f;){let z=e[m];switch(z[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{z[0]==="enter"?g++:g--,se=void 0;break}case"lineEndingBlank":{z[0]==="enter"&&(W&&!se&&!g&&!oe&&(oe=m),se=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:se=void 0}if(!g&&z[0]==="enter"&&z[1].type==="listItemPrefix"||g===-1&&z[0]==="exit"&&(z[1].type==="listUnordered"||z[1].type==="listOrdered")){if(W){let Y=m;for(M=void 0;Y--;){let D=e[Y];if(D[1].type==="lineEnding"||D[1].type==="lineEndingBlank"){if(D[0]==="exit")continue;M&&(e[M][1].type="lineEndingBlank",R=!0),D[1].type="lineEnding",M=Y}else if(!(D[1].type==="linePrefix"||D[1].type==="blockQuotePrefix"||D[1].type==="blockQuotePrefixWhitespace"||D[1].type==="blockQuoteMarker"||D[1].type==="listItemIndent"))break}oe&&(!M||oe<M)&&(W._spread=!0),W.end=Object.assign({},M?e[M][1].start:z[1].end),e.splice(M||m,0,["exit",W,z[2]]),m++,f++}if(z[1].type==="listItemPrefix"){let Y={type:"listItem",_spread:!1,start:Object.assign({},z[1].start),end:void 0};W=Y,e.splice(m,0,["enter",Y,z[2]]),m++,f++,oe=void 0,se=!0}}}return e[s][1]._spread=R,f}function o(e,s){return f;function f(m){d.call(this,e(m),m),s&&s.call(this,m)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(e,s,f){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([s,f||void 0]),e.position={start:N(s.start),end:void 0}}function u(e){return s;function s(f){e&&e.call(this,f),x.call(this,f)}}function x(e,s){let f=this.stack.pop(),m=this.tokenStack.pop();if(m)m[0].type!==e.type&&(s?s.call(this,e,m[0]):(m[1]||ft).call(this,e,m[0]));else throw new Error("Cannot close `"+e.type+"` ("+ae({start:e.start,end:e.end})+"): it\u2019s not open");f.position.end=N(e.end)}function l(){return Oe(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function w(e){if(this.data.expectingFirstListItemValue){let s=this.stack[this.stack.length-2];s.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function v(){let e=this.resume(),s=this.stack[this.stack.length-1];s.lang=e}function V(){let e=this.resume(),s=this.stack[this.stack.length-1];s.meta=e}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){let e=this.resume(),s=this.stack[this.stack.length-1];s.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){let e=this.resume(),s=this.stack[this.stack.length-1];s.value=e.replace(/(\r?\n|\r)$/g,"")}function Q(e){let s=this.resume(),f=this.stack[this.stack.length-1];f.label=s,f.identifier=fe(this.sliceSerialize(e)).toLowerCase()}function h(){let e=this.resume(),s=this.stack[this.stack.length-1];s.title=e}function C(){let e=this.resume(),s=this.stack[this.stack.length-1];s.url=e}function T(e){let s=this.stack[this.stack.length-1];if(!s.depth){let f=this.sliceSerialize(e).length;s.depth=f}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function B(e){let s=this.stack[this.stack.length-1];s.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function b(e){let f=this.stack[this.stack.length-1].children,m=f[f.length-1];(!m||m.type!=="text")&&(m=bt(),m.position={start:N(e.start),end:void 0},f.push(m)),this.stack.push(m)}function _(e){let s=this.stack.pop();s.value+=this.sliceSerialize(e),s.position.end=N(e.end)}function ge(e){let s=this.stack[this.stack.length-1];if(this.data.atHardBreak){let f=s.children[s.children.length-1];f.position.end=N(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(s.type)&&(b.call(this,e),_.call(this,e))}function G(){this.data.atHardBreak=!0}function p(){let e=this.resume(),s=this.stack[this.stack.length-1];s.value=e}function k(){let e=this.resume(),s=this.stack[this.stack.length-1];s.value=e}function F(){let e=this.resume(),s=this.stack[this.stack.length-1];s.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let s=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=s,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function U(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let s=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=s,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function J(e){let s=this.sliceSerialize(e),f=this.stack[this.stack.length-2];f.label=dt(s),f.identifier=fe(s).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],s=this.resume(),f=this.stack[this.stack.length-1];if(this.data.inReference=!0,f.type==="link"){let m=e.children;f.children=m}else f.alt=s}function K(){let e=this.resume(),s=this.stack[this.stack.length-1];s.url=e}function le(){let e=this.resume(),s=this.stack[this.stack.length-1];s.title=e}function te(){this.data.inReference=void 0}function ye(){this.data.referenceType="collapsed"}function ne(e){let s=this.resume(),f=this.stack[this.stack.length-1];f.label=s,f.identifier=fe(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function ie(e){this.data.characterReferenceType=e.type}function we(e){let s=this.sliceSerialize(e),f=this.data.characterReferenceType,m;f?(m=ke(s,f==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):m=de(s);let g=this.stack[this.stack.length-1];g.value+=m}function ue(e){let s=this.stack.pop();s.position.end=N(e.end)}function S(e){_.call(this,e);let s=this.stack[this.stack.length-1];s.url=this.sliceSerialize(e)}function re(e){_.call(this,e);let s=this.stack[this.stack.length-1];s.url="mailto:"+this.sliceSerialize(e)}function H(){return{type:"blockquote",children:[]}}function q(){return{type:"code",lang:null,meta:null,value:""}}function X(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function Be(){return{type:"heading",depth:0,children:[]}}function Ae(){return{type:"break"}}function Re(){return{type:"html",value:""}}function kt(){return{type:"image",title:null,url:"",alt:null}}function Pe(){return{type:"link",title:null,url:"",children:[]}}function Le(e){return{type:"list",ordered:e.type==="listOrdered",start:null,spread:e._spread,children:[]}}function gt(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function yt(){return{type:"paragraph",children:[]}}function wt(){return{type:"strong",children:[]}}function bt(){return{type:"text",value:""}}function St(){return{type:"thematicBreak"}}}function N(n){return{line:n.line,column:n.column,offset:n.offset}}function pt(n,t){let i=-1;for(;++i<t.length;){let r=t[i];Array.isArray(r)?pt(n,r):Qt(n,r)}}function Qt(n,t){let i;for(i in t)if(ht.call(t,i))switch(i){case"canContainEols":{let r=t[i];r&&n[i].push(...r);break}case"transforms":{let r=t[i];r&&n[i].push(...r);break}case"enter":case"exit":{let r=t[i];r&&Object.assign(n[i],r);break}}}function ft(n,t){throw n?new Error("Cannot close `"+n.type+"` ("+ae({start:n.start,end:n.end})+"): a different token (`"+t.type+"`, "+ae({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ae({start:t.start,end:t.end})+") is still open")}function mt(n){let t=this;t.parser=i;function i(r){return ve(r,{...t.data("settings"),...n,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}export{mt as a};
|