meshy-node 0.6.2 → 0.6.4
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 +1 -1
- package/dashboard/assets/DashboardPage-bvnSOEOR.js +139 -0
- package/dashboard/assets/DashboardShared-GLcSNGlq.js +83 -0
- package/dashboard/assets/DiffTab-COHFrirB.js +4 -0
- package/dashboard/assets/FilesTab-CbAyNkqV.js +22 -0
- package/dashboard/assets/{PreviewTab-Bv6dERjR.js → PreviewTab-DfpJt0_L.js} +4 -4
- package/dashboard/assets/SharedConversationPage-GIVshodB.js +7 -0
- package/dashboard/assets/{file-DlRlkTFC.js → file-BQIg747t.js} +1 -1
- package/dashboard/assets/{folder-BmMN0Ktd.js → folder-bif_P7Bd.js} +1 -1
- package/dashboard/assets/index-CtsPt3oz.css +1 -0
- package/dashboard/assets/index-DN5st9yl.js +301 -0
- package/dashboard/assets/{play-CsdLI-WG.js → play-DQsrWPv1.js} +1 -1
- package/dashboard/index.html +2 -2
- package/main.cjs +316 -137
- package/package.json +1 -1
- package/runtime-metadata.json +5 -5
- package/dashboard/assets/DashboardPage-CLJHILHo.js +0 -134
- package/dashboard/assets/DashboardShared-h22ibsrQ.js +0 -82
- package/dashboard/assets/DiffTab-CktFHjP4.js +0 -4
- package/dashboard/assets/FilesTab-BoGft5xw.js +0 -22
- package/dashboard/assets/SharedConversationPage-BrlYNCnU.js +0 -7
- package/dashboard/assets/index-DU7NIRxO.css +0 -1
- package/dashboard/assets/index-cc0FQMdy.js +0 -301
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import{c as ye,bb as jr,j as x,r as xe,B as gt,C as it,b as xt,X as Gi,l as Ki,E as Pr,bc as Qi,u as Zi,K as el}from"./index-cc0FQMdy.js";/**
|
|
2
|
-
* @license lucide-react v1.7.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const tl=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],nl=ye("brain",tl);/**
|
|
7
|
-
* @license lucide-react v1.7.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const rl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],il=ye("circle-question-mark",rl);/**
|
|
12
|
-
* @license lucide-react v1.7.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const ll=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ol=ye("circle",ll);/**
|
|
17
|
-
* @license lucide-react v1.7.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const al=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],sl=ye("list-checks",al);/**
|
|
22
|
-
* @license lucide-react v1.7.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const ul=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],cl=ye("loader-circle",ul);/**
|
|
27
|
-
* @license lucide-react v1.7.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const fl=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],pl=ye("shield-alert",fl);/**
|
|
32
|
-
* @license lucide-react v1.7.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const hl=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ml=ye("shield-check",hl);/**
|
|
37
|
-
* @license lucide-react v1.7.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const dl=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],gl=ye("user",dl);/**
|
|
42
|
-
* @license lucide-react v1.7.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const xl=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_r=ye("wrench",xl);function yt(e){return typeof e=="object"&&e!==null}function yl(e){if(!yt(e))return null;if(e.type==="text"&&typeof e.text=="string"){const t=e.text.trim();return t?{type:"text",text:t}:null}if(e.type==="image"&&typeof e.mediaType=="string"&&typeof e.data=="string"){const t=e.mediaType.trim(),n=e.data;return!t||!n?null:{type:"image",mediaType:t,data:n,...typeof e.filename=="string"&&e.filename.trim()?{filename:e.filename.trim()}:{}}}if(e.type==="tool_result"&&typeof e.toolUseId=="string"&&typeof e.content=="string"){const t=e.toolUseId.trim(),n=e.content.trim();return!t||!n?null:{type:"tool_result",toolUseId:t,content:n,...typeof e.isError=="boolean"?{isError:e.isError}:{}}}return null}function kl(e){if(!yt(e))return null;if(e.type==="text"&&typeof e.text=="string"){const r=e.text.trim();return r?{type:"text",text:r}:null}if(e.type!=="image"||!yt(e.source)){if(e.type==="tool_result"&&typeof e.tool_use_id=="string"&&typeof e.content=="string"){const r=e.tool_use_id.trim(),i=e.content.trim();return!r||!i?null:{type:"tool_result",toolUseId:r,content:i,...typeof e.is_error=="boolean"?{isError:e.is_error}:{}}}return null}const t=typeof e.source.media_type=="string"?e.source.media_type.trim():"",n=typeof e.source.data=="string"?e.source.data:"";return!t||!n?null:{type:"image",mediaType:t,data:n}}function mt(e){if(typeof e=="string"){const t=e.trim();return t?[{type:"text",text:t}]:[]}return Array.isArray(e)?e.map(t=>yl(t)??kl(t)).filter(t=>t!==null):[]}function jp(e,t){const n=e.trim();return[...n?[{type:"text",text:n}]:[],...t]}function bl(e){return{role:"user",content:e.map(t=>t.type==="text"?{type:"text",text:t.text}:t.type==="tool_result"?{type:"tool_result",tool_use_id:t.toolUseId,content:t.content,...typeof t.isError=="boolean"?{is_error:t.isError}:{}}:{type:"image",source:{type:"base64",media_type:t.mediaType,data:t.data}})}}function Pp(e,t=new Date().toISOString()){return{type:"user",message:bl(e),timestamp:t}}function Oe(e){if(e.type!=="user"||e.isSynthetic===!0)return null;if(typeof e.message=="string"){const t=mt(e.message);return t.length>0?t:null}if(yt(e.message)&&Array.isArray(e.message.content)){const t=mt(e.message.content);return t.length>0?t:null}if(Array.isArray(e.content)){const t=mt(e.content);return t.length>0?t:null}return null}function _p(e){return mt(e.payload.initialMessage)}function Se(e){return e.map(t=>{if(t.type==="text")return`t:${t.text}`;if(t.type==="tool_result")return`r:${t.toolUseId}:${t.isError===!0?"1":"0"}:${t.content}`;const n=t.data.slice(0,32),r=t.data.slice(-32);return`i:${t.mediaType}:${t.data.length}:${n}:${r}`}).join("|")}function wl(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool_result"?t.content:"").filter(Boolean).join(`
|
|
47
|
-
`)}function Sl(e){return`data:${e.mediaType};base64,${e.data}`}function zp(e){var i,o;if(!e)return[];const t=[],n=e.items;if(n)for(const l of Array.from(n)){if((l==null?void 0:l.kind)!=="file"||!((i=l.type)!=null&&i.startsWith("image/")))continue;const a=(o=l.getAsFile)==null?void 0:o.call(l);a&&a.type.startsWith("image/")&&t.push(a)}if(t.length>0)return t;const r=e.files;return r?Array.from(r).filter(l=>l.type.startsWith("image/")):[]}function Cl(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){n(new Error(`Failed to read ${e.name}`));return}t(r.result)},r.onerror=()=>n(r.error??new Error(`Failed to read ${e.name}`)),r.readAsDataURL(e)})}async function Lp(e){return Promise.all(Array.from(e).map(async t=>{if(!t.type.startsWith("image/"))throw new Error(`${t.name} is not an image`);const n=await Cl(t),r=n.indexOf(",");if(r===-1)throw new Error(`Failed to parse ${t.name}`);return{type:"image",mediaType:t.type||"image/png",data:n.slice(r+1),filename:t.name}}))}function lt(e){return typeof e=="object"&&e!==null}function El(e){return lt(e)&&typeof e.name=="string"&&e.name.toLowerCase()==="askuserquestion"}function Al(e){return!lt(e)||typeof e.label!="string"||!e.label.trim()?null:{label:e.label.trim(),description:typeof e.description=="string"?e.description.trim():""}}function Il(e){if(!lt(e)||typeof e.question!="string"||!e.question.trim())return null;const t=Array.isArray(e.options)?e.options.map(Al).filter(n=>n!==null):[];return t.length===0?null:{header:typeof e.header=="string"&&e.header.trim()?e.header.trim():void 0,question:e.question.trim(),multiSelect:e.multiSelect===!0,options:t}}function Yt(e){if(!lt(e)||!Array.isArray(e.questions))return null;const t=e.questions.map(Il).filter(n=>n!==null);return t.length===0?null:{questions:t}}function Re(e){return JSON.stringify({questions:e.questions})}function Ct(e){const t=Yt(e);if(t)return t;if(El(e)){const n=lt(e.input)?e.input:void 0,r=Yt(n);return r?{...r,...typeof e.id=="string"&&e.id.trim()?{toolUseId:e.id.trim()}:{}}:null}return null}function Tl(e){var i;const t=e.trim();if(!t)return[];const n=[t],r=t.matchAll(/```(?:json)?\s*([\s\S]*?)```/gi);for(const o of r){const l=(i=o[1])==null?void 0:i.trim();l&&n.push(l)}return n}function Et(e){for(const t of Tl(e))try{const n=JSON.parse(t),r=Yt(n);if(r)return r}catch{}return null}function vl(e){return e.questions.map(t=>t.options.length>0?[0]:[])}function Nl(e,t){return e.questions.every((n,r)=>(t[r]??[]).length>0)}function jl(e,t){const r=e.questions.map((i,o)=>{const l=[...new Set(t[o]??[])].sort((a,s)=>a-s).filter(a=>i.options[a]!==void 0);return{header:i.header??null,question:i.question,multiSelect:i.multiSelect,selectedOptions:l.map(a=>i.options[a]).filter(a=>a!==void 0)}}).map(i=>{const o=i.header??i.question,l=i.selectedOptions.map(a=>a.label).join(i.multiSelect?", ":"");return`${o}: ${l}`}).join(`
|
|
48
|
-
`);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function et(e){return typeof e=="object"&&e!==null}function Pl(e){if(!e)return;const t=["file_path","path","command"].map(n=>e[n]).find(n=>typeof n=="string"&&n.trim().length>0);return t==null?void 0:t.trim()}function _l(e){const t=e.toLowerCase();return t.includes(" permission to write ")?"Write":t.includes(" permission to edit ")?"Edit":t.includes(" permission to run ")||t.includes(" permission to execute ")?"Bash":"Action"}function Xt(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:_l(t),target:n==null?void 0:n[1],summary:t}]}}function zl(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!et(n)||typeof n.tool_name!="string")continue;const r=et(n.tool_input)?n.tool_input:void 0,i=Pl(r),o=typeof e.result=="string"&&e.result.trim().length>0?e.result.trim():`Awaiting your permission to use ${n.tool_name}${i?` on \`${i}\``:""}.`;t.push({toolName:n.tool_name,...typeof n.tool_use_id=="string"?{toolUseId:n.tool_use_id}:{},...i?{target:i}:{},summary:o})}return t.length>0?{requests:t}:null}function Fn(e){if(!Array.isArray(e))return null;for(const t of e){if(!et(t)||t.type!=="text"||typeof t.text!="string")continue;const n=Xt(t.text);if(n)return n}return null}function fn(e){if(!et(e))return null;const t=zl(e);if(t)return t;if(typeof e.result=="string"){const r=Xt(e.result);if(r)return r}if(typeof e.message=="string"){const r=Xt(e.message);if(r)return r}if(et(e.message)){const r=fn(e.message);if(r)return r;const i=Fn(e.message.content);if(i)return i}const n=Fn(e.content);return n||null}function Ll(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function Dl(e,t){return e.requests.map(n=>{const r=n.target?` for \`${n.target}\``:"",i=t==="approve"?`Approved. Proceed with the requested ${n.toolName} action${r}.`:`Denied. Do not proceed with the requested ${n.toolName} action${r}. Ask for another approach if needed.`;return n.toolUseId?{type:"tool_result",toolUseId:n.toolUseId,content:i,isError:t==="deny"}:t==="approve"?{type:"text",text:i}:{type:"text",text:i}})}function Fl(e){return Oe(e)!==null}function Gt(e){return typeof e=="object"&&e!==null}function Mn(e){if(e.type==="user"){const t=Oe(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Se(t)}`}return JSON.stringify(e)}function Xe(e){return Array.isArray(e)?e.map(t=>Xe(t)):Gt(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,Xe(n)])):e}function On(e){const t=Oe(e);if(t)return`user:${Se(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(Gt(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(Xe(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(Xe(e.content))}`;if(Gt(e.message))return`assistant:${JSON.stringify(Xe(e.message))}`}return JSON.stringify(e)}function Rn(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function Kt(e){const t=Ct(e);return t?`question:${Re(t)}`:null}function Ml(e){const t=fn(e);return t?`permission:${Ll(t)}`:null}function Bn(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=Kt(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=Et(n.text);i&&t.add(Re(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function Ol(e){const t=Kt(e);if(t)return t;if(typeof e.message=="string"){const n=Et(e.message);return n?Re(n):null}if(typeof e.message=="object"&&e.message!==null){const n=Kt(e.message);return n||Bn(e.message.content)}return Bn(e.content)}function Rl(e){return Ml(e)}function Dp(e,t,n){const r=typeof t.timestamp=="string"?t.timestamp:"";return`${e}-${r}-${n}`}function Fp(e,t){const n=new Map;for(const i of t){const o=On(i);n.set(o,(n.get(o)??0)+1)}const r=[];for(let i=e.length-1;i>=0;i-=1){const o=e[i];if(!o)continue;const l=On(o),a=n.get(l)??0;if(a>0){n.set(l,a-1);continue}r.push({...o})}return[...r.reverse(),...t.map(i=>({...i}))].map((i,o)=>({event:i,order:o})).sort((i,o)=>{const l=Rn(i.event),a=Rn(o.event);return l!==null&&a!==null&&l!==a?l-a:i.order-o.order}).map(i=>i.event)}function Mp(e,t){const n=Mn(t);return e.some(r=>Mn(r)===n)?e:[...e,{...t}]}function Op(e,t){const n=new Map;for(const r of t){const i=Oe(r);if(!i)continue;const o=Se(i);n.set(o,(n.get(o)??0)+1)}return e.filter(r=>{const i=Se(r.content),o=n.get(i)??0;return o<=0?!0:(n.set(i,o-1),!1)})}function Rp(e,t){const n=Se(t),r=e.findIndex(i=>Se(i.content)===n);return r===-1?e:e.filter((i,o)=>o!==r)}function Bp(e,t){const n=Se(t);return e.some(r=>{const i=Oe(r);return i!==null&&Se(i)===n})}function $p(e){const t=[];let n=null;for(const r of e){if(Fl(r)){n=null,t.push(r);continue}const i=Rl(r)??Ol(r);i&&i===n||(t.push(r),i&&(n=i))}return t}function Bl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $l=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ul=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ql={};function $n(e,t){return(ql.jsx?Ul:$l).test(e)}const Hl=/[ \t\n\f\r]/g;function Vl(e){return typeof e=="object"?e.type==="text"?Un(e.value):!1:Un(e)}function Un(e){return e.replace(Hl,"")===""}class ot{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ot.prototype.normal={};ot.prototype.property={};ot.prototype.space=void 0;function zr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ot(n,r,t)}function Qt(e){return e.toLowerCase()}class te{constructor(t,n){this.attribute=n,this.property=t}}te.prototype.attribute="";te.prototype.booleanish=!1;te.prototype.boolean=!1;te.prototype.commaOrSpaceSeparated=!1;te.prototype.commaSeparated=!1;te.prototype.defined=!1;te.prototype.mustUseProperty=!1;te.prototype.number=!1;te.prototype.overloadedBoolean=!1;te.prototype.property="";te.prototype.spaceSeparated=!1;te.prototype.space=void 0;let Wl=0;const F=ve(),Y=ve(),Zt=ve(),A=ve(),J=ve(),De=ve(),re=ve();function ve(){return 2**++Wl}const en=Object.freeze(Object.defineProperty({__proto__:null,boolean:F,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:De,number:A,overloadedBoolean:Zt,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),jt=Object.keys(en);class pn extends te{constructor(t,n,r,i){let o=-1;if(super(t,n),qn(this,"space",i),typeof r=="number")for(;++o<jt.length;){const l=jt[o];qn(this,jt[o],(r&en[l])===en[l])}}}pn.prototype.defined=!0;function qn(e,t,n){n&&(e[t]=n)}function Be(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new pn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Qt(r)]=r,n[Qt(o.attribute)]=r}return new ot(t,n,e.space)}const Lr=Be({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:J,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:A,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:Y,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Dr(e,t){return t in e?e[t]:t}function Fr(e,t){return Dr(e,t.toLowerCase())}const Jl=Be({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:De,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:F,allowPaymentRequest:F,allowUserMedia:F,alt:null,as:null,async:F,autoCapitalize:null,autoComplete:J,autoFocus:F,autoPlay:F,blocking:J,capture:null,charSet:null,checked:F,cite:null,className:J,cols:A,colSpan:null,content:null,contentEditable:Y,controls:F,controlsList:J,coords:A|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:F,defer:F,dir:null,dirName:null,disabled:F,download:Zt,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:F,formTarget:null,headers:J,height:A,hidden:Zt,high:A,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:F,inputMode:null,integrity:null,is:null,isMap:F,itemId:null,itemProp:J,itemRef:J,itemScope:F,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:F,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:F,muted:F,name:null,nonce:null,noModule:F,noValidate:F,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:F,optimum:A,pattern:null,ping:J,placeholder:null,playsInline:F,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:F,referrerPolicy:null,rel:J,required:F,reversed:F,rows:A,rowSpan:A,sandbox:J,scope:null,scoped:F,seamless:F,selected:F,shadowRootClonable:F,shadowRootDelegatesFocus:F,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:F,useMap:null,value:Y,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:F,declare:F,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:F,noHref:F,noShade:F,noWrap:F,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:F,disableRemotePlayback:F,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Fr}),Yl=Be({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:J,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:F,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:De,g2:De,glyphName:De,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dr}),Mr=Be({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Or=Be({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Fr}),Rr=Be({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xl={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Gl=/[A-Z]/g,Hn=/-[a-z]/g,Kl=/^data[-\w.:]+$/i;function Ql(e,t){const n=Qt(t);let r=t,i=te;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Kl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Hn,eo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Hn.test(o)){let l=o.replace(Gl,Zl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=pn}return new i(r,t)}function Zl(e){return"-"+e.toLowerCase()}function eo(e){return e.charAt(1).toUpperCase()}const to=zr([Lr,Jl,Mr,Or,Rr],"html"),hn=zr([Lr,Yl,Mr,Or,Rr],"svg");function no(e){return e.join(" ").trim()}var _e={},Pt,Vn;function ro(){if(Vn)return Pt;Vn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
|
|
49
|
-
`,u="/",f="*",c="",h="comment",p="declaration";function m(C,y){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];y=y||{};var I=1,E=1;function z(_){var v=_.match(t);v&&(I+=v.length);var H=_.lastIndexOf(s);E=~H?_.length-H:E+_.length}function L(){var _={line:I,column:E};return function(v){return v.position=new S(_),$(),v}}function S(_){this.start=_,this.end={line:I,column:E},this.source=y.source}S.prototype.content=C;function O(_){var v=new Error(y.source+":"+I+":"+E+": "+_);if(v.reason=_,v.filename=y.source,v.line=I,v.column=E,v.source=C,!y.silent)throw v}function U(_){var v=_.exec(C);if(v){var H=v[0];return z(H),C=C.slice(H.length),v}}function $(){U(n)}function k(_){var v;for(_=_||[];v=N();)v!==!1&&_.push(v);return _}function N(){var _=L();if(!(u!=C.charAt(0)||f!=C.charAt(1))){for(var v=2;c!=C.charAt(v)&&(f!=C.charAt(v)||u!=C.charAt(v+1));)++v;if(v+=2,c===C.charAt(v-1))return O("End of comment missing");var H=C.slice(2,v-2);return E+=2,z(H),C=C.slice(v),E+=2,_({type:h,comment:H})}}function j(){var _=L(),v=U(r);if(v){if(N(),!U(i))return O("property missing ':'");var H=U(o),X=_({type:p,property:b(v[0].replace(e,c)),value:H?b(H[0].replace(e,c)):c});return U(l),X}}function q(){var _=[];k(_);for(var v;v=j();)v!==!1&&(_.push(v),k(_));return _}return $(),q()}function b(C){return C?C.replace(a,c):c}return Pt=m,Pt}var Wn;function io(){if(Wn)return _e;Wn=1;var e=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=n;const t=e(ro());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return _e}var Ve={},Jn;function lo(){if(Jn)return Ve;Jn=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Ve.camelCase=s,Ve}var We,Yn;function oo(){if(Yn)return We;Yn=1;var e=We&&We.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(io()),n=lo();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,We=r,We}var ao=oo();const so=jr(ao),Br=$r("end"),mn=$r("start");function $r(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function uo(e){const t=mn(e),n=Br(e);if(t&&n)return{start:t,end:n}}function Ge(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xn(e.position):"start"in e||"end"in e?Xn(e):"line"in e||"column"in e?tn(e):""}function tn(e){return Gn(e&&e.line)+":"+Gn(e&&e.column)}function Xn(e){return tn(e&&e.start)+"-"+tn(e&&e.end)}function Gn(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ge(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const dn={}.hasOwnProperty,co=new Map,fo=/[A-Z]/g,po=new Set(["table","tbody","thead","tfoot","tr"]),ho=new Set(["td","th"]),Ur="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function mo(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Co(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=So(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?hn:to,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=qr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function qr(e,t,n){if(t.type==="element")return go(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xo(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ko(e,t,n);if(t.type==="mdxjsEsm")return yo(e,t);if(t.type==="root")return bo(e,t,n);if(t.type==="text")return wo(e,t)}function go(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=hn,e.schema=i),e.ancestors.push(t);const o=Vr(e,t.tagName,!1),l=Eo(e,t);let a=xn(e,t);return po.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Vl(s):!0})),Hr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function xo(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}tt(e,t.position)}function yo(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tt(e,t.position)}function ko(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=hn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Vr(e,t.name,!0),l=Ao(e,t),a=xn(e,t);return Hr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function bo(e,t,n){const r={};return gn(r,xn(e,t)),e.create(t,e.Fragment,r,n)}function wo(e,t){return t.value}function Hr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function So(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function Co(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=mn(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Eo(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&dn.call(t.properties,i)){const o=Io(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&ho.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ao(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else tt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else tt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function xn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:co;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=qr(e,o,l);a!==void 0&&n.push(a)}return n}function Io(e,t,n){const r=Ql(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Bl(n):no(n)),r.property==="style"){let i=typeof n=="object"?n:To(e,String(n));return e.stylePropertyNameCase==="css"&&(i=vo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Xl[r.property]||r.property:r.attribute,n]}}function To(e,t){try{return so(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Q("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ur+"#cannot-parse-style-attribute",i}}function Vr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=$n(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=$n(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return dn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);tt(e)}function tt(e,t){const n=new Q("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ur+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vo(e){const t={};let n;for(n in e)dn.call(e,n)&&(t[No(n)]=e[n]);return t}function No(e){let t=e.replace(fo,jo);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jo(e){return"-"+e.toLowerCase()}const _t={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Po={};function yn(e,t){const n=Po,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wr(e,r,i)}function Wr(e,t,n){if(_o(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Kn(e.children,t,n)}return Array.isArray(e)?Kn(e,t,n):""}function Kn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wr(e[i],t,n);return r.join("")}function _o(e){return!!(e&&typeof e=="object")}const Qn=document.createElement("i");function kn(e){const t="&"+e+";";Qn.innerHTML=t;const n=Qn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ie(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const Zn={}.hasOwnProperty;function Jr(e){const t={};let n=-1;for(;++n<e.length;)zo(t,e[n]);return t}function zo(e,t){let n;for(n in t){const i=(Zn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Zn.call(i,l)||(i[l]=[]);const a=o[l];Lo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Lo(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ie(e,0,0,r)}function Yr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ce(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Z=Ce(/[A-Za-z]/),K=Ce(/[\dA-Za-z]/),Do=Ce(/[#-'*+\--9=?A-Z^-~]/);function kt(e){return e!==null&&(e<32||e===127)}const nn=Ce(/\d/),Fo=Ce(/[\dA-Fa-f]/),Mo=Ce(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function M(e){return e===-2||e===-1||e===32}const At=Ce(new RegExp("\\p{P}|\\p{S}","u")),Te=Ce(/\s/);function Ce(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $e(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function B(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return M(s)?(e.enter(n),a(s)):t(s)}function a(s){return M(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const Oo={tokenize:Ro};function Ro(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),B(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return P(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Bo={tokenize:$o},er={tokenize:Uo};function $o(e){const t=this,n=[];let r=0,i,o,l;return a;function a(E){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,s,u)(E)}return u(E)}function s(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const z=t.events.length;let L=z,S;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){S=t.events[L][1].end;break}y(r);let O=z;for(;O<t.events.length;)t.events[O][1].end={...S},O++;return ie(t.events,L+1,0,t.events.slice(z)),t.events.length=O,u(E)}return a(E)}function u(E){if(r===n.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return m(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(er,f,c)(E)}function f(E){return i&&I(),y(r),h(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,m(E)}function h(E){return t.containerState={},e.attempt(er,p,m)(E)}function p(E){return r++,n.push([t.currentConstruct,t.containerState]),h(E)}function m(E){if(E===null){i&&I(),y(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(E)}function b(E){if(E===null){C(e.exit("chunkFlow"),!0),y(0),e.consume(E);return}return P(E)?(e.consume(E),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(E),b)}function C(E,z){const L=t.sliceStream(E);if(z&&L.push(null),E.previous=o,o&&(o.next=E),o=E,i.defineSkip(E.start),i.write(L),t.parser.lazy[E.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<l&&(!i.events[S][1].end||i.events[S][1].end.offset>l))return;const O=t.events.length;let U=O,$,k;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if($){k=t.events[U][1].end;break}$=!0}for(y(r),S=O;S<t.events.length;)t.events[S][1].end={...k},S++;ie(t.events,U+1,0,t.events.slice(O)),t.events.length=S}}function y(E){let z=n.length;for(;z-- >E;){const L=n[z];t.containerState=L[1],L[0].exit.call(t,e)}n.length=E}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Uo(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Me(e){if(e===null||W(e)||Te(e))return 1;if(At(e))return 2}function It(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const rn={name:"attention",resolveAll:qo,tokenize:Ho};function qo(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};tr(c,-s),tr(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=le(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=le(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=le(u,It(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=le(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ie(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ho(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Me(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=Me(s),c=!f||f===2&&i||n.includes(s),h=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),t(s)}}function tr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vo={name:"autolink",tokenize:Wo};function Wo(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Z(p)?(e.consume(p),l):p===64?n(p):u(p)}function l(p){return p===43||p===45||p===46||K(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||K(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||kt(p)?n(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):Do(p)?(e.consume(p),u):n(p)}function f(p){return K(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||K(p))&&r++<63){const m=p===45?h:c;return e.consume(p),m}return n(p)}}const at={partial:!0,tokenize:Jo};function Jo(e,t,n){return r;function r(o){return M(o)?B(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||P(o)?t(o):n(o)}}const Xr={continuation:{tokenize:Xo},exit:Go,name:"blockQuote",tokenize:Yo};function Yo(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return M(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Xo(e,t,n){const r=this;return i;function i(l){return M(l)?B(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Xr,t,n)(l)}}function Go(e){e.exit("blockQuote")}const Gr={name:"characterEscape",tokenize:Ko};function Ko(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Mo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Kr={name:"characterReference",tokenize:Qo};function Qo(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=K,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Fo,f):(e.enter("characterReferenceValue"),o=7,l=nn,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===K&&!kn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const nr={partial:!0,tokenize:ea},rr={concrete:!0,name:"codeFenced",tokenize:Zo};function Zo(e,t,n){const r=this,i={partial:!0,tokenize:L};let o=0,l=0,a;return s;function s(S){return u(S)}function u(S){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===a?(l++,e.consume(S),f):l<3?n(S):(e.exit("codeFencedFenceSequence"),M(S)?B(e,c,"whitespace")(S):c(S))}function c(S){return S===null||P(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(nr,b,z)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(S)):M(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,p,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),h)}function p(S){return S===null||P(S)?c(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(S)):S===96&&S===a?n(S):(e.consume(S),m)}function b(S){return e.attempt(i,z,C)(S)}function C(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return o>0&&M(S)?B(e,I,"linePrefix",o+1)(S):I(S)}function I(S){return S===null||P(S)?e.check(nr,b,z)(S):(e.enter("codeFlowValue"),E(S))}function E(S){return S===null||P(S)?(e.exit("codeFlowValue"),I(S)):(e.consume(S),E)}function z(S){return e.exit("codeFenced"),t(S)}function L(S,O,U){let $=0;return k;function k(v){return S.enter("lineEnding"),S.consume(v),S.exit("lineEnding"),N}function N(v){return S.enter("codeFencedFence"),M(v)?B(S,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):j(v)}function j(v){return v===a?(S.enter("codeFencedFenceSequence"),q(v)):U(v)}function q(v){return v===a?($++,S.consume(v),q):$>=l?(S.exit("codeFencedFenceSequence"),M(v)?B(S,_,"whitespace")(v):_(v)):U(v)}function _(v){return v===null||P(v)?(S.exit("codeFencedFence"),O(v)):U(v)}}}function ea(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const zt={name:"codeIndented",tokenize:na},ta={partial:!0,tokenize:ra};function na(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),B(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):P(u)?e.attempt(ta,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||P(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function ra(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):P(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):B(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):P(l)?i(l):n(l)}}const ia={name:"codeText",previous:oa,resolve:la,tokenize:aa};function la(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function oa(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aa(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):P(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||P(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class sa{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Je(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Je(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Je(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Je(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Je(this.left,n.reverse())}}}function Je(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Qr(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new sa(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ua(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function ua(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=n,m=0,b=0;const C=[b];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(b=h+1,C.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),h=C.length;h--;){const y=a.slice(C[h],C[h+1]),I=o.pop();s.push([I,I+y.length-1]),e.splice(I,2,y)}for(s.reverse(),h=-1;++h<s.length;)u[m+s[h][0]]=m+s[h][1],m+=s[h][1]-s[h][0]-1;return u}const ca={resolve:pa,tokenize:ha},fa={partial:!0,tokenize:ma};function pa(e){return Qr(e),e}function ha(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):P(a)?e.check(fa,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ma(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),B(e,o,"linePrefix")}function o(l){if(l===null||P(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Zr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||kt(y)?n(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||P(y)?n(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function b(y){return!f&&(y===null||y===41||W(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,b):y===41?(e.consume(y),f--,b):y===null||y===32||y===40||kt(y)?n(y):(e.consume(y),y===92?C:b)}function C(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function ei(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||P(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!M(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function ti(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,s):n(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?n(h):P(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),B(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||P(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function Ke(e,t){let n;return r;function r(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):M(i)?B(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const da={name:"definition",tokenize:xa},ga={partial:!0,tokenize:ya};function xa(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return ei.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return W(p)?Ke(e,u)(p):u(p)}function u(p){return Zr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(ga,c,c)(p)}function c(p){return M(p)?B(e,h,"whitespace")(p):h(p)}function h(p){return p===null||P(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ya(e,t,n){return r;function r(a){return W(a)?Ke(e,i)(a):n(a)}function i(a){return ti(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return M(a)?B(e,l,"whitespace")(a):l(a)}function l(a){return a===null||P(a)?t(a):n(a)}}const ka={name:"hardBreakEscape",tokenize:ba};function ba(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return P(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const wa={name:"headingAtx",resolve:Sa,tokenize:Ca};function Sa(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Ca(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||W(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||P(f)?(e.exit("atxHeading"),t(f)):M(f)?B(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Ea=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ir=["pre","script","style","textarea"],Aa={concrete:!0,name:"htmlFlow",resolveTo:va,tokenize:Na},Ia={partial:!0,tokenize:Pa},Ta={partial:!0,tokenize:ja};function va(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Na(e,t,n){const r=this;let i,o,l,a,s;return u;function u(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),o=!0,b):g===63?(e.consume(g),i=3,r.interrupt?t:d):Z(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,m):Z(g)?(e.consume(g),i=4,r.interrupt?t:d):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function m(g){const se="CDATA[";return g===se.charCodeAt(a++)?(e.consume(g),a===se.length?r.interrupt?t:j:m):n(g)}function b(g){return Z(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function C(g){if(g===null||g===47||g===62||W(g)){const se=g===47,Ee=l.toLowerCase();return!se&&!o&&ir.includes(Ee)?(i=1,r.interrupt?t(g):j(g)):Ea.includes(l.toLowerCase())?(i=6,se?(e.consume(g),y):r.interrupt?t(g):j(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?I(g):E(g))}return g===45||K(g)?(e.consume(g),l+=String.fromCharCode(g),C):n(g)}function y(g){return g===62?(e.consume(g),r.interrupt?t:j):n(g)}function I(g){return M(g)?(e.consume(g),I):k(g)}function E(g){return g===47?(e.consume(g),k):g===58||g===95||Z(g)?(e.consume(g),z):M(g)?(e.consume(g),E):k(g)}function z(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),z):L(g)}function L(g){return g===61?(e.consume(g),S):M(g)?(e.consume(g),L):E(g)}function S(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),s=g,O):M(g)?(e.consume(g),S):U(g)}function O(g){return g===s?(e.consume(g),s=null,$):g===null||P(g)?n(g):(e.consume(g),O)}function U(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||W(g)?L(g):(e.consume(g),U)}function $(g){return g===47||g===62||M(g)?E(g):n(g)}function k(g){return g===62?(e.consume(g),N):n(g)}function N(g){return g===null||P(g)?j(g):M(g)?(e.consume(g),N):n(g)}function j(g){return g===45&&i===2?(e.consume(g),H):g===60&&i===1?(e.consume(g),X):g===62&&i===4?(e.consume(g),ae):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),he):P(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ia,me,q)(g)):g===null||P(g)?(e.exit("htmlFlowData"),q(g)):(e.consume(g),j)}function q(g){return e.check(Ta,_,me)(g)}function _(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),v}function v(g){return g===null||P(g)?q(g):(e.enter("htmlFlowData"),j(g))}function H(g){return g===45?(e.consume(g),d):j(g)}function X(g){return g===47?(e.consume(g),l="",oe):j(g)}function oe(g){if(g===62){const se=l.toLowerCase();return ir.includes(se)?(e.consume(g),ae):j(g)}return Z(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),oe):j(g)}function he(g){return g===93?(e.consume(g),d):j(g)}function d(g){return g===62?(e.consume(g),ae):g===45&&i===2?(e.consume(g),d):j(g)}function ae(g){return g===null||P(g)?(e.exit("htmlFlowData"),me(g)):(e.consume(g),ae)}function me(g){return e.exit("htmlFlow"),t(g)}}function ja(e,t,n){const r=this;return i;function i(l){return P(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Pa(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(at,t,n)}}const _a={name:"htmlText",tokenize:za};function za(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),L):d===63?(e.consume(d),E):Z(d)?(e.consume(d),U):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,m):Z(d)?(e.consume(d),I):n(d)}function f(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):P(d)?(l=c,X(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?H(d):d===45?h(d):c(d)}function m(d){const ae="CDATA[";return d===ae.charCodeAt(o++)?(e.consume(d),o===ae.length?b:m):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),C):P(d)?(l=b,X(d)):(e.consume(d),b)}function C(d){return d===93?(e.consume(d),y):b(d)}function y(d){return d===62?H(d):d===93?(e.consume(d),y):b(d)}function I(d){return d===null||d===62?H(d):P(d)?(l=I,X(d)):(e.consume(d),I)}function E(d){return d===null?n(d):d===63?(e.consume(d),z):P(d)?(l=E,X(d)):(e.consume(d),E)}function z(d){return d===62?H(d):E(d)}function L(d){return Z(d)?(e.consume(d),S):n(d)}function S(d){return d===45||K(d)?(e.consume(d),S):O(d)}function O(d){return P(d)?(l=O,X(d)):M(d)?(e.consume(d),O):H(d)}function U(d){return d===45||K(d)?(e.consume(d),U):d===47||d===62||W(d)?$(d):n(d)}function $(d){return d===47?(e.consume(d),H):d===58||d===95||Z(d)?(e.consume(d),k):P(d)?(l=$,X(d)):M(d)?(e.consume(d),$):H(d)}function k(d){return d===45||d===46||d===58||d===95||K(d)?(e.consume(d),k):N(d)}function N(d){return d===61?(e.consume(d),j):P(d)?(l=N,X(d)):M(d)?(e.consume(d),N):$(d)}function j(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,q):P(d)?(l=j,X(d)):M(d)?(e.consume(d),j):(e.consume(d),_)}function q(d){return d===i?(e.consume(d),i=void 0,v):d===null?n(d):P(d)?(l=q,X(d)):(e.consume(d),q)}function _(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||W(d)?$(d):(e.consume(d),_)}function v(d){return d===47||d===62||W(d)?$(d):n(d)}function H(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function X(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),oe}function oe(d){return M(d)?B(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):he(d)}function he(d){return e.enter("htmlTextData"),l(d)}}const bn={name:"labelEnd",resolveAll:Ma,resolveTo:Oa,tokenize:Ra},La={tokenize:Ba},Da={tokenize:$a},Fa={tokenize:Ua};function Ma(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ie(e,0,e.length,n),e}function Oa(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=le(a,e.slice(o+1,o+r+3)),a=le(a,[["enter",f,t]]),a=le(a,It(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=le(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=le(a,e.slice(l+1)),a=le(a,[["exit",s,t]]),ie(e,o,e.length,a),e}function Ra(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(ce(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):n(h)}function s(h){return h===40?e.attempt(La,f,l?f:c)(h):h===91?e.attempt(Da,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(Fa,f,c)(h)}function f(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function Ba(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return W(c)?Ke(e,o)(c):o(c)}function o(c){return c===41?f(c):Zr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return W(c)?Ke(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?ti(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?Ke(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function $a(e,t,n){const r=this;return i;function i(a){return ei.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Ua(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const qa={name:"labelStartImage",resolveAll:bn.resolveAll,tokenize:Ha};function Ha(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Va={name:"labelStartLink",resolveAll:bn.resolveAll,tokenize:Wa};function Wa(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Lt={name:"lineEnding",tokenize:Ja};function Ja(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const dt={name:"thematicBreak",tokenize:Ya};function Ya(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||P(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),M(u)?B(e,a,"whitespace")(u):a(u))}}const ee={continuation:{tokenize:Qa},exit:es,name:"list",tokenize:Ka},Xa={partial:!0,tokenize:ts},Ga={partial:!0,tokenize:Za};function Ka(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:nn(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(dt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return nn(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(at,r.interrupt?n:f,e.attempt(Xa,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return M(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Qa(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(at,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!M(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ga,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Za(e,t,n){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function es(e){e.exit(this.containerState.type)}function ts(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!M(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const lr={name:"setextUnderline",resolveTo:ns,tokenize:rs};function ns(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function rs(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),M(u)?B(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||P(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const is={tokenize:ls};function ls(e){const t=this,n=e.attempt(at,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ca,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const os={resolveAll:ri()},as=ni("string"),ss=ni("text");function ni(e){return{resolveAll:ri(e==="text"?us:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function ri(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function us(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const cs={42:ee,43:ee,45:ee,48:ee,49:ee,50:ee,51:ee,52:ee,53:ee,54:ee,55:ee,56:ee,57:ee,62:Xr},fs={91:da},ps={[-2]:zt,[-1]:zt,32:zt},hs={35:wa,42:dt,45:[lr,dt],60:Aa,61:lr,95:dt,96:rr,126:rr},ms={38:Kr,92:Gr},ds={[-5]:Lt,[-4]:Lt,[-3]:Lt,33:qa,38:Kr,42:rn,60:[Vo,_a],91:Va,92:[ka,Gr],93:bn,95:rn,96:ia},gs={null:[rn,os]},xs={null:[42,95]},ys={null:[]},ks=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xs,contentInitial:fs,disable:ys,document:cs,flow:hs,flowInitial:ps,insideSpan:gs,string:ms,text:ds},Symbol.toStringTag,{value:"Module"}));function bs(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:O(L),check:O(S),consume:I,enter:E,exit:z,interrupt:O(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(N){return l=le(l,N),C(),l[l.length-1]!==null?[]:(U(t,0),u.events=It(o,u.events,u),u.events)}function h(N,j){return Ss(p(N),j)}function p(N){return ws(l,N)}function m(){const{_bufferIndex:N,_index:j,line:q,column:_,offset:v}=r;return{_bufferIndex:N,_index:j,line:q,column:_,offset:v}}function b(N){i[N.line]=N.column,k()}function C(){let N;for(;r._index<l.length;){const j=l[r._index];if(typeof j=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<j.length;)y(j.charCodeAt(r._bufferIndex));else y(j)}}function y(N){f=f(N)}function I(N){P(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,k()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function E(N,j){const q=j||{};return q.type=N,q.start=m(),u.events.push(["enter",q,u]),a.push(q),q}function z(N){const j=a.pop();return j.end=m(),u.events.push(["exit",j,u]),j}function L(N,j){U(N,j.from)}function S(N,j){j.restore()}function O(N,j){return q;function q(_,v,H){let X,oe,he,d;return Array.isArray(_)?me(_):"tokenize"in _?me([_]):ae(_);function ae(G){return Ue;function Ue(be){const Ne=be!==null&&G[be],je=be!==null&&G.null,ut=[...Array.isArray(Ne)?Ne:Ne?[Ne]:[],...Array.isArray(je)?je:je?[je]:[]];return me(ut)(be)}}function me(G){return X=G,oe=0,G.length===0?H:g(G[oe])}function g(G){return Ue;function Ue(be){return d=$(),he=G,G.partial||(u.currentConstruct=G),G.name&&u.parser.constructs.disable.null.includes(G.name)?Ee():G.tokenize.call(j?Object.assign(Object.create(u),j):u,s,se,Ee)(be)}}function se(G){return N(he,d),v}function Ee(G){return d.restore(),++oe<X.length?g(X[oe]):H}}}function U(N,j){N.resolveAll&&!o.includes(N)&&o.push(N),N.resolve&&ie(u.events,j,u.events.length-j,N.resolve(u.events.slice(j),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function $(){const N=m(),j=u.previous,q=u.currentConstruct,_=u.events.length,v=Array.from(a);return{from:_,restore:H};function H(){r=N,u.previous=j,u.currentConstruct=q,u.events.length=_,a=v,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ws(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ss(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
50
|
-
`;break}case-3:{l=`\r
|
|
51
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Cs(e){const r={constructs:Jr([ks,...(e||{}).extensions||[]]),content:i(Oo),defined:[],document:i(Bo),flow:i(is),lazy:{},string:i(as),text:i(ss)};return r;function i(o){return l;function l(a){return bs(r,o,a)}}}function Es(e){for(;!Qr(e););return e}const or=/[\0\t\n\r]/g;function As(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(or.lastIndex=c,u=or.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(c);break}if(p===10&&c===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<h&&(s.push(o.slice(c,h)),e+=h-c),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Is=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ts(e){return e.replace(Is,vs)}function vs(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Yr(n.slice(o?2:1),o?16:10)}return kn(n)||e}const ii={}.hasOwnProperty;function Ns(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),js(n)(Es(Cs(n).document().write(As()(e,t,!0))))}function js(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ln),autolinkProtocol:$,autolinkEmail:$,atxHeading:o(Pn),blockQuote:o(je),characterEscape:$,characterReference:$,codeFenced:o(ut),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(ut,l),codeText:o($i,l),codeTextData:$,data:$,codeFlowValue:$,definition:o(Ui),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(qi),hardBreakEscape:o(_n),hardBreakTrailing:o(_n),htmlFlow:o(zn,l),htmlFlowData:$,htmlText:o(zn,l),htmlTextData:$,image:o(Hi),label:l,link:o(Ln),listItem:o(Vi),listItemValue:h,listOrdered:o(Dn,c),listUnordered:o(Dn),paragraph:o(Wi),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Pn),strong:o(Ji),thematicBreak:o(Xi)},exit:{atxHeading:s(),atxHeadingSequence:L,autolink:s(),autolinkEmail:Ne,autolinkProtocol:be,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:G,characterReference:Ue,codeFenced:s(C),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:k,codeIndented:s(y),codeText:s(v),codeTextData:k,data:k,definition:s(),definitionDestinationString:z,definitionLabelString:I,definitionTitleString:E,emphasis:s(),hardBreakEscape:s(j),hardBreakTrailing:s(j),htmlFlow:s(q),htmlFlowData:k,htmlText:s(_),htmlTextData:k,image:s(X),label:he,labelText:oe,lineEnding:N,link:s(H),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:se,resourceDestinationString:d,resourceTitleString:ae,resource:me,setextHeading:s(U),setextHeadingLineSequence:O,setextHeadingText:S,strong:s(),thematicBreak:s()}};li(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let T={type:"root",children:[]};const D={stack:[T],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},R=[];let V=-1;for(;++V<w.length;)if(w[V][1].type==="listOrdered"||w[V][1].type==="listUnordered")if(w[V][0]==="enter")R.push(V);else{const ue=R.pop();V=i(w,ue,V)}for(V=-1;++V<w.length;){const ue=t[w[V][0]];ii.call(ue,w[V][1].type)&&ue[w[V][1].type].call(Object.assign({sliceSerialize:w[V][2].sliceSerialize},D),w[V][1])}if(D.tokenStack.length>0){const ue=D.tokenStack[D.tokenStack.length-1];(ue[1]||ar).call(D,void 0,ue[0])}for(T.position={start:we(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:we(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)T=t.transforms[V](T)||T;return T}function i(w,T,D){let R=T-1,V=-1,ue=!1,Ae,de,qe,He;for(;++R<=D;){const ne=w[R];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,He=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ae&&!He&&!V&&!qe&&(qe=R),He=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:He=void 0}if(!V&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||V===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(Ae){let Pe=R;for(de=void 0;Pe--;){const ge=w[Pe];if(ge[1].type==="lineEnding"||ge[1].type==="lineEndingBlank"){if(ge[0]==="exit")continue;de&&(w[de][1].type="lineEndingBlank",ue=!0),ge[1].type="lineEnding",de=Pe}else if(!(ge[1].type==="linePrefix"||ge[1].type==="blockQuotePrefix"||ge[1].type==="blockQuotePrefixWhitespace"||ge[1].type==="blockQuoteMarker"||ge[1].type==="listItemIndent"))break}qe&&(!de||qe<de)&&(Ae._spread=!0),Ae.end=Object.assign({},de?w[de][1].start:ne[1].end),w.splice(de||R,0,["exit",Ae,ne[2]]),R++,D++}if(ne[1].type==="listItemPrefix"){const Pe={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ae=Pe,w.splice(R,0,["enter",Pe,ne[2]]),R++,D++,qe=void 0,He=!0}}}return w[T][1]._spread=ue,D}function o(w,T){return D;function D(R){a.call(this,w(R),R),T&&T.call(this,R)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,T,D){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([T,D||void 0]),w.position={start:we(T.start),end:void 0}}function s(w){return T;function T(D){w&&w.call(this,D),u.call(this,D)}}function u(w,T){const D=this.stack.pop(),R=this.tokenStack.pop();if(R)R[0].type!==w.type&&(T?T.call(this,w,R[0]):(R[1]||ar).call(this,w,R[0]));else throw new Error("Cannot close `"+w.type+"` ("+Ge({start:w.start,end:w.end})+"): it’s not open");D.position.end=we(w.end)}function f(){return yn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(w){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function p(){const w=this.resume(),T=this.stack[this.stack.length-1];T.lang=w}function m(){const w=this.resume(),T=this.stack[this.stack.length-1];T.meta=w}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const w=this.resume(),T=this.stack[this.stack.length-1];T.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const w=this.resume(),T=this.stack[this.stack.length-1];T.value=w.replace(/(\r?\n|\r)$/g,"")}function I(w){const T=this.resume(),D=this.stack[this.stack.length-1];D.label=T,D.identifier=ce(this.sliceSerialize(w)).toLowerCase()}function E(){const w=this.resume(),T=this.stack[this.stack.length-1];T.title=w}function z(){const w=this.resume(),T=this.stack[this.stack.length-1];T.url=w}function L(w){const T=this.stack[this.stack.length-1];if(!T.depth){const D=this.sliceSerialize(w).length;T.depth=D}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function O(w){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(w){const D=this.stack[this.stack.length-1].children;let R=D[D.length-1];(!R||R.type!=="text")&&(R=Yi(),R.position={start:we(w.start),end:void 0},D.push(R)),this.stack.push(R)}function k(w){const T=this.stack.pop();T.value+=this.sliceSerialize(w),T.position.end=we(w.end)}function N(w){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=T.children[T.children.length-1];D.position.end=we(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(T.type)&&($.call(this,w),k.call(this,w))}function j(){this.data.atHardBreak=!0}function q(){const w=this.resume(),T=this.stack[this.stack.length-1];T.value=w}function _(){const w=this.resume(),T=this.stack[this.stack.length-1];T.value=w}function v(){const w=this.resume(),T=this.stack[this.stack.length-1];T.value=w}function H(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=T,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function X(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=T,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function oe(w){const T=this.sliceSerialize(w),D=this.stack[this.stack.length-2];D.label=Ts(T),D.identifier=ce(T).toLowerCase()}function he(){const w=this.stack[this.stack.length-1],T=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const R=w.children;D.children=R}else D.alt=T}function d(){const w=this.resume(),T=this.stack[this.stack.length-1];T.url=w}function ae(){const w=this.resume(),T=this.stack[this.stack.length-1];T.title=w}function me(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function se(w){const T=this.resume(),D=this.stack[this.stack.length-1];D.label=T,D.identifier=ce(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Ee(w){this.data.characterReferenceType=w.type}function G(w){const T=this.sliceSerialize(w),D=this.data.characterReferenceType;let R;D?(R=Yr(T,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):R=kn(T);const V=this.stack[this.stack.length-1];V.value+=R}function Ue(w){const T=this.stack.pop();T.position.end=we(w.end)}function be(w){k.call(this,w);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(w)}function Ne(w){k.call(this,w);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(w)}function je(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function $i(){return{type:"inlineCode",value:""}}function Ui(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qi(){return{type:"emphasis",children:[]}}function Pn(){return{type:"heading",depth:0,children:[]}}function _n(){return{type:"break"}}function zn(){return{type:"html",value:""}}function Hi(){return{type:"image",title:null,url:"",alt:null}}function Ln(){return{type:"link",title:null,url:"",children:[]}}function Dn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Vi(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Wi(){return{type:"paragraph",children:[]}}function Ji(){return{type:"strong",children:[]}}function Yi(){return{type:"text",value:""}}function Xi(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function li(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?li(e,r):Ps(e,r)}}function Ps(e,t){let n;for(n in t)if(ii.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ar(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ge({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ge({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ge({start:t.start,end:t.end})+") is still open")}function _s(e){const t=this;t.parser=n;function n(r){return Ns(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zs(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ls(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
52
|
-
`}]}function Ds(e,t){const n=t.value?t.value+`
|
|
53
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Fs(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ms(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Os(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$e(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function Rs(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bs(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function oi(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function $s(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return oi(e,t);const i={src:$e(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Us(e,t){const n={src:$e(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function qs(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Hs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return oi(e,t);const i={href:$e(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Vs(e,t){const n={href:$e(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ws(e,t,n){const r=e.all(t),i=n?Js(n):ai(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
54
|
-
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
|
|
55
|
-
`});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function Js(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ai(n[r])}return t}function ai(e){const t=e.spread;return t??e.children.length>1}function Ys(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Xs(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gs(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ks(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qs(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=mn(t.children[1]),s=Br(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Zs(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],h={},p=l?l[s]:void 0;p&&(h.align=p);let m={type:"element",tagName:o,properties:h,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function eu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const sr=9,ur=32;function tu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(cr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(cr(t.slice(i),i>0,!1)),o.join("")}function cr(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===sr||o===ur;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===sr||o===ur;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function nu(e,t){const n={type:"text",value:tu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ru(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const iu={blockquote:zs,break:Ls,code:Ds,delete:Fs,emphasis:Ms,footnoteReference:Os,heading:Rs,html:Bs,imageReference:$s,image:Us,inlineCode:qs,linkReference:Hs,link:Vs,listItem:Ws,list:Ys,paragraph:Xs,root:Gs,strong:Ks,table:Qs,tableCell:eu,tableRow:Zs,text:nu,thematicBreak:ru,toml:ct,yaml:ct,definition:ct,footnoteDefinition:ct};function ct(){}const si=-1,Tt=0,Qe=1,bt=2,wn=3,Sn=4,Cn=5,En=6,ui=7,ci=8,fr=typeof self=="object"?self:globalThis,lu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case Tt:case si:return n(l,i);case Qe:{const a=n([],i);for(const s of l)a.push(r(s));return a}case bt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case wn:return n(new Date(l),i);case Sn:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case Cn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case En:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case ui:{const{name:a,message:s}=l;return n(new fr[a](s),i)}case ci:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new fr[o](l),i)};return r},pr=e=>lu(new Map,e)(0),ze="",{toString:ou}={},{keys:au}=Object,Ye=e=>{const t=typeof e;if(t!=="object"||!e)return[Tt,t];const n=ou.call(e).slice(8,-1);switch(n){case"Array":return[Qe,ze];case"Object":return[bt,ze];case"Date":return[wn,ze];case"RegExp":return[Sn,ze];case"Map":return[Cn,ze];case"Set":return[En,ze];case"DataView":return[Qe,n]}return n.includes("Array")?[Qe,n]:n.includes("Error")?[ui,n]:[bt,n]},ft=([e,t])=>e===Tt&&(t==="function"||t==="symbol"),su=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Ye(l);switch(a){case Tt:{let f=l;switch(s){case"bigint":a=ci,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([si],l)}return i([a,f],l)}case Qe:{if(s){let h=l;return s==="DataView"?h=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(l)),i([s,[...h]],l)}const f=[],c=i([a,f],l);for(const h of l)f.push(o(h));return c}case bt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const h of au(l))(e||!ft(Ye(l[h])))&&f.push([o(h),o(l[h])]);return c}case wn:return i([a,l.toISOString()],l);case Sn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case Cn:{const f=[],c=i([a,f],l);for(const[h,p]of l)(e||!(ft(Ye(h))||ft(Ye(p))))&&f.push([o(h),o(p)]);return c}case En:{const f=[],c=i([a,f],l);for(const h of l)(e||!ft(Ye(h)))&&f.push(o(h));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},hr=(e,{json:t,lossy:n}={})=>{const r=[];return su(!(t||n),!!t,new Map,r)(e),r},wt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pr(hr(e,t)):structuredClone(e):(e,t)=>pr(hr(e,t));function uu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function cu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||uu,r=e.options.footnoteBackLabel||cu,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=$e(c.toLowerCase());let p=0;const m=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){m.length>0&&m.push({type:"text",value:" "});let I=typeof n=="string"?n:n(s,p);typeof I=="string"&&(I={type:"text",value:I}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const I=C.children[C.children.length-1];I&&I.type==="text"?I.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...m)}else f.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...wt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
56
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
57
|
-
`}]}}const vt=(function(e){if(e==null)return du;if(typeof e=="function")return Nt(e);if(typeof e=="object")return Array.isArray(e)?pu(e):hu(e);if(typeof e=="string")return mu(e);throw new Error("Expected function, string, or object as test")});function pu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vt(e[n]);return Nt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function hu(e){const t=e;return Nt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function mu(e){return Nt(t);function t(n){return n&&n.type===e}}function Nt(e){return t;function t(n,r,i){return!!(gu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function du(){return!0}function gu(e){return e!==null&&typeof e=="object"&&"type"in e}const fi=[],xu=!0,ln=!1,yu="skip";function pi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=vt(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=fi,m,b,C;if((!t||o(s,u,f[f.length-1]||void 0))&&(p=ku(n(s,f)),p[0]===ln))return p;if("children"in s&&s.children){const y=s;if(y.children&&p[0]!==yu)for(b=(r?y.children.length:-1)+l,C=f.concat(y);b>-1&&b<y.children.length;){const I=y.children[b];if(m=a(I,b,C)(),m[0]===ln)return m;b=typeof m[1]=="number"?m[1]:b+l}}return p}}}function ku(e){return Array.isArray(e)?e:typeof e=="number"?[xu,e]:e==null?fi:[e]}function An(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),pi(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const on={}.hasOwnProperty,bu={};function wu(e,t){const n=t||bu,r=new Map,i=new Map,o=new Map,l={...iu,...n.handlers},a={all:u,applyData:Cu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:n,patch:Su,wrap:Au};return An(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();c.has(h)||c.set(h,f)}}),a;function s(f,c){const h=f.type,p=a.handlers[h];if(on.call(a.handlers,h)&&p)return p(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in f){const{children:b,...C}=f,y=wt(C);return y.children=a.all(f),y}return wt(f)}return(a.options.unknownHandler||Eu)(a,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],f);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=mr(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=mr(b.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function Su(e,t){e.position&&(t.position=uo(e))}function Cu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,wt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Eu(e,t){const n=t.data||{},r="value"in t&&!(on.call(n,"hProperties")||on.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Au(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
58
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
59
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
60
|
-
`}),n}function mr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function dr(e,t){const n=wu(e,t),r=n.one(e,void 0),i=fu(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
61
|
-
`},i),o}function Iu(e,t){return e&&"run"in e?async function(n,r){const i=dr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return dr(n,{file:r,...e||t})}}function gr(e){if(e)throw e}var Dt,xr;function Tu(){if(xr)return Dt;xr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Dt=function s(){var u,f,c,h,p,m,b=arguments[0],C=1,y=arguments.length,I=!1;for(typeof b=="boolean"&&(I=b,b=arguments[1]||{},C=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});C<y;++C)if(u=arguments[C],u!=null)for(f in u)c=a(b,f),h=a(u,f),b!==h&&(I&&h&&(o(h)||(p=i(h)))?(p?(p=!1,m=c&&i(c)?c:[]):m=c&&o(c)?c:{},l(b,{name:f,newValue:s(I,m,h)})):typeof h<"u"&&l(b,{name:f,newValue:h}));return b},Dt}var vu=Tu();const Ft=jr(vu);function an(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Nu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?ju(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function ju(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const fe={basename:Pu,dirname:_u,extname:zu,join:Lu,sep:"/"};function Pu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');st(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function _u(e){if(st(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function zu(e){st(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Lu(...e){let t=-1,n;for(;++t<e.length;)st(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Du(n)}function Du(e){st(e);const t=e.codePointAt(0)===47;let n=Fu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function st(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mu={cwd:Ou};function Ou(){return"/"}function sn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ru(e){if(typeof e=="string")e=new URL(e);else if(!sn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Bu(e)}function Bu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Mt=["history","path","basename","stem","extname","dirname"];class hi{constructor(t){let n;t?sn(t)?n={path:t}:typeof t=="string"||$u(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Mt.length;){const o=Mt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Mt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?fe.basename(this.path):void 0}set basename(t){Rt(t,"basename"),Ot(t,"basename"),this.path=fe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?fe.dirname(this.path):void 0}set dirname(t){yr(this.basename,"dirname"),this.path=fe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?fe.extname(this.path):void 0}set extname(t){if(Ot(t,"extname"),yr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=fe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sn(t)&&(t=Ru(t)),Rt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?fe.basename(this.path,this.extname):void 0}set stem(t){Rt(t,"stem"),Ot(t,"stem"),this.path=fe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Q(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ot(e,t){if(e&&e.includes(fe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+fe.sep+"`")}function Rt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $u(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Uu=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),qu={}.hasOwnProperty;class In extends Uu{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Nu()}copy(){const t=new In;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ft(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ut("data",this.frozen),this.namespace[t]=n,this):qu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ut("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=pt(t),r=this.parser||this.Parser;return Bt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Bt("process",this.parser||this.Parser),$t("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=pt(t),s=r.parse(a);r.run(s,a,function(f,c,h){if(f||!c||!h)return u(f);const p=c,m=r.stringify(p,h);Wu(m)?h.value=m:h.result=m,u(f,h)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Bt("processSync",this.parser||this.Parser),$t("processSync",this.compiler||this.Compiler),this.process(t,i),br("processSync","process",n),r;function i(o,l){n=!0,gr(o),r=l}}run(t,n,r){kr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=pt(n);i.run(t,s,u);function u(f,c,h){const p=c||t;f?a(f):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),br("runSync","run",r),i;function o(l,a){gr(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=pt(n),i=this.compiler||this.Compiler;return $t("stringify",i),kr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ut("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Ft(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...f]);else if(f.length>0){let[p,...m]=f;const b=r[h][1];an(b)&&an(p)&&(p=Ft(!0,b,p)),r[h]=[u,p,...m]}}}}const Hu=new In().freeze();function Bt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $t(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ut(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kr(e){if(!an(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function br(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pt(e){return Vu(e)?e:new hi(e)}function Vu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Wu(e){return typeof e=="string"||Ju(e)}function Ju(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",wr=[],Sr={allowDangerousHtml:!0},Xu=/^(https?|ircs?|mailto|xmpp)$/i,Gu=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ku(e){const t=Qu(e),n=Zu(e);return ec(t.runSync(t.parse(n),n),e)}function Qu(e){const t=e.rehypePlugins||wr,n=e.remarkPlugins||wr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sr}:Sr;return Hu().use(_s).use(n).use(Iu,r).use(t)}function Zu(e){const t=e.children||"",n=new hi;return typeof t=="string"&&(n.value=t),n}function ec(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||tc;for(const f of Gu)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Yu+f.id,void 0);return An(e,u),mo(e,{Fragment:x.Fragment,components:i,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return l?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in _t)if(Object.hasOwn(_t,p)&&Object.hasOwn(f.properties,p)){const m=f.properties[p],b=_t[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=s(String(m||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return a&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function tc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Xu.test(e.slice(0,t))?e:""}function nc(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mi(e,t,n){const i=vt((n||{}).ignore||[]),o=rc(t);let l=-1;for(;++l<o.length;)pi(e,"text",a);function a(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],m=h?h.children:void 0;if(i(p,m?m.indexOf(p):void 0,h))return;h=p}if(h)return s(u,f)}function s(u,f){const c=f[f.length-1],h=o[l][0],p=o[l][1];let m=0;const C=c.children.indexOf(u);let y=!1,I=[];h.lastIndex=0;let E=h.exec(u.value);for(;E;){const z=E.index,L={index:E.index,input:E.input,stack:[...f,u]};let S=p(...E,L);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=z+1:(m!==z&&I.push({type:"text",value:u.value.slice(m,z)}),Array.isArray(S)?I.push(...S):S&&I.push(S),m=z+E[0].length,y=!0),!h.global)break;E=h.exec(u.value)}return y?(m<u.value.length&&I.push({type:"text",value:u.value.slice(m)}),c.children.splice(C,1,...I)):I=[u],C+I.length}}function rc(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([ic(i[0]),lc(i[1])])}return t}function ic(e){return typeof e=="string"?new RegExp(nc(e),"g"):e}function lc(e){return typeof e=="function"?e:function(){return e}}function oc(e){mi(e,[/\r?\n|\r/g,ac])}function ac(){return{type:"break"}}function sc(){return function(e){oc(e)}}function Cr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const qt="phrasing",Ht=["autolink","link","image","label"];function uc(){return{transforms:[gc],enter:{literalAutolink:fc,literalAutolinkEmail:Vt,literalAutolinkHttp:Vt,literalAutolinkWww:Vt},exit:{literalAutolink:dc,literalAutolinkEmail:mc,literalAutolinkHttp:pc,literalAutolinkWww:hc}}}function cc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Ht},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Ht},{character:":",before:"[ps]",after:"\\/",inConstruct:qt,notInConstruct:Ht}]}}function fc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Vt(e){this.config.enter.autolinkProtocol.call(this,e)}function pc(e){this.config.exit.autolinkProtocol.call(this,e)}function hc(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function mc(e){this.config.exit.autolinkEmail.call(this,e)}function dc(e){this.exit(e)}function gc(e){mi(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yc]],{ignore:["link","linkReference"]})}function xc(e,t,n,r,i){let o="";if(!di(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!kc(n)))return!1;const l=bc(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function yc(e,t,n,r){return!di(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kc(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function bc(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Cr(e,"(");let o=Cr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function di(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Te(n)||At(n))&&(!t||n!==47)}gi.peek=Nc;function wc(){this.buffer()}function Sc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Cc(){this.buffer()}function Ec(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ac(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ce(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ic(e){this.exit(e)}function Tc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ce(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vc(e){this.exit(e)}function Nc(){return"["}function gi(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function jc(){return{enter:{gfmFootnoteCallString:wc,gfmFootnoteCall:Sc,gfmFootnoteDefinitionLabelString:Cc,gfmFootnoteDefinition:Ec},exit:{gfmFootnoteCallString:Ac,gfmFootnoteCall:Ic,gfmFootnoteDefinitionLabelString:Tc,gfmFootnoteDefinition:vc}}}function Pc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:gi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
|
|
62
|
-
`:" ")+o.indentLines(o.containerFlow(r,a.current()),t?xi:_c))),u(),s}}function _c(e,t,n){return t===0?e:xi(e,t,n)}function xi(e,t,n){return(n?"":" ")+e}const zc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yi.peek=Oc;function Lc(){return{canContainEols:["delete"],enter:{strikethrough:Fc},exit:{strikethrough:Mc}}}function Dc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zc}],handlers:{delete:yi}}}function Fc(e){this.enter({type:"delete",children:[]},e)}function Mc(e){this.exit(e)}function yi(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Oc(){return"~"}function Rc(e){return e.length}function Bc(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Rc,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const b=[],C=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const I=$c(e[f][y]);if(n.alignDelimiters!==!1){const E=i(I);C[y]=E,(s[y]===void 0||E>s[y])&&(s[y]=E)}b.push(I)}l[f]=b,a[f]=C}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=Er(r[c]);else{const b=Er(r);for(;++c<u;)o[c]=b}c=-1;const h=[],p=[];for(;++c<u;){const b=o[c];let C="",y="";b===99?(C=":",y=":"):b===108?C=":":b===114&&(y=":");let I=n.alignDelimiters===!1?1:Math.max(1,s[c]-C.length-y.length);const E=C+"-".repeat(I)+y;n.alignDelimiters!==!1&&(I=C.length+I+y.length,I>s[c]&&(s[c]=I),p[c]=I),h[c]=E}l.splice(1,0,h),a.splice(1,0,p),f=-1;const m=[];for(;++f<l.length;){const b=l[f],C=a[f];c=-1;const y=[];for(;++c<u;){const I=b[c]||"";let E="",z="";if(n.alignDelimiters!==!1){const L=s[c]-(C[c]||0),S=o[c];S===114?E=" ".repeat(L):S===99?L%2?(E=" ".repeat(L/2+.5),z=" ".repeat(L/2-.5)):(E=" ".repeat(L/2),z=E):z=" ".repeat(L)}n.delimiterStart!==!1&&!c&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||c)&&y.push(" "),n.alignDelimiters!==!1&&y.push(E),y.push(I),n.alignDelimiters!==!1&&y.push(z),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
|
|
63
|
-
`)}function $c(e){return e==null?"":String(e)}function Er(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Uc(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),qc);return i(),l}function qc(e,t,n){return">"+(n?"":" ")+e}function Hc(e,t){return Ar(e,t.inConstruct,!0)&&!Ar(e,t.notInConstruct,!1)}function Ar(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ir(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
64
|
-
`&&Hc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
65
|
-
`}function Vc(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function Wc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Jc(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Yc(e,t,n,r){const i=Jc(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Wc(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(o,Xc);return c(),h}const a=n.createTracker(r),s=i.repeat(Math.max(Vc(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(s);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
|
|
66
|
-
`,encode:["`"],...a.current()})),c()}return f+=a.move(`
|
|
67
|
-
`),o&&(f+=a.move(o+`
|
|
68
|
-
`)),f+=a.move(s),u(),f}function Xc(e,t,n){return(n?"":" ")+e}function Tn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Gc(e,t,n,r){const i=Tn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("[");return u+=s.move(n.safe(n.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
69
|
-
`,...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function Kc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function nt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function St(e,t,n){const r=Me(e),i=Me(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ki.peek=Qc;function ki(e,t,n,r){const i=Kc(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=St(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=nt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=St(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+nt(c));const p=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Qc(e,t,n){return n.options.emphasis||"*"}function Zc(e,t){let n=!1;return An(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ln}),!!((!e.depth||e.depth<3)&&yn(e)&&(t.options.setext||n))}function ef(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Zc(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
|
|
70
|
-
`,after:`
|
|
71
|
-
`});return c(),f(),h+`
|
|
72
|
-
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
73
|
-
`))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
74
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=nt(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}bi.peek=tf;function bi(e){return e.value||""}function tf(){return"<"}wi.peek=nf;function wi(e,t,n,r){const i=Tn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function nf(){return"!"}Si.peek=rf;function Si(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function rf(){return"!"}Ci.peek=lf;function Ci(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function lf(){return"`"}function Ei(e,t){const n=yn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ai.peek=of;function Ai(e,t,n,r){const i=Tn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(Ei(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function of(e,t,n){return Ei(e,n)?"<":"["}Ii.peek=af;function Ii(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function af(){return"["}function vn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function sf(e){const t=vn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function uf(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ti(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cf(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?uf(n):vn(n);const a=e.ordered?l==="."?")":".":sf(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),Ti(n)===l&&f){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function ff(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pf(e,t,n,r){const i=ff(n);let o=n.bulletCurrent||vn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,h,p){return h?(p?"":" ".repeat(l))+c:(p?o:o+" ".repeat(l-o.length))+c}}function hf(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const mf=vt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function df(e,t,n,r){return(e.children.some(function(l){return mf(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gf(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}vi.peek=xf;function vi(e,t,n,r){const i=gf(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=St(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=nt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=St(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+nt(c));const p=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function xf(e,t,n){return n.options.strong||"*"}function yf(e,t,n,r){return n.safe(e.value,r)}function kf(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function bf(e,t,n){const r=(Ti(n)+(n.options.ruleSpaces?" ":"")).repeat(kf(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ni={blockquote:Uc,break:Ir,code:Yc,definition:Gc,emphasis:ki,hardBreak:Ir,heading:ef,html:bi,image:wi,imageReference:Si,inlineCode:Ci,link:Ai,linkReference:Ii,list:cf,listItem:pf,paragraph:hf,root:df,strong:vi,text:yf,thematicBreak:bf};function wf(){return{enter:{table:Sf,tableData:Tr,tableHeader:Tr,tableRow:Ef},exit:{codeText:Af,table:Cf,tableData:Wt,tableHeader:Wt,tableRow:Wt}}}function Sf(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Cf(e){this.exit(e),this.data.inTable=void 0}function Ef(e){this.enter({type:"tableRow",children:[]},e)}function Wt(e){this.exit(e)}function Tr(e){this.enter({type:"tableCell",children:[]},e)}function Af(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,If));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function If(e,t){return t==="|"?t:e}function Tf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
75
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:l,tableCell:s,tableRow:a}};function l(p,m,b,C){return u(f(p,b,C),p.align)}function a(p,m,b,C){const y=c(p,b,C),I=u([y]);return I.slice(0,I.indexOf(`
|
|
76
|
-
`))}function s(p,m,b,C){const y=b.enter("tableCell"),I=b.enter("phrasing"),E=b.containerPhrasing(p,{...C,before:o,after:o});return I(),y(),E}function u(p,m){return Bc(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(p,m,b){const C=p.children;let y=-1;const I=[],E=m.enter("table");for(;++y<C.length;)I[y]=c(C[y],m,b);return E(),I}function c(p,m,b){const C=p.children;let y=-1;const I=[],E=m.enter("tableRow");for(;++y<C.length;)I[y]=s(C[y],p,m,b);return E(),I}function h(p,m,b){let C=Ni.inlineCode(p,m,b);return b.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function vf(){return{exit:{taskListCheckValueChecked:vr,taskListCheckValueUnchecked:vr,paragraph:jf}}}function Nf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Pf}}}function vr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function jf(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Pf(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=Ni.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function _f(){return[uc(),jc(),Lc(),wf(),vf()]}function zf(e){return{extensions:[cc(),Pc(e),Dc(),Tf(e),Nf()]}}const Lf={tokenize:Bf,partial:!0},ji={tokenize:$f,partial:!0},Pi={tokenize:Uf,partial:!0},_i={tokenize:qf,partial:!0},Df={tokenize:Hf,partial:!0},zi={name:"wwwAutolink",tokenize:Of,previous:Di},Li={name:"protocolAutolink",tokenize:Rf,previous:Fi},ke={name:"emailAutolink",tokenize:Mf,previous:Mi},pe={};function Ff(){return{text:pe}}let Ie=48;for(;Ie<123;)pe[Ie]=ke,Ie++,Ie===58?Ie=65:Ie===91&&(Ie=97);pe[43]=ke;pe[45]=ke;pe[46]=ke;pe[95]=ke;pe[72]=[ke,Li];pe[104]=[ke,Li];pe[87]=[ke,zi];pe[119]=[ke,zi];function Mf(e,t,n){const r=this;let i,o;return l;function l(c){return!un(c)||!Mi.call(r,r.previous)||Nn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return un(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(Df,f,u)(c):c===45||c===95||K(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Of(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Di.call(r,r.previous)||Nn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lf,e.attempt(ji,e.attempt(Pi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Rf(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Fi.call(r,r.previous)&&!Nn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(Z(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||kt(c)||W(c)||Te(c)||At(c)?n(c):e.attempt(ji,e.attempt(Pi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Bf(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function $f(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(_i,s,a)(u):u===null||W(u)||Te(u)||u!==45&&At(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Uf(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(_i,t,o)(l):l===null||W(l)||Te(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function qf(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||W(a)||Te(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||W(a)||Te(a)?t(a):r(a)}function o(a){return Z(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):Z(a)?(e.consume(a),l):n(a)}}function Hf(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return K(o)?n(o):t(o)}}function Di(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Fi(e){return!Z(e)}function Mi(e){return!(e===47||un(e))}function un(e){return e===43||e===45||e===46||e===95||K(e)}function Nn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Vf={tokenize:Zf,partial:!0};function Wf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gf,continuation:{tokenize:Kf},exit:Qf}},text:{91:{name:"gfmFootnoteCall",tokenize:Xf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Jf,resolveTo:Yf}}}}function Jf(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=ce(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Yf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Xf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(ce(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Gf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(l>999||m===93&&!a||m===null||m===91||W(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=ce(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(m)||(a=!0),l++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),B(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function Kf(e,t,n){return e.check(at,t,e.attempt(Vf,t,n))}function Qf(e){e.exit("gfmFootnoteDefinition")}function Zf(e,t,n){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function ep(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},h=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],p=a.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,It(p,l.slice(u+1,s),a)),ie(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ie(l,u-1,s-u+3,h),s=u+h.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return h;function h(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const b=Me(u);if(m===126)return c>1?s(m):(l.consume(m),c++,p);if(c<2&&!n)return s(m);const C=l.exit("strikethroughSequenceTemporary"),y=Me(m);return C._open=!y||y===2&&!!b,C._close=!b||b===2&&!!y,a(m)}}}class tp{constructor(){this.map=[]}add(t,n,r){np(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function np(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function rp(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function ip(){return{flow:{null:{name:"table",tokenize:lp,resolveAll:op}}}}function lp(e,t,n){const r=this;let i=0,o=0,l;return a;function a(k){let N=r.events.length-1;for(;N>-1;){const _=r.events[N][1].type;if(_==="lineEnding"||_==="linePrefix")N--;else break}const j=N>-1?r.events[N][1].type:null,q=j==="tableHead"||j==="tableRow"?S:s;return q===S&&r.parser.lazy[r.now().line]?n(k):q(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?n(k):P(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):M(k)?B(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||W(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?h:c)}function h(k){return k===92||k===124?(e.consume(k),c):c(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),l=!1,M(k)?B(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):m(k))}function m(k){return k===45||k===58?C(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),b):L(k)}function b(k){return M(k)?B(e,C,"whitespace")(k):C(k)}function C(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(o+=1,y(k)):k===null||P(k)?z(k):L(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),I(k)):L(k)}function I(k){return k===45?(e.consume(k),I):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(k))}function E(k){return M(k)?B(e,z,"whitespace")(k):z(k)}function z(k){return k===124?m(k):k===null||P(k)?!l||i!==o?L(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):L(k)}function L(k){return n(k)}function S(k){return e.enter("tableRow"),O(k)}function O(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),O):k===null||P(k)?(e.exit("tableRow"),t(k)):M(k)?B(e,O,"whitespace")(k):(e.enter("data"),U(k))}function U(k){return k===null||k===124||W(k)?(e.exit("data"),O(k)):(e.consume(k),k===92?$:U)}function $(k){return k===92||k===124?(e.consume(k),U):U(k)}}function op(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new tp;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,s!==0&&(Nr(h,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):m.type==="tableHead"?(a=!0,s=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=ht(h,t,o,i,n,c)):l[1]!==0&&(c=ht(h,t,l,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&Nr(h,t,s,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=rp(t.events,n))}return e}function ht(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Le(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Le(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Le(t.events,n[2]),f=Le(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;e.add(m,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Le(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Nr(e,t,n,r,i){const o=[],l=Le(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Le(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ap={name:"tasklistCheck",tokenize:up};function sp(){return{text:{91:ap}}}function up(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return W(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return P(s)?t(s):M(s)?e.check({tokenize:cp},t,n)(s):n(s)}}function cp(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fp(e){return Jr([Ff(),Wf(),ep(e),ip(),sp()])}const pp={};function hp(e){const t=this,n=e||pp,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fp(n)),o.push(_f()),l.push(zf(n))}function rt({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[o,l]=xe.useState(()=>n?vl(e):e.questions.map(()=>[])),[a,s]=xe.useState(!1),[u,f]=xe.useState(!1);xe.useEffect(()=>{n&&l(m=>m.map((b,C)=>{var y;return b.length>0?b:(y=e.questions[C])!=null&&y.options.length?[0]:[]}))},[n,e]);const c=Nl(e,o)&&!t&&!a&&!u&&!!i,h=(m,b)=>{t||u||a||l(C=>C.map((y,I)=>{if(I!==m)return y;const E=e.questions[I];return E?E.multiSelect?y.includes(b)?y.filter(z=>z!==b):[...y,b].sort((z,L)=>z-L):[b]:y}))},p=async()=>{if(!c||!i)return;s(!0);const m=await i(jl(e,o));s(!1),m&&f(!0)};return x.jsxs("div",{className:"rounded-[24px] border border-primary/20 bg-primary/5 p-4 shadow-[0_24px_80px_-60px_hsl(var(--primary)/0.9)]",children:[x.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[x.jsxs("div",{className:"flex items-start gap-2",children:[x.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-[14px] border border-primary/20 bg-primary/10 text-primary shadow-sm",children:x.jsx(il,{className:"h-4 w-4"})}),x.jsxs("div",{children:[x.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-primary/80",children:"Ask User Question"}),x.jsx("div",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),x.jsxs(gt,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r==null?void 0:r(!n),className:"rounded-[14px]",children:[x.jsx(ml,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),x.jsx("div",{className:"mt-4 space-y-4",children:e.questions.map((m,b)=>{const C=o[b]??[];return x.jsxs("div",{className:"space-y-3 rounded-[20px] border border-border/60 bg-background/75 p-4",children:[x.jsxs("div",{children:[m.header&&x.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:m.header}),x.jsx("div",{className:"mt-1 text-sm font-medium leading-6 text-foreground",children:m.question}),x.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:m.multiSelect?"Select one or more options.":"Select one option."})]}),x.jsx("div",{className:"space-y-2",children:m.options.map((y,I)=>{const E=C.includes(I);return x.jsxs("button",{type:"button",onClick:()=>h(b,I),disabled:t||a||u,"aria-pressed":E,className:xt("flex w-full items-start gap-3 rounded-[18px] border px-4 py-3 text-left transition-colors",E?"border-primary/50 bg-primary/10 text-foreground":"border-border/60 bg-background/80 text-foreground hover:border-primary/30 hover:bg-primary/5"),children:[x.jsx("span",{className:xt("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",E?"border-primary bg-primary text-primary-foreground":"border-border/70 bg-background text-transparent"),children:x.jsx(it,{className:"h-3.5 w-3.5"})}),x.jsxs("span",{className:"min-w-0",children:[x.jsx("span",{className:"block text-sm font-medium leading-5",children:y.label}),y.description&&x.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:y.description})]})]},`${y.label}-${I}`)})})]},`${m.header??"question"}-${b}`)})}),x.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[x.jsx("div",{className:"text-xs text-muted-foreground",children:n?"Bypass is enabled. New question cards will default to the first option.":"Enable bypass if you want future question cards to preselect the first option."}),x.jsx(gt,{type:"button",onClick:()=>void p(),disabled:!c,className:"rounded-[16px] px-5",children:u?"Sent":a?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function mp({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=xe.useState(null),[o,l]=xe.useState(!1),a=!t&&!o&&!!n,s=async u=>{if(!a||!n)return;i(u);const f=await n(Dl(e,u));i(null),f&&l(!0)};return x.jsxs("div",{className:"rounded-[24px] border border-amber-500/25 bg-amber-500/5 p-4 shadow-[0_24px_80px_-60px_rgba(245,158,11,0.8)]",children:[x.jsxs("div",{className:"flex items-start gap-3",children:[x.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-[14px] border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-sm dark:text-amber-400",children:x.jsx(pl,{className:"h-4 w-4"})}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-amber-700/80 dark:text-amber-300/80",children:"Permission Request"}),x.jsx("div",{className:"mt-1 space-y-3",children:e.requests.map((u,f)=>x.jsxs("div",{className:"rounded-[18px] border border-border/60 bg-background/75 px-4 py-3",children:[x.jsx("div",{className:"text-sm font-medium leading-6 text-foreground",children:u.summary}),(u.toolName||u.target)&&x.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:[x.jsx("span",{children:u.toolName}),u.target&&x.jsx("span",{className:"font-mono normal-case tracking-normal",children:u.target})]})]},`${u.toolUseId??u.toolName}-${f}`))})]})]}),x.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-end gap-2",children:[x.jsxs(gt,{type:"button",variant:"outline",onClick:()=>void s("deny"),disabled:!a||r!==null,className:"rounded-[14px]",children:[x.jsx(Gi,{className:"h-4 w-4"}),o?"Sent":r==="deny"?"Sending...":"Deny"]}),x.jsxs(gt,{type:"button",onClick:()=>void s("approve"),disabled:!a||r!==null,className:"rounded-[14px]",children:[x.jsx(it,{className:"h-4 w-4"}),o?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}function Up({event:e,questionBypassEnabled:t=!1,onQuestionBypassChange:n,onSubmitQuestionResponse:r,questionResponseDisabled:i=!1}){const o=e.type,l=fn(e),a=Ct(e);if(l)return x.jsx(Ze,{children:x.jsx(mp,{payload:l,onSubmit:r,disabled:i})});if(a)return x.jsx(Ze,{children:x.jsx(rt,{payload:a,bypassEnabled:t,onBypassChange:n,onSubmit:r,disabled:i})});if(o==="user"){const s=dp(e),u=s.filter(c=>c.type==="tool_result");if(u.length>0&&s.every(c=>c.type==="tool_result"))return x.jsx(Ze,{children:u.map((c,h)=>x.jsx(Bi,{block:c,questionBypassEnabled:t,onQuestionBypassChange:n,onSubmitQuestionResponse:r,questionResponseDisabled:i},h))});const f=Oe(e);return f?x.jsx(kp,{content:f}):null}return o==="assistant"?x.jsx(bp,{event:e,questionBypassEnabled:t,onQuestionBypassChange:n,onSubmitQuestionResponse:r,questionResponseDisabled:i}):null}function dp(e){const t=e.message,n=t==null?void 0:t.content;if(Array.isArray(n))return n.filter(i=>typeof i=="object"&&i!==null);const r=e.content;return Array.isArray(r)?r.filter(i=>typeof i=="object"&&i!==null):[]}function Jt(e){var n;const t=e.replace(/\r\n/g,`
|
|
77
|
-
`).split(`
|
|
78
|
-
`);for(;t.length>0&&((n=t[0])==null?void 0:n.trim())==="";)t.shift();return t.join(`
|
|
79
|
-
`)}function Oi({text:e,tone:t="default",className:n=""}){const r=t==="inverted",i=r?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",o=r?"rounded-[8px] bg-black/15 px-1 py-0.5 font-mono text-[11px] text-primary-foreground":"rounded-[8px] bg-muted/80 px-1 py-0.5 font-mono text-[11px] text-foreground",l=r?"overflow-x-auto rounded-[16px] border border-primary-foreground/15 bg-black/15 px-3 py-2 font-mono text-[11px] leading-5 text-primary-foreground":"overflow-x-auto rounded-[16px] border border-border/60 bg-muted/55 px-3 py-2 font-mono text-[11px] leading-5 text-foreground",a=r?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",s=r?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",u=r?"border-l-2 border-primary-foreground/30 pl-3 italic text-primary-foreground/90":"border-l-2 border-border pl-3 italic text-muted-foreground";return x.jsx("div",{className:["max-w-none break-words text-[12px] leading-[18px] [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-3 [&_li>p]:my-0",n].filter(Boolean).join(" "),children:x.jsx(Ku,{remarkPlugins:[hp,sc],components:{a:({node:f,...c})=>x.jsx("a",{...c,target:"_blank",rel:"noreferrer noopener",className:i}),blockquote:({node:f,...c})=>x.jsx("blockquote",{...c,className:u}),code:({node:f,className:c,children:h,...p})=>c?x.jsx("code",{...p,className:c,children:h}):x.jsx("code",{...p,className:o,children:h}),h1:({node:f,...c})=>x.jsx("h1",{...c,className:"text-[15px] font-semibold leading-6"}),h2:({node:f,...c})=>x.jsx("h2",{...c,className:"text-[14px] font-semibold leading-6"}),h3:({node:f,...c})=>x.jsx("h3",{...c,className:"text-[13px] font-semibold leading-5"}),h4:({node:f,...c})=>x.jsx("h4",{...c,className:"text-[12px] font-semibold leading-5"}),hr:({node:f,...c})=>x.jsx("hr",{...c,className:r?"border-primary-foreground/20":"border-border"}),img:({node:f,alt:c,src:h})=>h?x.jsx("a",{href:h,target:"_blank",rel:"noreferrer noopener",className:i,children:(c==null?void 0:c.trim())||h}):x.jsx("span",{children:(c==null?void 0:c.trim())||"Image"}),ol:({node:f,...c})=>x.jsx("ol",{...c,className:"list-decimal space-y-1 pl-5"}),p:({node:f,...c})=>x.jsx("p",{...c,className:"my-0"}),pre:({node:f,...c})=>x.jsx("pre",{...c,className:l}),table:({node:f,...c})=>x.jsx("table",{...c,className:a}),td:({node:f,...c})=>x.jsx("td",{...c,className:s}),th:({node:f,...c})=>x.jsx("th",{...c,className:`${s} font-semibold`}),ul:({node:f,...c})=>x.jsx("ul",{...c,className:"list-disc space-y-1 pl-5"})},children:e})})}function Ri({text:e,className:t=""}){const[n,r]=xe.useState(!1);if(!e)return null;const i=async o=>{o.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1500)}catch{}};return x.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy message",className:`flex h-6 w-6 items-center justify-center rounded-[10px] border border-border/60 bg-background/86 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-all hover:-translate-y-px hover:text-foreground group-hover:opacity-100 focus-visible:opacity-100 ${t}`,children:n?x.jsx(it,{className:"h-3 w-3 text-emerald-500"}):x.jsx(Pr,{className:"h-3 w-3"})})}async function gp(e){let n=await(await fetch(e)).blob();n.type!=="image/png"&&(n=await xp(n)),await navigator.clipboard.write([new ClipboardItem({[n.type]:n})])}async function xp(e){const t=await createImageBitmap(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");if(!r)throw new Error("canvas 2d context unavailable");return r.drawImage(t,0,0),await new Promise((i,o)=>{n.toBlob(l=>l?i(l):o(new Error("toBlob failed")),"image/png")})}function yp({dataUrl:e,className:t=""}){const[n,r]=xe.useState(!1),i=async o=>{o.stopPropagation();try{await gp(e),r(!0),setTimeout(()=>r(!1),1500)}catch(l){console.error("copy image failed",l)}};return x.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy image",className:`flex h-6 w-6 items-center justify-center rounded-[10px] border border-border/60 bg-background/86 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-all hover:-translate-y-px hover:text-foreground group-hover:opacity-100 focus-visible:opacity-100 ${t}`,children:n?x.jsx(it,{className:"h-3 w-3 text-emerald-500"}):x.jsx(Pr,{className:"h-3 w-3"})})}function kp({content:e}){const t=wl(e),n=e.filter(r=>r.type==="image");return x.jsx("div",{className:"animate-message-rise flex justify-end",children:x.jsxs("div",{className:"group relative flex max-w-[88%] items-start gap-3",children:[x.jsx(Ri,{text:t,className:"absolute -left-8 top-7"}),x.jsxs("div",{className:"flex min-w-0 flex-col items-end gap-1",children:[x.jsx("div",{className:"pr-1 text-[10px] font-semibold uppercase tracking-[0.28em] text-muted-foreground",children:"You"}),x.jsxs("div",{className:"space-y-1 rounded-[24px] rounded-br-[9px] border border-primary/20 bg-primary px-3.5 py-2.5 text-[12px] leading-[18px] text-primary-foreground shadow-[0_22px_72px_-44px_hsl(var(--primary)/0.95)]",children:[t&&x.jsx(Oi,{text:t,tone:"inverted"}),n.length>0&&x.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:n.map((r,i)=>{const o=Sl(r);return x.jsxs("div",{className:"relative",children:[x.jsx("img",{src:o,alt:r.filename??`attachment ${i+1}`,className:"max-h-72 w-full rounded-2xl border border-primary-foreground/15 object-cover"}),x.jsx(yp,{dataUrl:o,className:"absolute right-2 top-2"})]},`${r.filename??"image"}-${i}`)})})]})]}),x.jsx("div",{className:"mt-6 flex h-8 w-8 shrink-0 items-center justify-center rounded-[14px] border border-primary/20 bg-primary/10 text-primary shadow-sm",children:x.jsx(gl,{className:"h-4 w-4"})})]})})}function Ze({children:e}){return x.jsx("div",{className:"animate-message-rise flex justify-start",children:x.jsxs("div",{className:"flex max-w-[92%] items-start gap-3",children:[x.jsx("div",{className:"mt-6 flex h-8 w-8 shrink-0 items-center justify-center rounded-[14px] border border-border/70 bg-muted/70 text-muted-foreground shadow-sm",children:x.jsx(Ki,{className:"h-4 w-4"})}),x.jsxs("div",{className:"min-w-0 space-y-2",children:[x.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.28em] text-muted-foreground",children:"Agent"}),e]})]})})}function bp({event:e,questionBypassEnabled:t,onQuestionBypassChange:n,onSubmitQuestionResponse:r,questionResponseDisabled:i}){const o=e.message;if(!o)return null;const l=Ct(o);if(l)return x.jsx(Ze,{children:x.jsx(rt,{payload:l,bypassEnabled:t,onBypassChange:n,onSubmit:r,disabled:i})});const a=o.content;if(!a||!Array.isArray(a))return null;const s=new Set,u=a.filter(m=>m.type==="text").map(m=>({...m,text:Jt(String(m.text??"")),questionPayload:Et(Jt(String(m.text??"")))})).filter(m=>m.text.length>0||m.questionPayload),f=a.filter(m=>m.type==="thinking").map(m=>Jt(String(m.thinking??""))).filter(Boolean).join(`
|
|
80
|
-
|
|
81
|
-
`),c=a.filter(m=>m.type==="tool_use"),h=a.filter(m=>m.type==="tool_result");return u.length>0||f.length>0||c.length>0||h.length>0?x.jsxs(Ze,{children:[f.length>0&&x.jsx(Ep,{text:f}),u.map((m,b)=>{if(m.questionPayload){const C=Re(m.questionPayload);return s.has(C)?null:(s.add(C),x.jsx(rt,{payload:m.questionPayload,bypassEnabled:t,onBypassChange:n,onSubmit:r,disabled:i},b))}return x.jsxs("div",{className:"group relative rounded-[24px] rounded-bl-[9px] border border-border/70 bg-card/86 px-3.5 py-2.5 text-[12px] leading-[18px] text-foreground shadow-[0_20px_70px_-58px_rgba(15,23,42,0.75)] backdrop-blur-sm dark:shadow-[0_20px_70px_-58px_rgba(0,0,0,0.95)]",children:[x.jsx(Ri,{text:m.text,className:"absolute right-2 top-2"}),x.jsx(Oi,{text:m.text})]},b)}),c.map((m,b)=>x.jsx(Ap,{block:m,renderedQuestionSignatures:s,questionBypassEnabled:t,onQuestionBypassChange:n,onSubmitQuestionResponse:r,questionResponseDisabled:i},b)),h.map((m,b)=>x.jsx(Bi,{block:m,renderedQuestionSignatures:s,questionBypassEnabled:t,onQuestionBypassChange:n,onSubmitQuestionResponse:r,questionResponseDisabled:i},b))]}):null}function wp(e){return e.replace(/\s+/g," ").trim()}function Fe(e,t=132){const n=wp(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function cn(e,t=84){if(typeof e=="string")return Fe(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>cn(r,28)).filter(Boolean).join(", ");return Fe(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${cn(i,32)}`).join(" · ");return Fe(n||JSON.stringify(e),t)}return""}function Sp(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${cn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return Fe(t||JSON.stringify(e),156)||"No input"}function Cp({expanded:e}){return x.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-[12px] border border-border/60 bg-background/70 px-2 py-1 text-[10px] font-medium uppercase tracking-[0.18em] text-muted-foreground shadow-sm",children:[e?"Less":"More",e?x.jsx(Qi,{className:"h-3 w-3"}):x.jsx(Zi,{className:"h-3 w-3"})]})}function jn({title:e,preview:t,icon:n,children:r,accentClassName:i,previewClassName:o="font-mono text-[11px] text-muted-foreground/90"}){const[l,a]=xe.useState(!1);return x.jsxs("div",{className:`overflow-hidden rounded-[20px] border border-border/60 shadow-sm ${i}`,children:[x.jsxs("button",{type:"button",onClick:()=>a(s=>!s),className:"flex w-full items-start gap-3 px-4 py-3 text-left transition-colors hover:bg-background/30",children:[x.jsx("div",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-[12px] border border-border/60 bg-background/70 text-muted-foreground",children:n}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"flex flex-wrap items-center gap-2",children:x.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:e})}),x.jsx("div",{className:`mt-1 whitespace-pre-wrap break-words text-[12px] leading-5 ${o}`,children:t})]}),x.jsx(Cp,{expanded:l})]}),l&&x.jsx("div",{className:"border-t border-border/60 px-4 py-3",children:r})]})}function Ep({text:e}){const t=Fe(e,156);return x.jsx(jn,{title:"Thinking",preview:t,icon:x.jsx(nl,{className:"h-3.5 w-3.5"}),accentClassName:"bg-muted/35",previewClassName:"text-[12px] leading-5 text-muted-foreground/90",children:x.jsx("div",{className:"whitespace-pre-wrap text-[13px] leading-5 text-muted-foreground/90",children:e})})}function Ap({block:e,renderedQuestionSignatures:t,questionBypassEnabled:n,onQuestionBypassChange:r,onSubmitQuestionResponse:i,questionResponseDisabled:o}){const l=String(e.name??"tool"),a=e.input,s=Ct(e);if(s){const f=Re(s);return t!=null&&t.has(f)?null:(t==null||t.add(f),x.jsx(rt,{payload:s,bypassEnabled:n,onBypassChange:r,onSubmit:i,disabled:o}))}const u=Sp(a);if(l==="TodoWrite"){const f=Ip(a==null?void 0:a.todos);if(f.length>0)return x.jsx(Tp,{todos:f})}return x.jsx(jn,{title:`Tool: ${l}`,preview:u,icon:x.jsx(_r,{className:"h-3.5 w-3.5"}),accentClassName:"bg-muted/25",children:x.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-xs leading-5 text-muted-foreground",children:JSON.stringify(a??{},null,2)})})}function Bi({block:e,renderedQuestionSignatures:t,questionBypassEnabled:n,onQuestionBypassChange:r,onSubmitQuestionResponse:i,questionResponseDisabled:o}){const l=e.content,a=typeof l=="string"?l:Array.isArray(l)?l.map(f=>String(f.text??"")).join(`
|
|
82
|
-
`):"";if(!a)return null;const s=Et(a);if(s){const f=Re(s);return t!=null&&t.has(f)?null:(t==null||t.add(f),x.jsx(rt,{payload:s,bypassEnabled:n,onBypassChange:r,onSubmit:i,disabled:o}))}const u=Fe(a,156);return x.jsx(jn,{title:"Result",preview:u,icon:x.jsx(_r,{className:"h-3.5 w-3.5"}),accentClassName:"bg-background/65",children:x.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-xs leading-5 text-muted-foreground",children:a})})}function Ip(e){return Array.isArray(e)?e.map(t=>{if(typeof t!="object"||t===null)return null;const n=t,r=typeof n.content=="string"?n.content:"";if(!r)return null;const i=typeof n.activeForm=="string"?n.activeForm:r,o=typeof n.status=="string"?n.status:"pending";return{content:r,activeForm:i,status:o==="completed"||o==="in_progress"?o:"pending"}}).filter(t=>t!==null):[]}function Tp({todos:e}){const t=e.filter(i=>i.status==="completed").length,n=e.length,r=e.find(i=>i.status==="in_progress");return x.jsxs("div",{className:"overflow-hidden rounded-[20px] border border-border/60 bg-muted/20 shadow-sm",children:[x.jsxs("div",{className:"flex items-center gap-3 border-b border-border/50 px-4 py-3",children:[x.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[12px] border border-border/60 bg-background/70 text-muted-foreground",children:x.jsx(sl,{className:"h-3.5 w-3.5"})}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:"Todos"}),x.jsx("div",{className:"mt-0.5 truncate text-[12px] leading-5 text-muted-foreground/90",children:r?r.activeForm:n===0?"No items":t===n?"All complete":"Up next"})]}),x.jsxs("div",{className:"shrink-0 rounded-[11px] border border-border/60 bg-background/70 px-2 py-0.5 font-mono text-[10px] tracking-wide text-muted-foreground",children:[t,"/",n]})]}),x.jsx("ul",{className:"divide-y divide-border/40",children:e.map((i,o)=>x.jsxs("li",{className:"flex items-start gap-3 px-4 py-2.5",children:[x.jsx(vp,{status:i.status}),x.jsx("span",{className:i.status==="completed"?"text-[13px] leading-5 text-muted-foreground line-through decoration-muted-foreground/60":i.status==="in_progress"?"text-[13px] font-medium leading-5 text-foreground":"text-[13px] leading-5 text-foreground/85",children:i.status==="in_progress"?i.activeForm:i.content})]},`${o}-${i.content}`))})]})}function vp({status:e}){return e==="completed"?x.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-500 dark:text-emerald-400",children:x.jsx(it,{className:"h-3 w-3"})}):e==="in_progress"?x.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center text-primary",children:x.jsx(cl,{className:"h-3.5 w-3.5 animate-spin"})}):x.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground/60",children:x.jsx(ol,{className:"h-3 w-3"})})}function qp({label:e,value:t}){return x.jsxs("div",{className:"min-w-[5.5rem] flex-1 rounded-[16px] border border-border/60 bg-background/52 px-2.5 py-2 shadow-sm",children:[x.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.22em] text-muted-foreground",children:e}),x.jsx("div",{className:"mt-0.5 text-sm font-semibold tracking-tight text-foreground",children:t})]})}function Hp({label:e}){return x.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-muted-foreground",children:e})}function Vp({label:e,value:t,mono:n,action:r}){return x.jsxs("div",{className:"grid grid-cols-[4.25rem,minmax(0,1fr)] items-start gap-2",children:[x.jsx("span",{className:"pt-0.5 text-[10px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),x.jsxs("div",{className:"flex min-w-0 items-start gap-1.5",children:[x.jsx("span",{className:xt("min-w-0 flex-1 break-all text-[12px] text-foreground",n&&"font-mono text-[11px] leading-5"),children:t}),r]})]})}function Wp({label:e,value:t,mono:n}){return x.jsxs("div",{className:"rounded-[15px] border border-border/60 bg-background/62 px-2.5 py-2 shadow-sm",children:[x.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.22em] text-muted-foreground",children:e}),x.jsx("div",{className:xt("mt-0.5 text-[12px] font-medium text-foreground",n&&"font-mono text-[11px]"),children:t})]})}function Jp({capabilities:e,action:t}){return x.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between sm:gap-3",children:[x.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[x.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.22em] text-muted-foreground",children:"Capabilities"}),x.jsx("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px]",children:e.length>0?e.map(n=>x.jsx(el,{variant:"secondary",className:"rounded-[11px]",children:n},n)):x.jsx("span",{className:"text-[12px] text-muted-foreground",children:"None declared"})})]}),t&&x.jsx("div",{className:"shrink-0 self-start",children:t})]})}export{Up as C,qp as D,Vp as I,cl as L,Wp as M,Hp as T,Dp as a,jp as b,Jp as c,Op as d,zp as e,Mp as f,Oe as g,Rp as h,$p as i,Pp as j,_p as k,Bp as l,Fp as m,mt as n,Ku as o,Lp as r,Sl as t};
|