intlayer-editor 9.4.4 → 9.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/CodeBlockShiki-BEeimB71.js +2 -0
- package/client/dist/assets/MarkDownRender-DKvUNxNK.js +1 -0
- package/client/dist/assets/MarkDownRender-DhMlgm14.js +25 -0
- package/client/dist/assets/{MarkdownEditor-DWz0fVZF.js → MarkdownEditor-JjkRh9Wo.js} +54 -54
- package/client/dist/assets/{dist-CMBnegHe.js → dist-BMR831Ty.js} +1 -1
- package/client/dist/assets/dist-CcmWBeAo.js +1 -0
- package/client/dist/assets/dynamic-Cl5uPODm.js +41 -0
- package/client/dist/assets/index-CXSTru2g.js +108 -0
- package/client/dist/assets/index-CmHcNYMx.css +2 -0
- package/client/dist/assets/purify.es-7fJ1DZ6H.js +3 -0
- package/client/dist/assets/react-CwJFpaho.js +1 -0
- package/client/dist/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/client/dist/assets/{shikiBundle-C2Pc5KKu.js → shikiBundle-CJIKzMGl.js} +1 -1
- package/client/dist/index.html +6 -5
- package/package.json +16 -17
- package/client/dist/assets/CodeBlockShiki-Bjm0Ego0.js +0 -2
- package/client/dist/assets/MarkDownRender-DL6ufzaY.js +0 -1
- package/client/dist/assets/MarkDownRender-clRAHZLd.js +0 -23
- package/client/dist/assets/dist-DmXGrB9_.js +0 -1
- package/client/dist/assets/dynamic-D3VGB1Rn.js +0 -41
- package/client/dist/assets/index-BNSCZ8xm.js +0 -108
- package/client/dist/assets/index-DB7qjJFL.css +0 -2
- package/client/dist/assets/purify.es-ChwZkWde.js +0 -3
- package/client/dist/assets/react-SIfiwpqq.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shikiBundle-CJIKzMGl.js","assets/rolldown-runtime-hePW80VL.js","assets/MarkDownRender-DhMlgm14.js","assets/react-CwJFpaho.js","assets/dynamic-Cl5uPODm.js","assets/dist-CcmWBeAo.js","assets/index-CXSTru2g.js","assets/index-CmHcNYMx.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{n}from"./dist-CcmWBeAo.js";import{c as r,o as i,r as a,s as o}from"./MarkDownRender-DhMlgm14.js";import{l as s}from"./index-CXSTru2g.js";var c=e(t(),1),l=n(),u=async(e,t)=>{let{codeToHtml:n}=await s(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-CJIKzMGl.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([0,1,2,3,4,5,6,7]));return n(String(e),{lang:i(t).id,themes:a,defaultColor:!1})},d=({children:e,lang:t})=>{let[n,i]=(0,c.useState)(null);return(0,c.useEffect)(()=>{let n=!1;return u(e,t).then(e=>{n||i(e)}).catch(e=>{console.error(`Failed to highlight code:`,e),n||i(``)}),()=>{n=!0}},[e,t]),(0,l.jsx)(`div`,{className:r,children:n?(0,l.jsx)(`div`,{dangerouslySetInnerHTML:{__html:n}}):(0,l.jsx)(o,{children:e})})};export{d as CodeBlockShiki};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./MarkDownRender-DhMlgm14.js";export{e as MarkdownRenderer};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-BEeimB71.js","assets/rolldown-runtime-hePW80VL.js","assets/react-CwJFpaho.js","assets/dist-CcmWBeAo.js","assets/index-CXSTru2g.js","assets/dynamic-Cl5uPODm.js","assets/index-CmHcNYMx.css","assets/astro-JHDYjn39.js","assets/json-B88Oqtu5.js","assets/javascript-BzbQS41l.js","assets/typescript-j_1H8WHN.js","assets/css-LbU1hoFO.js","assets/postcss-D_Wz94rJ.js","assets/tsx-BOvsFOI6.js","assets/css-CdtkT07m.js","assets/html-DYtkB_T1.js","assets/html-B2cKP6UN.js","assets/javascript-Yelw-5ZN.js","assets/json-CaljABEy.js","assets/svelte-tEuLYt3E.js","assets/tsx-5f3ulCja.js","assets/typescript-Utq2Cl8c.js","assets/vue-Bg0byEaI.js","assets/shikiBundle-CJIKzMGl.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{A as n,N as r,P as i,St as a,a as o,c as s,et as c,i as l,j as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,tt as y,u as b}from"./dynamic-Cl5uPODm.js";import{n as x,t as S}from"./dist-CcmWBeAo.js";import{l as C}from"./index-CXSTru2g.js";var w={blockQuote:`0`,breakLine:`1`,breakThematic:`2`,codeBlock:`3`,codeFenced:`4`,codeInline:`5`,footnote:`6`,footnoteReference:`7`,gfmTask:`8`,heading:`9`,headingSetext:`10`,htmlBlock:`11`,htmlComment:`12`,htmlSelfClosing:`13`,customComponent:`34`,image:`14`,link:`15`,linkAngleBraceStyleDetector:`16`,linkBareUrlDetector:`17`,newlineCoalescer:`19`,orderedList:`20`,paragraph:`21`,ref:`22`,refImage:`23`,refLink:`24`,table:`25`,tableSeparator:`26`,text:`27`,textBolded:`28`,textEmphasized:`29`,textEscaped:`30`,textMarked:`31`,textStrikethroughed:`32`,unorderedList:`33`},T={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},E={BLOCK:1,INLINE:2,BOTH:3},D=E.BLOCK,O=E.INLINE,k=E.BOTH,A=`allowFullScreen.allowTransparency.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),j={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},ee=[`style`,`script`,`pre`],te=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],ne=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,re=/\n{2,}$/,ie=/^(\s*>[\s\S]*?)(?=\n\n|$)/,ae=/^ *> ?/gm,oe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,se=/^(?=( {2,}))\1\n/,ce=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,le=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n((?:[^\n]*(?:\n|$))*?)(?:\1\n?|$)/,ue=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,de=/^([ \t]*)(`{3,}|~{3,})/,fe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,pe=/^(?:\n *)*\n/,me=/\r\n?/g,he=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,ge=/^\[\^([^\]]+)]/,_e=/\f/g,ve=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,ye=/^\s*?\[(x|\s)\]/,be=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,xe=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Se=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Ce=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,we=/^<!--[\s\S]*?(?:-->)/,Te=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Ee=/^\{.*\}$/,De=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Oe=/^<([^ >]+[:@/][^ >]+)>/,ke=/-([a-z])?/gi,Ae=/^(\|[^\n]*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:[^\n]*\|[^\n]*\n)*))?\n?/,je=/(^ *\||\| *$)/g,Me=/^ *:-+: *$/,Ne=/^ *:-+ *$/,Pe=/^ *-+: *$/,Fe=/^[^\n]+(?: {2}\n|\n{2,})/,Ie=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Le=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Re=/^\[([^\]]*)\] ?\[([^\]]*)\]/,ze=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Be=/\t/g,Ve=/^\n+/,He=/^\n*([ \t]*)/,M=`(?:\\d+\\.)`,Ue=`(?:[*+-])`,We=/^\\([^0-9A-Za-z\s])/,Ge=/\\([^0-9A-Za-z\s])/g,Ke=/^(:[a-zA-Z0-9-_]+:)/,N=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,P="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",qe=RegExp(`^([*_])\\1${N(1)}${P}\\1\\1(?!\\1)`),Je=RegExp(`^([*_])${N(0)}${P}\\1(?!\\1)`),Ye=RegExp(`^(==)${N(0)}${P}\\1`),Xe=RegExp(`^(~~)${N(0)}${P}\\1`),Ze=e=>`( *)(`+(e===1?M:Ue)+`) +`,Qe=Ze(1),$e=Ze(2),et=e=>RegExp(`^`+(e===1?Qe:$e)),tt=et(1),nt=et(2),rt=e=>RegExp(`^`+(e===1?Qe:$e)+`[^\\n]*(?:\\n(?!\\1`+(e===1?M:Ue)+` )[^\\n]*)*(\\n|$)`,`gm`),it=rt(1),at=rt(2),ot=e=>{let t=e===1?M:Ue;return RegExp(`^( *)(`+t+`) (?=[\\s\\S])(?:[^\\n]*(?:\\n|$))+?(?:\\n+(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*$)`)},st=ot(1),ct=ot(2),F=e=>{let t=e.length;for(;t>0&&e.charCodeAt(t-1)<=32;)t--;return t===e.length?e:e.slice(0,t)},I=(e,t)=>e.startsWith(t),lt=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},L=e=>e&&e.indexOf(`\\`)!==-1?e.replace(Ge,`$1`):e,ut=(...e)=>e.filter(Boolean).join(` `),R=(e,t,n)=>{if(t.indexOf(`.`)===-1)return e?.[t]??n;let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r??n},dt=[[/[ÀÁÂÃÄÅàáâãä忯]/g,`a`],[/[çÇ]/g,`c`],[/[ðÐ]/g,`d`],[/[ÈÉÊËéèêë]/g,`e`],[/[ÏïÎîÍíÌì]/g,`i`],[/[Ññ]/g,`n`],[/[øØœŒÕõÔôÓóÒò]/g,`o`],[/[ÜüÛûÚúÙù]/g,`u`],[/[ŸÿÝý]/g,`y`]],ft=/[\u0080-\uffff]/,pt=/[^a-z0-9- ]/gi,mt=/ /g,ht=e=>{let t=e;if(ft.test(t))for(let e=0;e<dt.length;e++){let[n,r]=dt[e];t=t.replace(n,r)}return t=t.replace(pt,``).replace(mt,`-`),t.toLowerCase()},gt=/(javascript|vbscript|data(?!:image)):/i,_t=/[^A-Za-z0-9/:]/g,vt=e=>{if(e.indexOf(`:`)===-1&&e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(_t,``);if(gt.test(t))return console.warn(`Input contains an unsafe JavaScript/VBScript/data expression, it will not be rendered.`,t),null}catch{return console.warn(`Input could not be decoded due to malformed syntax or characters, it will not be rendered.`,e),null}return e},yt=e=>{let t=e;return t.indexOf(` `)!==-1&&(t=t.replace(Be,` `)),t.indexOf(`\r`)!==-1&&(t=t.replace(me,`
|
|
3
|
+
`)),t.indexOf(`\f`)!==-1&&(t=t.replace(_e,``)),t},bt=(e,t)=>{if(!t)return e;let n=e.split(`
|
|
4
|
+
`),r=null,i=(e,t)=>t&&e.startsWith(t)?e.slice(t.length):e;return n.map(e=>{let n=e.match(de);if(!r)return n&&(r={indentation:n[1],marker:n[2]}),i(e,t);let a=n?.[2]?.startsWith(r.marker),{indentation:o}=r;return a&&(r=null),i(e,o)}).join(`
|
|
5
|
+
`)},xt=e=>(e.indexOf(`-`)!==-1&&e.match(Te)===null&&(e=e.replace(ke,(e,t)=>t.toUpperCase())),e),St=e=>{let t=[],n=``,r=!1,i=!1,a=``;if(!e)return t;for(let o=0;o<e.length;o++){let s=e[o];if((s===`"`||s===`'`)&&!r&&(i?s===a&&(i=!1,a=``):(i=!0,a=s)),s===`(`&&n.endsWith(`url`)?r=!0:s===`)`&&r&&(r=!1),s===`;`&&!i&&!r){let e=n.trim();if(e){let n=e.indexOf(`:`);if(n>0){let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();t.push([r,i])}}n=``}else n+=s}let o=n.trim();if(o){let e=o.indexOf(`:`);if(e>0){let n=o.slice(0,e).trim(),r=o.slice(e+1).trim();t.push([n,r])}}return t},Ct=(e,t,n,r)=>t===`style`?St(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):te.indexOf(t)===-1?(n.match(Ee)&&(n=L(n.slice(1,n.length-1))),n===`true`||n!==`false`&&n):r(L(n),e,t),wt=e=>e.indexOf(`:`)===-1?`left`:Pe.test(e)?`right`:Me.test(e)?`center`:(Ne.test(e),`left`),Tt=e=>e.replace(je,``).split(`|`).map(wt),Et=(e,t,n,r)=>{let i=n.inTable;n.inTable=!0;let a=0,o=e.length;for(;a<o;){let t=e.charCodeAt(a);if(t===32||t===9)a++;else break}for(;o>a;){let t=e.charCodeAt(o-1);if(t===32||t===9)o--;else break}if(a<o&&e.charCodeAt(a)===124&&a++,o>a&&e.charCodeAt(o-1)===124&&(o-2<a||e.charCodeAt(o-2)!==92)&&o--,!r){let r=t(e.slice(a,o),n);return n.inTable=i,[r]}let s=[],c=e.length,l=a,u=a,d=(r,i)=>{let a=e.slice(r,i).trim();return a===``?[]:t(a,n)},f=-1,p=-1,m=-1;for(;u<o;){if(f<u){let t=e.indexOf(`|`,u);f=t===-1?c:t}if(p<u){let t=e.indexOf(`\\`,u);p=t===-1?c:t}if(m<u){let t=e.indexOf("`",u);m=t===-1?c:t}if(u=Math.min(f,p,m),u>=o)break;if(u===p){u+=u+1<o?2:1;continue}if(u===m){let t=0;for(;u<o&&e.charCodeAt(u)===96;)t++,u++;let n=!1;for(;u<o&&!n;){let r=0;for(;u<o&&e.charCodeAt(u)===96;)r++,u++;r===t?n=!0:r===0&&u++}continue}s.push(d(l,u)),u++,l=u}return s.push(d(l,o)),n.inTable=i,s},Dt=(e,t,n)=>{if(!e)return[];let r=[],i=0,a=e.length;for(;i<a;){let o=e.indexOf(`
|
|
6
|
+
`,i);o===-1&&(o=a);let s=e.slice(i,o);i=o+1;let c=!1;for(let e=0;e<s.length;e++){let t=s.charCodeAt(e);if(t!==32&&t!==9&&t!==13){c=!0;break}}c&&r.push(Et(s,t,n,!0))}return r},Ot=(e,t,n)=>{if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(I(e,n[t]))return!0;return!1}return n(e,t)},z=e=>(e.inline=1,e),B=e=>z((t,n)=>n.inline?e.exec(t):null),V=e=>z((t,n)=>n.inline||n.simple?e.exec(t):null),H=e=>(t,n)=>n.inline||n.simple?null:e.exec(t),U=e=>z((t,n)=>typeof e==`function`?e(t,n):e.exec(t)),W=(e,t,n)=>{let r=n.inline??!1,i=n.simple??!1;n.inline=!0,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a},kt=(e,t,n)=>{let r=n.inline??!1,i=n.simple??!1;n.inline=!1,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a},At=(e,t,n={})=>{let r=n.inline||!1;n.inline=!1;let i=F(t),a=e(/\n\n$/.test(i)===!1?i.endsWith(`
|
|
7
|
+
`)?`${i}\n`:`${i}\n\n`:i,n);return n.inline=r,a},G=(e,t,n)=>({children:W(t,e[2]??``,n)}),K=()=>({}),q=()=>null,jt=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`?r(t):r.test(t))return!0}return!1},Mt=(e,t)=>{let n=t.charCodeAt(t.length-1);if(e.prevCaptureHasBlankLine!==!0&&(e.prevCaptureHasBlankLine=t.indexOf(`
|
|
8
|
+
|
|
9
|
+
`)!==-1||e.prevCaptureHasBlankLine!==void 0&&t.charCodeAt(0)===10&&e.prevCaptureIndent===``),n!==32&&n!==10){e.prevCaptureIndent=void 0;return}let r=t.lastIndexOf(`
|
|
10
|
+
`),i=r===-1?e.prevCaptureIndent===void 0?void 0:e.prevCaptureIndent===``?t:e.prevCaptureIndent+t:t.slice(r+1);if(i===void 0||i===``){e.prevCaptureIndent=i;return}for(let t=0;t<i.length;t++)if(i.charCodeAt(t)!==32){e.prevCaptureIndent=void 0;return}e.prevCaptureIndent=i},Nt=e=>{let t=Object.keys(e).sort((t,n)=>e[t]._order-e[n]._order||+t-n),n=t.length,r=Array(n),i=Array(n),a=Array(n),o=Array(n),s=Array(n),c=Array(n),l=[],u=[];for(let d=0;d<n;d++){let n=e[t[d]],f=n._qualify;i[d]=n._match,a[d]=n._parse;let p=n._scope,m=p!==O,h=p!==D;s[d]=m,c[d]=h,n._firstChars&&n._firstChars.length>0?o[d]=n._firstChars:Array.isArray(f)&&f.length>0&&f.every(e=>e.length>0)?(o[d]=f.map(e=>e.charCodeAt(0)),f.every(e=>e.length===1)&&(f=void 0)):(o[d]=null,m&&l.push(d),h&&u.push(d)),r[d]=f}let d=Array(128),f=Array(128);for(let e=0;e<128;e++){let t=[],r=[];for(let i=0;i<n;i++){let n=s[i],a=c[i],l=o[i];n&&(!l||l.includes(e))&&t.push(i),a&&(!l||l.includes(e))&&r.push(i)}d[e]=t,f[e]=r}let p=(e,n={})=>{let o=[],s=!!(n.inline||n.simple);n.prevCaptureHasBlankLine===void 0&&(n.prevCaptureIndent=``);let c=!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==10&&n!==13){c=!0;break}}if(c){let c=s?f:d,m=s?u:l;for(;e;){let s=e.charCodeAt(0),l=s<128?c[s]:m,u=l.length,d=!1;for(let s=0;s<u;s++){let c=l[s],u=r[c];if(u&&!Ot(e,n,u))continue;let f=i[c](e,n);if(f?.[0]){e=e.slice(f[0].length);let r=a[c](f,p,n);Mt(n,f[0]);let i=r.type||t[c];r.type=i;let s=o.length;if(i===w.text){if(!r.text){d=!0;break}if(s>0&&o[s-1].type===w.text){o[s-1].text+=r.text,d=!0;break}}o.push(r),d=!0;break}}if(!d)break}}return o};return(e,t)=>p(yt(e),t)},Pt=e=>{let t=(n,r={})=>{if(!Array.isArray(n))return e(n,t,r);let i=r.key,a=[],o=!1,s=0;for(let i=0;i<n.length;i++){r.key=s;let c=n[i],l=Array.isArray(c)?t(c,r):e(c,t,r),u=typeof l==`string`;u&&o?a[a.length-1]=a[a.length-1]+l:l!==null&&(a.push(l),s++),o=u}return r.key=i,a};return t},Ft=(e,t)=>{let n={};for(let t in e)n[t]=e[t]?._render;return t?(e,r,i)=>{let a=n[e.type];return t(()=>a?.(e,r,i),e,r,i)}:(e,t,r)=>{let i=n[e.type];return i?i(e,t,r):void 0}},J=(e,t)=>{let n=e.length,r=t;for(;r<n;){let t=e.charCodeAt(r);if(t===62)return r;if(t===34||t===39){let i=r+1;for(;i<n&&e.charCodeAt(i)!==t&&e.charCodeAt(i)!==10;)i++;r=e.charCodeAt(i)===t?i+1:r+1;continue}r++}return-1},It=e=>e>=65&&e<=90?e+32:e,Lt=(e,t,n)=>{for(let r=0;r<t.length;r++)if(It(e.charCodeAt(n+r))!==It(t.charCodeAt(r)))return!1;return!0},Y=(e,t,n,r,i)=>{if(!r){let r=e.indexOf(t,n);return r===-1||r>=i?-1:r}let a=Math.min(i,e.length-t.length+1),o=n;for(;o<a;){let n=e.indexOf(`<`,o);if(n===-1||n>=a)return-1;if(Lt(e,t,n))return n;o=n+1}return-1},Rt=(e,t,n,r,i)=>{let a=[e.slice(0,t),n,r,i];return a.index=0,a.input=e,a},zt=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57,Bt=e=>{let t=0;for(;e.charCodeAt(t)===32;)t++;return e.charCodeAt(t)===60?t:-1},Vt=(e,t)=>{let n=Bt(e);if(n===-1)return null;let r=n+1,i=r,a=e.charCodeAt(r);if(t){if(a<65||a>90)return null;for(;i<e.length&&zt(e.charCodeAt(i));)i++}else{if(!(a>=65&&a<=90||a>=97&&a<=122))return null;for(;i<e.length;){let t=e.charCodeAt(i);if(t===32||t===9||t===10||t===13||t===62||t===47)break;i++}}let o=e.slice(r,i),s=J(e,i);if(s===-1||!t&&e.charCodeAt(s-1)===47)return null;let c=s+1;e.charCodeAt(c)===10&&c++;let l=`<${o}`,u=`</${o}`,d=1,f=c,p=e.length,m=-1,h=-1;for(;f<p;){let n=Y(e,u,f,!t,p);if(n===-1)return null;let r=Y(e,l,f,!t,n);if(r!==-1){let t=e.charCodeAt(r+l.length);if(t===32||t===9||t===10||t===13||t===62||t===47){let t=J(e,r+l.length);if(t===-1)return null;d++,f=t+1}else f=r+1;continue}if(e.charCodeAt(n+u.length)!==62){f=n+1;continue}let i=n+u.length+1;if(d--,d>0){f=i;continue}if(Y(e,u,i,!t,p)===i&&e.charCodeAt(i+u.length)===62){d=1,f=i;continue}m=n,h=i;break}if(h===-1)return null;for(;e.charCodeAt(h)===10;)h++;return Rt(e,h,o,e.slice(i,s),e.slice(c,m))},Ht=e=>{let t=Bt(e);if(t===-1)return null;let n=t+1,r=e.charCodeAt(n);if(!(r>=65&&r<=90||r>=97&&r<=122))return null;let i=n+1;for(;i<e.length&&(zt(e.charCodeAt(i))||e.charCodeAt(i)===58);)i++;let a=e.charCodeAt(i),o=a===32||a===9||a===10||a===13,s;if(o){if(s=J(e,i),s===-1)return null}else if(s=e.charCodeAt(i)===47?i+1:i,e.charCodeAt(s)!==62)return null;let c=e.slice(n,i),l=s+1;if(e.charCodeAt(l)===60&&e.charCodeAt(l+1)===47&&Lt(e,c,l+2)&&e.charCodeAt(l+2+c.length)===62)return null;let u=l,d=l;for(;d<e.length;){let t=e.charCodeAt(d);if(t!==32&&t!==9&&t!==10&&t!==13)break;d++,e.charCodeAt(d-1)===10&&(u=d)}return Rt(e,u,c,o?e.slice(i+1,s):void 0,u>l?e.slice(l,u):void 0)},Ut=e=>Vt(e,!1),Wt=e=>Vt(e,!0),Gt=e=>Ut(e)!==null,Kt=e=>Ht(e)!==null,qt=e=>Wt(e)!==null,Jt=e=>Gt(e)||Kt(e),Yt=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Xt=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Zt=e=>{let t=null;if(Object.keys(e).length===0)return e=>e;let n=new Map;return r=>{if(typeof r!=`string`)return r;let i=n.get(r);if(i!==void 0)return i;let a=R(e,r);if(a)return n.set(r,a),a;if(!t){t=new Map;for(let n of Object.keys(e)){let e=n.toLowerCase();t.has(e)||t.set(e,n)}}let o=t.get(r.toLowerCase()),s=(o?R(e,o):void 0)||r;return n.set(r,s),s}},Qt=e=>t=>e.slugify?e.slugify(t,ht):ht(t),$t=(e,t)=>{let{runtime:n,components:r={}}=e,i=Zt(r),a=t.tagfilter?new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]):null,o=e=>{if(`class`in e)return!0;for(let t in e)if(e[t]==null)return!0;return!1};return(e,t,...r)=>{let s=typeof e==`string`;if(a&&s&&(a.has(e)||a.has(e.toLowerCase())))return null;let c;if(!t)c={};else if(!o(t))c=t;else{let e=ut(t.className,t.class),n={},r=!1;for(let i in t){let a=t[i];a!=null&&(i===`className`||i===`class`?r||=(e&&(n.className=e),!0):n[i]=a)}!r&&e&&(n.className=e),c=n}n.normalizeProps&&s&&(c=n.normalizeProps(e,c));let l=i(e);return n.createElement(l,c,...r)}},en=()=>({footnotes:[],references:{}}),tn=8,X=[],nn=(e,t,n,r)=>e.parseOnly===r&&e.ctx.runtime===t.runtime&&e.ctx.components===t.components&&e.ctx.namedCodesToUnicode===t.namedCodesToUnicode&&e.ctx.sanitizer===t.sanitizer&&e.ctx.slugify===t.slugify&&e.options.disableAutoLink===n.disableAutoLink&&e.options.disableParsingRawHTML===n.disableParsingRawHTML&&e.options.enforceAtxHeadings===n.enforceAtxHeadings&&e.options.tagfilter===n.tagfilter&&e.options.renderRule===n.renderRule,rn=(e,t,n)=>{for(let r=0;r<X.length;r++){let i=X[r];if(nn(i,e,t,n))return r>0&&(X.splice(r,1),X.unshift(i)),i}let r={current:en()},i=n?dn:$t(e,t),a=fn(i,e,t,r),o={ctx:e,options:t,parseOnly:n,createElement:i,scope:r,parse:Nt(a),emit:Pt(Ft(a,t.renderRule))};return X.unshift(o),X.length>tn&&X.pop(),o},an=(e,t,n)=>{let r=e.current;e.current=t;try{return n()}finally{e.current=r}},on=(e,t,n,r,i,a,o)=>{let s=Qt(t),c=t.sanitizer??vt,l=t.namedCodesToUnicode?{...j,...t.namedCodesToUnicode}:j,u=(t,n,r,o=k)=>({_scope:o,_qualify:[`<`],_match:U(t),_order:n,_parse(e,t,n){let o=e[3]??``,s=bt(o,o.match(He)?.[1]??``),c=a(s)?At:W,l=(e[1]??``).trim(),u=l.toLowerCase(),d=r&&ee.indexOf(u)!==-1,f=d?u:l,p={attrs:i(f,e[2]??``),noInnerParse:d,tag:f};if(r&&(n.inAnchor=n.inAnchor||u===`a`),d)p.text=o;else{let e=n.inHTML;n.inHTML=!0,p.children=c(t,s,n),n.inHTML=e}return r&&(n.inAnchor=!1),p},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}}),d=t=>{let n=t===1,r=n?st:ct,i=n?it:at,a=n?tt:nt;return{_scope:k,_firstChars:n?[32,9,48,49,50,51,52,53,54,55,56,57]:[32,9,42,43,45],_qualify:(e,t)=>t.prevCaptureIndent!==void 0&&!!(t.list??(!t.inline&&!t.simple))&&a.test(e),_match:z((e,t)=>{let n=t.prevCaptureIndent,i=n!==void 0,a=t.list??(!t.inline&&!t.simple);if(i&&a){let t=n?n+e:e,i=r.exec(t);if(!i)return null;if(n&&i[0].startsWith(n)){let e=[...i];return e[0]=i[0].slice(n.length),e.fullMatch=i[0],e}return i}return null}),_order:T.HIGH,_parse(e,t,r){let o=e[2]??``,s=n?+o.slice(0,-1):void 0,c=(e.fullMatch??e[0]??``).replace(re,`
|
|
11
|
+
`).match(i);if(!c)return{items:[],ordered:n,start:s};let l=!1;return{items:c.map((e,n)=>{let i=a.exec(e),o=i?i[0].length:0,s=o<=8?sn[o]:RegExp(`^ {1,${o}}`,`gm`),u=e.slice(o).replace(s,``),d=n===c.length-1,f=u.indexOf(`
|
|
12
|
+
|
|
13
|
+
`)!==-1||d&&l;l=f;let p=r.inline,m=r.list;r.list=!0;let h;f?(r.inline=!1,h=`${F(u)}\n\n`):(r.inline=!0,h=F(u));let g=t(h,r);return r.inline=p,r.list=m,g}),ordered:n,start:s}},_render(t,r,i={}){return e(n?`ol`:`ul`,{key:i.key,start:t.start},...t.items.map((t,n)=>e(`li`,{key:n},r(t,i))))}}},f=(e,t)=>{if(t.inline||t.simple||t.inHTML&&e.indexOf(`
|
|
14
|
+
|
|
15
|
+
`)===-1&&!t.prevCaptureHasBlankLine)return null;let n=0,r=e.length;for(;n<r;){let t=e.indexOf(`
|
|
16
|
+
`,n),i=t===-1?r:t,a=n;for(;a<i&&(e.charCodeAt(a)===32||e.charCodeAt(a)===9);)a++;if(a>=i||a-n>=4||e.charCodeAt(n)===9)break;let s=e.charCodeAt(a);if((s===62||s===96||s===126||s===35||s===124||s===42||s===43||s===45||s===61||s===60||s>=48&&s<=57)&&jt(o,e.slice(n,t===-1?void 0:t+1)))break;if(t===-1){n=r;break}n=t+1}let i=e.slice(0,n);if(i===``)return null;let a=F(i);return a===``?null:[i,void 0,a]};return{[w.blockQuote]:{_scope:D,_qualify:[`>`],_match:H(ie),_order:T.HIGH,_parse(e,t,n){let r=(e[0]??``).replace(ae,``).match(oe),i=r?.[1],a=r?.[2]??``;return{alert:i,children:a.indexOf(`
|
|
17
|
+
`)===-1?W(t,a,n):At(t,a,n)}},_render(t,n,r={}){let i={key:r.key};return t.alert&&(i.className=`markdown-alert-${s(t.alert.toLowerCase())}`,t.children.unshift({attrs:{},children:[{type:w.text,text:t.alert}],noInnerParse:!0,type:w.htmlBlock,tag:`header`})),e(`blockquote`,i,n(t.children,r))}},[w.breakLine]:{_scope:k,_qualify:[` `],_match:U(se),_order:T.HIGH,_parse:K,_render(t,n,r={}){return e(`br`,{key:r.key})}},[w.breakThematic]:{_scope:D,_qualify:[`--`,`__`,`**`,`- `,`* `,`_ `],_match:H(ce),_order:T.HIGH,_parse:K,_render(t,n,r={}){return e(`hr`,{key:r.key})}},[w.codeBlock]:{_scope:D,_qualify:[` `],_match:H(ue),_order:T.MAX,_parse(e){return{type:w.codeBlock,lang:void 0,text:L(F((e[0]??``).replace(/^ {4}/gm,``)))}},_render(t,n,r={}){let i={...t.attrs??{}},a=t.lang?`lang-${t.lang}`:`lang-plaintext`;return i.className=i.className?`${i.className} ${a}`:a,e(`pre`,{key:r.key},e(`code`,i,t.text))}},[w.codeFenced]:{_scope:D,_qualify:["```",`~~~`],_match:H(le),_order:T.MAX,_parse(e){return{attrs:i(`code`,e[3]??``),lang:e[2]||void 0,text:e[4]??``,type:w.codeBlock}}},[w.codeInline]:{_scope:O,_firstChars:[96],_qualify:e=>e.charCodeAt(0)===96&&e.indexOf("`",1)!==-1,_match:V(fe),_order:T.LOW,_parse(e){return{text:L(e[2]??``)}},_render(t,n,r={}){return e(`code`,{key:r.key},t.text)}},[w.footnote]:{_scope:O,_qualify:[`[^`],_match:H(he),_order:T.MAX,_parse(e){return r.current.footnotes.push({footnote:e[2]??``,identifier:e[1]??``}),{}},_render:q},[w.footnoteReference]:{_scope:O,_qualify:[`[^`],_match:B(ge),_order:T.HIGH,_parse(e){let t=e[1]??``;return{target:`#${s(t)}`,text:t}},_render(t,n,r={}){return e(`a`,{key:r.key,href:c(t.target,`a`,`href`)??void 0},e(`sup`,{key:r.key},t.text))}},[w.gfmTask]:{_scope:O,_qualify:[`[ ]`,`[x]`],_match:B(ye),_order:T.HIGH,_parse(e){return{completed:(e[1]??``).toLowerCase()===`x`}},_render(t,n,r={}){return e(`input`,{checked:t.completed,key:r.key,readOnly:!0,type:`checkbox`})}},[w.heading]:{_scope:D,_qualify:[`#`],_match:H(n.enforceAtxHeadings?xe:be),_order:T.HIGH,_parse(e,t,n){let r=e[2]??``;return{children:W(t,r,n),id:s(r),level:e[1]?.length??1}},_render(t,n,r={}){return e(`h${t.level}`,{id:t.id,key:r.key},n(t.children,r))}},[w.headingSetext]:{_scope:D,_qualify:(e,t)=>{if(t.prevCaptureIndent===void 0||t.inline||t.simple)return!1;let n=e.indexOf(`
|
|
18
|
+
`);return n>0&&n<e.length-1&&(e[n+1]===`=`||e[n+1]===`-`)},_match:H(Se),_order:T.MAX,_parse(e,t,n){return{children:W(t,e[1]??``,n),level:e[2]===`=`?1:2,type:w.heading}}},[w.htmlBlock]:u(Ut,T.HIGH,!0,k),[w.htmlComment]:{_scope:k,_qualify:[`<!`],_match:U(we),_order:T.HIGH,_parse:K,_render:q},[w.htmlSelfClosing]:{_scope:k,_qualify:[`<`],_match:U(Ht),_order:T.HIGH,_parse(e){let t=(e[1]??``).trim();return{attrs:i(t,e[2]||``),tag:t}},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}})}},[w.customComponent]:u(Wt,T.MAX,!1,k),[w.paragraph]:{_scope:D,_qualify:(e,t)=>!t.inline&&!t.simple,_match:f,_order:T.LOW,_parse:G,_render(t,n,r={}){return e(`p`,{key:r.key},n(t.children,r))}},[w.image]:{_scope:O,_firstChars:[33],_qualify:e=>e.startsWith(`!==-1,_match:V(Yt),_order:T.HIGH,_parse(e){return{alt:L(e[1]??``),target:L(e[2]??``),title:e[3]?L(e[3]):void 0}},_render(t,n,r={}){return e(`img`,{key:r.key,alt:t.alt??void 0,title:t.title??void 0,src:c(t.target,`img`,`src`)??void 0})}},[w.link]:{_scope:O,_firstChars:[91],_qualify:e=>e.charCodeAt(0)===91&&e.indexOf(`](`)!==-1,_match:B(Xt),_order:T.LOW,_parse(e,t,n){return{children:kt(t,e[1]??``,n),target:L(e[2]??``),title:e[3]?L(e[3]):void 0}},_render(t,n,r={}){let i=c(t.target,`a`,`href`);return e(`a`,{key:r.key,href:i??void 0,title:t.title??void 0},n(t.children,r))}},[w.linkAngleBraceStyleDetector]:{_scope:O,_qualify:[`<`],_match:B(Oe),_order:T.MAX,_parse(e){let t=e[1]??``,n=!1;return t.indexOf(`@`)!==-1&&t.indexOf(`//`)===-1&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:w.text}],target:n?`mailto:${t}`:t,type:w.link}}},[w.linkBareUrlDetector]:{_scope:O,_firstChars:[104],_qualify:(e,t)=>!!(t.inline&&!t.inAnchor&&!n.disableAutoLink&&(I(e,`http://`)||I(e,`https://`))),_match:B(De),_order:T.MAX,_parse(e){let t=e[1]??``;return{children:[{text:t,type:w.text}],target:t,type:w.link}}},[w.newlineCoalescer]:{_scope:k,_qualify:[`
|
|
19
|
+
`],_match:H(pe),_order:T.LOW,_parse:K,_render(){return`
|
|
20
|
+
`}},[w.orderedList]:d(1),[w.unorderedList]:d(2),[w.ref]:{_scope:k,_qualify:[`[`],_match:U(Ie),_order:T.MAX,_parse(e){let t=e[1];return t!==void 0&&(r.current.references[t]={target:e[2]??``,title:e[4]}),{}},_render:q},[w.refImage]:{_scope:O,_firstChars:[33],_qualify:e=>e.startsWith(`===-1,_match:V(Le),_order:T.MAX,_parse(e){return{alt:e[1]?L(e[1]):void 0,ref:e[2]??``}},_render(t,n,i={}){let a=r.current.references[t.ref];return a?e(`img`,{key:i.key,alt:t.alt,src:c(a.target,`img`,`src`)??void 0,title:a.title}):null}},[w.refLink]:{_scope:O,_firstChars:[91],_qualify:e=>e.indexOf(`](`)===-1,_match:B(Re),_order:T.MAX,_parse(e,t,n){return{children:kt(t,e[1]??``,n),fallbackChildren:e[0]??``,ref:e[2]??``}},_render(t,n,i={}){let a=r.current.references[t.ref];return a?e(`a`,{key:i.key,href:c(a.target,`a`,`href`)??void 0,title:a.title},n(t.children,i)):e(`span`,{key:i.key},t.fallbackChildren)}},[w.table]:{_scope:D,_qualify:[`|`],_match:H(Ae),_order:T.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?Tt(e[2]):[],i=e[3]?Dt(e[3],t,n):[],a=Et(e[1]??``,t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:w.table}:{children:a.flat(),type:w.paragraph}},_render(t,n,r={}){let i=t,a=e=>i.align[e]&&i.align[e]!==`left`?{textAlign:i.align[e]}:{};return e(`table`,{key:r.key},e(`thead`,{key:`thead`},e(`tr`,null,...i.header.map((t,i)=>e(`th`,{key:i,style:a(i)},n(t,r))))),e(`tbody`,{key:`tbody`},...i.cells.map((t,i)=>e(`tr`,{key:i},...t.map((t,i)=>e(`td`,{key:i,style:a(i)},n(t,r)))))))}},[w.tableSeparator]:{_scope:O,_qualify:[`|`],_match:(e,t)=>t.inTable?/^\|/.exec(e):null,_order:T.HIGH,_parse(){return{type:w.tableSeparator}},_render(){return` | `}},[w.text]:{_scope:O,_match:z((e,t)=>{let n=e.length;if(e.charCodeAt(0)===10){let t=1;for(;t<n&&e.charCodeAt(t)===32;)t++;return t<n&&(e.charCodeAt(t)===42||e.charCodeAt(t)===43||e.charCodeAt(t)===45||e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57)?[e.slice(0,t)]:[`
|
|
21
|
+
`]}if(e.charCodeAt(0)===58){let t=Ke.exec(e);if(t)return t}return ln.lastIndex=1,ln.test(e),cn[0]=e.slice(0,un(e,ln.lastIndex)),cn}),_order:T.MIN,_parse(e){let t=e[0]??``;return{type:w.text,text:t.charCodeAt(0)===38?t.replace(Ce,(e,t)=>t.startsWith(`#x`)?String.fromCharCode(parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCharCode(parseInt(t.slice(1),10)):l[t]||e):t}},_render(e){return e.text}},[w.textBolded]:{_scope:O,_firstChars:[42,95],_qualify:e=>{let t=e.charCodeAt(0);if(t===42){let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===42&&e.indexOf(`**`,2)!==-1}if(t===95){let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===95&&e.indexOf(`__`,2)!==-1}return!1},_match:V(qe),_order:T.MED,_parse(e,t,n){return{children:t(e[2]??``,n)}},_render(t,n,r={}){return e(`strong`,{key:r.key},n(t.children,r))}},[w.textEmphasized]:{_scope:O,_firstChars:[42,95],_qualify:e=>{let t=e.charCodeAt(0),n=e.charCodeAt(1);return n===32||n===10||n===9?!1:t===42&&e.indexOf(`*`,1)!==-1||t===95&&e.indexOf(`_`,1)!==-1},_match:V(Je),_order:T.LOW,_parse(e,t,n){return{children:t(e[2]??``,n)}},_render(t,n,r={}){return e(`em`,{key:r.key},n(t.children,r))}},[w.textEscaped]:{_scope:O,_qualify:[`\\`],_match:V(We),_order:T.HIGH,_parse(e){return{text:e[1]??``,type:w.text}}},[w.textMarked]:{_scope:O,_firstChars:[61],_qualify:e=>{let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===61&&e.indexOf(`==`,2)!==-1},_match:V(Ye),_order:T.LOW,_parse(e,t,n){return{children:G(e,t,n).children}},_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[w.textStrikethroughed]:{_scope:O,_firstChars:[126],_qualify:e=>{let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===126&&e.indexOf(`~~`,2)!==-1},_match:V(Xe),_order:T.LOW,_parse(e,t,n){return{children:G(e,t,n).children}},_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},sn=[null,/^ {1,1}/gm,/^ {1,2}/gm,/^ {1,3}/gm,/^ {1,4}/gm,/^ {1,5}/gm,/^ {1,6}/gm,/^ {1,7}/gm,/^ {1,8}/gm],cn=[``],ln=/(?:[^\n&h!*:<=[\\_`~]+|h(?!ttp))*/y,un=(e,t)=>t>=3&&e.charCodeAt(t)===10&&e.charCodeAt(t-1)===32&&e.charCodeAt(t-2)===32?t-2:t,dn=(e,t,...n)=>({children:n,props:t,type:e}),fn=(e,t,n,r)=>{let i=(e,r)=>{if(!r?.trim())return null;let i=r.match(ne);return i?i.reduce((r,i)=>{let a=i.indexOf(`=`);if(a!==-1){let o=xt(i.slice(0,a)).trim(),s=lt(i.slice(a+1).trim()),c=A[o]??o;if(c===`ref`)return r;r[c]=Ct(e,o,s,t.sanitizer??vt),typeof r[c]==`string`&&Jt(r[c])&&(r[c]=hn(r[c].trim(),t,n).ast)}else i!==`style`&&(r[A[i]??i]=!0);return r},{}):null},a=[ie,le,ue,n.enforceAtxHeadings?xe:be,Ae,st,ct,qt],o=n.disableParsingRawHTML?a:[...a,Fe,Gt,we,Kt,qt],s=on(e,t,n,r,i,e=>{let t=e.replace(Ve,``),n=t.length>2048?t.slice(0,2048):t;return n.indexOf(`
|
|
22
|
+
|
|
23
|
+
`)!==-1||jt(o,n)},a);return n.disableParsingRawHTML?Object.keys(s).reduce((e,t)=>(t!==w.htmlBlock&&t!==w.htmlSelfClosing&&(e[t]=s[t]),e),{}):s},pn=(e,t,n,r,i)=>{let a=!t.preserveFrontmatter&&e.charCodeAt(0)===45?e.replace(ve,``):e,o=a.charCodeAt(0)===10?a.replace(Ve,``):a,s=t.forceInline||!t.forceBlock&&ze.test(o)===!1,c=n(s?a:`${F(o)}\n\n`,{inline:s});if(r.length>0)for(let e of r)e.parsedAst=n(e.footnote,{inline:!0});return{ast:c,footnotes:r,references:i,inline:s}},mn=(e,t,n,r,i)=>{let a=t.components??{},o=Qt(t),s=e.footnotes||[],c=e.inline,l=r(e.ast,{inline:c});for(;typeof l[l.length-1]==`string`&&!l[l.length-1].trim();)l.pop();let u=(()=>{if(n.wrapper===null)return l;let e=n.wrapper??(c?`span`:`div`);if(l.length>1||n.forceWrapper)return i(e,{key:`outer`},l);if(l.length===1){let t=l[0];if(Array.isArray(t))return i(e,{key:`outer`},t);if(typeof t==`string`){let e={key:`outer`};if(!c&&a){let n=R(a,`p.props`,{})??{},r=ut(e.className,n.className),o={...e,...n};return r&&(o.className=r),i(`span`,o,t)}return i(`span`,e,t)}return t}return i(e,{key:`outer`},null)})();return s.length?i(`div`,null,u,i(`footer`,{key:`footer`},...s.map(e=>i(`div`,{id:o(e.identifier),key:e.identifier},e.identifier,r(e.parsedAst||e.footnote,{inline:!0}))))):u},hn=(e=``,t,n={})=>{let{parse:r,scope:i}=rn(t,n,!0),a=en();return an(i,a,()=>pn(e,n,r,a.footnotes,a.references))},gn=(e,t,n={})=>{let{emit:r,createElement:i,scope:a}=rn(t,n,!1);return an(a,{footnotes:e.footnotes??[],references:e.references??{}},()=>mn(e,t,n,r,i))},_n=(e=``,t,n={})=>{if(typeof e!=`string`)throw console.error(`intlayer: the first argument must be a string. Received`,typeof e),Error(`intlayer: the first argument must be a string`);let{parse:r,emit:i,createElement:a,scope:o}=rn(t,n,!1),s=en();return an(o,s,()=>mn(pn(e,n,r,s.footnotes,s.references),t,n,i,a))},Z=e(t(),1),vn;try{let e=(0,Z.createElement)(`div`);vn=e&&typeof e==`object`&&`$$typeof`in e&&typeof e.$$typeof==`symbol`?e.$$typeof:Symbol.for(`react.transitional.element`)}catch{vn=Symbol.for(`react.transitional.element`)}var yn={createElement:(e,t,...n)=>{let r=null,i=t||{};t&&t.key!=null&&(r=String(t.key),i.key=void 0);let a=n.length;return a===1?i.children=n[0]:a>1&&(i.children=n),{$$typeof:vn,type:e,key:r,ref:null,props:i,_owner:null,_store:{},_debugStack:null,_debugTask:null}},cloneElement:(e,t,...n)=>n.length===0?(0,Z.cloneElement)(e,t):(0,Z.cloneElement)(e,t,...n),Fragment:Z.Fragment,normalizeProps:(e,t)=>t},bn=(e=``,t={})=>{let{createElement:n,disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,namedCodesToUnicode:l,components:u,renderRule:d,sanitizer:f,slugify:p,wrapper:m,preserveFrontmatter:h,tagfilter:g}=t,_={runtime:n?{...yn,createElement:n}:yn,components:u,namedCodesToUnicode:l,sanitizer:f,slugify:p},v={disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,renderRule:d,wrapper:m,preserveFrontmatter:h,tagfilter:g};return typeof e==`string`?_n(e,_,v):gn(e,_,v)},Q=x(),xn=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>bn(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o}),Sn={name:`move-diagonal`,size:24,node:[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]};Sn.node;var Cn=c(Sn),wn={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};wn.node;var Tn=c(wn),En=e=>{let{enable:t=!0,onSwipeLeft:n,onSwipeRight:r,itemIndex:i,itemCount:a,thresholdPct:o=20,touchAction:s=`pan-y`,disableWhenSelectingText:c=!0}=e,l=(0,Z.useRef)(null),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(0),m=(0,Z.useRef)({pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1}),h=(0,Z.useRef)(!1),g=()=>{let e=l.current;return e?e.clientWidth:0},_=e=>{let t=i<=0,n=i>=a-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},v=e=>{t&&m.current.pointerId===null&&(m.current.pointerId=e.pointerId,m.current.startX=e.clientX,m.current.startY=e.clientY,m.current.lastX=e.clientX,m.current.axisLocked=!1,m.current.isHorizontal=!1,h.current=!1,d(!1),p(0))},y=e=>{if(!t||m.current.pointerId!==e.pointerId)return;let n=g();if(!n)return;let r=e.clientX-m.current.startX,i=e.clientY-m.current.startY;if(c){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){h.current=!0;return}}if(!m.current.axisLocked){let e=Math.abs(r),t=Math.abs(i);(e>6||t>6)&&(m.current.axisLocked=!0,m.current.isHorizontal=e>t)}if(!m.current.isHorizontal)return;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),u||d(!0);let a=r/n*100;p(_(a)),m.current.lastX=e.clientX},b=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=m.current.isHorizontal,i=f;if(d(!1),p(0),m.current.pointerId=null,m.current.axisLocked=!1,m.current.isHorizontal=!1,h.current){h.current=!1;return}t&&(i>o?r?.():i<-o&&n?.())};return(0,Z.useEffect)(()=>{p(0),d(!1)},[i]),{containerRef:l,isDragging:u,dragDeltaPct:f,containerProps:{ref:l,onPointerDown:v,onPointerMove:y,onPointerUp:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},onPointerCancel:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},style:{touchAction:s}}}},Dn=({children:e})=>(0,Q.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,Q.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,Q.jsx)(`code`,{children:typeof e==`string`?e.split(`
|
|
24
|
+
`).map((e,t)=>(0,Q.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),On=`[&_pre.shiki]:!bg-transparent min-w-0 max-w-full overflow-auto bg-transparent [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&_pre.shiki]:max-w-full [&_pre.shiki]:overflow-x-auto [&_pre::-webkit-scrollbar]:hidden [&_pre]:[-ms-overflow-style:none] [&_pre]:[scrollbar-width:none]`,kn=({html:e})=>(0,Q.jsx)(`div`,{className:On,children:(0,Q.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}),An=(0,Z.lazy)(()=>C(()=>import(`./CodeBlockShiki-BEeimB71.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2,3,4,5,6]))),jn=({className:e,onChange:t,isEditable:n,children:r,lang:i,highlightedHtml:a,...o})=>(0,Q.jsx)(`div`,{className:S(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:a?(0,Q.jsx)(kn,{html:a}):(0,Q.jsx)(Z.Suspense,{fallback:(0,Q.jsx)(Dn,{children:r}),children:(0,Q.jsx)(An,{lang:i,children:r})})}),Mn={astro:()=>C(()=>import(`./astro-JHDYjn39.js`),__vite__mapDeps([7,8,9,10,11,12,13])),bash:()=>C(()=>import(`./bash-CLZ0U2zV.js`),[]),css:()=>C(()=>import(`./css-CdtkT07m.js`),__vite__mapDeps([14,11])),html:()=>C(()=>import(`./html-DYtkB_T1.js`),__vite__mapDeps([15,16,9,11])),javascript:()=>C(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([17,9])),json:()=>C(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([18,8])),json5:()=>C(()=>import(`./json5-BR5RXkoi.js`),[]),jsonc:()=>C(()=>import(`./jsonc-CYpm1nAK.js`),[]),markdown:()=>C(()=>import(`./markdown-BYOwaDjH.js`),[]),svelte:()=>C(()=>import(`./svelte-tEuLYt3E.js`),__vite__mapDeps([19,9,10,11,12])),tsx:()=>C(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([20,13])),typescript:()=>C(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([21,10])),vue:()=>C(()=>import(`./vue-Bg0byEaI.js`),__vite__mapDeps([22,8,9,10,11,16])),xml:()=>C(()=>import(`./xml-DMbpbO54.js`),[]),yaml:()=>C(()=>import(`./yaml-rwi0_p6S.js`),[])};Object.keys(Mn);var Nn={cjs:`javascript`,console:`bash`,cts:`typescript`,dockerfile:`docker`,gql:`graphql`,htm:`html`,js:`javascript`,jsonc:`json5`,jsx:`tsx`,md:`markdown`,mdx:`markdown`,mjs:`javascript`,mts:`typescript`,postcss:`css`,sh:`bash`,shell:`bash`,shellscript:`bash`,ts:`typescript`,yml:`yaml`,zsh:`bash`},Pn=`plaintext`,Fn=e=>{let t=(e??``).trim().toLowerCase(),n=Nn[t]??t,r=Mn[n];return r?{id:n,loadGrammar:r}:{id:Pn,loadGrammar:null}},In={light:`github-light`,dark:`github-dark`};function Ln(e){if(!e)return{href:``,label:``};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}}var Rn=e=>{if(!e||!/^https?:\/\//i.test(e))return null;try{let t=new URL(e);return/(^|\.)youtube(-nocookie)?\.com$/.test(t.hostname)&&t.pathname.replace(/^\/embed\//,``).split(`/`)[0]||null}catch{return null}},zn=()=>{let e=(0,Z.useRef)(null),[t,n]=(0,Z.useState)(!1);return(0,Z.useEffect)(()=>{let r=e.current;if(!r||t)return;if(typeof IntersectionObserver>`u`){n(!0);return}let i=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(n(!0),i.disconnect())},{rootMargin:`200px`});return i.observe(r),()=>i.disconnect()},[t]),{elementRef:e,hasBecomeVisible:t}},Bn=({src:e,title:t,className:n,frameProps:r})=>{let[i,a]=(0,Z.useState)(!1),{elementRef:o,hasBecomeVisible:s}=zn(),c=Rn(e);if(c&&!i)return(0,Q.jsxs)(`button`,{type:`button`,"aria-label":t??`Play video`,onClick:()=>a(!0),className:S(`group relative block cursor-pointer border-0 bg-card p-0`,n),children:[(0,Q.jsxs)(`picture`,{children:[(0,Q.jsx)(`source`,{srcSet:`https://i.ytimg.com/vi_webp/${c}/hqdefault.webp`,type:`image/webp`}),(0,Q.jsx)(`img`,{src:`https://i.ytimg.com/vi/${c}/hqdefault.jpg`,alt:``,width:480,height:360,fetchPriority:`high`,decoding:`async`,className:`size-full object-cover`})]}),(0,Q.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,Q.jsx)(`span`,{className:`flex size-14 items-center justify-center rounded-full bg-text/70 text-text-opposite transition-transform group-hover:scale-110`,children:(0,Q.jsx)(Tn,{className:`size-6 translate-x-0.5 fill-current`})})})]});if(!s&&!i)return(0,Q.jsx)(`div`,{ref:o,"aria-hidden":!0,className:n});let l=(()=>{if(!i||!c||!e)return e;let t=new URL(e);return t.searchParams.set(`autoplay`,`1`),t.href})();return(0,Q.jsx)(`iframe`,{...r,src:l,title:t,loading:`lazy`,className:n})},Vn=e=>{let{src:t,className:n,title:r,...a}=e,[o,s]=(0,Z.useState)(!1),{href:c,label:d}=Ln(t);return(0,Q.jsxs)(u,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,Q.jsx)(Bn,{src:t,title:r,frameProps:a,className:S(`block max-h-[80vh] min-h-[12rem] w-full border-0`,n)}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-1`,children:[c?(0,Q.jsx)(h,{href:c,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-muted-foreground text-xs underline-offset-2 hover:text-foreground hover:underline`,children:d}):(0,Q.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,Q.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>s(!0),label:`Open embedded page in fullscreen`,Icon:Cn})]}),(0,Q.jsx)(l,{isOpen:o,onClose:()=>s(!1),size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&t?(0,Q.jsx)(u,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,Q.jsx)(`iframe`,{...a,src:t,title:r??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},Hn=(0,Z.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),$=()=>(0,Z.useContext)(Hn),Un=({children:e})=>{let[t,r]=n(`packageManager`,`npm`),[i,a]=n(`codeFormat`,`typescript`),[o,s]=n(`contentDeclarationFormat`,`typescript`);return(0,Q.jsx)(Hn,{value:{packageManager:t,setPackageManager:r,codeFormat:i,setCodeFormat:a,contentDeclarationFormat:o,setContentDeclarationFormat:s},children:e})},Wn=700,Gn=({isRollable:e=!0,minHeight:t=Wn,children:n,className:i})=>{let[o,s]=(0,Z.useState)(0),[c,l]=(0,Z.useState)(!0),u=(0,Z.useRef)(null),{expandCollapseContent:d}=a(`expand-collapse`),f=o>t,p=(0,Z.useCallback)(e=>{if(u.current?.disconnect(),u.current=null,!e)return;if(typeof ResizeObserver>`u`){s(e.clientHeight);return}let t=new ResizeObserver(([e])=>{e&&s(e.contentRect.height)});t.observe(e),u.current=t},[]);return(0,Z.useEffect)(()=>()=>u.current?.disconnect(),[]),e?f?(0,Q.jsxs)(r,{isHidden:c,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,Q.jsx)(`div`,{className:S(`grid w-full`,i),ref:p,children:n}),(0,Q.jsx)(`button`,{className:S(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-linear-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,c?`w-full`:`w-32`),type:`button`,onClick:()=>l(e=>!e),children:d(c)})]}):(0,Q.jsx)(`div`,{className:S(`grid w-full`,i),ref:p,children:n}):n},Kn=({children:e,originalLang:t,targetFormat:n,initialHtml:r})=>{let[i,a]=(0,Z.useState)(r??null),o=(0,Z.useRef)(r??null);(0,Z.useEffect)(()=>{if(r&&n===`typescript`){o.current=r,a(r);return}let i=!1;return(async()=>{try{let r=e,s=Fn(t).id;if(n!==`typescript`){let{transformCode:a,deriveLanguage:o}=await C(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;r=a(String(e),n),s=Fn(o(t,n)).id}let{codeToHtml:c}=await C(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-CJIKzMGl.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([23,1,4,2,5,3,6]));if(i)return;let l=await c(String(r),{lang:s,themes:In,defaultColor:!1});i||(o.current=l,a(l))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,Q.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,Q.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,Q.jsx)(`code`,{children:e})})},qn=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},Jn=({children:e,...t})=>{let{packageManager:n,codeFormat:r,contentDeclarationFormat:i}=$(),a=t.packageManager===void 0,o=n===t.packageManager,s=qn(t.codeFormat),c=s===void 0,l=s?s.includes(r):!1,u=qn(t.contentDeclarationFormat),d=u===void 0,f=u?u.includes(i):!1;return(a||o)&&(c||l)&&(d||f)?e:(0,Q.jsx)(Q.Fragment,{})},Yn=({availableFormats:e})=>{let{codeFormat:t,setCodeFormat:n,setContentDeclarationFormat:r}=$(),i=a(`code-selectors`),o=t=>!e||e.includes(t);return(0,Q.jsxs)(f,{value:t,onValueChange:e=>{n(e),r(e)},children:[(0,Q.jsx)(f.Trigger,{className:`py-1!`,"aria-label":i.codeFormat.label.value,children:(0,Q.jsx)(f.Value,{placeholder:i.codeFormat.placeholder.value})}),(0,Q.jsxs)(f.Content,{children:[o(`typescript`)&&(0,Q.jsx)(f.Item,{value:`typescript`,children:`TypeScript`}),o(`esm`)&&(0,Q.jsx)(f.Item,{value:`esm`,children:`ESM`}),o(`commonjs`)&&(0,Q.jsx)(f.Item,{value:`commonjs`,children:`CommonJS`})]})]})},Xn=()=>{let{contentDeclarationFormat:e,setContentDeclarationFormat:t}=$(),n=a(`code-selectors`);return(0,Q.jsxs)(f,{value:e,onValueChange:t,children:[(0,Q.jsx)(f.Trigger,{className:`py-1!`,"aria-label":n.contentDeclarationFormat.label.value,children:(0,Q.jsx)(f.Value,{placeholder:n.contentDeclarationFormat.placeholder.value})}),(0,Q.jsxs)(f.Content,{children:[(0,Q.jsx)(f.Item,{value:`typescript`,children:`TypeScript`}),(0,Q.jsx)(f.Item,{value:`commonjs`,children:`CommonJS`}),(0,Q.jsx)(f.Item,{value:`esm`,children:`ESM`}),(0,Q.jsx)(f.Item,{value:`json`,children:`JSON`})]})]})},Zn=({code:e,...t})=>{let{title:n,description:r}=a(`code`);return(0,Q.jsxs)(v,{identifier:`copy`,children:[(0,Q.jsx)(p,{content:e,...t}),(0,Q.jsxs)(v.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Q.jsx)(`strong`,{children:n}),(0,Q.jsx)(`p`,{className:`text-neutral`,children:r})]})]})},Qn=()=>{let{packageManager:e,setPackageManager:t}=$(),n=a(`code-selectors`);return a(`code-selectors`),(0,Q.jsxs)(f,{value:e,onValueChange:t,children:[(0,Q.jsx)(f.Trigger,{className:`py-1!`,"aria-label":n.packageManager.label.value,children:(0,Q.jsx)(f.Value,{placeholder:n.packageManager.placeholder.value})}),(0,Q.jsxs)(f.Content,{children:[(0,Q.jsx)(f.Item,{value:`npm`,children:`npm`}),(0,Q.jsx)(f.Item,{value:`pnpm`,children:`pnpm`}),(0,Q.jsx)(f.Item,{value:`yarn`,children:`yarn`}),(0,Q.jsx)(f.Item,{value:`bun`,children:`bun`})]})]})},$n=700,er=new Set([`tsx`,`jsx`]),tr=e=>{if(e){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},nr=({children:e,language:t,highlightedHtml:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:l,isRollable:d=!0,lang:f,...p})=>{let{codeFormat:m,contentDeclarationFormat:h}=$(),g=(0,Z.useMemo)(()=>tr(c),[c]),_=(0,Z.useMemo)(()=>tr(l),[l]),v=g!==void 0&&g.length>1&&g.includes(`typescript`),y=_!==void 0&&_.length>1&&_.includes(`typescript`),b=v||y,x=y?h:m,w=(0,Z.useMemo)(()=>{let e=y?_:g;if(!e)return e;let n=e.filter(e=>e!==`json`);return er.has(t)&&(n=n.filter(e=>e!==`commonjs`)),n},[y,_,g,t]),T=(0,Z.useMemo)(()=>!w||w.includes(x)?x:w[w.length-1]??`typescript`,[w,x]),[E,D]=(0,Z.useState)(o);(0,Z.useEffect)(()=>{if(!b||T===`typescript`){D(o);return}if(!o)return;let e=!1;return(async()=>{let{deriveFileName:t}=await C(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{deriveFileName:e}},[]);e||D(t(o,T))})(),()=>{e=!0}},[o,b,T]);let O=(0,Z.useMemo)(()=>{let t=Array.isArray(e)?e.join(``):String(e);return t.endsWith(`
|
|
25
|
+
`)?t.slice(0,-1):t},[e]),[k,A]=(0,Z.useState)(O);(0,Z.useEffect)(()=>{if(!b||T===`typescript`){A(O);return}let e=!1;return(async()=>{let{transformCode:t}=await C(async()=>{let{transformCode:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e}},[]);e||A(t(O,T))})(),()=>{e=!0}},[O,b,T]);let j=s||c||l;return(0,Q.jsx)(Jn,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,Q.jsxs)(u,{className:S(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...p,children:[r&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl border-b bg-card/50 py-1.5 pr-12 pl-4 text-muted-foreground text-xs`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:E??t}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,Q.jsx)(Qn,{}),c&&(0,Q.jsx)(Yn,{availableFormats:w}),l&&(0,Q.jsx)(Xn,{})]})]}),(0,Q.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,Q.jsx)(`div`,{className:S(`absolute right-2 bottom-0 flex h-7 items-center`,j&&`h-11`),children:(0,Q.jsx)(Zn,{code:k})})})]}),(0,Q.jsx)(Gn,{minHeight:$n,isRollable:d,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:b?(0,Q.jsx)(Kn,{originalLang:t,targetFormat:T,initialHtml:n,children:O}):(0,Q.jsx)(jn,{lang:t,highlightedHtml:n,children:O})})]})})},rr=(0,Z.createContext)({tabsValues:{},setTabsValues:(()=>{})}),ir=()=>(0,Z.useContext)(rr),ar=({children:e})=>{let[t,n]=(0,Z.useState)({});return(0,Q.jsx)(rr,{value:{tabsValues:t,setTabsValues:n},children:e})},or=e=>e.trim().replace(/\s+/g,`-`).replace(/[^\w-]/g,``),sr=e=>{let t=new Map;return e.map((e,n)=>{let r=or(e)||String(n),i=t.get(r)??0;return t.set(r,i+1),i===0?r:`${r}-${i+1}`})},cr=(0,Z.createContext)(void 0),lr=y(`relative w-full rounded-lg`,{variants:{background:{with:`border bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),ur=({value:e,label:t},n)=>{let r=e??t;return typeof r==`string`?r:String(n)},dr=({children:e,...t})=>(0,Q.jsx)(`div`,{...t,children:e});dr.displayName=`TabItem`;var fr=Object.assign(({defaultTab:e,group:t,variant:n,children:r,className:i,headerClassName:a,fullHeight:o,...s})=>{let c=Z.Children.toArray(r).filter(e=>(0,Z.isValidElement)(e)&&e.type===dr).map((e,t)=>({...e.props,value:ur(e.props,t)})),l=c[0]?.value,{tabsValues:u,setTabsValues:d}=ir(),[f,p]=(0,Z.useState)(e??l??``),m=(t&&typeof u==`object`?u?.[t]:f)??e??l,h=c.findIndex(e=>e.value===m),_=c.length,v=sr(c.map(({value:e})=>e)),{containerProps:y,dragDeltaPct:b,isDragging:x}=En({itemIndex:h,itemCount:_,onSwipeLeft:()=>{let e=Math.min(_-1,h+1),t=c[e]?.value;t&&C(t)},onSwipeRight:()=>{let e=Math.max(0,h-1),t=c[e]?.value;t&&C(t)}}),C=e=>{p(e),typeof d==`function`&&d(n=>({...n,[t]:e}))},w={activeTab:f??l??``,setActiveTab:C};return(0,Q.jsx)(cr.Provider,{value:w,children:(0,Q.jsxs)(`div`,{className:S(lr({variant:n}),o&&`flex h-full flex-col overflow-hidden`,i),...s,children:[(0,Q.jsx)(`div`,{className:S(`flex shrink-0 gap-3 p-3`,a),children:(0,Q.jsx)(g,{selectedChoice:m,tabs:c.map(({label:e,value:t,disabled:n},r)=>{let i=m===t,a=v[r];return(0,Q.jsx)(`button`,{className:S(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:n,onClick:()=>!n&&C(t),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${a}`,id:`tab-${a}`,type:`button`,children:e??t},t)}),hoverable:!0,color:`text`})}),(0,Q.jsx)(`div`,{className:S(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,o&&`min-h-0 flex-1`),...y,children:(0,Q.jsx)(`div`,{className:S(`grid w-full min-w-0`,o&&`h-full`,x?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${c.length}, 100%)`,transform:`translateX(-${h*100-(x?b:0)}%)`},children:c.map(({value:e,children:t,className:n},r)=>{let i=r===h,a=v[r];return(0,Q.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${a}`,id:`tabpanel-${a}`,inert:!i,tabIndex:i?0:-1,"data-active":i,className:S(`w-full min-w-0 p-3 opacity-100 transition-opacity duration-300 ease-in-out`,o&&`h-full overflow-y-auto`,!i&&`pointer-events-none opacity-0`,n),children:(0,Q.jsx)(`div`,{className:S(`flex w-full min-w-0 flex-col items-stretch gap-6`,o&&`min-h-full`),children:t})},e)})})})]})})},{Item:dr}),pr=({setIsModalOpen:e})=>{let{modal:t}=a(`table`);return(0,Q.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,Q.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,Q.jsxs)(v,{identifier:`expand`,children:[(0,Q.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>{e(!0)},label:t.title,Icon:Cn}),(0,Q.jsxs)(v.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Q.jsx)(`strong`,{children:t.title}),(0,Q.jsx)(`p`,{className:`text-neutral`,children:t.description})]})]})})})},mr=(0,Z.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,Q.jsx)(`table`,{ref:r,className:S(`w-full table-auto border-separate border-spacing-0 overflow-hidden rounded-2xl text-left text-sm`,`[&_thead_tr:first-child_th:first-child]:rounded-tl-2xl`,`[&_thead_tr:first-child_th:last-child]:rounded-tr-2xl`,`[&_tbody_tr:last-child_td:first-child]:rounded-bl-2xl`,`[&_tbody_tr:last-child_td:last-child]:rounded-br-2xl`,`supports-[corner-shape:squircle]:rounded-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:first-child]:rounded-tl-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:last-child]:rounded-tr-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:first-child]:rounded-bl-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:last-child]:rounded-br-3xl`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),hr=.55,gr=5,_r=30,vr=(e,t,n)=>{(0,Z.useEffect)(()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(_r,Math.max(gr,(n[t]??0)*hr));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${_r}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},n)},yr=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,Z.useState)(!1),[c,u]=(0,Z.useState)(null),d=(0,Z.useRef)(null),f=(0,Z.useRef)(null);vr(d,f,[a.children,o]),(0,Z.useEffect)(()=>{if(o&&c!==null&&f.current){let e=f.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-card`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,Z.useEffect)(()=>{o||u(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),s(!0))}i?.(e)};return(0,Q.jsxs)(`div`,{className:`group relative`,children:[n&&(0,Q.jsx)(pr,{setIsModalOpen:s}),(0,Q.jsx)(Gn,{isRollable:t,className:`max-w-full overflow-x-auto bg-background text-left`,children:(0,Q.jsx)(mr,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,Q.jsx)(l,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,Q.jsx)(`div`,{className:`grid`,children:(0,Q.jsx)(mr,{ref:f,className:S(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,Q.jsx)(Q.Fragment,{})})]})},br=({className:e,...t})=>(0,Q.jsx)(`th`,{className:S(`border border-b border-solid bg-neutral/10 p-4`,e),...t}),xr=({className:e,...t})=>(0,Q.jsx)(`tr`,{className:S(`hover:bg-neutral/10`,e),...t}),Sr=({className:e,...t})=>(0,Q.jsx)(`td`,{className:S(`border border-b border-solid p-4`,e),...t}),Cr=({className:e,...t})=>(0,Q.jsx)(`hr`,{className:S(`mx-6 mt-16 border-dashed text-neutral`,e),...t}),wr=e=>(0,Q.jsx)(o,{isClickable:!0,className:`mb-16 mb-8 text-foreground`,...e}),Tr=e=>(0,Q.jsx)(m,{isClickable:!0,className:`mt-16 text-foreground`,...e}),Er=e=>(0,Q.jsx)(_,{isClickable:!0,className:`mt-5 text-foreground`,...e}),Dr=e=>(0,Q.jsx)(s,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Or=e=>(0,Q.jsx)(d,{isClickable:!0,className:`mt-3 text-foreground`,...e}),kr=e=>(0,Q.jsx)(b,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Ar=e=>(0,Q.jsx)(`strong`,{className:`text-foreground`,...e}),jr=(0,Z.memo)(({className:e,children:t,highlightedHtml:n,lang:r,...i})=>{let a=String(t??``).replace(/\n$/,``);if(!e){let e=a.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)));return(0,Q.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-[0.875em] leading-[inherit]`,children:e})}let o=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,Q.jsx)(nr,{...i,language:o,showHeader:!0,highlightedHtml:n,className:`border`,children:a})},(e,t)=>e.children===t.children&&e.className===t.className&&e.highlightedHtml===t.highlightedHtml),Mr=e=>(0,Q.jsx)(jr,{...e}),Nr=({className:e,...t})=>(0,Q.jsx)(`blockquote`,{className:S(`mt-5 gap-3 border-card border-l-4 pl-5 text-muted-foreground [&_strong]:text-neutral`,e),...t}),Pr=({className:e,...t})=>(0,Q.jsx)(`ul`,{className:S(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Fr=({className:e,...t})=>(0,Q.jsx)(`ol`,{className:S(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Ir=({className:e,alt:t,src:n,...r})=>(0,Q.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:S(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),Lr=e=>t=>(0,Q.jsx)(h,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),Rr={h1:wr,h2:Tr,h3:Er,h4:Dr,h5:Or,h6:kr,strong:Ar,blockquote:Nr,ul:Pr,ol:Fr,img:Ir,pre:e=>(0,Q.jsx)(Q.Fragment,{children:e.children}),table:e=>(0,Q.jsx)(yr,{isRollable:!0,displayModal:!0,...e}),th:br,tr:xr,td:Sr,hr:Cr,Tabs:e=>(0,Q.jsx)(fr,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:fr.Item,Columns:({className:e,...t})=>(0,Q.jsx)(`div`,{className:S(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,Q.jsx)(`div`,{className:S(`flex-1`,e),...t}),iframe:e=>(0,Q.jsx)(Vn,{...e})},zr=e=>({...Rr,code:Mr,a:Lr(e)}),Br=({children:e,locale:t,forceBlock:n,preserveFrontmatter:r,tagfilter:i,components:a,wrapper:o})=>{let s=xn(e,{components:{...zr(t),...a},wrapper:o,forceBlock:n,preserveFrontmatter:r,tagfilter:i});return(0,Q.jsx)(Un,{children:(0,Q.jsx)(ar,{children:s})})};export{Mn as a,On as c,Nn as i,Vn as n,Fn as o,In as r,Dn as s,Br as t};
|