meshy-node 0.9.1 → 0.9.2

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.
@@ -1,83 +1,88 @@
1
- import{c as ye,j as m,L as Tl,bv as $r,T as Ur,l as gn,bw as Hr,r as ce,B as wt,C as Be,b as St,X as qr,bx as jl,v as Nl,H as Vr}from"./index-AgRF0fhH.js";/**
1
+ import{c as he,j as m,N as Tl,bv as $r,T as Ur,l as gn,bw as Hr,r as ce,B as wt,C as Be,b as St,X as qr,bx as jl,v as Nl,H as Vr}from"./index-X_Md_59M.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const _l=[["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"}]],Pl=ye("brain",_l);/**
6
+ */const _l=[["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"}]],Pl=he("brain",_l);/**
7
7
  * @license lucide-react v1.7.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const zl=[["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"}]],Ll=ye("circle-question-mark",zl);/**
11
+ */const zl=[["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"}]],Ll=he("circle-question-mark",zl);/**
12
12
  * @license lucide-react v1.7.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const Dl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wr=ye("circle",Dl);/**
16
+ */const Dl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wr=he("circle",Dl);/**
17
17
  * @license lucide-react v1.7.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const Fl=[["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"}]],Ml=ye("list-checks",Fl);/**
21
+ */const Ml=[["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"}]],Fl=he("list-checks",Ml);/**
22
22
  * @license lucide-react v1.7.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const Rl=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ol=ye("loader-circle",Rl);/**
26
+ */const Rl=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ol=he("loader-circle",Rl);/**
27
27
  * @license lucide-react v1.7.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Bl=[["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"}]],$l=ye("shield-alert",Bl);/**
31
+ */const Bl=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],kh=he("message-square-text",Bl);/**
32
32
  * @license lucide-react v1.7.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Ul=[["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"}]],Hl=ye("shield-check",Ul);/**
36
+ */const $l=[["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"}]],Ul=he("shield-alert",$l);/**
37
37
  * @license lucide-react v1.7.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const ql=[["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"}]],Vl=ye("user",ql);/**
41
+ */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"}]],ql=he("shield-check",Hl);/**
42
42
  * @license lucide-react v1.7.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const Wl=[["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"}]],xn=ye("wrench",Wl);function Ct(e){return typeof e=="object"&&e!==null}function Jl(e){if(!Ct(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 Yl(e){if(!Ct(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"||!Ct(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 yt(e){if(typeof e=="string"){const t=e.trim();return t?[{type:"text",text:t}]:[]}return Array.isArray(e)?e.map(t=>Jl(t)??Yl(t)).filter(t=>t!==null):[]}function yh(e,t){const n=e.trim();return[...n?[{type:"text",text:n}]:[],...t]}function Xl(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 kh(e,t=new Date().toISOString()){return{type:"user",message:Xl(e),timestamp:t}}function $e(e){if(e.type!=="user"||e.isSynthetic===!0)return null;if(typeof e.message=="string"){const t=yt(e.message);return t.length>0?t:null}if(Ct(e.message)&&Array.isArray(e.message.content)){const t=yt(e.message.content);return t.length>0?t:null}if(Array.isArray(e.content)){const t=yt(e.content);return t.length>0?t:null}return null}function bh(e){return yt(e.payload.initialMessage)}function Ce(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 Gl(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool_result"?t.content:"").filter(Boolean).join(`
47
- `)}function Kl(e){return`data:${e.mediaType};base64,${e.data}`}function wh(e){var i,l;if(!e)return[];const t=[],n=e.items;if(n)for(const o of Array.from(n)){if((o==null?void 0:o.kind)!=="file"||!((i=o.type)!=null&&i.startsWith("image/")))continue;const s=(l=o.getAsFile)==null?void 0:l.call(o);s&&s.type.startsWith("image/")&&t.push(s)}if(t.length>0)return t;const r=e.files;return r?Array.from(r).filter(o=>o.type.startsWith("image/")):[]}function Zl(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 Sh(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 Zl(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 st(e){return typeof e=="object"&&e!==null}function Ql(e){return st(e)&&typeof e.name=="string"&&e.name.toLowerCase()==="askuserquestion"}function eo(e){return!st(e)||typeof e.label!="string"||!e.label.trim()?null:{label:e.label.trim(),description:typeof e.description=="string"?e.description.trim():""}}function to(e){if(!st(e)||typeof e.question!="string"||!e.question.trim())return null;const t=Array.isArray(e.options)?e.options.map(eo).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 Zt(e){if(!st(e)||!Array.isArray(e.questions))return null;const t=e.questions.map(to).filter(n=>n!==null);return t.length===0?null:{questions:t}}function Ue(e){return JSON.stringify({questions:e.questions})}function at(e){const t=Zt(e);if(t)return t;if(Ql(e)){const n=st(e.input)?e.input:void 0,r=Zt(n);return r?{...r,...typeof e.id=="string"&&e.id.trim()?{toolUseId:e.id.trim()}:{}}:null}return null}function no(e){var i;const t=e.trim();if(!t)return[];const n=[t],r=t.matchAll(/```(?:json)?\s*([\s\S]*?)```/gi);for(const l of r){const o=(i=l[1])==null?void 0:i.trim();o&&n.push(o)}return n}function ut(e){for(const t of no(e))try{const n=JSON.parse(t),r=Zt(n);if(r)return r}catch{}return null}function ro(e){return e.questions.map(t=>t.options.length>0?[0]:[])}function io(e,t){return e.questions.every((n,r)=>(t[r]??[]).length>0)}function lo(e,t){const r=e.questions.map((i,l)=>{const o=[...new Set(t[l]??[])].sort((s,a)=>s-a).filter(s=>i.options[s]!==void 0);return{header:i.header??null,question:i.question,multiSelect:i.multiSelect,selectedOptions:o.map(s=>i.options[s]).filter(s=>s!==void 0)}}).map(i=>{const l=i.header??i.question,o=i.selectedOptions.map(s=>s.label).join(i.multiSelect?", ":"");return`${l}: ${o}`}).join(`
48
- `);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function rt(e){return typeof e=="object"&&e!==null}function oo(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 so(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 Qt(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:so(t),target:n==null?void 0:n[1],summary:t}]}}function ao(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!rt(n)||typeof n.tool_name!="string")continue;const r=rt(n.tool_input)?n.tool_input:void 0,i=oo(r),l=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:l})}return t.length>0?{requests:t}:null}function Jn(e){if(!Array.isArray(e))return null;for(const t of e){if(!rt(t)||t.type!=="text"||typeof t.text!="string")continue;const n=Qt(t.text);if(n)return n}return null}function yn(e){if(!rt(e))return null;const t=ao(e);if(t)return t;if(typeof e.result=="string"){const r=Qt(e.result);if(r)return r}if(typeof e.message=="string"){const r=Qt(e.message);if(r)return r}if(rt(e.message)){const r=yn(e.message);if(r)return r;const i=Jn(e.message.content);if(i)return i}const n=Jn(e.content);return n||null}function uo(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function co(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 fo(e){return $e(e)!==null}function en(e){return typeof e=="object"&&e!==null}function Yn(e){if(e.type==="user"){const t=$e(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Ce(t)}`}return JSON.stringify(e)}function je(e){return Array.isArray(e)?e.map(t=>je(t)):en(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,je(n)])):e}function po(e,t){return e.length!==t.length?!1:e.every((n,r)=>JSON.stringify(je(n))===JSON.stringify(je(t[r])))}function tn(e){const t=$e(e);if(t)return`user:${Ce(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(en(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(je(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(je(e.content))}`;if(en(e.message))return`assistant:${JSON.stringify(je(e.message))}`}return JSON.stringify(e)}function ho(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Xn(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function nn(e){const t=at(e);return t?`question:${Ue(t)}`:null}function mo(e){const t=yn(e);return t?`permission:${uo(t)}`:null}function Gn(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=nn(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=ut(n.text);i&&t.add(Ue(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function go(e){const t=nn(e);if(t)return t;if(typeof e.message=="string"){const n=ut(e.message);return n?Ue(n):null}if(typeof e.message=="object"&&e.message!==null){const n=nn(e.message);return n||Gn(e.message.content)}return Gn(e.content)}function xo(e){return mo(e)}function Ch(e,t){const n=new Map;return t.map(r=>{const i=tn(r),l=n.get(i)??0;return n.set(i,l+1),`${e}-${ho(i)}-${l}`})}function Eh(e,t){const n=new Map;for(const l of t){const o=tn(l);n.set(o,(n.get(o)??0)+1)}const r=[];for(let l=e.length-1;l>=0;l-=1){const o=e[l];if(!o)continue;const s=tn(o),a=n.get(s)??0;if(a>0){n.set(s,a-1);continue}r.push({...o})}const i=[...r.reverse(),...t.map(l=>({...l}))].map((l,o)=>({event:l,order:o})).sort((l,o)=>{const s=Xn(l.event),a=Xn(o.event);return s!==null&&a!==null&&s!==a?s-a:l.order-o.order}).map(l=>l.event);return po(e,i)?e:i}function Ah(e,t){const n=Yn(t);return e.some(r=>Yn(r)===n)?e:[...e,{...t}]}function vh(e,t){const n=new Map;for(const r of t){const i=$e(r);if(!i)continue;const l=Ce(i);n.set(l,(n.get(l)??0)+1)}return e.filter(r=>{const i=Ce(r.content),l=n.get(i)??0;return l<=0?!0:(n.set(i,l-1),!1)})}function Ih(e,t){const n=Ce(t),r=e.findIndex(i=>Ce(i.content)===n);return r===-1?e:e.filter((i,l)=>l!==r)}function Th(e,t){const n=Ce(t);return e.some(r=>{const i=$e(r);return i!==null&&Ce(i)===n})}function jh(e){const t=[];let n=null;for(const r of e){if(fo(r)){n=null,t.push(r);continue}const i=xo(r)??go(r);i&&i===n||(t.push(r),i&&(n=i))}return t}const yo=["codex","claudecode","copilot"];function Jr({agent:e,className:t="h-3.5 w-3.5 shrink-0"}){const n=t;return e==="claudecode"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"butt",strokeLinejoin:"miter",className:n,"data-agent-icon":"claudecode","data-agent-shape":"pixel-bot","aria-hidden":"true",children:[m.jsx("path",{d:"M5 9V6h14v3h2v6h-3v3H6v-3H3V9z"}),m.jsx("path",{d:"M8 7v4"}),m.jsx("path",{d:"M16 7v4"}),m.jsx("path",{d:"M7 18v3"}),m.jsx("path",{d:"M11 18v3"}),m.jsx("path",{d:"M15 18v3"})]}):e==="codex"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"codex","data-agent-shape":"command-cloud","aria-hidden":"true",children:[m.jsx("path",{d:"M6.85 18.05h9.65a4.35 4.35 0 0 0 .65-8.65 5.45 5.45 0 0 0-10.2-1.65 5.1 5.1 0 0 0-.1 10.3z"}),m.jsx("path",{d:"M9.25 8.9 12 12l-2.75 3.1"}),m.jsx("path",{d:"M14.15 15.1h3.25"})]}):e==="copilot"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"copilot","data-agent-shape":"pixel-face","aria-hidden":"true",children:[m.jsx("path",{d:"M5.2 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55H5.2a1.55 1.55 0 0 1-1.55-1.55V5.65A1.55 1.55 0 0 1 5.2 4.1z"}),m.jsx("path",{d:"M14.15 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55h-4.65a1.55 1.55 0 0 1-1.55-1.55V5.65a1.55 1.55 0 0 1 1.55-1.55z"}),m.jsx("path",{d:"M4.5 14.7v3.85h15v-3.85"}),m.jsx("path",{d:"M8.4 14.7v1.9"}),m.jsx("path",{d:"M12 14.7v1.9"}),m.jsx("path",{d:"M15.6 14.7v1.9"}),m.jsx("path",{d:"M7.65 20.25h8.7"})]}):m.jsx(Tl,{className:n,"data-agent-icon":"generic","aria-hidden":"true"})}function Yr({value:e,label:t,description:n}){return m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx(Jr,{agent:e}),m.jsx("span",{children:t}),n&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:n})]})}function Nh(){return $r.map(e=>m.jsx(gn,{value:e.value,disabled:e.disabled,children:m.jsx(Yr,{value:e.value,label:e.label,description:e.description})},e.value))}function _h(){return yo.map(e=>m.jsx(gn,{value:e,children:m.jsx(Yr,{value:e,label:Xr(e)})},e))}function Ph(){return Ur.map(e=>m.jsx(gn,{value:e.value,children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{children:e.label}),e.description&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:e.description})]})},e.value))}function Xr(e){var t;return((t=$r.find(n=>n.value===e))==null?void 0:t.label)??e}function zh(e){var t;return((t=Ur.find(n=>n.value===e))==null?void 0:t.label)??e}function ko(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const bo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,So={};function Kn(e,t){return(So.jsx?wo:bo).test(e)}const Co=/[ \t\n\f\r]/g;function Eo(e){return typeof e=="object"?e.type==="text"?Zn(e.value):!1:Zn(e)}function Zn(e){return e.replace(Co,"")===""}class ct{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ct.prototype.normal={};ct.prototype.property={};ct.prototype.space=void 0;function Gr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ct(n,r,t)}function rn(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 Ao=0;const F=_e(),Y=_e(),ln=_e(),v=_e(),J=_e(),Re=_e(),re=_e();function _e(){return 2**++Ao}const on=Object.freeze(Object.defineProperty({__proto__:null,boolean:F,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:Re,number:v,overloadedBoolean:ln,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),Lt=Object.keys(on);class kn extends te{constructor(t,n,r,i){let l=-1;if(super(t,n),Qn(this,"space",i),typeof r=="number")for(;++l<Lt.length;){const o=Lt[l];Qn(this,Lt[l],(r&on[o])===on[o])}}}kn.prototype.defined=!0;function Qn(e,t,n){n&&(e[t]=n)}function He(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new kn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[rn(r)]=r,n[rn(l.attribute)]=r}return new ct(t,n,e.space)}const Kr=He({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,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:v,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:Y,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zr(e,t){return t in e?e[t]:t}function Qr(e,t){return Zr(e,t.toLowerCase())}const vo=He({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Re,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:v,colSpan:null,content:null,contentEditable:Y,controls:F,controlsList:J,coords:v|Re,crossOrigin:null,data:null,dateTime:null,decoding:null,default:F,defer:F,dir:null,dirName:null,disabled:F,download:ln,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:F,formTarget:null,headers:J,height:v,hidden:ln,high:v,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:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,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:v,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:v,rowSpan:v,sandbox:J,scope:null,scoped:F,seamless:F,selected:F,shadowRootClonable:F,shadowRootDelegatesFocus:F,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:F,useMap:null,value:Y,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,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:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:F,noHref:F,noShade:F,noWrap:F,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:F,disableRemotePlayback:F,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:Qr}),Io=He({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:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:F,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Re,g2:Re,glyphName:Re,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,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:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zr}),ei=He({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()}}),ti=He({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Qr}),ni=He({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),To={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"},jo=/[A-Z]/g,er=/-[a-z]/g,No=/^data[-\w.:]+$/i;function _o(e,t){const n=rn(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"&&No.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(er,zo);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!er.test(l)){let o=l.replace(jo,Po);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=kn}return new i(r,t)}function Po(e){return"-"+e.toLowerCase()}function zo(e){return e.charAt(1).toUpperCase()}const Lo=Gr([Kr,vo,ei,ti,ni],"html"),bn=Gr([Kr,Io,ei,ti,ni],"svg");function Do(e){return e.join(" ").trim()}var De={},Dt,tr;function Fo(){if(tr)return Dt;tr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,a=`
49
- `,u="/",f="*",c="",h="comment",p="declaration";function d(w,k){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];k=k||{};var A=1,E=1;function T(z){var j=z.match(t);j&&(A+=j.length);var q=z.lastIndexOf(a);E=~q?z.length-q:E+z.length}function L(){var z={line:A,column:E};return function(j){return j.position=new S(z),$(),j}}function S(z){this.start=z,this.end={line:A,column:E},this.source=k.source}S.prototype.content=w;function R(z){var j=new Error(k.source+":"+A+":"+E+": "+z);if(j.reason=z,j.filename=k.source,j.line=A,j.column=E,j.source=w,!k.silent)throw j}function U(z){var j=z.exec(w);if(j){var q=j[0];return T(q),w=w.slice(q.length),j}}function $(){U(n)}function b(z){var j;for(z=z||[];j=N();)j!==!1&&z.push(j);return z}function N(){var z=L();if(!(u!=w.charAt(0)||f!=w.charAt(1))){for(var j=2;c!=w.charAt(j)&&(f!=w.charAt(j)||u!=w.charAt(j+1));)++j;if(j+=2,c===w.charAt(j-1))return R("End of comment missing");var q=w.slice(2,j-2);return E+=2,T(q),w=w.slice(j),E+=2,z({type:h,comment:q})}}function _(){var z=L(),j=U(r);if(j){if(N(),!U(i))return R("property missing ':'");var q=U(l),X=z({type:p,property:y(j[0].replace(e,c)),value:q?y(q[0].replace(e,c)):c});return U(o),X}}function H(){var z=[];b(z);for(var j;j=_();)j!==!1&&(z.push(j),b(z));return z}return $(),H()}function y(w){return w?w.replace(s,c):c}return Dt=d,Dt}var nr;function Mo(){if(nr)return De;nr=1;var e=De&&De.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(De,"__esModule",{value:!0}),De.default=n;const t=e(Fo());function n(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,t.default)(r),s=typeof i=="function";return o.forEach(a=>{if(a.type!=="declaration")return;const{property:u,value:f}=a;s?i(u,f,a):f&&(l=l||{},l[u]=f)}),l}return De}var Ye={},rr;function Ro(){if(rr)return Ye;rr=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},o=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},a=function(u,f){return f===void 0&&(f={}),l(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(t,o))};return Ye.camelCase=a,Ye}var Xe,ir;function Oo(){if(ir)return Xe;ir=1;var e=Xe&&Xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Mo()),n=Ro();function r(i,l){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,a){s&&a&&(o[(0,n.camelCase)(s,l)]=a)}),o}return r.default=r,Xe=r,Xe}var Bo=Oo();const $o=Hr(Bo),ri=ii("end"),wn=ii("start");function ii(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=wn(e),n=ri(e);if(t&&n)return{start:t,end:n}}function Qe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?lr(e.position):"start"in e||"end"in e?lr(e):"line"in e||"column"in e?sn(e):""}function sn(e){return or(e&&e.line)+":"+or(e&&e.column)}function lr(e){return sn(e&&e.start)+"-"+sn(e&&e.end)}function or(e){return e&&typeof e=="number"?e:1}class Z extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Qe(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Z.prototype.file="";Z.prototype.name="";Z.prototype.reason="";Z.prototype.message="";Z.prototype.stack="";Z.prototype.column=void 0;Z.prototype.line=void 0;Z.prototype.ancestors=void 0;Z.prototype.cause=void 0;Z.prototype.fatal=void 0;Z.prototype.place=void 0;Z.prototype.ruleId=void 0;Z.prototype.source=void 0;const Sn={}.hasOwnProperty,Ho=new Map,qo=/[A-Z]/g,Vo=new Set(["table","tbody","thead","tfoot","tr"]),Wo=new Set(["td","th"]),li="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jo(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=ts(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=es(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"?bn:Lo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=oi(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function oi(e,t,n){if(t.type==="element")return Yo(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 Go(e,t);if(t.type==="root")return Zo(e,t,n);if(t.type==="text")return Qo(e,t)}function Yo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=bn,e.schema=i),e.ancestors.push(t);const l=ai(e,t.tagName,!1),o=ns(e,t);let s=En(e,t);return Vo.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!Eo(a):!0})),si(e,o,l,t),Cn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,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)}it(e,t.position)}function Go(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);it(e,t.position)}function Ko(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=bn,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:ai(e,t.name,!0),o=rs(e,t),s=En(e,t);return si(e,o,l,t),Cn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Zo(e,t,n){const r={};return Cn(r,En(e,t)),e.create(t,e.Fragment,r,n)}function Qo(e,t){return t.value}function si(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Cn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function es(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function ts(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=wn(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function ns(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Sn.call(t.properties,i)){const l=is(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Wo.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function rs(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else it(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else it(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function En(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ho;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=oi(e,l,o);s!==void 0&&n.push(s)}return n}function is(e,t,n){const r=_o(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ko(n):Do(n)),r.property==="style"){let i=typeof n=="object"?n:ls(e,String(n));return e.stylePropertyNameCase==="css"&&(i=os(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?To[r.property]||r.property:r.attribute,n]}}function ls(e,t){try{return $o(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Z("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=li+"#cannot-parse-style-attribute",i}}function ai(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=Kn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=Kn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Sn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);it(e)}function it(e,t){const n=new Z("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=li+"#cannot-handle-mdx-estrees-without-createevaluater",n}function os(e){const t={};let n;for(n in e)Sn.call(e,n)&&(t[ss(n)]=e[n]);return t}function ss(e){let t=e.replace(qo,as);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function as(e){return"-"+e.toLowerCase()}const Ft={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"]},us={};function An(e,t){const n=us,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ui(e,r,i)}function ui(e,t,n){if(cs(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 sr(e.children,t,n)}return Array.isArray(e)?sr(e,t,n):""}function sr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ui(e[i],t,n);return r.join("")}function cs(e){return!!(e&&typeof e=="object")}const ar=document.createElement("i");function vn(e){const t="&"+e+";";ar.innerHTML=t;const n=ar.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 l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const ur={}.hasOwnProperty;function ci(e){const t={};let n=-1;for(;++n<e.length;)fs(t,e[n]);return t}function fs(e,t){let n;for(n in t){const i=(ur.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){ur.call(i,o)||(i[o]=[]);const s=l[o];ps(i[o],Array.isArray(s)?s:s?[s]:[])}}}function ps(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 fi(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 fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Q=Ae(/[A-Za-z]/),K=Ae(/[\dA-Za-z]/),hs=Ae(/[#-'*+\--9=?A-Z^-~]/);function Et(e){return e!==null&&(e<32||e===127)}const an=Ae(/\d/),ms=Ae(/[\dA-Fa-f]/),ds=Ae(/[!-/:-@[-`{-~]/);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 jt=Ae(new RegExp("\\p{P}|\\p{S}","u")),Ne=Ae(/\s/);function Ae(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),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 l=0;return o;function o(a){return M(a)?(e.enter(n),s(a)):t(a)}function s(a){return M(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}const gs={tokenize:xs};function xs(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),B(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return P(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}const ys={tokenize:ks},cr={tokenize:bs};function ks(e){const t=this,n=[];let r=0,i,l,o;return s;function s(E){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,a,u)(E)}return u(E)}function a(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const T=t.events.length;let L=T,S;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){S=t.events[L][1].end;break}k(r);let R=T;for(;R<t.events.length;)t.events[R][1].end={...S},R++;return ie(t.events,L+1,0,t.events.slice(T)),t.events.length=R,u(E)}return s(E)}function u(E){if(r===n.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return d(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cr,f,c)(E)}function f(E){return i&&A(),k(r),h(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,d(E)}function h(E){return t.containerState={},e.attempt(cr,p,d)(E)}function p(E){return r++,n.push([t.currentConstruct,t.containerState]),h(E)}function d(E){if(E===null){i&&A(),k(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),y(E)}function y(E){if(E===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(E);return}return P(E)?(e.consume(E),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(E),y)}function w(E,T){const L=t.sliceStream(E);if(T&&L.push(null),E.previous=l,l&&(l.next=E),l=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<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const R=t.events.length;let U=R,$,b;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if($){b=t.events[U][1].end;break}$=!0}for(k(r),S=R;S<t.events.length;)t.events[S][1].end={...b},S++;ie(t.events,U+1,0,t.events.slice(R)),t.events.length=S}}function k(E){let T=n.length;for(;T-- >E;){const L=n[T];t.containerState=L[1],L[0].exit.call(t,e)}n.length=E}function A(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function bs(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 Oe(e){if(e===null||W(e)||Ne(e))return 1;if(jt(e))return 2}function Nt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const un={name:"attention",resolveAll:ws,tokenize:Ss};function ws(e,t){let n=-1,r,i,l,o,s,a,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;a=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};fr(c,-a),fr(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.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",o,t],["exit",o,t],["enter",l,t]]),u=le(u,Nt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",l,t],["enter",s,t],["exit",s,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 Ss(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oe(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),f=Oe(a),c=!f||f===2&&i||n.includes(a),h=!i||i===2&&f||n.includes(r);return u._open=!!(l===42?c:c&&(i||!h)),u._close=!!(l===42?h:h&&(f||!c)),t(a)}}function fr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Cs={name:"autolink",tokenize:Es};function Es(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"),l}function l(p){return Q(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||K(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||K(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(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||Et(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),f):hs(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 d=p===45?h:c;return e.consume(p),d}return n(p)}}const ft={partial:!0,tokenize:As};function As(e,t,n){return r;function r(l){return M(l)?B(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||P(l)?t(l):n(l)}}const pi={continuation:{tokenize:Is},exit:Ts,name:"blockQuote",tokenize:vs};function vs(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return M(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Is(e,t,n){const r=this;return i;function i(o){return M(o)?B(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(pi,t,n)(o)}}function Ts(e){e.exit("blockQuote")}const hi={name:"characterEscape",tokenize:js};function js(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return ds(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const mi={name:"characterReference",tokenize:Ns};function Ns(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=K,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=ms,f):(e.enter("characterReferenceValue"),l=7,o=an,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return o===K&&!vn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const pr={partial:!0,tokenize:Ps},hr={concrete:!0,name:"codeFenced",tokenize:_s};function _s(e,t,n){const r=this,i={partial:!0,tokenize:L};let l=0,o=0,s;return a;function a(S){return u(S)}function u(S){const R=r.events[r.events.length-1];return l=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===s?(o++,e.consume(S),f):o<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(pr,y,T)(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===s?n(S):(e.consume(S),h)}function p(S){return S===null||P(S)?c(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(S)):S===96&&S===s?n(S):(e.consume(S),d)}function y(S){return e.attempt(i,T,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),k}function k(S){return l>0&&M(S)?B(e,A,"linePrefix",l+1)(S):A(S)}function A(S){return S===null||P(S)?e.check(pr,y,T)(S):(e.enter("codeFlowValue"),E(S))}function E(S){return S===null||P(S)?(e.exit("codeFlowValue"),A(S)):(e.consume(S),E)}function T(S){return e.exit("codeFenced"),t(S)}function L(S,R,U){let $=0;return b;function b(j){return S.enter("lineEnding"),S.consume(j),S.exit("lineEnding"),N}function N(j){return S.enter("codeFencedFence"),M(j)?B(S,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):_(j)}function _(j){return j===s?(S.enter("codeFencedFenceSequence"),H(j)):U(j)}function H(j){return j===s?($++,S.consume(j),H):$>=o?(S.exit("codeFencedFenceSequence"),M(j)?B(S,z,"whitespace")(j):z(j)):U(j)}function z(j){return j===null||P(j)?(S.exit("codeFencedFence"),R(j)):U(j)}}}function Ps(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Mt={name:"codeIndented",tokenize:Ls},zs={partial:!0,tokenize:Ds};function Ls(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),B(e,l,"linePrefix",5)(u)}function l(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?a(u):P(u)?e.attempt(zs,o,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||P(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function Ds(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):B(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):P(o)?i(o):n(o)}}const Fs={name:"codeText",previous:Rs,resolve:Ms,tokenize:Os};function Ms(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 Rs(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Os(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):P(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||P(c)?(e.exit("codeTextData"),a(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)):(l.type="codeTextData",u(c))}}class Bs{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 l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ge(this.left,r),l.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),Ge(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ge(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);Ge(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ge(this.left,n.reverse())}}}function Ge(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 di(e){const t={};let n=-1,r,i,l,o,s,a,u;const f=new Bs(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"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,$s(f,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function $s(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let f,c,h=-1,p=n,d=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(y=h+1,w.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const k=s.slice(w[h],w[h+1]),A=l.pop();a.push([A,A+k.length-1]),e.splice(A,2,k)}for(a.reverse(),h=-1;++h<a.length;)u[d+a[h][0]]=d+a[h][1],d+=a[h][1]-a[h][0]-1;return u}const Us={resolve:qs,tokenize:Vs},Hs={partial:!0,tokenize:Ws};function qs(e){return di(e),e}function Vs(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):P(s)?e.check(Hs,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ws(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),B(e,l,"linePrefix")}function l(o){if(o===null||P(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function gi(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(k),e.exit(l),h):k===null||k===32||k===41||Et(k)?n(k):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(k))}function h(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(s),h(k)):k===null||k===60||P(k)?n(k):(e.consume(k),k===92?d:p)}function d(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function y(k){return!f&&(k===null||k===41||W(k))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(k)):f<u&&k===40?(e.consume(k),f++,y):k===41?(e.consume(k),f--,y):k===null||k===32||k===40||Et(k)?n(k):(e.consume(k),k===92?w:y)}function w(k){return k===40||k===41||k===92?(e.consume(k),y):y(k)}}function xi(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),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)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),a||(a=!M(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function yi(e,t,n,r,i,l){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,a):n(h)}function a(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),a(o)):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===o||h===null||P(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===o||h===92?(e.consume(h),f):f(h)}}function et(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 Js={name:"definition",tokenize:Xs},Ys={partial:!0,tokenize:Gs};function Xs(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return xi.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return W(p)?et(e,u)(p):u(p)}function u(p){return gi(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Ys,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 Gs(e,t,n){return r;function r(s){return W(s)?et(e,i)(s):n(s)}function i(s){return yi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return M(s)?B(e,o,"whitespace")(s):o(s)}function o(s){return s===null||P(s)?t(s):n(s)}}const Ks={name:"hardBreakEscape",tokenize:Zs};function Zs(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return P(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const Qs={name:"headingAtx",resolve:ea,tokenize:ta};function ea(e,t){let n=e.length-2,r=3,i,l;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},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function ta(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||W(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||P(f)?(e.exit("atxHeading"),t(f)):M(f)?B(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const na=["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"],mr=["pre","script","style","textarea"],ra={concrete:!0,name:"htmlFlow",resolveTo:oa,tokenize:sa},ia={partial:!0,tokenize:ua},la={partial:!0,tokenize:aa};function oa(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 sa(e,t,n){const r=this;let i,l,o,s,a;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),h):x===47?(e.consume(x),l=!0,y):x===63?(e.consume(x),i=3,r.interrupt?t:g):Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function h(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,d):Q(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function d(x){const ae="CDATA[";return x===ae.charCodeAt(s++)?(e.consume(x),s===ae.length?r.interrupt?t:_:d):n(x)}function y(x){return Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function w(x){if(x===null||x===47||x===62||W(x)){const ae=x===47,ve=o.toLowerCase();return!ae&&!l&&mr.includes(ve)?(i=1,r.interrupt?t(x):_(x)):na.includes(o.toLowerCase())?(i=6,ae?(e.consume(x),k):r.interrupt?t(x):_(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):l?A(x):E(x))}return x===45||K(x)?(e.consume(x),o+=String.fromCharCode(x),w):n(x)}function k(x){return x===62?(e.consume(x),r.interrupt?t:_):n(x)}function A(x){return M(x)?(e.consume(x),A):b(x)}function E(x){return x===47?(e.consume(x),b):x===58||x===95||Q(x)?(e.consume(x),T):M(x)?(e.consume(x),E):b(x)}function T(x){return x===45||x===46||x===58||x===95||K(x)?(e.consume(x),T):L(x)}function L(x){return x===61?(e.consume(x),S):M(x)?(e.consume(x),L):E(x)}function S(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),a=x,R):M(x)?(e.consume(x),S):U(x)}function R(x){return x===a?(e.consume(x),a=null,$):x===null||P(x)?n(x):(e.consume(x),R)}function U(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||W(x)?L(x):(e.consume(x),U)}function $(x){return x===47||x===62||M(x)?E(x):n(x)}function b(x){return x===62?(e.consume(x),N):n(x)}function N(x){return x===null||P(x)?_(x):M(x)?(e.consume(x),N):n(x)}function _(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),X):x===62&&i===4?(e.consume(x),se):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),me):P(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ia,de,H)(x)):x===null||P(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),_)}function H(x){return e.check(la,z,de)(x)}function z(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),j}function j(x){return x===null||P(x)?H(x):(e.enter("htmlFlowData"),_(x))}function q(x){return x===45?(e.consume(x),g):_(x)}function X(x){return x===47?(e.consume(x),o="",oe):_(x)}function oe(x){if(x===62){const ae=o.toLowerCase();return mr.includes(ae)?(e.consume(x),se):_(x)}return Q(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),oe):_(x)}function me(x){return x===93?(e.consume(x),g):_(x)}function g(x){return x===62?(e.consume(x),se):x===45&&i===2?(e.consume(x),g):_(x)}function se(x){return x===null||P(x)?(e.exit("htmlFlowData"),de(x)):(e.consume(x),se)}function de(x){return e.exit("htmlFlow"),t(x)}}function aa(e,t,n){const r=this;return i;function i(o){return P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function ua(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ft,t,n)}}const ca={name:"htmlText",tokenize:fa};function fa(e,t,n){const r=this;let i,l,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),L):g===63?(e.consume(g),E):Q(g)?(e.consume(g),U):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,d):Q(g)?(e.consume(g),A):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function c(g){return g===null?n(g):g===45?(e.consume(g),h):P(g)?(o=c,X(g)):(e.consume(g),c)}function h(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?h(g):c(g)}function d(g){const se="CDATA[";return g===se.charCodeAt(l++)?(e.consume(g),l===se.length?y:d):n(g)}function y(g){return g===null?n(g):g===93?(e.consume(g),w):P(g)?(o=y,X(g)):(e.consume(g),y)}function w(g){return g===93?(e.consume(g),k):y(g)}function k(g){return g===62?q(g):g===93?(e.consume(g),k):y(g)}function A(g){return g===null||g===62?q(g):P(g)?(o=A,X(g)):(e.consume(g),A)}function E(g){return g===null?n(g):g===63?(e.consume(g),T):P(g)?(o=E,X(g)):(e.consume(g),E)}function T(g){return g===62?q(g):E(g)}function L(g){return Q(g)?(e.consume(g),S):n(g)}function S(g){return g===45||K(g)?(e.consume(g),S):R(g)}function R(g){return P(g)?(o=R,X(g)):M(g)?(e.consume(g),R):q(g)}function U(g){return g===45||K(g)?(e.consume(g),U):g===47||g===62||W(g)?$(g):n(g)}function $(g){return g===47?(e.consume(g),q):g===58||g===95||Q(g)?(e.consume(g),b):P(g)?(o=$,X(g)):M(g)?(e.consume(g),$):q(g)}function b(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),b):N(g)}function N(g){return g===61?(e.consume(g),_):P(g)?(o=N,X(g)):M(g)?(e.consume(g),N):$(g)}function _(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,H):P(g)?(o=_,X(g)):M(g)?(e.consume(g),_):(e.consume(g),z)}function H(g){return g===i?(e.consume(g),i=void 0,j):g===null?n(g):P(g)?(o=H,X(g)):(e.consume(g),H)}function z(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||W(g)?$(g):(e.consume(g),z)}function j(g){return g===47||g===62||W(g)?$(g):n(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function X(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),oe}function oe(g){return M(g)?B(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):me(g)}function me(g){return e.enter("htmlTextData"),o(g)}}const In={name:"labelEnd",resolveAll:da,resolveTo:ga,tokenize:xa},pa={tokenize:ya},ha={tokenize:ka},ma={tokenize:ba};function da(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 ga(e,t){let n=e.length,r=0,i,l,o,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,t],["enter",u,t]],s=le(s,e.slice(l+1,l+r+3)),s=le(s,[["enter",f,t]]),s=le(s,Nt(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),s=le(s,[["exit",f,t],e[o-2],e[o-1],["exit",u,t]]),s=le(s,e.slice(o+1)),s=le(s,[["exit",a,t]]),ie(e,l,e.length,s),e}function xa(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(h){return l?l._inactive?c(h):(o=r.parser.defined.includes(fe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(pa,f,o?f:c)(h):h===91?e.attempt(ha,f,o?u:c)(h):o?f(h):c(h)}function u(h){return e.attempt(ma,f,c)(h)}function f(h){return t(h)}function c(h){return l._balanced=!0,n(h)}}function ya(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)?et(e,l)(c):l(c)}function l(c){return c===41?f(c):gi(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return W(c)?et(e,a)(c):f(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?yi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?et(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 ka(e,t,n){const r=this;return i;function i(s){return xi.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function ba(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const wa={name:"labelStartImage",resolveAll:In.resolveAll,tokenize:Sa};function Sa(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ca={name:"labelStartLink",resolveAll:In.resolveAll,tokenize:Ea};function Ea(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Rt={name:"lineEnding",tokenize:Aa};function Aa(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const kt={name:"thematicBreak",tokenize:va};function va(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||P(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),M(u)?B(e,s,"whitespace")(u):s(u))}}const ee={continuation:{tokenize:Na},exit:Pa,name:"list",tokenize:ja},Ia={partial:!0,tokenize:za},Ta={partial:!0,tokenize:_a};function ja(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:an(p)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(kt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return an(p)&&++o<10?(e.consume(p),a):(!r.interrupt||o<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(ft,r.interrupt?n:f,e.attempt(Ia,h,c))}function f(p){return r.containerState.initialBlankLine=!0,l++,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=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Na(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ft,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!M(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ta,t,o)(s))}function o(s){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)(s)}}function _a(e,t,n){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function Pa(e){e.exit(this.containerState.type)}function za(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!M(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const dr={name:"setextUnderline",resolveTo:La,tokenize:Da};function La(e,t){let n=e.length,r,i,l;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),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function Da(e,t,n){const r=this;let i;return l;function l(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,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),M(u)?B(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||P(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Fa={tokenize:Ma};function Ma(e){const t=this,n=e.attempt(ft,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Us,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ra={resolveAll:bi()},Oa=ki("string"),Ba=ki("text");function ki(e){return{resolveAll:bi(e==="text"?$a:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(f){return u(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),a)}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 bi(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function $a(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 l=i.length,o=-1,s=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)a=!0,s++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},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 Ua={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:pi},Ha={91:Js},qa={[-2]:Mt,[-1]:Mt,32:Mt},Va={35:Qs,42:kt,45:[dr,kt],60:ra,61:dr,95:kt,96:hr,126:hr},Wa={38:mi,92:hi},Ja={[-5]:Rt,[-4]:Rt,[-3]:Rt,33:wa,38:mi,42:un,60:[Cs,ca],91:Ca,92:[Ks,hi],93:In,95:un,96:Fs},Ya={null:[un,Ra]},Xa={null:[42,95]},Ga={null:[]},Ka=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Xa,contentInitial:Ha,disable:Ga,document:Ua,flow:Va,flowInitial:qa,insideSpan:Ya,string:Wa,text:Ja},Symbol.toStringTag,{value:"Module"}));function Za(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={},l=[];let o=[],s=[];const a={attempt:R(L),check:R(S),consume:A,enter:E,exit:T,interrupt:R(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:d,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(N){return o=le(o,N),w(),o[o.length-1]!==null?[]:(U(t,0),u.events=Nt(l,u.events,u),u.events)}function h(N,_){return eu(p(N),_)}function p(N){return Qa(o,N)}function d(){const{_bufferIndex:N,_index:_,line:H,column:z,offset:j}=r;return{_bufferIndex:N,_index:_,line:H,column:z,offset:j}}function y(N){i[N.line]=N.column,b()}function w(){let N;for(;r._index<o.length;){const _=o[r._index];if(typeof _=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<_.length;)k(_.charCodeAt(r._bufferIndex));else k(_)}}function k(N){f=f(N)}function A(N){P(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,b()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function E(N,_){const H=_||{};return H.type=N,H.start=d(),u.events.push(["enter",H,u]),s.push(H),H}function T(N){const _=s.pop();return _.end=d(),u.events.push(["exit",_,u]),_}function L(N,_){U(N,_.from)}function S(N,_){_.restore()}function R(N,_){return H;function H(z,j,q){let X,oe,me,g;return Array.isArray(z)?de(z):"tokenize"in z?de([z]):se(z);function se(G){return Ve;function Ve(be){const Pe=be!==null&&G[be],ze=be!==null&&G.null,ht=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return de(ht)(be)}}function de(G){return X=G,oe=0,G.length===0?q:x(G[oe])}function x(G){return Ve;function Ve(be){return g=$(),me=G,G.partial||(u.currentConstruct=G),G.name&&u.parser.constructs.disable.null.includes(G.name)?ve():G.tokenize.call(_?Object.assign(Object.create(u),_):u,a,ae,ve)(be)}}function ae(G){return N(me,g),j}function ve(G){return g.restore(),++oe<X.length?x(X[oe]):q}}}function U(N,_){N.resolveAll&&!l.includes(N)&&l.push(N),N.resolve&&ie(u.events,_,u.events.length-_,N.resolve(u.events.slice(_),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function $(){const N=d(),_=u.previous,H=u.currentConstruct,z=u.events.length,j=Array.from(s);return{from:z,restore:q};function q(){r=N,u.previous=_,u.currentConstruct=H,u.events.length=z,s=j,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Qa(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function eu(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
46
+ */const Vl=[["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"}]],Wl=he("user",Vl);/**
47
+ * @license lucide-react v1.7.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const Jl=[["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"}]],xn=he("wrench",Jl);function Ct(e){return typeof e=="object"&&e!==null}function Yl(e){if(!Ct(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 Xl(e){if(!Ct(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"||!Ct(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 yt(e){if(typeof e=="string"){const t=e.trim();return t?[{type:"text",text:t}]:[]}return Array.isArray(e)?e.map(t=>Yl(t)??Xl(t)).filter(t=>t!==null):[]}function bh(e,t){const n=e.trim();return[...n?[{type:"text",text:n}]:[],...t]}function Gl(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 wh(e,t=new Date().toISOString()){return{type:"user",message:Gl(e),timestamp:t}}function $e(e){if(e.type!=="user"||e.isSynthetic===!0)return null;if(typeof e.message=="string"){const t=yt(e.message);return t.length>0?t:null}if(Ct(e.message)&&Array.isArray(e.message.content)){const t=yt(e.message.content);return t.length>0?t:null}if(Array.isArray(e.content)){const t=yt(e.content);return t.length>0?t:null}return null}function Sh(e){return yt(e.payload.initialMessage)}function Ce(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 Kl(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool_result"?t.content:"").filter(Boolean).join(`
52
+ `)}function Zl(e){return`data:${e.mediaType};base64,${e.data}`}function Ch(e){var i,l;if(!e)return[];const t=[],n=e.items;if(n)for(const o of Array.from(n)){if((o==null?void 0:o.kind)!=="file"||!((i=o.type)!=null&&i.startsWith("image/")))continue;const s=(l=o.getAsFile)==null?void 0:l.call(o);s&&s.type.startsWith("image/")&&t.push(s)}if(t.length>0)return t;const r=e.files;return r?Array.from(r).filter(o=>o.type.startsWith("image/")):[]}function Ql(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 Ah(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 Ql(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 st(e){return typeof e=="object"&&e!==null}function eo(e){return st(e)&&typeof e.name=="string"&&e.name.toLowerCase()==="askuserquestion"}function to(e){return!st(e)||typeof e.label!="string"||!e.label.trim()?null:{label:e.label.trim(),description:typeof e.description=="string"?e.description.trim():""}}function no(e){if(!st(e)||typeof e.question!="string"||!e.question.trim())return null;const t=Array.isArray(e.options)?e.options.map(to).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 Zt(e){if(!st(e)||!Array.isArray(e.questions))return null;const t=e.questions.map(no).filter(n=>n!==null);return t.length===0?null:{questions:t}}function Ue(e){return JSON.stringify({questions:e.questions})}function at(e){const t=Zt(e);if(t)return t;if(eo(e)){const n=st(e.input)?e.input:void 0,r=Zt(n);return r?{...r,...typeof e.id=="string"&&e.id.trim()?{toolUseId:e.id.trim()}:{}}:null}return null}function ro(e){var i;const t=e.trim();if(!t)return[];const n=[t],r=t.matchAll(/```(?:json)?\s*([\s\S]*?)```/gi);for(const l of r){const o=(i=l[1])==null?void 0:i.trim();o&&n.push(o)}return n}function ut(e){for(const t of ro(e))try{const n=JSON.parse(t),r=Zt(n);if(r)return r}catch{}return null}function io(e){return e.questions.map(t=>t.options.length>0?[0]:[])}function lo(e,t){return e.questions.every((n,r)=>(t[r]??[]).length>0)}function oo(e,t){const r=e.questions.map((i,l)=>{const o=[...new Set(t[l]??[])].sort((s,a)=>s-a).filter(s=>i.options[s]!==void 0);return{header:i.header??null,question:i.question,multiSelect:i.multiSelect,selectedOptions:o.map(s=>i.options[s]).filter(s=>s!==void 0)}}).map(i=>{const l=i.header??i.question,o=i.selectedOptions.map(s=>s.label).join(i.multiSelect?", ":"");return`${l}: ${o}`}).join(`
53
+ `);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function rt(e){return typeof e=="object"&&e!==null}function so(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 ao(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 Qt(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:ao(t),target:n==null?void 0:n[1],summary:t}]}}function uo(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!rt(n)||typeof n.tool_name!="string")continue;const r=rt(n.tool_input)?n.tool_input:void 0,i=so(r),l=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:l})}return t.length>0?{requests:t}:null}function Jn(e){if(!Array.isArray(e))return null;for(const t of e){if(!rt(t)||t.type!=="text"||typeof t.text!="string")continue;const n=Qt(t.text);if(n)return n}return null}function yn(e){if(!rt(e))return null;const t=uo(e);if(t)return t;if(typeof e.result=="string"){const r=Qt(e.result);if(r)return r}if(typeof e.message=="string"){const r=Qt(e.message);if(r)return r}if(rt(e.message)){const r=yn(e.message);if(r)return r;const i=Jn(e.message.content);if(i)return i}const n=Jn(e.content);return n||null}function co(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function fo(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 po(e){return $e(e)!==null}function en(e){return typeof e=="object"&&e!==null}function Yn(e){if(e.type==="user"){const t=$e(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Ce(t)}`}return JSON.stringify(e)}function je(e){return Array.isArray(e)?e.map(t=>je(t)):en(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,je(n)])):e}function ho(e,t){return e.length!==t.length?!1:e.every((n,r)=>JSON.stringify(je(n))===JSON.stringify(je(t[r])))}function tn(e){const t=$e(e);if(t)return`user:${Ce(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(en(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(je(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(je(e.content))}`;if(en(e.message))return`assistant:${JSON.stringify(je(e.message))}`}return JSON.stringify(e)}function mo(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Xn(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function nn(e){const t=at(e);return t?`question:${Ue(t)}`:null}function go(e){const t=yn(e);return t?`permission:${co(t)}`:null}function Gn(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=nn(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=ut(n.text);i&&t.add(Ue(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function xo(e){const t=nn(e);if(t)return t;if(typeof e.message=="string"){const n=ut(e.message);return n?Ue(n):null}if(typeof e.message=="object"&&e.message!==null){const n=nn(e.message);return n||Gn(e.message.content)}return Gn(e.content)}function yo(e){return go(e)}function Eh(e,t){const n=new Map;return t.map(r=>{const i=tn(r),l=n.get(i)??0;return n.set(i,l+1),`${e}-${mo(i)}-${l}`})}function vh(e,t){const n=new Map;for(const l of t){const o=tn(l);n.set(o,(n.get(o)??0)+1)}const r=[];for(let l=e.length-1;l>=0;l-=1){const o=e[l];if(!o)continue;const s=tn(o),a=n.get(s)??0;if(a>0){n.set(s,a-1);continue}r.push({...o})}const i=[...r.reverse(),...t.map(l=>({...l}))].map((l,o)=>({event:l,order:o})).sort((l,o)=>{const s=Xn(l.event),a=Xn(o.event);return s!==null&&a!==null&&s!==a?s-a:l.order-o.order}).map(l=>l.event);return ho(e,i)?e:i}function Ih(e,t){const n=Yn(t);return e.some(r=>Yn(r)===n)?e:[...e,{...t}]}function Th(e,t){const n=new Map;for(const r of t){const i=$e(r);if(!i)continue;const l=Ce(i);n.set(l,(n.get(l)??0)+1)}return e.filter(r=>{const i=Ce(r.content),l=n.get(i)??0;return l<=0?!0:(n.set(i,l-1),!1)})}function jh(e,t){const n=Ce(t),r=e.findIndex(i=>Ce(i.content)===n);return r===-1?e:e.filter((i,l)=>l!==r)}function Nh(e,t){const n=Ce(t);return e.some(r=>{const i=$e(r);return i!==null&&Ce(i)===n})}function _h(e){const t=[];let n=null;for(const r of e){if(po(r)){n=null,t.push(r);continue}const i=yo(r)??xo(r);i&&i===n||(t.push(r),i&&(n=i))}return t}const ko=["codex","claudecode","copilot"];function Jr({agent:e,className:t="h-3.5 w-3.5 shrink-0"}){const n=t;return e==="claudecode"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"butt",strokeLinejoin:"miter",className:n,"data-agent-icon":"claudecode","data-agent-shape":"pixel-bot","aria-hidden":"true",children:[m.jsx("path",{d:"M5 9V6h14v3h2v6h-3v3H6v-3H3V9z"}),m.jsx("path",{d:"M8 7v4"}),m.jsx("path",{d:"M16 7v4"}),m.jsx("path",{d:"M7 18v3"}),m.jsx("path",{d:"M11 18v3"}),m.jsx("path",{d:"M15 18v3"})]}):e==="codex"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"codex","data-agent-shape":"command-cloud","aria-hidden":"true",children:[m.jsx("path",{d:"M6.85 18.05h9.65a4.35 4.35 0 0 0 .65-8.65 5.45 5.45 0 0 0-10.2-1.65 5.1 5.1 0 0 0-.1 10.3z"}),m.jsx("path",{d:"M9.25 8.9 12 12l-2.75 3.1"}),m.jsx("path",{d:"M14.15 15.1h3.25"})]}):e==="copilot"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"copilot","data-agent-shape":"pixel-face","aria-hidden":"true",children:[m.jsx("path",{d:"M5.2 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55H5.2a1.55 1.55 0 0 1-1.55-1.55V5.65A1.55 1.55 0 0 1 5.2 4.1z"}),m.jsx("path",{d:"M14.15 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55h-4.65a1.55 1.55 0 0 1-1.55-1.55V5.65a1.55 1.55 0 0 1 1.55-1.55z"}),m.jsx("path",{d:"M4.5 14.7v3.85h15v-3.85"}),m.jsx("path",{d:"M8.4 14.7v1.9"}),m.jsx("path",{d:"M12 14.7v1.9"}),m.jsx("path",{d:"M15.6 14.7v1.9"}),m.jsx("path",{d:"M7.65 20.25h8.7"})]}):m.jsx(Tl,{className:n,"data-agent-icon":"generic","aria-hidden":"true"})}function Yr({value:e,label:t,description:n}){return m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx(Jr,{agent:e}),m.jsx("span",{children:t}),n&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:n})]})}function Ph(){return $r.map(e=>m.jsx(gn,{value:e.value,disabled:e.disabled,children:m.jsx(Yr,{value:e.value,label:e.label,description:e.description})},e.value))}function zh(){return ko.map(e=>m.jsx(gn,{value:e,children:m.jsx(Yr,{value:e,label:Xr(e)})},e))}function Lh(){return Ur.map(e=>m.jsx(gn,{value:e.value,children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{children:e.label}),e.description&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:e.description})]})},e.value))}function Xr(e){var t;return((t=$r.find(n=>n.value===e))==null?void 0:t.label)??e}function Dh(e){var t;return((t=Ur.find(n=>n.value===e))==null?void 0:t.label)??e}function bo(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const wo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,So=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Co={};function Kn(e,t){return(Co.jsx?So:wo).test(e)}const Ao=/[ \t\n\f\r]/g;function Eo(e){return typeof e=="object"?e.type==="text"?Zn(e.value):!1:Zn(e)}function Zn(e){return e.replace(Ao,"")===""}class ct{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ct.prototype.normal={};ct.prototype.property={};ct.prototype.space=void 0;function Gr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ct(n,r,t)}function rn(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 vo=0;const M=_e(),Y=_e(),ln=_e(),v=_e(),J=_e(),Re=_e(),re=_e();function _e(){return 2**++vo}const on=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:Re,number:v,overloadedBoolean:ln,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),Lt=Object.keys(on);class kn extends te{constructor(t,n,r,i){let l=-1;if(super(t,n),Qn(this,"space",i),typeof r=="number")for(;++l<Lt.length;){const o=Lt[l];Qn(this,Lt[l],(r&on[o])===on[o])}}}kn.prototype.defined=!0;function Qn(e,t,n){n&&(e[t]=n)}function He(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new kn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[rn(r)]=r,n[rn(l.attribute)]=r}return new ct(t,n,e.space)}const Kr=He({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,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:v,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:Y,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zr(e,t){return t in e?e[t]:t}function Qr(e,t){return Zr(e,t.toLowerCase())}const Io=He({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Re,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:J,autoFocus:M,autoPlay:M,blocking:J,capture:null,charSet:null,checked:M,cite:null,className:J,cols:v,colSpan:null,content:null,contentEditable:Y,controls:M,controlsList:J,coords:v|Re,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:ln,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:J,height:v,hidden:ln,high:v,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:J,itemRef:J,itemScope:M,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,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:M,optimum:v,pattern:null,ping:J,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:J,required:M,reversed:M,rows:v,rowSpan:v,sandbox:J,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:Y,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:M,disableRemotePlayback:M,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:Qr}),To=He({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:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Re,g2:Re,glyphName:Re,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,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:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zr}),ei=He({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()}}),ti=He({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Qr}),ni=He({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jo={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"},No=/[A-Z]/g,er=/-[a-z]/g,_o=/^data[-\w.:]+$/i;function Po(e,t){const n=rn(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"&&_o.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(er,Lo);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!er.test(l)){let o=l.replace(No,zo);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=kn}return new i(r,t)}function zo(e){return"-"+e.toLowerCase()}function Lo(e){return e.charAt(1).toUpperCase()}const Do=Gr([Kr,Io,ei,ti,ni],"html"),bn=Gr([Kr,To,ei,ti,ni],"svg");function Mo(e){return e.join(" ").trim()}var De={},Dt,tr;function Fo(){if(tr)return Dt;tr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,a=`
54
+ `,u="/",f="*",c="",h="comment",p="declaration";function d(w,k){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];k=k||{};var E=1,A=1;function T(z){var j=z.match(t);j&&(E+=j.length);var q=z.lastIndexOf(a);A=~q?z.length-q:A+z.length}function L(){var z={line:E,column:A};return function(j){return j.position=new S(z),$(),j}}function S(z){this.start=z,this.end={line:E,column:A},this.source=k.source}S.prototype.content=w;function R(z){var j=new Error(k.source+":"+E+":"+A+": "+z);if(j.reason=z,j.filename=k.source,j.line=E,j.column=A,j.source=w,!k.silent)throw j}function U(z){var j=z.exec(w);if(j){var q=j[0];return T(q),w=w.slice(q.length),j}}function $(){U(n)}function b(z){var j;for(z=z||[];j=N();)j!==!1&&z.push(j);return z}function N(){var z=L();if(!(u!=w.charAt(0)||f!=w.charAt(1))){for(var j=2;c!=w.charAt(j)&&(f!=w.charAt(j)||u!=w.charAt(j+1));)++j;if(j+=2,c===w.charAt(j-1))return R("End of comment missing");var q=w.slice(2,j-2);return A+=2,T(q),w=w.slice(j),A+=2,z({type:h,comment:q})}}function _(){var z=L(),j=U(r);if(j){if(N(),!U(i))return R("property missing ':'");var q=U(l),X=z({type:p,property:y(j[0].replace(e,c)),value:q?y(q[0].replace(e,c)):c});return U(o),X}}function H(){var z=[];b(z);for(var j;j=_();)j!==!1&&(z.push(j),b(z));return z}return $(),H()}function y(w){return w?w.replace(s,c):c}return Dt=d,Dt}var nr;function Ro(){if(nr)return De;nr=1;var e=De&&De.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(De,"__esModule",{value:!0}),De.default=n;const t=e(Fo());function n(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,t.default)(r),s=typeof i=="function";return o.forEach(a=>{if(a.type!=="declaration")return;const{property:u,value:f}=a;s?i(u,f,a):f&&(l=l||{},l[u]=f)}),l}return De}var Ye={},rr;function Oo(){if(rr)return Ye;rr=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},o=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},a=function(u,f){return f===void 0&&(f={}),l(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(t,o))};return Ye.camelCase=a,Ye}var Xe,ir;function Bo(){if(ir)return Xe;ir=1;var e=Xe&&Xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Ro()),n=Oo();function r(i,l){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,a){s&&a&&(o[(0,n.camelCase)(s,l)]=a)}),o}return r.default=r,Xe=r,Xe}var $o=Bo();const Uo=Hr($o),ri=ii("end"),wn=ii("start");function ii(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 Ho(e){const t=wn(e),n=ri(e);if(t&&n)return{start:t,end:n}}function Qe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?lr(e.position):"start"in e||"end"in e?lr(e):"line"in e||"column"in e?sn(e):""}function sn(e){return or(e&&e.line)+":"+or(e&&e.column)}function lr(e){return sn(e&&e.start)+"-"+sn(e&&e.end)}function or(e){return e&&typeof e=="number"?e:1}class Z extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Qe(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Z.prototype.file="";Z.prototype.name="";Z.prototype.reason="";Z.prototype.message="";Z.prototype.stack="";Z.prototype.column=void 0;Z.prototype.line=void 0;Z.prototype.ancestors=void 0;Z.prototype.cause=void 0;Z.prototype.fatal=void 0;Z.prototype.place=void 0;Z.prototype.ruleId=void 0;Z.prototype.source=void 0;const Sn={}.hasOwnProperty,qo=new Map,Vo=/[A-Z]/g,Wo=new Set(["table","tbody","thead","tfoot","tr"]),Jo=new Set(["td","th"]),li="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yo(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=ns(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=ts(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"?bn:Do,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=oi(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function oi(e,t,n){if(t.type==="element")return Xo(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Go(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Zo(e,t,n);if(t.type==="mdxjsEsm")return Ko(e,t);if(t.type==="root")return Qo(e,t,n);if(t.type==="text")return es(e,t)}function Xo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=bn,e.schema=i),e.ancestors.push(t);const l=ai(e,t.tagName,!1),o=rs(e,t);let s=An(e,t);return Wo.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!Eo(a):!0})),si(e,o,l,t),Cn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Go(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)}it(e,t.position)}function Ko(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);it(e,t.position)}function Zo(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=bn,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:ai(e,t.name,!0),o=is(e,t),s=An(e,t);return si(e,o,l,t),Cn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Qo(e,t,n){const r={};return Cn(r,An(e,t)),e.create(t,e.Fragment,r,n)}function es(e,t){return t.value}function si(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Cn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ts(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function ns(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=wn(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function rs(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Sn.call(t.properties,i)){const l=ls(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Jo.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function is(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else it(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else it(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function An(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:qo;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=oi(e,l,o);s!==void 0&&n.push(s)}return n}function ls(e,t,n){const r=Po(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?bo(n):Mo(n)),r.property==="style"){let i=typeof n=="object"?n:os(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ss(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?jo[r.property]||r.property:r.attribute,n]}}function os(e,t){try{return Uo(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Z("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=li+"#cannot-parse-style-attribute",i}}function ai(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=Kn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=Kn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Sn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);it(e)}function it(e,t){const n=new Z("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=li+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ss(e){const t={};let n;for(n in e)Sn.call(e,n)&&(t[as(n)]=e[n]);return t}function as(e){let t=e.replace(Vo,us);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function us(e){return"-"+e.toLowerCase()}const Mt={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"]},cs={};function En(e,t){const n=cs,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ui(e,r,i)}function ui(e,t,n){if(fs(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 sr(e.children,t,n)}return Array.isArray(e)?sr(e,t,n):""}function sr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ui(e[i],t,n);return r.join("")}function fs(e){return!!(e&&typeof e=="object")}const ar=document.createElement("i");function vn(e){const t="&"+e+";";ar.innerHTML=t;const n=ar.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 l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const ur={}.hasOwnProperty;function ci(e){const t={};let n=-1;for(;++n<e.length;)ps(t,e[n]);return t}function ps(e,t){let n;for(n in t){const i=(ur.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){ur.call(i,o)||(i[o]=[]);const s=l[o];hs(i[o],Array.isArray(s)?s:s?[s]:[])}}}function hs(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 fi(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 fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Q=Ee(/[A-Za-z]/),K=Ee(/[\dA-Za-z]/),ms=Ee(/[#-'*+\--9=?A-Z^-~]/);function At(e){return e!==null&&(e<32||e===127)}const an=Ee(/\d/),ds=Ee(/[\dA-Fa-f]/),gs=Ee(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function F(e){return e===-2||e===-1||e===32}const jt=Ee(new RegExp("\\p{P}|\\p{S}","u")),Ne=Ee(/\s/);function Ee(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),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 l=0;return o;function o(a){return F(a)?(e.enter(n),s(a)):t(a)}function s(a){return F(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}const xs={tokenize:ys};function ys(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),B(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return P(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}const ks={tokenize:bs},cr={tokenize:ws};function bs(e){const t=this,n=[];let r=0,i,l,o;return s;function s(A){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,a,u)(A)}return u(A)}function a(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const T=t.events.length;let L=T,S;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){S=t.events[L][1].end;break}k(r);let R=T;for(;R<t.events.length;)t.events[R][1].end={...S},R++;return ie(t.events,L+1,0,t.events.slice(T)),t.events.length=R,u(A)}return s(A)}function u(A){if(r===n.length){if(!i)return h(A);if(i.currentConstruct&&i.currentConstruct.concrete)return d(A);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cr,f,c)(A)}function f(A){return i&&E(),k(r),h(A)}function c(A){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,d(A)}function h(A){return t.containerState={},e.attempt(cr,p,d)(A)}function p(A){return r++,n.push([t.currentConstruct,t.containerState]),h(A)}function d(A){if(A===null){i&&E(),k(0),e.consume(A);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),y(A)}function y(A){if(A===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(A);return}return P(A)?(e.consume(A),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(A),y)}function w(A,T){const L=t.sliceStream(A);if(T&&L.push(null),A.previous=l,l&&(l.next=A),l=A,i.defineSkip(A.start),i.write(L),t.parser.lazy[A.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const R=t.events.length;let U=R,$,b;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if($){b=t.events[U][1].end;break}$=!0}for(k(r),S=R;S<t.events.length;)t.events[S][1].end={...b},S++;ie(t.events,U+1,0,t.events.slice(R)),t.events.length=S}}function k(A){let T=n.length;for(;T-- >A;){const L=n[T];t.containerState=L[1],L[0].exit.call(t,e)}n.length=A}function E(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ws(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 Oe(e){if(e===null||W(e)||Ne(e))return 1;if(jt(e))return 2}function Nt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const un={name:"attention",resolveAll:Ss,tokenize:Cs};function Ss(e,t){let n=-1,r,i,l,o,s,a,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;a=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};fr(c,-a),fr(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.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",o,t],["exit",o,t],["enter",l,t]]),u=le(u,Nt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",l,t],["enter",s,t],["exit",s,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 Cs(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oe(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),f=Oe(a),c=!f||f===2&&i||n.includes(a),h=!i||i===2&&f||n.includes(r);return u._open=!!(l===42?c:c&&(i||!h)),u._close=!!(l===42?h:h&&(f||!c)),t(a)}}function fr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const As={name:"autolink",tokenize:Es};function Es(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"),l}function l(p){return Q(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||K(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||K(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(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||At(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),f):ms(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 d=p===45?h:c;return e.consume(p),d}return n(p)}}const ft={partial:!0,tokenize:vs};function vs(e,t,n){return r;function r(l){return F(l)?B(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||P(l)?t(l):n(l)}}const pi={continuation:{tokenize:Ts},exit:js,name:"blockQuote",tokenize:Is};function Is(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return F(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Ts(e,t,n){const r=this;return i;function i(o){return F(o)?B(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(pi,t,n)(o)}}function js(e){e.exit("blockQuote")}const hi={name:"characterEscape",tokenize:Ns};function Ns(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return gs(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const mi={name:"characterReference",tokenize:_s};function _s(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=K,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=ds,f):(e.enter("characterReferenceValue"),l=7,o=an,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return o===K&&!vn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const pr={partial:!0,tokenize:zs},hr={concrete:!0,name:"codeFenced",tokenize:Ps};function Ps(e,t,n){const r=this,i={partial:!0,tokenize:L};let l=0,o=0,s;return a;function a(S){return u(S)}function u(S){const R=r.events[r.events.length-1];return l=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===s?(o++,e.consume(S),f):o<3?n(S):(e.exit("codeFencedFenceSequence"),F(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(pr,y,T)(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)):F(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,p,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),h)}function p(S){return S===null||P(S)?c(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(S)):S===96&&S===s?n(S):(e.consume(S),d)}function y(S){return e.attempt(i,T,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),k}function k(S){return l>0&&F(S)?B(e,E,"linePrefix",l+1)(S):E(S)}function E(S){return S===null||P(S)?e.check(pr,y,T)(S):(e.enter("codeFlowValue"),A(S))}function A(S){return S===null||P(S)?(e.exit("codeFlowValue"),E(S)):(e.consume(S),A)}function T(S){return e.exit("codeFenced"),t(S)}function L(S,R,U){let $=0;return b;function b(j){return S.enter("lineEnding"),S.consume(j),S.exit("lineEnding"),N}function N(j){return S.enter("codeFencedFence"),F(j)?B(S,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):_(j)}function _(j){return j===s?(S.enter("codeFencedFenceSequence"),H(j)):U(j)}function H(j){return j===s?($++,S.consume(j),H):$>=o?(S.exit("codeFencedFenceSequence"),F(j)?B(S,z,"whitespace")(j):z(j)):U(j)}function z(j){return j===null||P(j)?(S.exit("codeFencedFence"),R(j)):U(j)}}}function zs(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ft={name:"codeIndented",tokenize:Ds},Ls={partial:!0,tokenize:Ms};function Ds(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),B(e,l,"linePrefix",5)(u)}function l(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?a(u):P(u)?e.attempt(Ls,o,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||P(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function Ms(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):B(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):P(o)?i(o):n(o)}}const Fs={name:"codeText",previous:Os,resolve:Rs,tokenize:Bs};function Rs(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 Os(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bs(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):P(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||P(c)?(e.exit("codeTextData"),a(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)):(l.type="codeTextData",u(c))}}class $s{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 l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ge(this.left,r),l.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),Ge(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ge(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);Ge(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ge(this.left,n.reverse())}}}function Ge(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 di(e){const t={};let n=-1,r,i,l,o,s,a,u;const f=new $s(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"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Us(f,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Us(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let f,c,h=-1,p=n,d=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(y=h+1,w.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const k=s.slice(w[h],w[h+1]),E=l.pop();a.push([E,E+k.length-1]),e.splice(E,2,k)}for(a.reverse(),h=-1;++h<a.length;)u[d+a[h][0]]=d+a[h][1],d+=a[h][1]-a[h][0]-1;return u}const Hs={resolve:Vs,tokenize:Ws},qs={partial:!0,tokenize:Js};function Vs(e){return di(e),e}function Ws(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):P(s)?e.check(qs,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Js(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),B(e,l,"linePrefix")}function l(o){if(o===null||P(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function gi(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(k),e.exit(l),h):k===null||k===32||k===41||At(k)?n(k):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(k))}function h(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(s),h(k)):k===null||k===60||P(k)?n(k):(e.consume(k),k===92?d:p)}function d(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function y(k){return!f&&(k===null||k===41||W(k))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(k)):f<u&&k===40?(e.consume(k),f++,y):k===41?(e.consume(k),f--,y):k===null||k===32||k===40||At(k)?n(k):(e.consume(k),k===92?w:y)}function w(k){return k===40||k===41||k===92?(e.consume(k),y):y(k)}}function xi(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),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)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),a||(a=!F(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function yi(e,t,n,r,i,l){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,a):n(h)}function a(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),a(o)):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===o||h===null||P(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===o||h===92?(e.consume(h),f):f(h)}}function et(e,t){let n;return r;function r(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):F(i)?B(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ys={name:"definition",tokenize:Gs},Xs={partial:!0,tokenize:Ks};function Gs(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return xi.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return W(p)?et(e,u)(p):u(p)}function u(p){return gi(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Xs,c,c)(p)}function c(p){return F(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 Ks(e,t,n){return r;function r(s){return W(s)?et(e,i)(s):n(s)}function i(s){return yi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return F(s)?B(e,o,"whitespace")(s):o(s)}function o(s){return s===null||P(s)?t(s):n(s)}}const Zs={name:"hardBreakEscape",tokenize:Qs};function Qs(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return P(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const ea={name:"headingAtx",resolve:ta,tokenize:na};function ta(e,t){let n=e.length-2,r=3,i,l;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},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function na(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||W(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||P(f)?(e.exit("atxHeading"),t(f)):F(f)?B(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const ra=["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"],mr=["pre","script","style","textarea"],ia={concrete:!0,name:"htmlFlow",resolveTo:sa,tokenize:aa},la={partial:!0,tokenize:ca},oa={partial:!0,tokenize:ua};function sa(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 aa(e,t,n){const r=this;let i,l,o,s,a;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),h):x===47?(e.consume(x),l=!0,y):x===63?(e.consume(x),i=3,r.interrupt?t:g):Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function h(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,d):Q(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function d(x){const ae="CDATA[";return x===ae.charCodeAt(s++)?(e.consume(x),s===ae.length?r.interrupt?t:_:d):n(x)}function y(x){return Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function w(x){if(x===null||x===47||x===62||W(x)){const ae=x===47,ve=o.toLowerCase();return!ae&&!l&&mr.includes(ve)?(i=1,r.interrupt?t(x):_(x)):ra.includes(o.toLowerCase())?(i=6,ae?(e.consume(x),k):r.interrupt?t(x):_(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):l?E(x):A(x))}return x===45||K(x)?(e.consume(x),o+=String.fromCharCode(x),w):n(x)}function k(x){return x===62?(e.consume(x),r.interrupt?t:_):n(x)}function E(x){return F(x)?(e.consume(x),E):b(x)}function A(x){return x===47?(e.consume(x),b):x===58||x===95||Q(x)?(e.consume(x),T):F(x)?(e.consume(x),A):b(x)}function T(x){return x===45||x===46||x===58||x===95||K(x)?(e.consume(x),T):L(x)}function L(x){return x===61?(e.consume(x),S):F(x)?(e.consume(x),L):A(x)}function S(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),a=x,R):F(x)?(e.consume(x),S):U(x)}function R(x){return x===a?(e.consume(x),a=null,$):x===null||P(x)?n(x):(e.consume(x),R)}function U(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||W(x)?L(x):(e.consume(x),U)}function $(x){return x===47||x===62||F(x)?A(x):n(x)}function b(x){return x===62?(e.consume(x),N):n(x)}function N(x){return x===null||P(x)?_(x):F(x)?(e.consume(x),N):n(x)}function _(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),X):x===62&&i===4?(e.consume(x),se):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),de):P(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(la,ge,H)(x)):x===null||P(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),_)}function H(x){return e.check(oa,z,ge)(x)}function z(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),j}function j(x){return x===null||P(x)?H(x):(e.enter("htmlFlowData"),_(x))}function q(x){return x===45?(e.consume(x),g):_(x)}function X(x){return x===47?(e.consume(x),o="",oe):_(x)}function oe(x){if(x===62){const ae=o.toLowerCase();return mr.includes(ae)?(e.consume(x),se):_(x)}return Q(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),oe):_(x)}function de(x){return x===93?(e.consume(x),g):_(x)}function g(x){return x===62?(e.consume(x),se):x===45&&i===2?(e.consume(x),g):_(x)}function se(x){return x===null||P(x)?(e.exit("htmlFlowData"),ge(x)):(e.consume(x),se)}function ge(x){return e.exit("htmlFlow"),t(x)}}function ua(e,t,n){const r=this;return i;function i(o){return P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function ca(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ft,t,n)}}const fa={name:"htmlText",tokenize:pa};function pa(e,t,n){const r=this;let i,l,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),L):g===63?(e.consume(g),A):Q(g)?(e.consume(g),U):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,d):Q(g)?(e.consume(g),E):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function c(g){return g===null?n(g):g===45?(e.consume(g),h):P(g)?(o=c,X(g)):(e.consume(g),c)}function h(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?h(g):c(g)}function d(g){const se="CDATA[";return g===se.charCodeAt(l++)?(e.consume(g),l===se.length?y:d):n(g)}function y(g){return g===null?n(g):g===93?(e.consume(g),w):P(g)?(o=y,X(g)):(e.consume(g),y)}function w(g){return g===93?(e.consume(g),k):y(g)}function k(g){return g===62?q(g):g===93?(e.consume(g),k):y(g)}function E(g){return g===null||g===62?q(g):P(g)?(o=E,X(g)):(e.consume(g),E)}function A(g){return g===null?n(g):g===63?(e.consume(g),T):P(g)?(o=A,X(g)):(e.consume(g),A)}function T(g){return g===62?q(g):A(g)}function L(g){return Q(g)?(e.consume(g),S):n(g)}function S(g){return g===45||K(g)?(e.consume(g),S):R(g)}function R(g){return P(g)?(o=R,X(g)):F(g)?(e.consume(g),R):q(g)}function U(g){return g===45||K(g)?(e.consume(g),U):g===47||g===62||W(g)?$(g):n(g)}function $(g){return g===47?(e.consume(g),q):g===58||g===95||Q(g)?(e.consume(g),b):P(g)?(o=$,X(g)):F(g)?(e.consume(g),$):q(g)}function b(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),b):N(g)}function N(g){return g===61?(e.consume(g),_):P(g)?(o=N,X(g)):F(g)?(e.consume(g),N):$(g)}function _(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,H):P(g)?(o=_,X(g)):F(g)?(e.consume(g),_):(e.consume(g),z)}function H(g){return g===i?(e.consume(g),i=void 0,j):g===null?n(g):P(g)?(o=H,X(g)):(e.consume(g),H)}function z(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||W(g)?$(g):(e.consume(g),z)}function j(g){return g===47||g===62||W(g)?$(g):n(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function X(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),oe}function oe(g){return F(g)?B(e,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):de(g)}function de(g){return e.enter("htmlTextData"),o(g)}}const In={name:"labelEnd",resolveAll:ga,resolveTo:xa,tokenize:ya},ha={tokenize:ka},ma={tokenize:ba},da={tokenize:wa};function ga(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 xa(e,t){let n=e.length,r=0,i,l,o,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,t],["enter",u,t]],s=le(s,e.slice(l+1,l+r+3)),s=le(s,[["enter",f,t]]),s=le(s,Nt(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),s=le(s,[["exit",f,t],e[o-2],e[o-1],["exit",u,t]]),s=le(s,e.slice(o+1)),s=le(s,[["exit",a,t]]),ie(e,l,e.length,s),e}function ya(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(h){return l?l._inactive?c(h):(o=r.parser.defined.includes(fe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(ha,f,o?f:c)(h):h===91?e.attempt(ma,f,o?u:c)(h):o?f(h):c(h)}function u(h){return e.attempt(da,f,c)(h)}function f(h){return t(h)}function c(h){return l._balanced=!0,n(h)}}function ka(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)?et(e,l)(c):l(c)}function l(c){return c===41?f(c):gi(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return W(c)?et(e,a)(c):f(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?yi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?et(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 ba(e,t,n){const r=this;return i;function i(s){return xi.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function wa(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Sa={name:"labelStartImage",resolveAll:In.resolveAll,tokenize:Ca};function Ca(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Aa={name:"labelStartLink",resolveAll:In.resolveAll,tokenize:Ea};function Ea(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Rt={name:"lineEnding",tokenize:va};function va(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const kt={name:"thematicBreak",tokenize:Ia};function Ia(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||P(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),F(u)?B(e,s,"whitespace")(u):s(u))}}const ee={continuation:{tokenize:_a},exit:za,name:"list",tokenize:Na},Ta={partial:!0,tokenize:La},ja={partial:!0,tokenize:Pa};function Na(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:an(p)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(kt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return an(p)&&++o<10?(e.consume(p),a):(!r.interrupt||o<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(ft,r.interrupt?n:f,e.attempt(Ta,h,c))}function f(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function c(p){return F(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function _a(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ft,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!F(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ja,t,o)(s))}function o(s){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)(s)}}function Pa(e,t,n){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function za(e){e.exit(this.containerState.type)}function La(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!F(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const dr={name:"setextUnderline",resolveTo:Da,tokenize:Ma};function Da(e,t){let n=e.length,r,i,l;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),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function Ma(e,t,n){const r=this;let i;return l;function l(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,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),F(u)?B(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||P(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Fa={tokenize:Ra};function Ra(e){const t=this,n=e.attempt(ft,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Hs,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Oa={resolveAll:bi()},Ba=ki("string"),$a=ki("text");function ki(e){return{resolveAll:bi(e==="text"?Ua:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(f){return u(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),a)}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 bi(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function Ua(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 l=i.length,o=-1,s=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)a=!0,s++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},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 Ha={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:pi},qa={91:Ys},Va={[-2]:Ft,[-1]:Ft,32:Ft},Wa={35:ea,42:kt,45:[dr,kt],60:ia,61:dr,95:kt,96:hr,126:hr},Ja={38:mi,92:hi},Ya={[-5]:Rt,[-4]:Rt,[-3]:Rt,33:Sa,38:mi,42:un,60:[As,fa],91:Aa,92:[Zs,hi],93:In,95:un,96:Fs},Xa={null:[un,Oa]},Ga={null:[42,95]},Ka={null:[]},Za=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ga,contentInitial:qa,disable:Ka,document:Ha,flow:Wa,flowInitial:Va,insideSpan:Xa,string:Ja,text:Ya},Symbol.toStringTag,{value:"Module"}));function Qa(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={},l=[];let o=[],s=[];const a={attempt:R(L),check:R(S),consume:E,enter:A,exit:T,interrupt:R(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:d,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(N){return o=le(o,N),w(),o[o.length-1]!==null?[]:(U(t,0),u.events=Nt(l,u.events,u),u.events)}function h(N,_){return tu(p(N),_)}function p(N){return eu(o,N)}function d(){const{_bufferIndex:N,_index:_,line:H,column:z,offset:j}=r;return{_bufferIndex:N,_index:_,line:H,column:z,offset:j}}function y(N){i[N.line]=N.column,b()}function w(){let N;for(;r._index<o.length;){const _=o[r._index];if(typeof _=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<_.length;)k(_.charCodeAt(r._bufferIndex));else k(_)}}function k(N){f=f(N)}function E(N){P(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,b()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function A(N,_){const H=_||{};return H.type=N,H.start=d(),u.events.push(["enter",H,u]),s.push(H),H}function T(N){const _=s.pop();return _.end=d(),u.events.push(["exit",_,u]),_}function L(N,_){U(N,_.from)}function S(N,_){_.restore()}function R(N,_){return H;function H(z,j,q){let X,oe,de,g;return Array.isArray(z)?ge(z):"tokenize"in z?ge([z]):se(z);function se(G){return Ve;function Ve(be){const Pe=be!==null&&G[be],ze=be!==null&&G.null,ht=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return ge(ht)(be)}}function ge(G){return X=G,oe=0,G.length===0?q:x(G[oe])}function x(G){return Ve;function Ve(be){return g=$(),de=G,G.partial||(u.currentConstruct=G),G.name&&u.parser.constructs.disable.null.includes(G.name)?ve():G.tokenize.call(_?Object.assign(Object.create(u),_):u,a,ae,ve)(be)}}function ae(G){return N(de,g),j}function ve(G){return g.restore(),++oe<X.length?x(X[oe]):q}}}function U(N,_){N.resolveAll&&!l.includes(N)&&l.push(N),N.resolve&&ie(u.events,_,u.events.length-_,N.resolve(u.events.slice(_),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function $(){const N=d(),_=u.previous,H=u.currentConstruct,z=u.events.length,j=Array.from(s);return{from:z,restore:q};function q(){r=N,u.previous=_,u.currentConstruct=H,u.events.length=z,s=j,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function eu(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function tu(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
50
55
  `;break}case-3:{o=`\r
51
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function tu(e){const r={constructs:ci([Ka,...(e||{}).extensions||[]]),content:i(gs),defined:[],document:i(ys),flow:i(Fa),lazy:{},string:i(Oa),text:i(Ba)};return r;function i(l){return o;function o(s){return Za(r,l,s)}}}function nu(e){for(;!di(e););return e}const gr=/[\0\t\n\r]/g;function ru(){let e=1,t="",n=!0,r;return i;function i(l,o,s){const a=[];let u,f,c,h,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(gr.lastIndex=c,u=gr.exec(l),h=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(h),!u){t=l.slice(c);break}if(p===10&&c===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<h&&(a.push(l.slice(c,h)),e+=h-c),p){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const iu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lu(e){return e.replace(iu,ou)}function ou(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return fi(n.slice(l?2:1),l?16:10)}return vn(n)||e}const wi={}.hasOwnProperty;function su(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),au(n)(nu(tu(n).document().write(ru()(e,t,!0))))}function au(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Vn),autolinkProtocol:$,autolinkEmail:$,atxHeading:l(Un),blockQuote:l(ze),characterEscape:$,characterReference:$,codeFenced:l(ht),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(ht,o),codeText:l(kl,o),codeTextData:$,data:$,codeFlowValue:$,definition:l(bl),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(wl),hardBreakEscape:l(Hn),hardBreakTrailing:l(Hn),htmlFlow:l(qn,o),htmlFlowData:$,htmlText:l(qn,o),htmlTextData:$,image:l(Sl),label:o,link:l(Vn),listItem:l(Cl),listItemValue:h,listOrdered:l(Wn,c),listUnordered:l(Wn),paragraph:l(El),reference:x,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Un),strong:l(Al),thematicBreak:l(Il)},exit:{atxHeading:a(),atxHeadingSequence:L,autolink:a(),autolinkEmail:Pe,autolinkProtocol:be,blockQuote:a(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:G,characterReference:Ve,codeFenced:a(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:b,codeIndented:a(k),codeText:a(j),codeTextData:b,data:b,definition:a(),definitionDestinationString:T,definitionLabelString:A,definitionTitleString:E,emphasis:a(),hardBreakEscape:a(_),hardBreakTrailing:a(_),htmlFlow:a(H),htmlFlowData:b,htmlText:a(z),htmlTextData:b,image:a(X),label:me,labelText:oe,lineEnding:N,link:a(q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ae,resourceDestinationString:g,resourceTitleString:se,resource:de,setextHeading:a(U),setextHeadingLineSequence:R,setextHeadingText:S,strong:a(),thematicBreak:a()}};Si(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(C){let I={type:"root",children:[]};const D={stack:[I],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:f,data:n},O=[];let V=-1;for(;++V<C.length;)if(C[V][1].type==="listOrdered"||C[V][1].type==="listUnordered")if(C[V][0]==="enter")O.push(V);else{const ue=O.pop();V=i(C,ue,V)}for(V=-1;++V<C.length;){const ue=t[C[V][0]];wi.call(ue,C[V][1].type)&&ue[C[V][1].type].call(Object.assign({sliceSerialize:C[V][2].sliceSerialize},D),C[V][1])}if(D.tokenStack.length>0){const ue=D.tokenStack[D.tokenStack.length-1];(ue[1]||xr).call(D,void 0,ue[0])}for(I.position={start:we(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:we(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)I=t.transforms[V](I)||I;return I}function i(C,I,D){let O=I-1,V=-1,ue=!1,Ie,ge,We,Je;for(;++O<=D;){const ne=C[O];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,Je=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ie&&!Je&&!V&&!We&&(We=O),Je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Je=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(Ie){let Le=O;for(ge=void 0;Le--;){const xe=C[Le];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;ge&&(C[ge][1].type="lineEndingBlank",ue=!0),xe[1].type="lineEnding",ge=Le}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}We&&(!ge||We<ge)&&(Ie._spread=!0),Ie.end=Object.assign({},ge?C[ge][1].start:ne[1].end),C.splice(ge||O,0,["exit",Ie,ne[2]]),O++,D++}if(ne[1].type==="listItemPrefix"){const Le={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ie=Le,C.splice(O,0,["enter",Le,ne[2]]),O++,D++,We=void 0,Je=!0}}}return C[I][1]._spread=ue,D}function l(C,I){return D;function D(O){s.call(this,C(O),O),I&&I.call(this,O)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(C,I,D){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([I,D||void 0]),C.position={start:we(I.start),end:void 0}}function a(C){return I;function I(D){C&&C.call(this,D),u.call(this,D)}}function u(C,I){const D=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==C.type&&(I?I.call(this,C,O[0]):(O[1]||xr).call(this,C,O[0]));else throw new Error("Cannot close `"+C.type+"` ("+Qe({start:C.start,end:C.end})+"): it’s not open");D.position.end=we(C.end)}function f(){return An(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(C){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),I=this.stack[this.stack.length-1];I.lang=C}function d(){const C=this.resume(),I=this.stack[this.stack.length-1];I.meta=C}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/(\r?\n|\r)$/g,"")}function A(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase()}function E(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function T(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function L(C){const I=this.stack[this.stack.length-1];if(!I.depth){const D=this.sliceSerialize(C).length;I.depth=D}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function R(C){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(C){const D=this.stack[this.stack.length-1].children;let O=D[D.length-1];(!O||O.type!=="text")&&(O=vl(),O.position={start:we(C.start),end:void 0},D.push(O)),this.stack.push(O)}function b(C){const I=this.stack.pop();I.value+=this.sliceSerialize(C),I.position.end=we(C.end)}function N(C){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=I.children[I.children.length-1];D.position.end=we(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&($.call(this,C),b.call(this,C))}function _(){this.data.atHardBreak=!0}function H(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function z(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function j(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function q(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function X(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function oe(C){const I=this.sliceSerialize(C),D=this.stack[this.stack.length-2];D.label=lu(I),D.identifier=fe(I).toLowerCase()}function me(){const C=this.stack[this.stack.length-1],I=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const O=C.children;D.children=O}else D.alt=I}function g(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function se(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function de(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ae(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function ve(C){this.data.characterReferenceType=C.type}function G(C){const I=this.sliceSerialize(C),D=this.data.characterReferenceType;let O;D?(O=fi(I,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=vn(I);const V=this.stack[this.stack.length-1];V.value+=O}function Ve(C){const I=this.stack.pop();I.position.end=we(C.end)}function be(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(C)}function Pe(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(C)}function ze(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function kl(){return{type:"inlineCode",value:""}}function bl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wl(){return{type:"emphasis",children:[]}}function Un(){return{type:"heading",depth:0,children:[]}}function Hn(){return{type:"break"}}function qn(){return{type:"html",value:""}}function Sl(){return{type:"image",title:null,url:"",alt:null}}function Vn(){return{type:"link",title:null,url:"",children:[]}}function Wn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function Cl(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function El(){return{type:"paragraph",children:[]}}function Al(){return{type:"strong",children:[]}}function vl(){return{type:"text",value:""}}function Il(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function Si(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Si(e,r):uu(e,r)}}function uu(e,t){let n;for(n in t)if(wi.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 xr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qe({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qe({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qe({start:t.start,end:t.end})+") is still open")}function cu(e){const t=this;t.parser=n;function n(r){return su(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fu(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 pu(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
52
- `}]}function hu(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 l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function mu(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function du(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gu(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qe(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function xu(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 yu(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ci(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),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function ku(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ci(e,t);const i={src:qe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function bu(e,t){const n={src:qe(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 wu(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 Su(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ci(e,t);const i={href:qe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Cu(e,t){const n={href:qe(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 Eu(e,t,n){const r=e.all(t),i=n?Au(n):Ei(t),l={},o=[];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:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
56
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function nu(e){const r={constructs:ci([Za,...(e||{}).extensions||[]]),content:i(xs),defined:[],document:i(ks),flow:i(Fa),lazy:{},string:i(Ba),text:i($a)};return r;function i(l){return o;function o(s){return Qa(r,l,s)}}}function ru(e){for(;!di(e););return e}const gr=/[\0\t\n\r]/g;function iu(){let e=1,t="",n=!0,r;return i;function i(l,o,s){const a=[];let u,f,c,h,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(gr.lastIndex=c,u=gr.exec(l),h=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(h),!u){t=l.slice(c);break}if(p===10&&c===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<h&&(a.push(l.slice(c,h)),e+=h-c),p){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const lu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ou(e){return e.replace(lu,su)}function su(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return fi(n.slice(l?2:1),l?16:10)}return vn(n)||e}const wi={}.hasOwnProperty;function au(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),uu(n)(ru(nu(n).document().write(iu()(e,t,!0))))}function uu(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Vn),autolinkProtocol:$,autolinkEmail:$,atxHeading:l(Un),blockQuote:l(ze),characterEscape:$,characterReference:$,codeFenced:l(ht),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(ht,o),codeText:l(kl,o),codeTextData:$,data:$,codeFlowValue:$,definition:l(bl),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(wl),hardBreakEscape:l(Hn),hardBreakTrailing:l(Hn),htmlFlow:l(qn,o),htmlFlowData:$,htmlText:l(qn,o),htmlTextData:$,image:l(Sl),label:o,link:l(Vn),listItem:l(Cl),listItemValue:h,listOrdered:l(Wn,c),listUnordered:l(Wn),paragraph:l(Al),reference:x,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Un),strong:l(El),thematicBreak:l(Il)},exit:{atxHeading:a(),atxHeadingSequence:L,autolink:a(),autolinkEmail:Pe,autolinkProtocol:be,blockQuote:a(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:G,characterReference:Ve,codeFenced:a(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:b,codeIndented:a(k),codeText:a(j),codeTextData:b,data:b,definition:a(),definitionDestinationString:T,definitionLabelString:E,definitionTitleString:A,emphasis:a(),hardBreakEscape:a(_),hardBreakTrailing:a(_),htmlFlow:a(H),htmlFlowData:b,htmlText:a(z),htmlTextData:b,image:a(X),label:de,labelText:oe,lineEnding:N,link:a(q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ae,resourceDestinationString:g,resourceTitleString:se,resource:ge,setextHeading:a(U),setextHeadingLineSequence:R,setextHeadingText:S,strong:a(),thematicBreak:a()}};Si(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(C){let I={type:"root",children:[]};const D={stack:[I],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:f,data:n},O=[];let V=-1;for(;++V<C.length;)if(C[V][1].type==="listOrdered"||C[V][1].type==="listUnordered")if(C[V][0]==="enter")O.push(V);else{const ue=O.pop();V=i(C,ue,V)}for(V=-1;++V<C.length;){const ue=t[C[V][0]];wi.call(ue,C[V][1].type)&&ue[C[V][1].type].call(Object.assign({sliceSerialize:C[V][2].sliceSerialize},D),C[V][1])}if(D.tokenStack.length>0){const ue=D.tokenStack[D.tokenStack.length-1];(ue[1]||xr).call(D,void 0,ue[0])}for(I.position={start:we(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:we(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)I=t.transforms[V](I)||I;return I}function i(C,I,D){let O=I-1,V=-1,ue=!1,Ie,xe,We,Je;for(;++O<=D;){const ne=C[O];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,Je=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ie&&!Je&&!V&&!We&&(We=O),Je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Je=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(Ie){let Le=O;for(xe=void 0;Le--;){const ye=C[Le];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;xe&&(C[xe][1].type="lineEndingBlank",ue=!0),ye[1].type="lineEnding",xe=Le}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}We&&(!xe||We<xe)&&(Ie._spread=!0),Ie.end=Object.assign({},xe?C[xe][1].start:ne[1].end),C.splice(xe||O,0,["exit",Ie,ne[2]]),O++,D++}if(ne[1].type==="listItemPrefix"){const Le={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ie=Le,C.splice(O,0,["enter",Le,ne[2]]),O++,D++,We=void 0,Je=!0}}}return C[I][1]._spread=ue,D}function l(C,I){return D;function D(O){s.call(this,C(O),O),I&&I.call(this,O)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(C,I,D){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([I,D||void 0]),C.position={start:we(I.start),end:void 0}}function a(C){return I;function I(D){C&&C.call(this,D),u.call(this,D)}}function u(C,I){const D=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==C.type&&(I?I.call(this,C,O[0]):(O[1]||xr).call(this,C,O[0]));else throw new Error("Cannot close `"+C.type+"` ("+Qe({start:C.start,end:C.end})+"): it’s not open");D.position.end=we(C.end)}function f(){return En(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(C){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),I=this.stack[this.stack.length-1];I.lang=C}function d(){const C=this.resume(),I=this.stack[this.stack.length-1];I.meta=C}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/(\r?\n|\r)$/g,"")}function E(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase()}function A(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function T(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function L(C){const I=this.stack[this.stack.length-1];if(!I.depth){const D=this.sliceSerialize(C).length;I.depth=D}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function R(C){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(C){const D=this.stack[this.stack.length-1].children;let O=D[D.length-1];(!O||O.type!=="text")&&(O=vl(),O.position={start:we(C.start),end:void 0},D.push(O)),this.stack.push(O)}function b(C){const I=this.stack.pop();I.value+=this.sliceSerialize(C),I.position.end=we(C.end)}function N(C){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=I.children[I.children.length-1];D.position.end=we(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&($.call(this,C),b.call(this,C))}function _(){this.data.atHardBreak=!0}function H(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function z(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function j(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function q(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function X(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function oe(C){const I=this.sliceSerialize(C),D=this.stack[this.stack.length-2];D.label=ou(I),D.identifier=fe(I).toLowerCase()}function de(){const C=this.stack[this.stack.length-1],I=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const O=C.children;D.children=O}else D.alt=I}function g(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function se(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function ge(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ae(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function ve(C){this.data.characterReferenceType=C.type}function G(C){const I=this.sliceSerialize(C),D=this.data.characterReferenceType;let O;D?(O=fi(I,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=vn(I);const V=this.stack[this.stack.length-1];V.value+=O}function Ve(C){const I=this.stack.pop();I.position.end=we(C.end)}function be(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(C)}function Pe(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(C)}function ze(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function kl(){return{type:"inlineCode",value:""}}function bl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wl(){return{type:"emphasis",children:[]}}function Un(){return{type:"heading",depth:0,children:[]}}function Hn(){return{type:"break"}}function qn(){return{type:"html",value:""}}function Sl(){return{type:"image",title:null,url:"",alt:null}}function Vn(){return{type:"link",title:null,url:"",children:[]}}function Wn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function Cl(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function Al(){return{type:"paragraph",children:[]}}function El(){return{type:"strong",children:[]}}function vl(){return{type:"text",value:""}}function Il(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function Si(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Si(e,r):cu(e,r)}}function cu(e,t){let n;for(n in t)if(wi.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 xr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qe({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qe({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qe({start:t.start,end:t.end})+") is still open")}function fu(e){const t=this;t.parser=n;function n(r){return au(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pu(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 hu(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
57
+ `}]}function mu(e,t){const n=t.value?t.value+`
58
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function du(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gu(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xu(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qe(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function yu(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 ku(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ci(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),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function bu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ci(e,t);const i={src:qe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function wu(e,t){const n={src:qe(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 Su(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 Cu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ci(e,t);const i={href:qe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Au(e,t){const n={href:qe(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 Eu(e,t,n){const r=e.all(t),i=n?vu(n):Ai(t),l={},o=[];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:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
54
59
  `}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&o.push({type:"text",value:`
55
- `});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function Au(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=Ei(n[r])}return t}function Ei(e){const t=e.spread;return t??e.children.length>1}function vu(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function Iu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ju(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=wn(t.children[1]),a=ri(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function _u(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const c=t.children[a],h={},p=o?o[a]:void 0;p&&(h.align=p);let d={type:"element",tagName:l,properties:h,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),u.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Pu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yr=9,kr=32;function zu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(br(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(br(t.slice(i),i>0,!1)),l.join("")}function br(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===yr||l===kr;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===yr||l===kr;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Lu(e,t){const n={type:"text",value:zu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Du(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Fu={blockquote:fu,break:pu,code:hu,delete:mu,emphasis:du,footnoteReference:gu,heading:xu,html:yu,imageReference:ku,image:bu,inlineCode:wu,linkReference:Su,link:Cu,listItem:Eu,list:vu,paragraph:Iu,root:Tu,strong:ju,table:Nu,tableCell:Pu,tableRow:_u,text:Lu,thematicBreak:Du,toml:mt,yaml:mt,definition:mt,footnoteDefinition:mt};function mt(){}const Ai=-1,_t=0,tt=1,At=2,Tn=3,jn=4,Nn=5,_n=6,vi=7,Ii=8,wr=typeof self=="object"?self:globalThis,Mu=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case _t:case Ai:return n(o,i);case tt:{const s=n([],i);for(const a of o)s.push(r(a));return s}case At:{const s=n({},i);for(const[a,u]of o)s[r(a)]=r(u);return s}case Tn:return n(new Date(o),i);case jn:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case Nn:{const s=n(new Map,i);for(const[a,u]of o)s.set(r(a),r(u));return s}case _n:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case vi:{const{name:s,message:a}=o;return n(new wr[s](a),i)}case Ii:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new wr[l](o),i)};return r},Sr=e=>Mu(new Map,e)(0),Fe="",{toString:Ru}={},{keys:Ou}=Object,Ke=e=>{const t=typeof e;if(t!=="object"||!e)return[_t,t];const n=Ru.call(e).slice(8,-1);switch(n){case"Array":return[tt,Fe];case"Object":return[At,Fe];case"Date":return[Tn,Fe];case"RegExp":return[jn,Fe];case"Map":return[Nn,Fe];case"Set":return[_n,Fe];case"DataView":return[tt,n]}return n.includes("Array")?[tt,n]:n.includes("Error")?[vi,n]:[At,n]},dt=([e,t])=>e===_t&&(t==="function"||t==="symbol"),Bu=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=Ke(o);switch(s){case _t:{let f=o;switch(a){case"bigint":s=Ii,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([Ai],o)}return i([s,f],o)}case tt:{if(a){let h=o;return a==="DataView"?h=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(o)),i([a,[...h]],o)}const f=[],c=i([s,f],o);for(const h of o)f.push(l(h));return c}case At:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const f=[],c=i([s,f],o);for(const h of Ou(o))(e||!dt(Ke(o[h])))&&f.push([l(h),l(o[h])]);return c}case Tn:return i([s,o.toISOString()],o);case jn:{const{source:f,flags:c}=o;return i([s,{source:f,flags:c}],o)}case Nn:{const f=[],c=i([s,f],o);for(const[h,p]of o)(e||!(dt(Ke(h))||dt(Ke(p))))&&f.push([l(h),l(p)]);return c}case _n:{const f=[],c=i([s,f],o);for(const h of o)(e||!dt(Ke(h)))&&f.push(l(h));return c}}const{message:u}=o;return i([s,{name:a,message:u}],o)};return l},Cr=(e,{json:t,lossy:n}={})=>{const r=[];return Bu(!(t||n),!!t,new Map,r)(e),r},vt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Sr(Cr(e,t)):structuredClone(e):(e,t)=>Sr(Cr(e,t));function $u(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 Uu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Hu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$u,r=e.options.footnoteBackLabel||Uu,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=qe(c.toLowerCase());let p=0;const d=[],y=e.footnoteCounts.get(c);for(;y!==void 0&&++p<=y;){d.length>0&&d.push({type:"text",value:" "});let A=typeof n=="string"?n:n(a,p);typeof A=="string"&&(A={type:"text",value:A}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const A=w.children[w.children.length-1];A&&A.type==="text"?A.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...d)}else f.push(...d);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...vt(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
60
+ `});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function vu(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 Iu(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function Tu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ju(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Nu(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _u(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=wn(t.children[1]),a=ri(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Pu(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const c=t.children[a],h={},p=o?o[a]:void 0;p&&(h.align=p);let d={type:"element",tagName:l,properties:h,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),u.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function zu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yr=9,kr=32;function Lu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(br(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(br(t.slice(i),i>0,!1)),l.join("")}function br(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===yr||l===kr;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===yr||l===kr;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Du(e,t){const n={type:"text",value:Lu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Mu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Fu={blockquote:pu,break:hu,code:mu,delete:du,emphasis:gu,footnoteReference:xu,heading:yu,html:ku,imageReference:bu,image:wu,inlineCode:Su,linkReference:Cu,link:Au,listItem:Eu,list:Iu,paragraph:Tu,root:ju,strong:Nu,table:_u,tableCell:zu,tableRow:Pu,text:Du,thematicBreak:Mu,toml:mt,yaml:mt,definition:mt,footnoteDefinition:mt};function mt(){}const Ei=-1,_t=0,tt=1,Et=2,Tn=3,jn=4,Nn=5,_n=6,vi=7,Ii=8,wr=typeof self=="object"?self:globalThis,Ru=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case _t:case Ei:return n(o,i);case tt:{const s=n([],i);for(const a of o)s.push(r(a));return s}case Et:{const s=n({},i);for(const[a,u]of o)s[r(a)]=r(u);return s}case Tn:return n(new Date(o),i);case jn:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case Nn:{const s=n(new Map,i);for(const[a,u]of o)s.set(r(a),r(u));return s}case _n:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case vi:{const{name:s,message:a}=o;return n(new wr[s](a),i)}case Ii:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new wr[l](o),i)};return r},Sr=e=>Ru(new Map,e)(0),Me="",{toString:Ou}={},{keys:Bu}=Object,Ke=e=>{const t=typeof e;if(t!=="object"||!e)return[_t,t];const n=Ou.call(e).slice(8,-1);switch(n){case"Array":return[tt,Me];case"Object":return[Et,Me];case"Date":return[Tn,Me];case"RegExp":return[jn,Me];case"Map":return[Nn,Me];case"Set":return[_n,Me];case"DataView":return[tt,n]}return n.includes("Array")?[tt,n]:n.includes("Error")?[vi,n]:[Et,n]},dt=([e,t])=>e===_t&&(t==="function"||t==="symbol"),$u=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=Ke(o);switch(s){case _t:{let f=o;switch(a){case"bigint":s=Ii,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([Ei],o)}return i([s,f],o)}case tt:{if(a){let h=o;return a==="DataView"?h=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(o)),i([a,[...h]],o)}const f=[],c=i([s,f],o);for(const h of o)f.push(l(h));return c}case Et:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const f=[],c=i([s,f],o);for(const h of Bu(o))(e||!dt(Ke(o[h])))&&f.push([l(h),l(o[h])]);return c}case Tn:return i([s,o.toISOString()],o);case jn:{const{source:f,flags:c}=o;return i([s,{source:f,flags:c}],o)}case Nn:{const f=[],c=i([s,f],o);for(const[h,p]of o)(e||!(dt(Ke(h))||dt(Ke(p))))&&f.push([l(h),l(p)]);return c}case _n:{const f=[],c=i([s,f],o);for(const h of o)(e||!dt(Ke(h)))&&f.push(l(h));return c}}const{message:u}=o;return i([s,{name:a,message:u}],o)};return l},Cr=(e,{json:t,lossy:n}={})=>{const r=[];return $u(!(t||n),!!t,new Map,r)(e),r},vt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Sr(Cr(e,t)):structuredClone(e):(e,t)=>Sr(Cr(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 Hu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Uu,r=e.options.footnoteBackLabel||Hu,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=qe(c.toLowerCase());let p=0;const d=[],y=e.footnoteCounts.get(c);for(;y!==void 0&&++p<=y;){d.length>0&&d.push({type:"text",value:" "});let E=typeof n=="string"?n:n(a,p);typeof E=="string"&&(E={type:"text",value:E}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,p),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const E=w.children[w.children.length-1];E&&E.type==="text"?E.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...d)}else f.push(...d);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...vt(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
56
61
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
57
- `}]}}const Pt=(function(e){if(e==null)return Ju;if(typeof e=="function")return zt(e);if(typeof e=="object")return Array.isArray(e)?qu(e):Vu(e);if(typeof e=="string")return Wu(e);throw new Error("Expected function, string, or object as test")});function qu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Pt(e[n]);return zt(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Vu(e){const t=e;return zt(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Wu(e){return zt(t);function t(n){return n&&n.type===e}}function zt(e){return t;function t(n,r,i){return!!(Yu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ju(){return!0}function Yu(e){return e!==null&&typeof e=="object"&&"type"in e}const Ti=[],Xu=!0,cn=!1,Gu="skip";function ji(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=Pt(i),o=r?-1:1;s(e,void 0,[])();function s(a,u,f){const c=a&&typeof a=="object"?a:{};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 ("+(a.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Ti,d,y,w;if((!t||l(a,u,f[f.length-1]||void 0))&&(p=Ku(n(a,f)),p[0]===cn))return p;if("children"in a&&a.children){const k=a;if(k.children&&p[0]!==Gu)for(y=(r?k.children.length:-1)+o,w=f.concat(k);y>-1&&y<k.children.length;){const A=k.children[y];if(d=s(A,y,w)(),d[0]===cn)return d;y=typeof d[1]=="number"?d[1]:y+o}}return p}}}function Ku(e){return Array.isArray(e)?e:typeof e=="number"?[Xu,e]:e==null?Ti:[e]}function Pn(e,t,n,r){let i,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,i=n):(l=t,o=n,i=r),ji(e,l,s,i);function s(a,u){const f=u[u.length-1],c=f?f.children.indexOf(a):void 0;return o(a,c,f)}}const fn={}.hasOwnProperty,Zu={};function Qu(e,t){const n=t||Zu,r=new Map,i=new Map,l=new Map,o={...Fu,...n.handlers},s={all:u,applyData:tc,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:a,options:n,patch:ec,wrap:rc};return Pn(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)}}),s;function a(f,c){const h=f.type,p=s.handlers[h];if(fn.call(s.handlers,h)&&p)return p(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in f){const{children:y,...w}=f,k=vt(w);return k.children=s.all(f),k}return vt(f)}return(s.options.unknownHandler||nc)(s,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const d=s.one(h[p],f);if(d){if(p&&h[p-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=Er(d.value)),!Array.isArray(d)&&d.type==="element")){const y=d.children[0];y&&y.type==="text"&&(y.value=Er(y.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function ec(e,t){e.position&&(t.position=Uo(e))}function tc(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,vt(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function nc(e,t){const n=t.data||{},r="value"in t&&!(fn.call(n,"hProperties")||fn.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 rc(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
62
+ `}]}}const Pt=(function(e){if(e==null)return Yu;if(typeof e=="function")return zt(e);if(typeof e=="object")return Array.isArray(e)?Vu(e):Wu(e);if(typeof e=="string")return Ju(e);throw new Error("Expected function, string, or object as test")});function Vu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Pt(e[n]);return zt(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Wu(e){const t=e;return zt(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Ju(e){return zt(t);function t(n){return n&&n.type===e}}function zt(e){return t;function t(n,r,i){return!!(Xu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Yu(){return!0}function Xu(e){return e!==null&&typeof e=="object"&&"type"in e}const Ti=[],Gu=!0,cn=!1,Ku="skip";function ji(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=Pt(i),o=r?-1:1;s(e,void 0,[])();function s(a,u,f){const c=a&&typeof a=="object"?a:{};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 ("+(a.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Ti,d,y,w;if((!t||l(a,u,f[f.length-1]||void 0))&&(p=Zu(n(a,f)),p[0]===cn))return p;if("children"in a&&a.children){const k=a;if(k.children&&p[0]!==Ku)for(y=(r?k.children.length:-1)+o,w=f.concat(k);y>-1&&y<k.children.length;){const E=k.children[y];if(d=s(E,y,w)(),d[0]===cn)return d;y=typeof d[1]=="number"?d[1]:y+o}}return p}}}function Zu(e){return Array.isArray(e)?e:typeof e=="number"?[Gu,e]:e==null?Ti:[e]}function Pn(e,t,n,r){let i,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,i=n):(l=t,o=n,i=r),ji(e,l,s,i);function s(a,u){const f=u[u.length-1],c=f?f.children.indexOf(a):void 0;return o(a,c,f)}}const fn={}.hasOwnProperty,Qu={};function ec(e,t){const n=t||Qu,r=new Map,i=new Map,l=new Map,o={...Fu,...n.handlers},s={all:u,applyData:nc,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:a,options:n,patch:tc,wrap:ic};return Pn(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)}}),s;function a(f,c){const h=f.type,p=s.handlers[h];if(fn.call(s.handlers,h)&&p)return p(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in f){const{children:y,...w}=f,k=vt(w);return k.children=s.all(f),k}return vt(f)}return(s.options.unknownHandler||rc)(s,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const d=s.one(h[p],f);if(d){if(p&&h[p-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=Ar(d.value)),!Array.isArray(d)&&d.type==="element")){const y=d.children[0];y&&y.type==="text"&&(y.value=Ar(y.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function tc(e,t){e.position&&(t.position=Ho(e))}function nc(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,vt(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function rc(e,t){const n=t.data||{},r="value"in t&&!(fn.call(n,"hProperties")||fn.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 ic(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
58
63
  `});++r<e.length;)r&&n.push({type:"text",value:`
59
64
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
60
- `}),n}function Er(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ar(e,t){const n=Qu(e,t),r=n.one(e,void 0),i=Hu(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
61
- `},i),l}function ic(e,t){return e&&"run"in e?async function(n,r){const i=Ar(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ar(n,{file:r,...e||t})}}function vr(e){if(e)throw e}var Ot,Ir;function lc(){if(Ir)return Ot;Ir=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]"},l=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)},o=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},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ot=function a(){var u,f,c,h,p,d,y=arguments[0],w=1,k=arguments.length,A=!1;for(typeof y=="boolean"&&(A=y,y=arguments[1]||{},w=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});w<k;++w)if(u=arguments[w],u!=null)for(f in u)c=s(y,f),h=s(u,f),y!==h&&(A&&h&&(l(h)||(p=i(h)))?(p?(p=!1,d=c&&i(c)?c:[]):d=c&&l(c)?c:{},o(y,{name:f,newValue:a(A,d,h)})):typeof h<"u"&&o(y,{name:f,newValue:h}));return y},Ot}var oc=lc();const Bt=Hr(oc);function pn(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 sc(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const f=e[++l];let c=-1;if(a){o(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?ac(f,s)(...u):o(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 ac(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const pe={basename:uc,dirname:cc,extname:fc,join:pc,sep:"/"};function uc(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function cc(e){if(pt(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 fc(e){pt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function pc(...e){let t=-1,n;for(;++t<e.length;)pt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":hc(n)}function hc(e){pt(e);const t=e.codePointAt(0)===47;let n=mc(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function mc(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const dc={cwd:gc};function gc(){return"/"}function hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function xc(e){if(typeof e=="string")e=new URL(e);else if(!hn(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 yc(e)}function yc(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 $t=["history","path","basename","stem","extname","dirname"];class Ni{constructor(t){let n;t?hn(t)?n={path:t}:typeof t=="string"||kc(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":dc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$t.length;){const l=$t[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)$t.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(t){Ht(t,"basename"),Ut(t,"basename"),this.path=pe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(t){Tr(this.basename,"dirname"),this.path=pe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(t){if(Ut(t,"extname"),Tr(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=pe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hn(t)&&(t=xc(t)),Ht(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(t){Ht(t,"stem"),Ut(t,"stem"),this.path=pe.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 Z(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 Ut(e,t){if(e&&e.includes(pe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pe.sep+"`")}function Ht(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Tr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function kc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bc=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),wc={}.hasOwnProperty;class zn extends bc{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=sc()}copy(){const t=new zn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Bt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Wt("data",this.frozen),this.namespace[t]=n,this):wc.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Wt("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=gt(t),r=this.parser||this.Parser;return qt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),qt("process",this.parser||this.Parser),Vt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=gt(t),a=r.parse(s);r.run(a,s,function(f,c,h){if(f||!c||!h)return u(f);const p=c,d=r.stringify(p,h);Ec(d)?h.value=d:h.result=d,u(f,h)});function u(f,c){f||!c?o(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),qt("processSync",this.parser||this.Parser),Vt("processSync",this.compiler||this.Compiler),this.process(t,i),Nr("processSync","process",n),r;function i(l,o){n=!0,vr(l),r=o}}run(t,n,r){jr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=gt(n);i.run(t,a,u);function u(f,c,h){const p=c||t;f?s(f):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Nr("runSync","run",r),i;function l(o,s){vr(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=gt(n),i=this.compiler||this.Compiler;return Vt("stringify",i),jr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Wt("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(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");s(u.plugins),u.settings&&(i.settings=Bt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(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,...d]=f;const y=r[h][1];pn(y)&&pn(p)&&(p=Bt(!0,y,p)),r[h]=[u,p,...d]}}}}const Sc=new zn().freeze();function qt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wt(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 jr(e){if(!pn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Nr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gt(e){return Cc(e)?e:new Ni(e)}function Cc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ec(e){return typeof e=="string"||Ac(e)}function Ac(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_r=[],Pr={allowDangerousHtml:!0},Ic=/^(https?|ircs?|mailto|xmpp)$/i,Tc=[{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 jc(e){const t=Nc(e),n=_c(e);return Pc(t.runSync(t.parse(n),n),e)}function Nc(e){const t=e.rehypePlugins||_r,n=e.remarkPlugins||_r,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Pr}:Pr;return Sc().use(cu).use(n).use(ic,r).use(t)}function _c(e){const t=e.children||"",n=new Ni;return typeof t=="string"&&(n.value=t),n}function Pc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||zc;for(const f of Tc)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+vc+f.id,void 0);return Pn(e,u),Jo(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return o?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Ft)if(Object.hasOwn(Ft,p)&&Object.hasOwn(f.properties,p)){const d=f.properties[p],y=Ft[p];(y===null||y.includes(f.tagName))&&(f.properties[p]=a(String(d||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return s&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function zc(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||Ic.test(e.slice(0,t))?e:""}function Lc(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _i(e,t,n){const i=Pt((n||{}).ignore||[]),l=Dc(t);let o=-1;for(;++o<l.length;)ji(e,"text",s);function s(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],d=h?h.children:void 0;if(i(p,d?d.indexOf(p):void 0,h))return;h=p}if(h)return a(u,f)}function a(u,f){const c=f[f.length-1],h=l[o][0],p=l[o][1];let d=0;const w=c.children.indexOf(u);let k=!1,A=[];h.lastIndex=0;let E=h.exec(u.value);for(;E;){const T=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=T+1:(d!==T&&A.push({type:"text",value:u.value.slice(d,T)}),Array.isArray(S)?A.push(...S):S&&A.push(S),d=T+E[0].length,k=!0),!h.global)break;E=h.exec(u.value)}return k?(d<u.value.length&&A.push({type:"text",value:u.value.slice(d)}),c.children.splice(w,1,...A)):A=[u],w+A.length}}function Dc(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([Fc(i[0]),Mc(i[1])])}return t}function Fc(e){return typeof e=="string"?new RegExp(Lc(e),"g"):e}function Mc(e){return typeof e=="function"?e:function(){return e}}function Rc(e){_i(e,[/\r?\n|\r/g,Oc])}function Oc(){return{type:"break"}}function Bc(){return function(e){Rc(e)}}function zr(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 Jt="phrasing",Yt=["autolink","link","image","label"];function $c(){return{transforms:[Yc],enter:{literalAutolink:Hc,literalAutolinkEmail:Xt,literalAutolinkHttp:Xt,literalAutolinkWww:Xt},exit:{literalAutolink:Jc,literalAutolinkEmail:Wc,literalAutolinkHttp:qc,literalAutolinkWww:Vc}}}function Uc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Jt,notInConstruct:Yt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Jt,notInConstruct:Yt},{character:":",before:"[ps]",after:"\\/",inConstruct:Jt,notInConstruct:Yt}]}}function Hc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xt(e){this.config.enter.autolinkProtocol.call(this,e)}function qc(e){this.config.exit.autolinkProtocol.call(this,e)}function Vc(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 Wc(e){this.config.exit.autolinkEmail.call(this,e)}function Jc(e){this.exit(e)}function Yc(e){_i(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Xc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Gc]],{ignore:["link","linkReference"]})}function Xc(e,t,n,r,i){let l="";if(!Pi(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!Kc(n)))return!1;const o=Zc(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function Gc(e,t,n,r){return!Pi(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 Zc(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=zr(e,"(");let l=zr(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Pi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ne(n)||jt(n))&&(!t||n!==47)}zi.peek=af;function Qc(){this.buffer()}function ef(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tf(){this.buffer()}function nf(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function rf(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lf(e){this.exit(e)}function of(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sf(e){this.exit(e)}function af(){return"["}function zi(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function uf(){return{enter:{gfmFootnoteCallString:Qc,gfmFootnoteCall:ef,gfmFootnoteDefinitionLabelString:tf,gfmFootnoteDefinition:nf},exit:{gfmFootnoteCallString:rf,gfmFootnoteCall:lf,gfmFootnoteDefinitionLabelString:of,gfmFootnoteDefinition:sf}}}function cf(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:zi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),f=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),f(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
62
- `:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Li:ff))),u(),a}}function ff(e,t,n){return t===0?e:Li(e,t,n)}function Li(e,t,n){return(n?"":" ")+e}const pf=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Di.peek=xf;function hf(){return{canContainEols:["delete"],enter:{strikethrough:df},exit:{strikethrough:gf}}}function mf(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pf}],handlers:{delete:Di}}}function df(e){this.enter({type:"delete",children:[]},e)}function gf(e){this.exit(e)}function Di(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function xf(){return"~"}function yf(e){return e.length}function kf(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||yf,l=[],o=[],s=[],a=[];let u=0,f=-1;for(;++f<e.length;){const y=[],w=[];let k=-1;for(e[f].length>u&&(u=e[f].length);++k<e[f].length;){const A=bf(e[f][k]);if(n.alignDelimiters!==!1){const E=i(A);w[k]=E,(a[k]===void 0||E>a[k])&&(a[k]=E)}y.push(A)}o[f]=y,s[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)l[c]=Lr(r[c]);else{const y=Lr(r);for(;++c<u;)l[c]=y}c=-1;const h=[],p=[];for(;++c<u;){const y=l[c];let w="",k="";y===99?(w=":",k=":"):y===108?w=":":y===114&&(k=":");let A=n.alignDelimiters===!1?1:Math.max(1,a[c]-w.length-k.length);const E=w+"-".repeat(A)+k;n.alignDelimiters!==!1&&(A=w.length+A+k.length,A>a[c]&&(a[c]=A),p[c]=A),h[c]=E}o.splice(1,0,h),s.splice(1,0,p),f=-1;const d=[];for(;++f<o.length;){const y=o[f],w=s[f];c=-1;const k=[];for(;++c<u;){const A=y[c]||"";let E="",T="";if(n.alignDelimiters!==!1){const L=a[c]-(w[c]||0),S=l[c];S===114?E=" ".repeat(L):S===99?L%2?(E=" ".repeat(L/2+.5),T=" ".repeat(L/2-.5)):(E=" ".repeat(L/2),T=E):T=" ".repeat(L)}n.delimiterStart!==!1&&!c&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||c)&&k.push(" "),n.alignDelimiters!==!1&&k.push(E),k.push(A),n.alignDelimiters!==!1&&k.push(T),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&k.push("|")}d.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return d.join(`
63
- `)}function bf(e){return e==null?"":String(e)}function Lr(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 wf(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),Sf);return i(),o}function Sf(e,t,n){return">"+(n?"":" ")+e}function Cf(e,t){return Dr(e,t.inConstruct,!0)&&!Dr(e,t.notInConstruct,!1)}function Dr(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 Fr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
64
- `&&Cf(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
65
- `}function Ef(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+t.length,r=n.indexOf(t,i);return o}function Af(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 vf(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 If(e,t,n,r){const i=vf(n),l=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Af(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(l,Tf);return c(),h}const s=n.createTracker(r),a=i.repeat(Math.max(Ef(l,i)+1,3)),u=n.enter("codeFenced");let f=s.move(a);if(e.lang){const c=n.enter(`codeFencedLang${o}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${o}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
65
+ `}),n}function Ar(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Er(e,t){const n=ec(e,t),r=n.one(e,void 0),i=qu(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
66
+ `},i),l}function lc(e,t){return e&&"run"in e?async function(n,r){const i=Er(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Er(n,{file:r,...e||t})}}function vr(e){if(e)throw e}var Ot,Ir;function oc(){if(Ir)return Ot;Ir=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]"},l=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)},o=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},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ot=function a(){var u,f,c,h,p,d,y=arguments[0],w=1,k=arguments.length,E=!1;for(typeof y=="boolean"&&(E=y,y=arguments[1]||{},w=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});w<k;++w)if(u=arguments[w],u!=null)for(f in u)c=s(y,f),h=s(u,f),y!==h&&(E&&h&&(l(h)||(p=i(h)))?(p?(p=!1,d=c&&i(c)?c:[]):d=c&&l(c)?c:{},o(y,{name:f,newValue:a(E,d,h)})):typeof h<"u"&&o(y,{name:f,newValue:h}));return y},Ot}var sc=oc();const Bt=Hr(sc);function pn(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 ac(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const f=e[++l];let c=-1;if(a){o(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?uc(f,s)(...u):o(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 uc(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const pe={basename:cc,dirname:fc,extname:pc,join:hc,sep:"/"};function cc(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function fc(e){if(pt(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 pc(e){pt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function hc(...e){let t=-1,n;for(;++t<e.length;)pt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":mc(n)}function mc(e){pt(e);const t=e.codePointAt(0)===47;let n=dc(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function dc(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const gc={cwd:xc};function xc(){return"/"}function hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yc(e){if(typeof e=="string")e=new URL(e);else if(!hn(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 kc(e)}function kc(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 $t=["history","path","basename","stem","extname","dirname"];class Ni{constructor(t){let n;t?hn(t)?n={path:t}:typeof t=="string"||bc(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":gc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$t.length;){const l=$t[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)$t.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(t){Ht(t,"basename"),Ut(t,"basename"),this.path=pe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(t){Tr(this.basename,"dirname"),this.path=pe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(t){if(Ut(t,"extname"),Tr(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=pe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hn(t)&&(t=yc(t)),Ht(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(t){Ht(t,"stem"),Ut(t,"stem"),this.path=pe.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 Z(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 Ut(e,t){if(e&&e.includes(pe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pe.sep+"`")}function Ht(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Tr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wc=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Sc={}.hasOwnProperty;class zn extends wc{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=ac()}copy(){const t=new zn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Bt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Wt("data",this.frozen),this.namespace[t]=n,this):Sc.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Wt("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=gt(t),r=this.parser||this.Parser;return qt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),qt("process",this.parser||this.Parser),Vt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=gt(t),a=r.parse(s);r.run(a,s,function(f,c,h){if(f||!c||!h)return u(f);const p=c,d=r.stringify(p,h);Ec(d)?h.value=d:h.result=d,u(f,h)});function u(f,c){f||!c?o(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),qt("processSync",this.parser||this.Parser),Vt("processSync",this.compiler||this.Compiler),this.process(t,i),Nr("processSync","process",n),r;function i(l,o){n=!0,vr(l),r=o}}run(t,n,r){jr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=gt(n);i.run(t,a,u);function u(f,c,h){const p=c||t;f?s(f):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Nr("runSync","run",r),i;function l(o,s){vr(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=gt(n),i=this.compiler||this.Compiler;return Vt("stringify",i),jr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Wt("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(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");s(u.plugins),u.settings&&(i.settings=Bt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(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,...d]=f;const y=r[h][1];pn(y)&&pn(p)&&(p=Bt(!0,y,p)),r[h]=[u,p,...d]}}}}const Cc=new zn().freeze();function qt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wt(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 jr(e){if(!pn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Nr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gt(e){return Ac(e)?e:new Ni(e)}function Ac(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ec(e){return typeof e=="string"||vc(e)}function vc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ic="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_r=[],Pr={allowDangerousHtml:!0},Tc=/^(https?|ircs?|mailto|xmpp)$/i,jc=[{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 Nc(e){const t=_c(e),n=Pc(e);return zc(t.runSync(t.parse(n),n),e)}function _c(e){const t=e.rehypePlugins||_r,n=e.remarkPlugins||_r,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Pr}:Pr;return Cc().use(fu).use(n).use(lc,r).use(t)}function Pc(e){const t=e.children||"",n=new Ni;return typeof t=="string"&&(n.value=t),n}function zc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||Lc;for(const f of jc)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Ic+f.id,void 0);return Pn(e,u),Yo(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return o?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Mt)if(Object.hasOwn(Mt,p)&&Object.hasOwn(f.properties,p)){const d=f.properties[p],y=Mt[p];(y===null||y.includes(f.tagName))&&(f.properties[p]=a(String(d||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return s&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function Lc(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||Tc.test(e.slice(0,t))?e:""}function Dc(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _i(e,t,n){const i=Pt((n||{}).ignore||[]),l=Mc(t);let o=-1;for(;++o<l.length;)ji(e,"text",s);function s(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],d=h?h.children:void 0;if(i(p,d?d.indexOf(p):void 0,h))return;h=p}if(h)return a(u,f)}function a(u,f){const c=f[f.length-1],h=l[o][0],p=l[o][1];let d=0;const w=c.children.indexOf(u);let k=!1,E=[];h.lastIndex=0;let A=h.exec(u.value);for(;A;){const T=A.index,L={index:A.index,input:A.input,stack:[...f,u]};let S=p(...A,L);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=T+1:(d!==T&&E.push({type:"text",value:u.value.slice(d,T)}),Array.isArray(S)?E.push(...S):S&&E.push(S),d=T+A[0].length,k=!0),!h.global)break;A=h.exec(u.value)}return k?(d<u.value.length&&E.push({type:"text",value:u.value.slice(d)}),c.children.splice(w,1,...E)):E=[u],w+E.length}}function Mc(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([Fc(i[0]),Rc(i[1])])}return t}function Fc(e){return typeof e=="string"?new RegExp(Dc(e),"g"):e}function Rc(e){return typeof e=="function"?e:function(){return e}}function Oc(e){_i(e,[/\r?\n|\r/g,Bc])}function Bc(){return{type:"break"}}function $c(){return function(e){Oc(e)}}function zr(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 Jt="phrasing",Yt=["autolink","link","image","label"];function Uc(){return{transforms:[Xc],enter:{literalAutolink:qc,literalAutolinkEmail:Xt,literalAutolinkHttp:Xt,literalAutolinkWww:Xt},exit:{literalAutolink:Yc,literalAutolinkEmail:Jc,literalAutolinkHttp:Vc,literalAutolinkWww:Wc}}}function Hc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Jt,notInConstruct:Yt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Jt,notInConstruct:Yt},{character:":",before:"[ps]",after:"\\/",inConstruct:Jt,notInConstruct:Yt}]}}function qc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xt(e){this.config.enter.autolinkProtocol.call(this,e)}function Vc(e){this.config.exit.autolinkProtocol.call(this,e)}function Wc(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 Jc(e){this.config.exit.autolinkEmail.call(this,e)}function Yc(e){this.exit(e)}function Xc(e){_i(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Gc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Kc]],{ignore:["link","linkReference"]})}function Gc(e,t,n,r,i){let l="";if(!Pi(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!Zc(n)))return!1;const o=Qc(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function Kc(e,t,n,r){return!Pi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Zc(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 Qc(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=zr(e,"(");let l=zr(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Pi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ne(n)||jt(n))&&(!t||n!==47)}zi.peek=uf;function ef(){this.buffer()}function tf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function nf(){this.buffer()}function rf(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lf(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function of(e){this.exit(e)}function sf(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function af(e){this.exit(e)}function uf(){return"["}function zi(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function cf(){return{enter:{gfmFootnoteCallString:ef,gfmFootnoteCall:tf,gfmFootnoteDefinitionLabelString:nf,gfmFootnoteDefinition:rf},exit:{gfmFootnoteCallString:lf,gfmFootnoteCall:of,gfmFootnoteDefinitionLabelString:sf,gfmFootnoteDefinition:af}}}function ff(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:zi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),f=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),f(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
67
+ `:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Li:pf))),u(),a}}function pf(e,t,n){return t===0?e:Li(e,t,n)}function Li(e,t,n){return(n?"":" ")+e}const hf=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Di.peek=yf;function mf(){return{canContainEols:["delete"],enter:{strikethrough:gf},exit:{strikethrough:xf}}}function df(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hf}],handlers:{delete:Di}}}function gf(e){this.enter({type:"delete",children:[]},e)}function xf(e){this.exit(e)}function Di(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function yf(){return"~"}function kf(e){return e.length}function bf(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||kf,l=[],o=[],s=[],a=[];let u=0,f=-1;for(;++f<e.length;){const y=[],w=[];let k=-1;for(e[f].length>u&&(u=e[f].length);++k<e[f].length;){const E=wf(e[f][k]);if(n.alignDelimiters!==!1){const A=i(E);w[k]=A,(a[k]===void 0||A>a[k])&&(a[k]=A)}y.push(E)}o[f]=y,s[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)l[c]=Lr(r[c]);else{const y=Lr(r);for(;++c<u;)l[c]=y}c=-1;const h=[],p=[];for(;++c<u;){const y=l[c];let w="",k="";y===99?(w=":",k=":"):y===108?w=":":y===114&&(k=":");let E=n.alignDelimiters===!1?1:Math.max(1,a[c]-w.length-k.length);const A=w+"-".repeat(E)+k;n.alignDelimiters!==!1&&(E=w.length+E+k.length,E>a[c]&&(a[c]=E),p[c]=E),h[c]=A}o.splice(1,0,h),s.splice(1,0,p),f=-1;const d=[];for(;++f<o.length;){const y=o[f],w=s[f];c=-1;const k=[];for(;++c<u;){const E=y[c]||"";let A="",T="";if(n.alignDelimiters!==!1){const L=a[c]-(w[c]||0),S=l[c];S===114?A=" ".repeat(L):S===99?L%2?(A=" ".repeat(L/2+.5),T=" ".repeat(L/2-.5)):(A=" ".repeat(L/2),T=A):T=" ".repeat(L)}n.delimiterStart!==!1&&!c&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||c)&&k.push(" "),n.alignDelimiters!==!1&&k.push(A),k.push(E),n.alignDelimiters!==!1&&k.push(T),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&k.push("|")}d.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return d.join(`
68
+ `)}function wf(e){return e==null?"":String(e)}function Lr(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 Sf(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),Cf);return i(),o}function Cf(e,t,n){return">"+(n?"":" ")+e}function Af(e,t){return Dr(e,t.inConstruct,!0)&&!Dr(e,t.notInConstruct,!1)}function Dr(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 Mr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
69
+ `&&Af(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
70
+ `}function Ef(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+t.length,r=n.indexOf(t,i);return o}function vf(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 If(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 Tf(e,t,n,r){const i=If(n),l=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(vf(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(l,jf);return c(),h}const s=n.createTracker(r),a=i.repeat(Math.max(Ef(l,i)+1,3)),u=n.enter("codeFenced");let f=s.move(a);if(e.lang){const c=n.enter(`codeFencedLang${o}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${o}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
66
71
  `,encode:["`"],...s.current()})),c()}return f+=s.move(`
67
72
  `),l&&(f+=s.move(l+`
68
- `)),f+=s.move(a),u(),f}function Tf(e,t,n){return(n?"":" ")+e}function Ln(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 jf(e,t,n,r){const i=Ln(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
69
- `,...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),o(),u}function Nf(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 lt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function It(e,t,n){const r=Oe(e),i=Oe(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}}Fi.peek=_f;function Fi(e,t,n,r){const i=Nf(n),l=n.enter("emphasis"),o=n.createTracker(r),s=o.move(i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),f=It(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=lt(u)+a.slice(1));const c=a.charCodeAt(a.length-1),h=It(r.after.charCodeAt(0),c,i);h.inside&&(a=a.slice(0,-1)+lt(c));const p=o.move(i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},s+a+p}function _f(e,t,n){return n.options.emphasis||"*"}function Pf(e,t){let n=!1;return Pn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cn}),!!((!e.depth||e.depth<3)&&An(e)&&(t.options.setext||n))}function zf(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(Pf(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...l.current(),before:`
73
+ `)),f+=s.move(a),u(),f}function jf(e,t,n){return(n?"":" ")+e}function Ln(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 Nf(e,t,n,r){const i=Ln(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
74
+ `,...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),o(),u}function _f(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 lt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function It(e,t,n){const r=Oe(e),i=Oe(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}}Mi.peek=Pf;function Mi(e,t,n,r){const i=_f(n),l=n.enter("emphasis"),o=n.createTracker(r),s=o.move(i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),f=It(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=lt(u)+a.slice(1));const c=a.charCodeAt(a.length-1),h=It(r.after.charCodeAt(0),c,i);h.inside&&(a=a.slice(0,-1)+lt(c));const p=o.move(i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},s+a+p}function Pf(e,t,n){return n.options.emphasis||"*"}function zf(e,t){let n=!1;return Pn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cn}),!!((!e.depth||e.depth<3)&&En(e)&&(t.options.setext||n))}function Lf(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(zf(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...l.current(),before:`
70
75
  `,after:`
71
76
  `});return c(),f(),h+`
72
77
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
73
78
  `))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),a=n.enter("phrasing");l.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
74
- `,...l.current()});return/^[\t ]/.test(u)&&(u=lt(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),a(),s(),u}Mi.peek=Lf;function Mi(e){return e.value||""}function Lf(){return"<"}Ri.peek=Df;function Ri(e,t,n,r){const i=Ln(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),u+=a.move(")"),o(),u}function Df(){return"!"}Oi.peek=Ff;function Oi(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const u=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Ff(){return"!"}Bi.peek=Mf;function Bi(e,t,n){let r=e.value||"",i="`",l=-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+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);let a;if(o.atBreak)for(;a=s.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function Mf(){return"`"}function $i(e,t){const n=An(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))}Ui.peek=Rf;function Ui(e,t,n,r){const i=Ln(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,a;if($i(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let c=o.move("<");return c+=o.move(n.containerPhrasing(e,{before:c,after:">",...o.current()})),c+=o.move(">"),s(),n.stack=f,c}s=n.enter("link"),a=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${l}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),s(),u}function Rf(e,t,n){return $i(e,n)?"<":"["}Hi.peek=Of;function Hi(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Of(){return"["}function Dn(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 Bf(e){const t=Dn(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 $f(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 qi(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 Uf(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?$f(n):Dn(n);const s=e.ordered?o==="."?")":".":Bf(n);let a=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&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&&(a=!0),qi(n)===o&&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"){a=!0;break}}}}a&&(o=s),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),u}function Hf(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 qf(e,t,n,r){const i=Hf(n);let l=n.bulletCurrent||Dn(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),f);return a(),u;function f(c,h,p){return h?(p?"":" ".repeat(o))+c:(p?l:l+" ".repeat(o-l.length))+c}}function Vf(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const Wf=Pt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Jf(e,t,n,r){return(e.children.some(function(o){return Wf(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Yf(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=Yf(n),l=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),f=It(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=lt(u)+a.slice(1));const c=a.charCodeAt(a.length-1),h=It(r.after.charCodeAt(0),c,i);h.inside&&(a=a.slice(0,-1)+lt(c));const p=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},s+a+p}function Xf(e,t,n){return n.options.strong||"*"}function Gf(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 Zf(e,t,n){const r=(qi(n)+(n.options.ruleSpaces?" ":"")).repeat(Kf(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wi={blockquote:wf,break:Fr,code:If,definition:jf,emphasis:Fi,hardBreak:Fr,heading:zf,html:Mi,image:Ri,imageReference:Oi,inlineCode:Bi,link:Ui,linkReference:Hi,list:Uf,listItem:qf,paragraph:Vf,root:Jf,strong:Vi,text:Gf,thematicBreak:Zf};function Qf(){return{enter:{table:ep,tableData:Mr,tableHeader:Mr,tableRow:np},exit:{codeText:rp,table:tp,tableData:Gt,tableHeader:Gt,tableRow:Gt}}}function ep(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 tp(e){this.exit(e),this.data.inTable=void 0}function np(e){this.enter({type:"tableRow",children:[]},e)}function Gt(e){this.exit(e)}function Mr(e){this.enter({type:"tableCell",children:[]},e)}function rp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ip));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ip(e,t){return t==="|"?t:e}function lp(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=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:o,tableCell:a,tableRow:s}};function o(p,d,y,w){return u(f(p,y,w),p.align)}function s(p,d,y,w){const k=c(p,y,w),A=u([k]);return A.slice(0,A.indexOf(`
76
- `))}function a(p,d,y,w){const k=y.enter("tableCell"),A=y.enter("phrasing"),E=y.containerPhrasing(p,{...w,before:l,after:l});return A(),k(),E}function u(p,d){return kf(p,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(p,d,y){const w=p.children;let k=-1;const A=[],E=d.enter("table");for(;++k<w.length;)A[k]=c(w[k],d,y);return E(),A}function c(p,d,y){const w=p.children;let k=-1;const A=[],E=d.enter("tableRow");for(;++k<w.length;)A[k]=a(w[k],p,d,y);return E(),A}function h(p,d,y){let w=Wi.inlineCode(p,d,y);return y.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function op(){return{exit:{taskListCheckValueChecked:Rr,taskListCheckValueUnchecked:Rr,paragraph:ap}}}function sp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:up}}}function Rr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ap(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 l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===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 up(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let a=Wi.listItem(e,t,n,{...r,...s.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+o}}function cp(){return[$c(),uf(),hf(),Qf(),op()]}function fp(e){return{extensions:[Uc(),cf(e),mf(),lp(e),sp()]}}const pp={tokenize:yp,partial:!0},Ji={tokenize:kp,partial:!0},Yi={tokenize:bp,partial:!0},Xi={tokenize:wp,partial:!0},hp={tokenize:Sp,partial:!0},Gi={name:"wwwAutolink",tokenize:gp,previous:Zi},Ki={name:"protocolAutolink",tokenize:xp,previous:Qi},ke={name:"emailAutolink",tokenize:dp,previous:el},he={};function mp(){return{text:he}}let Te=48;for(;Te<123;)he[Te]=ke,Te++,Te===58?Te=65:Te===91&&(Te=97);he[43]=ke;he[45]=ke;he[46]=ke;he[95]=ke;he[72]=[ke,Ki];he[104]=[ke,Ki];he[87]=[ke,Gi];he[119]=[ke,Gi];function dp(e,t,n){const r=this;let i,l;return o;function o(c){return!mn(c)||!el.call(r,r.previous)||Fn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return mn(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(hp,f,u)(c):c===45||c===95||K(c)?(l=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return l&&i&&Q(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function gp(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Zi.call(r,r.previous)||Fn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pp,e.attempt(Ji,e.attempt(Yi,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function xp(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&Qi.call(r,r.previous)&&!Fn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Q(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||Et(c)||W(c)||Ne(c)||jt(c)?n(c):e.attempt(Ji,e.attempt(Yi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function yp(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function kp(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(Xi,a,s)(u):u===null||W(u)||Ne(u)||u!==45&&jt(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function bp(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Xi,t,l)(o):o===null||W(o)||Ne(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function wp(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||W(s)||Ne(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||W(s)||Ne(s)?t(s):r(s)}function l(s){return Q(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Q(s)?(e.consume(s),o):n(s)}}function Sp(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return K(l)?n(l):t(l)}}function Zi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Qi(e){return!Q(e)}function el(e){return!(e===47||mn(e))}function mn(e){return e===43||e===45||e===46||e===95||K(e)}function Fn(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 Cp={tokenize:_p,partial:!0};function Ep(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Tp,continuation:{tokenize:jp},exit:Np}},text:{91:{name:"gfmFootnoteCall",tokenize:Ip},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ap,resolveTo:vp}}}}function Ap(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=fe(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function vp(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 l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Ip(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(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(l>999||c===93&&!o||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(o=!0),l++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function Tp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(o>999||d===93&&!s||d===null||d===91||W(d))return n(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return l=fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(d)||(s=!0),o++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,f):f(d)}function h(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(l)||i.push(l),B(e,p,"gfmFootnoteDefinitionWhitespace")):n(d)}function p(d){return t(d)}}function jp(e,t,n){return e.check(ft,t,e.attempt(Cp,t,n))}function Np(e){e.exit("gfmFootnoteDefinition")}function _p(e,t,n){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function Pp(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,Nt(p,o.slice(u+1,a),s)),ie(h,h.length,0,[["exit",c,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",f,s]]),ie(o,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,f=this.events;let c=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(d):(o.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const y=Oe(u);if(d===126)return c>1?a(d):(o.consume(d),c++,p);if(c<2&&!n)return a(d);const w=o.exit("strikethroughSequenceTemporary"),k=Oe(d);return w._open=!k||k===2&&!!y,w._close=!y||y===2&&!!k,s(d)}}}class zp{constructor(){this.map=[]}add(t,n,r){Lp(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[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 l of i)t.push(l);i=r.pop()}this.map.length=0}}function Lp(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 Dp(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 l=r.length-1;r[l]=r[l]==="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 Fp(){return{flow:{null:{name:"table",tokenize:Mp,resolveAll:Rp}}}}function Mp(e,t,n){const r=this;let i=0,l=0,o;return s;function s(b){let N=r.events.length-1;for(;N>-1;){const z=r.events[N][1].type;if(z==="lineEnding"||z==="linePrefix")N--;else break}const _=N>-1?r.events[N][1].type:null,H=_==="tableHead"||_==="tableRow"?S:a;return H===S&&r.parser.lazy[r.now().line]?n(b):H(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(o=!0,l+=1),f(b)}function f(b){return b===null?n(b):P(b)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):M(b)?B(e,f,"whitespace")(b):(l+=1,o&&(o=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||W(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:c)}function h(b){return b===92||b===124?(e.consume(b),c):c(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),o=!1,M(b)?B(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?w(b):b===124?(o=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),y):L(b)}function y(b){return M(b)?B(e,w,"whitespace")(b):w(b)}function w(b){return b===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),k):b===45?(l+=1,k(b)):b===null||P(b)?T(b):L(b)}function k(b){return b===45?(e.enter("tableDelimiterFiller"),A(b)):L(b)}function A(b){return b===45?(e.consume(b),A):b===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(b))}function E(b){return M(b)?B(e,T,"whitespace")(b):T(b)}function T(b){return b===124?d(b):b===null||P(b)?!o||i!==l?L(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):L(b)}function L(b){return n(b)}function S(b){return e.enter("tableRow"),R(b)}function R(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),R):b===null||P(b)?(e.exit("tableRow"),t(b)):M(b)?B(e,R,"whitespace")(b):(e.enter("data"),U(b))}function U(b){return b===null||b===124||W(b)?(e.exit("data"),R(b)):(e.consume(b),b===92?$:U)}function $(b){return b===92||b===124?(e.consume(b),U):U(b)}}function Rp(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,f,c;const h=new zp;for(;++n<e.length;){const p=e[n],d=p[1];p[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Or(h,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],c=xt(h,t,l,i,n,c)):o[1]!==0&&(c=xt(h,t,o,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&Or(h,t,a,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=Dp(t.events,n))}return e}function xt(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Me(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=Me(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=Me(t.events,n[2]),f=Me(t.events,n[3]),c={type:s,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 d=n[2]+1,y=n[3]-n[2]-1;e.add(d,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},Me(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Or(e,t,n,r,i){const l=[],o=Me(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function Me(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Op={name:"tasklistCheck",tokenize:$p};function Bp(){return{text:{91:Op}}}function $p(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return W(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return P(a)?t(a):M(a)?e.check({tokenize:Up},t,n)(a):n(a)}}function Up(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Hp(e){return ci([mp(),Ep(),Pp(e),Fp(),Bp()])}const qp={};function Vp(e){const t=this,n=e||qp,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Hp(n)),l.push(cp()),o.push(fp(n))}function ot({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[l,o]=ce.useState(()=>n?ro(e):e.questions.map(()=>[])),[s,a]=ce.useState(!1),[u,f]=ce.useState(!1);ce.useEffect(()=>{n&&o(d=>d.map((y,w)=>{var k;return y.length>0?y:(k=e.questions[w])!=null&&k.options.length?[0]:[]}))},[n,e]);const c=io(e,l)&&!t&&!s&&!u&&!!i,h=(d,y)=>{t||u||s||o(w=>w.map((k,A)=>{if(A!==d)return k;const E=e.questions[A];return E?E.multiSelect?k.includes(y)?k.filter(T=>T!==y):[...k,y].sort((T,L)=>T-L):[y]:k}))},p=async()=>{if(!c||!i)return;a(!0);const d=await i(lo(e,l));a(!1),d&&f(!0)};return m.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 shadow-[0_24px_80px_-60px_hsl(var(--primary)/0.9)]",children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-primary/20 bg-primary/10 text-primary shadow-sm",children:m.jsx(Ll,{className:"h-4 w-4"})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-primary/80",children:"Ask User Question"}),m.jsx("div",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),m.jsxs(wt,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r==null?void 0:r(!n),className:"rounded-sm",children:[m.jsx(Hl,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),m.jsx("div",{className:"mt-4 space-y-4",children:e.questions.map((d,y)=>{const w=l[y]??[];return m.jsxs("div",{className:"space-y-3 rounded-lg border border-border/60 bg-background/75 p-4",children:[m.jsxs("div",{children:[d.header&&m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:d.header}),m.jsx("div",{className:"mt-1 text-sm font-medium leading-6 text-foreground",children:d.question}),m.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:d.multiSelect?"Select one or more options.":"Select one option."})]}),m.jsx("div",{className:"space-y-2",children:d.options.map((k,A)=>{const E=w.includes(A);return m.jsxs("button",{type:"button",onClick:()=>h(y,A),disabled:t||s||u,"aria-pressed":E,className:St("flex w-full items-start gap-3 rounded-lg 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:[m.jsx("span",{className:St("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:m.jsx(Be,{className:"h-3.5 w-3.5"})}),m.jsxs("span",{className:"min-w-0",children:[m.jsx("span",{className:"block text-sm font-medium leading-5",children:k.label}),k.description&&m.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:k.description})]})]},`${k.label}-${A}`)})})]},`${d.header??"question"}-${y}`)})}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[m.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."}),m.jsx(wt,{type:"button",onClick:()=>void p(),disabled:!c,className:"rounded-sm px-5",children:u?"Sent":s?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function Wp({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=ce.useState(null),[l,o]=ce.useState(!1),s=!t&&!l&&!!n,a=async u=>{if(!s||!n)return;i(u);const f=await n(co(e,u));i(null),f&&o(!0)};return m.jsxs("div",{className:"rounded-xl border border-amber-500/25 bg-amber-500/5 p-4 shadow-[0_24px_80px_-60px_rgba(245,158,11,0.8)]",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-sm dark:text-amber-400",children:m.jsx($l,{className:"h-4 w-4"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-amber-700/80 dark:text-amber-300/80",children:"Permission Request"}),m.jsx("div",{className:"mt-1 space-y-3",children:e.requests.map((u,f)=>m.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/75 px-4 py-3",children:[m.jsx("div",{className:"text-sm font-medium leading-6 text-foreground",children:u.summary}),(u.toolName||u.target)&&m.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:[m.jsx("span",{children:u.toolName}),u.target&&m.jsx("span",{className:"font-mono normal-case tracking-normal",children:u.target})]})]},`${u.toolUseId??u.toolName}-${f}`))})]})]}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-end gap-2",children:[m.jsxs(wt,{type:"button",variant:"outline",onClick:()=>void a("deny"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(qr,{className:"h-4 w-4"}),l?"Sent":r==="deny"?"Sending...":"Deny"]}),m.jsxs(wt,{type:"button",onClick:()=>void a("approve"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(Be,{className:"h-4 w-4"}),l?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}const Ze=6;function Jp(e){return e.replace(/\s+/g," ").trim()}function Se(e,t=132){const n=Jp(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function dn(e,t=84){if(typeof e=="string")return Se(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>dn(r,28)).filter(Boolean).join(", ");return Se(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${dn(i,32)}`).join(" · ");return Se(n||JSON.stringify(e),t)}return""}function tl(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${dn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return Se(t||JSON.stringify(e),156)||"No input"}function nl({expanded:e}){return m.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-sm px-1 py-0.5 text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground/70 transition-colors group-hover/activity:text-muted-foreground",children:[e?"Less":"More",e?m.jsx(jl,{className:"h-2.5 w-2.5"}):m.jsx(Nl,{className:"h-2.5 w-2.5"})]})}function Mn({status:e}){const t=e==="failed"?"border-destructive/22 bg-destructive/9 text-destructive":e==="success"?"border-emerald-500/24 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300":"border-border/35 bg-muted/30 text-muted-foreground/58";return m.jsx("span",{className:`agent-activity-status-icon mt-0.5 inline-flex h-3 w-3 shrink-0 items-center justify-center rounded-full border ${t}`,"data-agent-activity-status":e,"aria-hidden":"true",children:e==="failed"?m.jsx(qr,{className:"h-2 w-2"}):e==="success"?m.jsx(Be,{className:"h-2 w-2"}):m.jsx(Wr,{className:"h-1 w-1 fill-current"})})}function rl(e){const t=typeof e.status=="string"?e.status.toLowerCase():"";if(e.is_error===!0||e.isError===!0||t==="failed"||t==="error")return"failed";const n=Bn(e).slice(0,160);return/\b(error|failed|exception|traceback)\b/i.test(n)?"failed":"success"}function Rn({title:e,preview:t,icon:n,children:r,accentClassName:i,status:l="success",previewClassName:o="font-mono text-[9px] leading-3 text-muted-foreground/78"}){const[s,a]=ce.useState(!1);return m.jsxs("div",{className:`overflow-hidden rounded-sm border border-border/18 shadow-none ${i}`,children:[m.jsxs("button",{type:"button",onClick:()=>a(u=>!u),className:"flex w-full items-start gap-1.5 px-2 py-1 text-left transition-colors hover:bg-background/24",children:[m.jsx(Mn,{status:l}),m.jsx("div",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:n}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:m.jsx("span",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:e})}),m.jsx("div",{className:`mt-0.5 whitespace-pre-wrap break-words ${o}`,children:t})]}),m.jsx(nl,{expanded:s})]}),s&&m.jsx("div",{className:"border-t border-border/18 px-2 py-1.5",children:r})]})}function il({text:e,status:t="success"}){const n=Se(e,156);return m.jsx(Rn,{title:"Thinking",preview:n,icon:m.jsx(Pl,{className:"h-3 w-3"}),accentClassName:"bg-muted/22",status:t,previewClassName:"text-[9px] leading-3 text-muted-foreground/78",children:m.jsx("div",{className:"whitespace-pre-wrap text-[10px] leading-4 text-muted-foreground/82",children:e})})}function ll({block:e,status:t="success",renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=String(e.name??"tool"),a=e.input,u=at(e);if(u){const c=Ue(u);return n!=null&&n.has(c)?null:(n==null||n.add(c),m.jsx(ot,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const f=tl(a);if(s==="TodoWrite"){const c=Kp(a==null?void 0:a.todos);if(c.length>0)return m.jsx(Zp,{todos:c,status:t})}return m.jsx(Rn,{title:`Tool: ${s}`,preview:f,icon:m.jsx(xn,{className:"h-3 w-3"}),accentClassName:"bg-muted/18",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:JSON.stringify(a??{},null,2)})})}function On({block:e,status:t=rl(e),renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=Bn(e);if(!s)return null;const a=ut(s);if(a){const f=Ue(a);return n!=null&&n.has(f)?null:(n==null||n.add(f),m.jsx(ot,{payload:a,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const u=Se(s,156);return m.jsx(Rn,{title:"Result",preview:u,icon:m.jsx(xn,{className:"h-3 w-3"}),accentClassName:"bg-background/45",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:s})})}function Bn(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>String(n.text??"")).join(`
77
- `):""}function Yp(e){const t=e.message;return typeof t=="object"&&t!==null&&Array.isArray(t.content)?t.content:Array.isArray(e.content)?e.content:[]}function Xp(e){return e.flatMap(t=>Yp(t).flatMap(n=>{if(n.type==="thinking"){const r=String(n.thinking??"").trim();return r?[{title:"Thinking",preview:Se(r,112),block:n,kind:"thinking",status:"success"}]:[]}if(n.type==="tool_use")return[{title:`Tool: ${String(n.name??"tool")}`,preview:tl(n.input),block:n,kind:"tool_use",status:"success"}];if(n.type==="tool_result"){const r=Se(Bn(n),112);return r?[{title:"Result",preview:r,block:n,kind:"tool_result",status:rl(n)}]:[]}return[]}))}function Gp({events:e,...t}){const[n,r]=ce.useState(!1),[i,l]=ce.useState(Ze),o=Xp(e);if(o.length===0)return null;const s=o.slice(0,i),a=o.length-s.length;function u(){r(f=>{const c=!f;return c&&l(Ze),c})}return m.jsxs("div",{className:"animate-agent-activity group/activity overflow-hidden py-0.5 text-muted-foreground","data-agent-activity-page-size":Ze,children:[m.jsxs("button",{type:"button",onClick:u,"aria-expanded":n,className:"flex w-full items-start gap-1.5 rounded-sm px-1 py-1 text-left transition-colors hover:bg-muted/18",children:[m.jsx("div",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground/55 transition-colors group-hover/activity:text-muted-foreground/80",children:m.jsx(xn,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1 space-y-0.5",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/80",children:"Agent activity"}),m.jsxs("span",{className:"font-mono text-[9px] leading-4 text-muted-foreground/55",children:[o.length," ",o.length===1?"item":"items"]})]}),m.jsx("div",{className:"divide-y divide-dashed divide-border/18",children:o.slice(0,4).map((f,c)=>m.jsxs("div",{className:"grid gap-1 py-0.5 text-[9px] leading-3 sm:grid-cols-[0.875rem_4.75rem_minmax(0,1fr)]",children:[m.jsx(Mn,{status:f.status}),m.jsx("span",{className:"truncate font-medium text-muted-foreground/75",children:f.title}),m.jsx("span",{className:"truncate font-mono text-muted-foreground/60",children:f.preview})]},`${f.kind}-${c}`))})]}),m.jsx(nl,{expanded:n})]}),n&&m.jsxs("div",{className:"animate-agent-activity-expand divide-y divide-dashed divide-border/18 px-3 pb-1 pt-0.5",children:[s.map((f,c)=>{const h=`${f.kind}-${c}`;return f.kind==="thinking"?m.jsx("div",{className:"py-0.5",children:m.jsx(il,{text:String(f.block.thinking??""),status:f.status})},h):f.kind==="tool_use"?m.jsx("div",{className:"py-0.5",children:m.jsx(ll,{block:f.block,status:f.status,...t})},h):m.jsx("div",{className:"py-0.5",children:m.jsx(On,{block:f.block,status:f.status,...t})},h)}),a>0&&m.jsxs("button",{type:"button",onClick:()=>l(f=>f+Ze),className:"ml-5 inline-flex rounded-sm px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground/62 transition-colors hover:bg-muted/20 hover:text-muted-foreground",children:["Load more ",Math.min(a,Ze)]})]})]})}function Kp(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,l=typeof n.status=="string"?n.status:"pending";return{content:r,activeForm:i,status:l==="completed"||l==="in_progress"?l:"pending"}}).filter(t=>t!==null):[]}function Zp({todos:e,status:t="success"}){const n=e.filter(l=>l.status==="completed").length,r=e.length,i=e.find(l=>l.status==="in_progress");return m.jsxs("div",{className:"overflow-hidden rounded-sm border border-border/18 bg-muted/16 shadow-none",children:[m.jsxs("div",{className:"flex items-center gap-1.5 border-b border-border/18 px-2 py-1",children:[m.jsx(Mn,{status:t}),m.jsx("div",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:m.jsx(Ml,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:"Todos"}),m.jsx("div",{className:"mt-0.5 truncate text-[9px] leading-3 text-muted-foreground/78",children:i?i.activeForm:r===0?"No items":n===r?"All complete":"Up next"})]}),m.jsxs("div",{className:"shrink-0 rounded-sm border border-border/20 bg-background/36 px-1.5 py-0.5 font-mono text-[8px] tracking-wide text-muted-foreground/72",children:[n,"/",r]})]}),m.jsx("ul",{className:"divide-y divide-border/18",children:e.map((l,o)=>m.jsxs("li",{className:"flex items-start gap-1.5 px-2 py-1",children:[m.jsx(Qp,{status:l.status}),m.jsx("span",{className:l.status==="completed"?"text-[11px] leading-4 text-muted-foreground line-through decoration-muted-foreground/60":l.status==="in_progress"?"text-[11px] font-medium leading-4 text-foreground":"text-[11px] leading-4 text-foreground/85",children:l.status==="in_progress"?l.activeForm:l.content})]},`${o}-${l.content}`))})]})}function Qp({status:e}){return e==="completed"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-500 dark:text-emerald-400",children:m.jsx(Be,{className:"h-2.5 w-2.5"})}):e==="in_progress"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-primary",children:m.jsx(Ol,{className:"h-3 w-3 animate-spin"})}):m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground/60",children:m.jsx(Wr,{className:"h-2.5 w-2.5"})})}const ol=/^[A-Za-z]:[\\/]/,eh=/^[A-Za-z][A-Za-z\d+.-]*:/,th=/^\/(?:api|preview|preview-open|shared|tasks)(?:\/|$)/;function nh(e,t,n={}){const r=ul(e);if(!r||r.startsWith("#")||th.test(r)||eh.test(r)&&!r.toLowerCase().startsWith("file:")&&!ol.test(r))return null;const i=rh(r,t,n);if(!i)return null;const l=sl(i,t);return!l||l==="."?null:gl(l)?l:null}function sl(e,t){let n=ul(e);if(!n)return null;n=cl(n),n=fl(n),n=pl(n),n=Ee(n),n=hl(n);const r=t?Tt(Ee(t)):null;if(dl(n)){if(!r)return null;const i=Tt(n);if(i===r)return".";if(!i.startsWith(`${r}/`))return null;n=i.slice(r.length+1)}return n=$n(n),ml(n)?null:n||"."}function al(e){const t=$n(Ee(e)),n=t.lastIndexOf("/");return n<=0?".":t.slice(0,n)}function Lh(e,t,n,r=new Set){const i=[],l=(o,s)=>{for(const a of o){const u=a.type==="directory"&&n.has(a.path);i.push({entry:a,depth:s,expanded:u,loading:a.type==="directory"&&r.has(a.path)}),u&&l(t[a.path]??[],s+1)}};return l(e,0),i}function Dh(e){const t=al(e);if(t===".")return[];const n=t.split("/").filter(Boolean);return n.map((r,i)=>n.slice(0,i+1).join("/"))}function Fh(e){const t=$n(Ee(e));return!t||t==="."?0:Math.max(0,t.split("/").filter(Boolean).length-1)}function Mh(e,t){const n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?e:e.filter(r=>{const i=`${r.name} ${r.path}`.toLowerCase();return n.every(l=>i.includes(l))})}function ul(e){const t=(e==null?void 0:e.trim())??"";if(!t)return"";try{return decodeURIComponent(t)}catch{return t}}function cl(e){if(!e.toLowerCase().startsWith("file:"))return e;try{return new URL(e).pathname}catch{return e.replace(/^file:\/\//i,"")}}function fl(e){const t=e.indexOf("#"),n=e.indexOf("?"),r=[t,n].filter(i=>i>=0).sort((i,l)=>i-l)[0];return r===void 0?e:e.slice(0,r)}function pl(e){const t=e.match(/^(.*):\d+(?::\d+)?$/);return t!=null&&t[1]&&gl(t[1])?t[1]:e}function Ee(e){return e.replace(/\\/g,"/")}function Tt(e){return e.replace(/\/+$/,"")}function hl(e){return e.replace(/^\/([A-Za-z]:\/)/,"$1")}function $n(e){let t=e;for(;t.startsWith("./");)t=t.slice(2);return t}function ml(e){return e.split("/").includes("..")}function dl(e){return e.startsWith("/")||ol.test(e)}function gl(e){const t=Ee(e);if(!t||t==="."||ml(t))return!1;const n=t.split("/").pop()??t;return n.startsWith(".")||/\.[A-Za-z0-9][A-Za-z0-9_-]*$/.test(n)?!0:t.split("/").some(r=>r.startsWith(".")&&r.length>1)}function rh(e,t,n){const r=hl(Ee(pl(fl(cl(e))))),i=t?Tt(Ee(t)):null;if(n.allowRootRelative&&r.startsWith("/")){const s=Tt(r);if(!(i?s===i||s.startsWith(`${i}/`):!1))return r.replace(/^\/+/,"")}if(dl(r))return e;const l=sl(n.baseFilePath,t);if(!l||l===".")return e;const o=al(l);return o==="."?e:ih(`${o}/${r}`)}function ih(e){const t=[];for(const n of Ee(e).split("/"))if(!(!n||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n)}return t.join("/")||"."}function lh(e){return/^(https?:\/\/|mailto:|tel:)/i.test((e==null?void 0:e.trim())??"")}function oh(e){var i,l,o,s;const t=typeof window>"u"?void 0:window,n=(l=(i=t==null?void 0:t.__TAURI__)==null?void 0:i.core)==null?void 0:l.invoke;if(typeof n=="function")return a=>n("plugin:opener|open_url",{url:a,with:void 0});const r=(s=(o=t==null?void 0:t.__TAURI__)==null?void 0:o.opener)==null?void 0:s.openUrl;return typeof r=="function"?r:null}function Br(e,t){const n=oh(),r=t==null?void 0:t.trim();!n||!lh(r)||(e.preventDefault(),Promise.resolve(n(r)).catch(()=>{window.open(r,"_blank","noopener,noreferrer")}))}function Rh({event:e,agent:t,subItems:n=[],questionBypassEnabled:r=!1,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o=!1,taskRootPath:s,onOpenFilePath:a}){const u=e.type,f=yn(e),c=at(e);if(f)return m.jsx(nt,{agent:t,children:m.jsx(Wp,{payload:f,onSubmit:l,disabled:o})});if(c)return m.jsx(nt,{agent:t,children:m.jsx(ot,{payload:c,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});if(u==="user"){if(e.isMeta===!0||e.isSidechain===!0)return null;const h=sh(e),p=h.filter(y=>y.type==="tool_result");if(p.length>0&&h.every(y=>y.type==="tool_result"))return m.jsx(nt,{agent:t,children:p.map((y,w)=>m.jsx(On,{block:y,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},w))});const d=$e(e);return d?m.jsx(fh,{content:d,taskRootPath:s,onOpenFilePath:a}):null}return u==="assistant"?m.jsx(ph,{event:e,agent:t,subItems:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}):null}function sh(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 Kt(e){var n;const t=e.replace(/\r\n/g,`
79
+ `,...l.current()});return/^[\t ]/.test(u)&&(u=lt(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),a(),s(),u}Fi.peek=Df;function Fi(e){return e.value||""}function Df(){return"<"}Ri.peek=Mf;function Ri(e,t,n,r){const i=Ln(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),u+=a.move(")"),o(),u}function Mf(){return"!"}Oi.peek=Ff;function Oi(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const u=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Ff(){return"!"}Bi.peek=Rf;function Bi(e,t,n){let r=e.value||"",i="`",l=-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+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);let a;if(o.atBreak)for(;a=s.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function Rf(){return"`"}function $i(e,t){const n=En(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))}Ui.peek=Of;function Ui(e,t,n,r){const i=Ln(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,a;if($i(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let c=o.move("<");return c+=o.move(n.containerPhrasing(e,{before:c,after:">",...o.current()})),c+=o.move(">"),s(),n.stack=f,c}s=n.enter("link"),a=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${l}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),s(),u}function Of(e,t,n){return $i(e,n)?"<":"["}Hi.peek=Bf;function Hi(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Bf(){return"["}function Dn(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 $f(e){const t=Dn(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 qi(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 Hf(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?Uf(n):Dn(n);const s=e.ordered?o==="."?")":".":$f(n);let a=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&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&&(a=!0),qi(n)===o&&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"){a=!0;break}}}}a&&(o=s),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),u}function qf(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 Vf(e,t,n,r){const i=qf(n);let l=n.bulletCurrent||Dn(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),f);return a(),u;function f(c,h,p){return h?(p?"":" ".repeat(o))+c:(p?l:l+" ".repeat(o-l.length))+c}}function Wf(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const Jf=Pt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Yf(e,t,n,r){return(e.children.some(function(o){return Jf(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Xf(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=Gf;function Vi(e,t,n,r){const i=Xf(n),l=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),f=It(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=lt(u)+a.slice(1));const c=a.charCodeAt(a.length-1),h=It(r.after.charCodeAt(0),c,i);h.inside&&(a=a.slice(0,-1)+lt(c));const p=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},s+a+p}function Gf(e,t,n){return n.options.strong||"*"}function Kf(e,t,n,r){return n.safe(e.value,r)}function Zf(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 Qf(e,t,n){const r=(qi(n)+(n.options.ruleSpaces?" ":"")).repeat(Zf(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wi={blockquote:Sf,break:Mr,code:Tf,definition:Nf,emphasis:Mi,hardBreak:Mr,heading:Lf,html:Fi,image:Ri,imageReference:Oi,inlineCode:Bi,link:Ui,linkReference:Hi,list:Hf,listItem:Vf,paragraph:Wf,root:Yf,strong:Vi,text:Kf,thematicBreak:Qf};function ep(){return{enter:{table:tp,tableData:Fr,tableHeader:Fr,tableRow:rp},exit:{codeText:ip,table:np,tableData:Gt,tableHeader:Gt,tableRow:Gt}}}function tp(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 np(e){this.exit(e),this.data.inTable=void 0}function rp(e){this.enter({type:"tableRow",children:[]},e)}function Gt(e){this.exit(e)}function Fr(e){this.enter({type:"tableCell",children:[]},e)}function ip(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lp(e,t){return t==="|"?t:e}function op(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
80
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:a,tableRow:s}};function o(p,d,y,w){return u(f(p,y,w),p.align)}function s(p,d,y,w){const k=c(p,y,w),E=u([k]);return E.slice(0,E.indexOf(`
81
+ `))}function a(p,d,y,w){const k=y.enter("tableCell"),E=y.enter("phrasing"),A=y.containerPhrasing(p,{...w,before:l,after:l});return E(),k(),A}function u(p,d){return bf(p,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(p,d,y){const w=p.children;let k=-1;const E=[],A=d.enter("table");for(;++k<w.length;)E[k]=c(w[k],d,y);return A(),E}function c(p,d,y){const w=p.children;let k=-1;const E=[],A=d.enter("tableRow");for(;++k<w.length;)E[k]=a(w[k],p,d,y);return A(),E}function h(p,d,y){let w=Wi.inlineCode(p,d,y);return y.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function sp(){return{exit:{taskListCheckValueChecked:Rr,taskListCheckValueUnchecked:Rr,paragraph:up}}}function ap(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cp}}}function Rr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function up(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 l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===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 cp(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let a=Wi.listItem(e,t,n,{...r,...s.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+o}}function fp(){return[Uc(),cf(),mf(),ep(),sp()]}function pp(e){return{extensions:[Hc(),ff(e),df(),op(e),ap()]}}const hp={tokenize:kp,partial:!0},Ji={tokenize:bp,partial:!0},Yi={tokenize:wp,partial:!0},Xi={tokenize:Sp,partial:!0},mp={tokenize:Cp,partial:!0},Gi={name:"wwwAutolink",tokenize:xp,previous:Zi},Ki={name:"protocolAutolink",tokenize:yp,previous:Qi},ke={name:"emailAutolink",tokenize:gp,previous:el},me={};function dp(){return{text:me}}let Te=48;for(;Te<123;)me[Te]=ke,Te++,Te===58?Te=65:Te===91&&(Te=97);me[43]=ke;me[45]=ke;me[46]=ke;me[95]=ke;me[72]=[ke,Ki];me[104]=[ke,Ki];me[87]=[ke,Gi];me[119]=[ke,Gi];function gp(e,t,n){const r=this;let i,l;return o;function o(c){return!mn(c)||!el.call(r,r.previous)||Mn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return mn(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(mp,f,u)(c):c===45||c===95||K(c)?(l=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return l&&i&&Q(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function xp(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Zi.call(r,r.previous)||Mn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(hp,e.attempt(Ji,e.attempt(Yi,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function yp(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&Qi.call(r,r.previous)&&!Mn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Q(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||At(c)||W(c)||Ne(c)||jt(c)?n(c):e.attempt(Ji,e.attempt(Yi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function kp(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function bp(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(Xi,a,s)(u):u===null||W(u)||Ne(u)||u!==45&&jt(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function wp(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Xi,t,l)(o):o===null||W(o)||Ne(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function Sp(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||W(s)||Ne(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||W(s)||Ne(s)?t(s):r(s)}function l(s){return Q(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Q(s)?(e.consume(s),o):n(s)}}function Cp(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return K(l)?n(l):t(l)}}function Zi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Qi(e){return!Q(e)}function el(e){return!(e===47||mn(e))}function mn(e){return e===43||e===45||e===46||e===95||K(e)}function Mn(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 Ap={tokenize:Pp,partial:!0};function Ep(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jp,continuation:{tokenize:Np},exit:_p}},text:{91:{name:"gfmFootnoteCall",tokenize:Tp},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vp,resolveTo:Ip}}}}function vp(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=fe(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function Ip(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 l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Tp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(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(l>999||c===93&&!o||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(o=!0),l++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function jp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(o>999||d===93&&!s||d===null||d===91||W(d))return n(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return l=fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(d)||(s=!0),o++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,f):f(d)}function h(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(l)||i.push(l),B(e,p,"gfmFootnoteDefinitionWhitespace")):n(d)}function p(d){return t(d)}}function Np(e,t,n){return e.check(ft,t,e.attempt(Ap,t,n))}function _p(e){e.exit("gfmFootnoteDefinition")}function Pp(e,t,n){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function zp(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,Nt(p,o.slice(u+1,a),s)),ie(h,h.length,0,[["exit",c,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",f,s]]),ie(o,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,f=this.events;let c=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(d):(o.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const y=Oe(u);if(d===126)return c>1?a(d):(o.consume(d),c++,p);if(c<2&&!n)return a(d);const w=o.exit("strikethroughSequenceTemporary"),k=Oe(d);return w._open=!k||k===2&&!!y,w._close=!y||y===2&&!!k,s(d)}}}class Lp{constructor(){this.map=[]}add(t,n,r){Dp(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[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 l of i)t.push(l);i=r.pop()}this.map.length=0}}function Dp(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 Mp(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 l=r.length-1;r[l]=r[l]==="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 Fp(){return{flow:{null:{name:"table",tokenize:Rp,resolveAll:Op}}}}function Rp(e,t,n){const r=this;let i=0,l=0,o;return s;function s(b){let N=r.events.length-1;for(;N>-1;){const z=r.events[N][1].type;if(z==="lineEnding"||z==="linePrefix")N--;else break}const _=N>-1?r.events[N][1].type:null,H=_==="tableHead"||_==="tableRow"?S:a;return H===S&&r.parser.lazy[r.now().line]?n(b):H(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(o=!0,l+=1),f(b)}function f(b){return b===null?n(b):P(b)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):F(b)?B(e,f,"whitespace")(b):(l+=1,o&&(o=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||W(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:c)}function h(b){return b===92||b===124?(e.consume(b),c):c(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),o=!1,F(b)?B(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?w(b):b===124?(o=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),y):L(b)}function y(b){return F(b)?B(e,w,"whitespace")(b):w(b)}function w(b){return b===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),k):b===45?(l+=1,k(b)):b===null||P(b)?T(b):L(b)}function k(b){return b===45?(e.enter("tableDelimiterFiller"),E(b)):L(b)}function E(b){return b===45?(e.consume(b),E):b===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(b))}function A(b){return F(b)?B(e,T,"whitespace")(b):T(b)}function T(b){return b===124?d(b):b===null||P(b)?!o||i!==l?L(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):L(b)}function L(b){return n(b)}function S(b){return e.enter("tableRow"),R(b)}function R(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),R):b===null||P(b)?(e.exit("tableRow"),t(b)):F(b)?B(e,R,"whitespace")(b):(e.enter("data"),U(b))}function U(b){return b===null||b===124||W(b)?(e.exit("data"),R(b)):(e.consume(b),b===92?$:U)}function $(b){return b===92||b===124?(e.consume(b),U):U(b)}}function Op(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,f,c;const h=new Lp;for(;++n<e.length;){const p=e[n],d=p[1];p[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Or(h,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],c=xt(h,t,l,i,n,c)):o[1]!==0&&(c=xt(h,t,o,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&Or(h,t,a,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=Mp(t.events,n))}return e}function xt(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Fe(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=Fe(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=Fe(t.events,n[2]),f=Fe(t.events,n[3]),c={type:s,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 d=n[2]+1,y=n[3]-n[2]-1;e.add(d,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},Fe(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Or(e,t,n,r,i){const l=[],o=Fe(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function Fe(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Bp={name:"tasklistCheck",tokenize:Up};function $p(){return{text:{91:Bp}}}function Up(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return W(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return P(a)?t(a):F(a)?e.check({tokenize:Hp},t,n)(a):n(a)}}function Hp(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function qp(e){return ci([dp(),Ep(),zp(e),Fp(),$p()])}const Vp={};function Wp(e){const t=this,n=e||Vp,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(qp(n)),l.push(fp()),o.push(pp(n))}function ot({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[l,o]=ce.useState(()=>n?io(e):e.questions.map(()=>[])),[s,a]=ce.useState(!1),[u,f]=ce.useState(!1);ce.useEffect(()=>{n&&o(d=>d.map((y,w)=>{var k;return y.length>0?y:(k=e.questions[w])!=null&&k.options.length?[0]:[]}))},[n,e]);const c=lo(e,l)&&!t&&!s&&!u&&!!i,h=(d,y)=>{t||u||s||o(w=>w.map((k,E)=>{if(E!==d)return k;const A=e.questions[E];return A?A.multiSelect?k.includes(y)?k.filter(T=>T!==y):[...k,y].sort((T,L)=>T-L):[y]:k}))},p=async()=>{if(!c||!i)return;a(!0);const d=await i(oo(e,l));a(!1),d&&f(!0)};return m.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 shadow-[0_24px_80px_-60px_hsl(var(--primary)/0.9)]",children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-primary/20 bg-primary/10 text-primary shadow-sm",children:m.jsx(Ll,{className:"h-4 w-4"})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-primary/80",children:"Ask User Question"}),m.jsx("div",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),m.jsxs(wt,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r==null?void 0:r(!n),className:"rounded-sm",children:[m.jsx(ql,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),m.jsx("div",{className:"mt-4 space-y-4",children:e.questions.map((d,y)=>{const w=l[y]??[];return m.jsxs("div",{className:"space-y-3 rounded-lg border border-border/60 bg-background/75 p-4",children:[m.jsxs("div",{children:[d.header&&m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:d.header}),m.jsx("div",{className:"mt-1 text-sm font-medium leading-6 text-foreground",children:d.question}),m.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:d.multiSelect?"Select one or more options.":"Select one option."})]}),m.jsx("div",{className:"space-y-2",children:d.options.map((k,E)=>{const A=w.includes(E);return m.jsxs("button",{type:"button",onClick:()=>h(y,E),disabled:t||s||u,"aria-pressed":A,className:St("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors",A?"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:[m.jsx("span",{className:St("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",A?"border-primary bg-primary text-primary-foreground":"border-border/70 bg-background text-transparent"),children:m.jsx(Be,{className:"h-3.5 w-3.5"})}),m.jsxs("span",{className:"min-w-0",children:[m.jsx("span",{className:"block text-sm font-medium leading-5",children:k.label}),k.description&&m.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:k.description})]})]},`${k.label}-${E}`)})})]},`${d.header??"question"}-${y}`)})}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[m.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."}),m.jsx(wt,{type:"button",onClick:()=>void p(),disabled:!c,className:"rounded-sm px-5",children:u?"Sent":s?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function Jp({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=ce.useState(null),[l,o]=ce.useState(!1),s=!t&&!l&&!!n,a=async u=>{if(!s||!n)return;i(u);const f=await n(fo(e,u));i(null),f&&o(!0)};return m.jsxs("div",{className:"rounded-xl border border-amber-500/25 bg-amber-500/5 p-4 shadow-[0_24px_80px_-60px_rgba(245,158,11,0.8)]",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-sm dark:text-amber-400",children:m.jsx(Ul,{className:"h-4 w-4"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-amber-700/80 dark:text-amber-300/80",children:"Permission Request"}),m.jsx("div",{className:"mt-1 space-y-3",children:e.requests.map((u,f)=>m.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/75 px-4 py-3",children:[m.jsx("div",{className:"text-sm font-medium leading-6 text-foreground",children:u.summary}),(u.toolName||u.target)&&m.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:[m.jsx("span",{children:u.toolName}),u.target&&m.jsx("span",{className:"font-mono normal-case tracking-normal",children:u.target})]})]},`${u.toolUseId??u.toolName}-${f}`))})]})]}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-end gap-2",children:[m.jsxs(wt,{type:"button",variant:"outline",onClick:()=>void a("deny"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(qr,{className:"h-4 w-4"}),l?"Sent":r==="deny"?"Sending...":"Deny"]}),m.jsxs(wt,{type:"button",onClick:()=>void a("approve"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(Be,{className:"h-4 w-4"}),l?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}const Ze=6;function Yp(e){return e.replace(/\s+/g," ").trim()}function Se(e,t=132){const n=Yp(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function dn(e,t=84){if(typeof e=="string")return Se(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>dn(r,28)).filter(Boolean).join(", ");return Se(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${dn(i,32)}`).join(" · ");return Se(n||JSON.stringify(e),t)}return""}function tl(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${dn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return Se(t||JSON.stringify(e),156)||"No input"}function nl({expanded:e}){return m.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-sm px-1 py-0.5 text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground/70 transition-colors group-hover/activity:text-muted-foreground",children:[e?"Less":"More",e?m.jsx(jl,{className:"h-2.5 w-2.5"}):m.jsx(Nl,{className:"h-2.5 w-2.5"})]})}function Fn({status:e}){const t=e==="failed"?"border-destructive/22 bg-destructive/9 text-destructive":e==="success"?"border-emerald-500/24 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300":"border-border/35 bg-muted/30 text-muted-foreground/58";return m.jsx("span",{className:`agent-activity-status-icon mt-0.5 inline-flex h-3 w-3 shrink-0 items-center justify-center rounded-full border ${t}`,"data-agent-activity-status":e,"aria-hidden":"true",children:e==="failed"?m.jsx(qr,{className:"h-2 w-2"}):e==="success"?m.jsx(Be,{className:"h-2 w-2"}):m.jsx(Wr,{className:"h-1 w-1 fill-current"})})}function rl(e){const t=typeof e.status=="string"?e.status.toLowerCase():"";if(e.is_error===!0||e.isError===!0||t==="failed"||t==="error")return"failed";const n=Bn(e).slice(0,160);return/\b(error|failed|exception|traceback)\b/i.test(n)?"failed":"success"}function Rn({title:e,preview:t,icon:n,children:r,accentClassName:i,status:l="success",previewClassName:o="font-mono text-[9px] leading-3 text-muted-foreground/78"}){const[s,a]=ce.useState(!1);return m.jsxs("div",{className:`overflow-hidden rounded-sm border border-border/18 shadow-none ${i}`,children:[m.jsxs("button",{type:"button",onClick:()=>a(u=>!u),className:"flex w-full items-start gap-1.5 px-2 py-1 text-left transition-colors hover:bg-background/24",children:[m.jsx(Fn,{status:l}),m.jsx("div",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:n}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:m.jsx("span",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:e})}),m.jsx("div",{className:`mt-0.5 whitespace-pre-wrap break-words ${o}`,children:t})]}),m.jsx(nl,{expanded:s})]}),s&&m.jsx("div",{className:"border-t border-border/18 px-2 py-1.5",children:r})]})}function il({text:e,status:t="success"}){const n=Se(e,156);return m.jsx(Rn,{title:"Thinking",preview:n,icon:m.jsx(Pl,{className:"h-3 w-3"}),accentClassName:"bg-muted/22",status:t,previewClassName:"text-[9px] leading-3 text-muted-foreground/78",children:m.jsx("div",{className:"whitespace-pre-wrap text-[10px] leading-4 text-muted-foreground/82",children:e})})}function ll({block:e,status:t="success",renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=String(e.name??"tool"),a=e.input,u=at(e);if(u){const c=Ue(u);return n!=null&&n.has(c)?null:(n==null||n.add(c),m.jsx(ot,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const f=tl(a);if(s==="TodoWrite"){const c=Zp(a==null?void 0:a.todos);if(c.length>0)return m.jsx(Qp,{todos:c,status:t})}return m.jsx(Rn,{title:`Tool: ${s}`,preview:f,icon:m.jsx(xn,{className:"h-3 w-3"}),accentClassName:"bg-muted/18",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:JSON.stringify(a??{},null,2)})})}function On({block:e,status:t=rl(e),renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=Bn(e);if(!s)return null;const a=ut(s);if(a){const f=Ue(a);return n!=null&&n.has(f)?null:(n==null||n.add(f),m.jsx(ot,{payload:a,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const u=Se(s,156);return m.jsx(Rn,{title:"Result",preview:u,icon:m.jsx(xn,{className:"h-3 w-3"}),accentClassName:"bg-background/45",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:s})})}function Bn(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>String(n.text??"")).join(`
82
+ `):""}function Xp(e){const t=e.message;return typeof t=="object"&&t!==null&&Array.isArray(t.content)?t.content:Array.isArray(e.content)?e.content:[]}function Gp(e){return e.flatMap(t=>Xp(t).flatMap(n=>{if(n.type==="thinking"){const r=String(n.thinking??"").trim();return r?[{title:"Thinking",preview:Se(r,112),block:n,kind:"thinking",status:"success"}]:[]}if(n.type==="tool_use")return[{title:`Tool: ${String(n.name??"tool")}`,preview:tl(n.input),block:n,kind:"tool_use",status:"success"}];if(n.type==="tool_result"){const r=Se(Bn(n),112);return r?[{title:"Result",preview:r,block:n,kind:"tool_result",status:rl(n)}]:[]}return[]}))}function Kp({events:e,...t}){const[n,r]=ce.useState(!1),[i,l]=ce.useState(Ze),o=Gp(e);if(o.length===0)return null;const s=o.slice(0,i),a=o.length-s.length;function u(){r(f=>{const c=!f;return c&&l(Ze),c})}return m.jsxs("div",{className:"animate-agent-activity group/activity overflow-hidden py-0.5 text-muted-foreground","data-agent-activity-page-size":Ze,children:[m.jsxs("button",{type:"button",onClick:u,"aria-expanded":n,className:"flex w-full items-start gap-1.5 rounded-sm px-1 py-1 text-left transition-colors hover:bg-muted/18",children:[m.jsx("div",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground/55 transition-colors group-hover/activity:text-muted-foreground/80",children:m.jsx(xn,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1 space-y-0.5",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/80",children:"Agent activity"}),m.jsxs("span",{className:"font-mono text-[9px] leading-4 text-muted-foreground/55",children:[o.length," ",o.length===1?"item":"items"]})]}),m.jsx("div",{className:"divide-y divide-dashed divide-border/18",children:o.slice(0,4).map((f,c)=>m.jsxs("div",{className:"grid gap-1 py-0.5 text-[9px] leading-3 sm:grid-cols-[0.875rem_4.75rem_minmax(0,1fr)]",children:[m.jsx(Fn,{status:f.status}),m.jsx("span",{className:"truncate font-medium text-muted-foreground/75",children:f.title}),m.jsx("span",{className:"truncate font-mono text-muted-foreground/60",children:f.preview})]},`${f.kind}-${c}`))})]}),m.jsx(nl,{expanded:n})]}),n&&m.jsxs("div",{className:"animate-agent-activity-expand divide-y divide-dashed divide-border/18 px-3 pb-1 pt-0.5",children:[s.map((f,c)=>{const h=`${f.kind}-${c}`;return f.kind==="thinking"?m.jsx("div",{className:"py-0.5",children:m.jsx(il,{text:String(f.block.thinking??""),status:f.status})},h):f.kind==="tool_use"?m.jsx("div",{className:"py-0.5",children:m.jsx(ll,{block:f.block,status:f.status,...t})},h):m.jsx("div",{className:"py-0.5",children:m.jsx(On,{block:f.block,status:f.status,...t})},h)}),a>0&&m.jsxs("button",{type:"button",onClick:()=>l(f=>f+Ze),className:"ml-5 inline-flex rounded-sm px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground/62 transition-colors hover:bg-muted/20 hover:text-muted-foreground",children:["Load more ",Math.min(a,Ze)]})]})]})}function Zp(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,l=typeof n.status=="string"?n.status:"pending";return{content:r,activeForm:i,status:l==="completed"||l==="in_progress"?l:"pending"}}).filter(t=>t!==null):[]}function Qp({todos:e,status:t="success"}){const n=e.filter(l=>l.status==="completed").length,r=e.length,i=e.find(l=>l.status==="in_progress");return m.jsxs("div",{className:"overflow-hidden rounded-sm border border-border/18 bg-muted/16 shadow-none",children:[m.jsxs("div",{className:"flex items-center gap-1.5 border-b border-border/18 px-2 py-1",children:[m.jsx(Fn,{status:t}),m.jsx("div",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:m.jsx(Fl,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:"Todos"}),m.jsx("div",{className:"mt-0.5 truncate text-[9px] leading-3 text-muted-foreground/78",children:i?i.activeForm:r===0?"No items":n===r?"All complete":"Up next"})]}),m.jsxs("div",{className:"shrink-0 rounded-sm border border-border/20 bg-background/36 px-1.5 py-0.5 font-mono text-[8px] tracking-wide text-muted-foreground/72",children:[n,"/",r]})]}),m.jsx("ul",{className:"divide-y divide-border/18",children:e.map((l,o)=>m.jsxs("li",{className:"flex items-start gap-1.5 px-2 py-1",children:[m.jsx(eh,{status:l.status}),m.jsx("span",{className:l.status==="completed"?"text-[11px] leading-4 text-muted-foreground line-through decoration-muted-foreground/60":l.status==="in_progress"?"text-[11px] font-medium leading-4 text-foreground":"text-[11px] leading-4 text-foreground/85",children:l.status==="in_progress"?l.activeForm:l.content})]},`${o}-${l.content}`))})]})}function eh({status:e}){return e==="completed"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-500 dark:text-emerald-400",children:m.jsx(Be,{className:"h-2.5 w-2.5"})}):e==="in_progress"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-primary",children:m.jsx(Ol,{className:"h-3 w-3 animate-spin"})}):m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground/60",children:m.jsx(Wr,{className:"h-2.5 w-2.5"})})}const ol=/^[A-Za-z]:[\\/]/,th=/^[A-Za-z][A-Za-z\d+.-]*:/,nh=/^\/(?:api|preview|preview-open|shared|tasks)(?:\/|$)/;function rh(e,t,n={}){const r=ul(e);if(!r||r.startsWith("#")||nh.test(r)||th.test(r)&&!r.toLowerCase().startsWith("file:")&&!ol.test(r))return null;const i=ih(r,t,n);if(!i)return null;const l=sl(i,t);return!l||l==="."?null:gl(l)?l:null}function sl(e,t){let n=ul(e);if(!n)return null;n=cl(n),n=fl(n),n=pl(n),n=Ae(n),n=hl(n);const r=t?Tt(Ae(t)):null;if(dl(n)){if(!r)return null;const i=Tt(n);if(i===r)return".";if(!i.startsWith(`${r}/`))return null;n=i.slice(r.length+1)}return n=$n(n),ml(n)?null:n||"."}function al(e){const t=$n(Ae(e)),n=t.lastIndexOf("/");return n<=0?".":t.slice(0,n)}function Mh(e,t,n,r=new Set){const i=[],l=(o,s)=>{for(const a of o){const u=a.type==="directory"&&n.has(a.path);i.push({entry:a,depth:s,expanded:u,loading:a.type==="directory"&&r.has(a.path)}),u&&l(t[a.path]??[],s+1)}};return l(e,0),i}function Fh(e){const t=al(e);if(t===".")return[];const n=t.split("/").filter(Boolean);return n.map((r,i)=>n.slice(0,i+1).join("/"))}function Rh(e){const t=$n(Ae(e));return!t||t==="."?0:Math.max(0,t.split("/").filter(Boolean).length-1)}function Oh(e,t){const n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?e:e.filter(r=>{const i=`${r.name} ${r.path}`.toLowerCase();return n.every(l=>i.includes(l))})}function ul(e){const t=(e==null?void 0:e.trim())??"";if(!t)return"";try{return decodeURIComponent(t)}catch{return t}}function cl(e){if(!e.toLowerCase().startsWith("file:"))return e;try{return new URL(e).pathname}catch{return e.replace(/^file:\/\//i,"")}}function fl(e){const t=e.indexOf("#"),n=e.indexOf("?"),r=[t,n].filter(i=>i>=0).sort((i,l)=>i-l)[0];return r===void 0?e:e.slice(0,r)}function pl(e){const t=e.match(/^(.*):\d+(?::\d+)?$/);return t!=null&&t[1]&&gl(t[1])?t[1]:e}function Ae(e){return e.replace(/\\/g,"/")}function Tt(e){return e.replace(/\/+$/,"")}function hl(e){return e.replace(/^\/([A-Za-z]:\/)/,"$1")}function $n(e){let t=e;for(;t.startsWith("./");)t=t.slice(2);return t}function ml(e){return e.split("/").includes("..")}function dl(e){return e.startsWith("/")||ol.test(e)}function gl(e){const t=Ae(e);if(!t||t==="."||ml(t))return!1;const n=t.split("/").pop()??t;return n.startsWith(".")||/\.[A-Za-z0-9][A-Za-z0-9_-]*$/.test(n)?!0:t.split("/").some(r=>r.startsWith(".")&&r.length>1)}function ih(e,t,n){const r=hl(Ae(pl(fl(cl(e))))),i=t?Tt(Ae(t)):null;if(n.allowRootRelative&&r.startsWith("/")){const s=Tt(r);if(!(i?s===i||s.startsWith(`${i}/`):!1))return r.replace(/^\/+/,"")}if(dl(r))return e;const l=sl(n.baseFilePath,t);if(!l||l===".")return e;const o=al(l);return o==="."?e:lh(`${o}/${r}`)}function lh(e){const t=[];for(const n of Ae(e).split("/"))if(!(!n||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n)}return t.join("/")||"."}function oh(e){return/^(https?:\/\/|mailto:|tel:)/i.test((e==null?void 0:e.trim())??"")}function sh(e){var i,l,o,s;const t=typeof window>"u"?void 0:window,n=(l=(i=t==null?void 0:t.__TAURI__)==null?void 0:i.core)==null?void 0:l.invoke;if(typeof n=="function")return a=>n("plugin:opener|open_url",{url:a,with:void 0});const r=(s=(o=t==null?void 0:t.__TAURI__)==null?void 0:o.opener)==null?void 0:s.openUrl;return typeof r=="function"?r:null}function Br(e,t){const n=sh(),r=t==null?void 0:t.trim();!n||!oh(r)||(e.preventDefault(),Promise.resolve(n(r)).catch(()=>{window.open(r,"_blank","noopener,noreferrer")}))}function Bh({event:e,agent:t,subItems:n=[],questionBypassEnabled:r=!1,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o=!1,taskRootPath:s,onOpenFilePath:a}){const u=e.type,f=yn(e),c=at(e);if(f)return m.jsx(nt,{agent:t,children:m.jsx(Jp,{payload:f,onSubmit:l,disabled:o})});if(c)return m.jsx(nt,{agent:t,children:m.jsx(ot,{payload:c,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});if(u==="user"){if(e.isMeta===!0||e.isSidechain===!0)return null;const h=ah(e),p=h.filter(y=>y.type==="tool_result");if(p.length>0&&h.every(y=>y.type==="tool_result"))return m.jsx(nt,{agent:t,children:p.map((y,w)=>m.jsx(On,{block:y,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},w))});const d=$e(e);return d?m.jsx(ph,{content:d,taskRootPath:s,onOpenFilePath:a}):null}return u==="assistant"?m.jsx(hh,{event:e,agent:t,subItems:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}):null}function ah(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 Kt(e){var n;const t=e.replace(/\r\n/g,`
78
83
  `).split(`
79
84
  `);for(;t.length>0&&((n=t[0])==null?void 0:n.trim())==="";)t.shift();return t.join(`
80
- `)}function xl({text:e,tone:t="default",size:n="default",className:r="",taskRootPath:i,onOpenFilePath:l}){const o=t==="inverted",s=n==="compact"?"text-[10px] leading-4":"text-[11px] leading-[17px]",a=o?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",u=o?"rounded-sm bg-black/15 px-1 py-0.5 font-mono text-[10px] text-primary-foreground":"rounded-sm bg-muted/80 px-1 py-0.5 font-mono text-[10px] text-foreground",f=o?"overflow-x-auto rounded-md border border-primary-foreground/12 bg-black/15 px-3 py-2 font-mono text-[10px] leading-4 text-primary-foreground":"overflow-x-auto rounded-md border border-border/45 bg-muted/50 px-3 py-2 font-mono text-[10px] leading-4 text-foreground",c=o?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",h=o?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",p=o?"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 m.jsx("div",{className:[`max-w-none break-words ${s} [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-2 [&_li>p]:my-0`,r].filter(Boolean).join(" "),children:m.jsx(jc,{remarkPlugins:[Vp,Bc],components:{a:({node:d,href:y,...w})=>{const k=l?nh(y,i):null;return k?m.jsx("a",{...w,href:y,"data-task-file-link":k,className:a,onClick:A=>{A.preventDefault(),l==null||l(k)}}):m.jsx("a",{...w,href:y,target:"_blank",rel:"noreferrer noopener",className:a,onClick:A=>Br(A,y)})},blockquote:({node:d,...y})=>m.jsx("blockquote",{...y,className:p}),code:({node:d,className:y,children:w,...k})=>y?m.jsx("code",{...k,className:y,children:w}):m.jsx("code",{...k,className:u,children:w}),h1:({node:d,...y})=>m.jsx("h1",{...y,className:"text-[14px] font-semibold leading-5"}),h2:({node:d,...y})=>m.jsx("h2",{...y,className:"text-[13px] font-semibold leading-5"}),h3:({node:d,...y})=>m.jsx("h3",{...y,className:"text-[12px] font-semibold leading-5"}),h4:({node:d,...y})=>m.jsx("h4",{...y,className:"text-[11px] font-semibold leading-4"}),hr:({node:d,...y})=>m.jsx("hr",{...y,className:o?"border-primary-foreground/20":"border-border"}),img:({node:d,alt:y,src:w})=>w?m.jsx("a",{href:w,target:"_blank",rel:"noreferrer noopener",className:a,onClick:k=>Br(k,w),children:(y==null?void 0:y.trim())||w}):m.jsx("span",{children:(y==null?void 0:y.trim())||"Image"}),ol:({node:d,...y})=>m.jsx("ol",{...y,className:"list-decimal space-y-0.5 pl-5"}),p:({node:d,...y})=>m.jsx("p",{...y,className:"my-0"}),pre:({node:d,...y})=>m.jsx("pre",{...y,className:f}),table:({node:d,...y})=>m.jsx("table",{...y,className:c}),td:({node:d,...y})=>m.jsx("td",{...y,className:h}),th:({node:d,...y})=>m.jsx("th",{...y,className:`${h} font-semibold`}),ul:({node:d,...y})=>m.jsx("ul",{...y,className:"list-disc space-y-0.5 pl-5"})},children:e})})}function yl({text:e,className:t=""}){const[n,r]=ce.useState(!1);if(!e)return null;const i=async l=>{l.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1500)}catch{}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy message",className:`flex h-6 w-6 items-center justify-center rounded-sm 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?m.jsx(Be,{className:"h-3 w-3 text-emerald-500"}):m.jsx(Vr,{className:"h-3 w-3"})})}async function ah(e){let n=await(await fetch(e)).blob();n.type!=="image/png"&&(n=await uh(n)),await navigator.clipboard.write([new ClipboardItem({[n.type]:n})])}async function uh(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,l)=>{n.toBlob(o=>o?i(o):l(new Error("toBlob failed")),"image/png")})}function ch({dataUrl:e,className:t=""}){const[n,r]=ce.useState(!1),i=async l=>{l.stopPropagation();try{await ah(e),r(!0),setTimeout(()=>r(!1),1500)}catch(o){console.error("copy image failed",o)}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy image",className:`flex h-6 w-6 items-center justify-center rounded-sm 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?m.jsx(Be,{className:"h-3 w-3 text-emerald-500"}):m.jsx(Vr,{className:"h-3 w-3"})})}function fh({content:e,taskRootPath:t,onOpenFilePath:n}){const r=Gl(e),i=e.filter(l=>l.type==="image");return m.jsx("div",{className:"animate-message-send flex w-full max-w-full min-w-0 justify-end",children:m.jsxs("div",{className:"group relative flex min-w-0 max-w-[88%] items-start gap-2",children:[m.jsx(yl,{text:r,className:"absolute -left-8 top-5"}),m.jsxs("div",{className:"flex min-w-0 max-w-full flex-col items-end gap-0.5",children:[m.jsx("div",{className:"pr-0.5 text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72",children:"You"}),m.jsxs("div",{className:"max-w-full space-y-1 overflow-hidden rounded-lg rounded-br-md bg-primary px-3 py-2 text-[10px] leading-4 text-primary-foreground shadow-[0_16px_52px_-38px_hsl(var(--primary)/0.9)]",children:[r&&m.jsx(xl,{text:r,tone:"inverted",size:"compact",taskRootPath:t,onOpenFilePath:n}),i.length>0&&m.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:i.map((l,o)=>{const s=Kl(l);return m.jsxs("div",{className:"relative",children:[m.jsx("img",{src:s,alt:l.filename??`attachment ${o+1}`,className:"max-h-72 w-full rounded-2xl border border-primary-foreground/15 object-cover"}),m.jsx(ch,{dataUrl:s,className:"absolute right-2 top-2"})]},`${l.filename??"image"}-${o}`)})})]})]}),m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-primary/8 text-primary",children:m.jsx(Vl,{className:"h-3.5 w-3.5"})})]})})}function nt({agent:e,children:t}){const n=e?Xr(e):"Agent";return m.jsx("div",{className:"animate-message-receive flex w-full max-w-full min-w-0 justify-start",children:m.jsxs("div",{className:"flex min-w-0 max-w-[92%] items-start gap-2",children:[m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-muted/45 text-muted-foreground/82",children:m.jsx(Jr,{agent:e??"",className:"h-3.5 w-3.5"})}),m.jsxs("div",{className:"min-w-0 max-w-full space-y-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72","data-agent-speaker-label":n,children:n}),t]})]})})}function ph({event:e,agent:t,subItems:n=[],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}){const u=e.message;if(!u)return null;const f=at(u);if(f)return m.jsx(nt,{agent:t,children:m.jsx(ot,{payload:f,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});const c=u.content;if(!c||!Array.isArray(c))return null;const h=new Set,p=c.filter(T=>T.type==="text").map(T=>({...T,text:Kt(String(T.text??"")),questionPayload:ut(Kt(String(T.text??"")))})).filter(T=>T.text.length>0||T.questionPayload),d=c.filter(T=>T.type==="thinking").map(T=>Kt(String(T.thinking??""))).filter(Boolean).join(`
85
+ `)}function xl({text:e,tone:t="default",size:n="default",className:r="",taskRootPath:i,onOpenFilePath:l}){const o=t==="inverted",s=n==="compact"?"text-[10px] leading-4":"text-[11px] leading-[17px]",a=o?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",u=o?"rounded-sm bg-black/15 px-1 py-0.5 font-mono text-[10px] text-primary-foreground":"rounded-sm bg-muted/80 px-1 py-0.5 font-mono text-[10px] text-foreground",f=o?"overflow-x-auto rounded-md border border-primary-foreground/12 bg-black/15 px-3 py-2 font-mono text-[10px] leading-4 text-primary-foreground":"overflow-x-auto rounded-md border border-border/45 bg-muted/50 px-3 py-2 font-mono text-[10px] leading-4 text-foreground",c=o?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",h=o?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",p=o?"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 m.jsx("div",{className:[`max-w-none break-words ${s} [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-2 [&_li>p]:my-0`,r].filter(Boolean).join(" "),children:m.jsx(Nc,{remarkPlugins:[Wp,$c],components:{a:({node:d,href:y,...w})=>{const k=l?rh(y,i):null;return k?m.jsx("a",{...w,href:y,"data-task-file-link":k,className:a,onClick:E=>{E.preventDefault(),l==null||l(k)}}):m.jsx("a",{...w,href:y,target:"_blank",rel:"noreferrer noopener",className:a,onClick:E=>Br(E,y)})},blockquote:({node:d,...y})=>m.jsx("blockquote",{...y,className:p}),code:({node:d,className:y,children:w,...k})=>y?m.jsx("code",{...k,className:y,children:w}):m.jsx("code",{...k,className:u,children:w}),h1:({node:d,...y})=>m.jsx("h1",{...y,className:"text-[14px] font-semibold leading-5"}),h2:({node:d,...y})=>m.jsx("h2",{...y,className:"text-[13px] font-semibold leading-5"}),h3:({node:d,...y})=>m.jsx("h3",{...y,className:"text-[12px] font-semibold leading-5"}),h4:({node:d,...y})=>m.jsx("h4",{...y,className:"text-[11px] font-semibold leading-4"}),hr:({node:d,...y})=>m.jsx("hr",{...y,className:o?"border-primary-foreground/20":"border-border"}),img:({node:d,alt:y,src:w})=>w?m.jsx("a",{href:w,target:"_blank",rel:"noreferrer noopener",className:a,onClick:k=>Br(k,w),children:(y==null?void 0:y.trim())||w}):m.jsx("span",{children:(y==null?void 0:y.trim())||"Image"}),ol:({node:d,...y})=>m.jsx("ol",{...y,className:"list-decimal space-y-0.5 pl-5"}),p:({node:d,...y})=>m.jsx("p",{...y,className:"my-0"}),pre:({node:d,...y})=>m.jsx("pre",{...y,className:f}),table:({node:d,...y})=>m.jsx("table",{...y,className:c}),td:({node:d,...y})=>m.jsx("td",{...y,className:h}),th:({node:d,...y})=>m.jsx("th",{...y,className:`${h} font-semibold`}),ul:({node:d,...y})=>m.jsx("ul",{...y,className:"list-disc space-y-0.5 pl-5"})},children:e})})}function yl({text:e,className:t=""}){const[n,r]=ce.useState(!1);if(!e)return null;const i=async l=>{l.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1500)}catch{}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy message",className:`flex h-6 w-6 items-center justify-center rounded-sm 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?m.jsx(Be,{className:"h-3 w-3 text-emerald-500"}):m.jsx(Vr,{className:"h-3 w-3"})})}async function uh(e){let n=await(await fetch(e)).blob();n.type!=="image/png"&&(n=await ch(n)),await navigator.clipboard.write([new ClipboardItem({[n.type]:n})])}async function ch(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,l)=>{n.toBlob(o=>o?i(o):l(new Error("toBlob failed")),"image/png")})}function fh({dataUrl:e,className:t=""}){const[n,r]=ce.useState(!1),i=async l=>{l.stopPropagation();try{await uh(e),r(!0),setTimeout(()=>r(!1),1500)}catch(o){console.error("copy image failed",o)}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy image",className:`flex h-6 w-6 items-center justify-center rounded-sm 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?m.jsx(Be,{className:"h-3 w-3 text-emerald-500"}):m.jsx(Vr,{className:"h-3 w-3"})})}function ph({content:e,taskRootPath:t,onOpenFilePath:n}){const r=Kl(e),i=e.filter(l=>l.type==="image");return m.jsx("div",{className:"animate-message-send flex w-full max-w-full min-w-0 justify-end",children:m.jsxs("div",{className:"group relative flex min-w-0 max-w-[88%] items-start gap-2",children:[m.jsx(yl,{text:r,className:"absolute -left-8 top-5"}),m.jsxs("div",{className:"flex min-w-0 max-w-full flex-col items-end gap-0.5",children:[m.jsx("div",{className:"pr-0.5 text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72",children:"You"}),m.jsxs("div",{className:"max-w-full space-y-1 overflow-hidden rounded-lg rounded-br-md bg-primary px-3 py-2 text-[10px] leading-4 text-primary-foreground shadow-[0_16px_52px_-38px_hsl(var(--primary)/0.9)]",children:[r&&m.jsx(xl,{text:r,tone:"inverted",size:"compact",taskRootPath:t,onOpenFilePath:n}),i.length>0&&m.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:i.map((l,o)=>{const s=Zl(l);return m.jsxs("div",{className:"relative",children:[m.jsx("img",{src:s,alt:l.filename??`attachment ${o+1}`,className:"max-h-72 w-full rounded-2xl border border-primary-foreground/15 object-cover"}),m.jsx(fh,{dataUrl:s,className:"absolute right-2 top-2"})]},`${l.filename??"image"}-${o}`)})})]})]}),m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-primary/8 text-primary",children:m.jsx(Wl,{className:"h-3.5 w-3.5"})})]})})}function nt({agent:e,children:t}){const n=e?Xr(e):"Agent";return m.jsx("div",{className:"animate-message-receive flex w-full max-w-full min-w-0 justify-start",children:m.jsxs("div",{className:"flex min-w-0 max-w-[92%] items-start gap-2",children:[m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-muted/45 text-muted-foreground/82",children:m.jsx(Jr,{agent:e??"",className:"h-3.5 w-3.5"})}),m.jsxs("div",{className:"min-w-0 max-w-full space-y-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72","data-agent-speaker-label":n,children:n}),t]})]})})}function hh({event:e,agent:t,subItems:n=[],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}){const u=e.message;if(!u)return null;const f=at(u);if(f)return m.jsx(nt,{agent:t,children:m.jsx(ot,{payload:f,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});const c=u.content;if(!c||!Array.isArray(c))return null;const h=new Set,p=c.filter(T=>T.type==="text").map(T=>({...T,text:Kt(String(T.text??"")),questionPayload:ut(Kt(String(T.text??"")))})).filter(T=>T.text.length>0||T.questionPayload),d=c.filter(T=>T.type==="thinking").map(T=>Kt(String(T.thinking??""))).filter(Boolean).join(`
81
86
 
82
- `),y=c.filter(T=>T.type==="tool_use"),w=c.filter(T=>T.type==="tool_result"),k=p.length>0,A=k&&(d.length>0||y.length>0||w.length>0)?[{type:"assistant",message:{content:[...d.length>0?[{type:"thinking",thinking:d}]:[],...y,...w]}}]:[];return p.length>0||d.length>0||y.length>0||w.length>0||n.length>0?m.jsxs(nt,{agent:t,children:[p.map((T,L)=>{if(T.questionPayload){const S=Ue(T.questionPayload);return h.has(S)?null:(h.add(S),m.jsx(ot,{payload:T.questionPayload,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o},L))}return m.jsxs("div",{className:"group relative max-w-full overflow-hidden rounded-lg rounded-bl-md bg-card/72 px-3 py-2 text-[11px] leading-[17px] text-foreground shadow-[0_14px_48px_-42px_rgba(15,23,42,0.65)] backdrop-blur-sm dark:bg-card/68 dark:shadow-[0_14px_48px_-42px_rgba(0,0,0,0.9)]",children:[m.jsx(yl,{text:T.text,className:"absolute right-2 top-2"}),m.jsx(xl,{text:T.text,taskRootPath:s,onOpenFilePath:a})]},L)}),(n.length>0||A.length>0)&&m.jsx(Gp,{events:[...A,...n],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}),d.length>0&&!k&&m.jsx(il,{text:d}),!k&&y.map((T,L)=>m.jsx(ll,{block:T,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},L)),!k&&w.map((T,L)=>m.jsx(On,{block:T,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},L))]}):null}function bt(e){return typeof e=="object"&&e!==null}function hh(e){const t=e.message;return bt(t)&&Array.isArray(t.content)?t.content.filter(bt):Array.isArray(e.content)?e.content.filter(bt):[]}function mh(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.filter(bt).map(n=>String(n.text??"")).join(`
83
- `):""}function dh(e){return at(e)?!0:e.type==="tool_result"&&ut(mh(e))!==null}function gh(e){const t=hh(e);return t.length===0||t.some(dh)?!1:e.type==="assistant"?t.every(n=>n.type==="thinking"||n.type==="tool_use"||n.type==="tool_result"):e.type==="user"?t.every(n=>n.type==="tool_result"):!1}function Oh(e){const t=[];let n=[];const r=()=>{var l;if(n.length===0)return;const i=typeof((l=n[0])==null?void 0:l.timestamp)=="string"?n[0].timestamp:void 0;t.push({event:{type:"assistant",message:{role:"assistant",content:[]},...i?{timestamp:i}:{}},subItems:n}),n=[]};for(const i of e){if(gh(i)){n.push(i);continue}r(),t.push({event:i,subItems:[]})}return r(),t}function Bh({label:e,value:t}){return m.jsxs("div",{className:"min-w-[4.75rem] flex-1 rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:"mt-0.5 text-[11px] font-semibold leading-4 tracking-tight text-foreground",children:t})]})}function $h({label:e}){return m.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-muted-foreground",children:e})}function Uh({label:e,value:t,mono:n,action:r}){return m.jsxs("div",{className:"grid grid-cols-[3.75rem,minmax(0,1fr)] items-start gap-1.5",children:[m.jsx("span",{className:"pt-px text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground",children:e}),m.jsxs("div",{className:"flex min-w-0 items-start gap-1",children:[m.jsx("span",{className:St("min-w-0 flex-1 break-all text-[9px] leading-[0.95rem] text-foreground",n&&"font-mono"),children:t}),r]})]})}function Hh({label:e,value:t,mono:n}){return m.jsxs("div",{className:"rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:St("mt-0.5 text-[9px] font-medium leading-[0.95rem] text-foreground",n&&"font-mono"),children:t})]})}export{Jr as A,Fh as B,Rh as C,Bh as D,Mh as E,nh as F,jc as G,Uh as I,Ol as L,Hh as M,$h as T,_h as a,yh as b,zh as c,Nh as d,wh as e,Ph as f,Xr as g,Oh as h,Ch as i,Ml as j,vh as k,Ah as l,Eh as m,$e as n,Ih as o,jh as p,kh as q,Sh as r,bh as s,Kl as t,yt as u,Th as v,sl as w,al as x,Dh as y,Lh as z};
87
+ `),y=c.filter(T=>T.type==="tool_use"),w=c.filter(T=>T.type==="tool_result"),k=p.length>0,E=k&&(d.length>0||y.length>0||w.length>0)?[{type:"assistant",message:{content:[...d.length>0?[{type:"thinking",thinking:d}]:[],...y,...w]}}]:[];return p.length>0||d.length>0||y.length>0||w.length>0||n.length>0?m.jsxs(nt,{agent:t,children:[p.map((T,L)=>{if(T.questionPayload){const S=Ue(T.questionPayload);return h.has(S)?null:(h.add(S),m.jsx(ot,{payload:T.questionPayload,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o},L))}return m.jsxs("div",{className:"group relative max-w-full overflow-hidden rounded-lg rounded-bl-md bg-card/72 px-3 py-2 text-[11px] leading-[17px] text-foreground shadow-[0_14px_48px_-42px_rgba(15,23,42,0.65)] backdrop-blur-sm dark:bg-card/68 dark:shadow-[0_14px_48px_-42px_rgba(0,0,0,0.9)]",children:[m.jsx(yl,{text:T.text,className:"absolute right-2 top-2"}),m.jsx(xl,{text:T.text,taskRootPath:s,onOpenFilePath:a})]},L)}),(n.length>0||E.length>0)&&m.jsx(Kp,{events:[...E,...n],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}),d.length>0&&!k&&m.jsx(il,{text:d}),!k&&y.map((T,L)=>m.jsx(ll,{block:T,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},L)),!k&&w.map((T,L)=>m.jsx(On,{block:T,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},L))]}):null}function bt(e){return typeof e=="object"&&e!==null}function mh(e){const t=e.message;return bt(t)&&Array.isArray(t.content)?t.content.filter(bt):Array.isArray(e.content)?e.content.filter(bt):[]}function dh(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.filter(bt).map(n=>String(n.text??"")).join(`
88
+ `):""}function gh(e){return at(e)?!0:e.type==="tool_result"&&ut(dh(e))!==null}function xh(e){const t=mh(e);return t.length===0||t.some(gh)?!1:e.type==="assistant"?t.every(n=>n.type==="thinking"||n.type==="tool_use"||n.type==="tool_result"):e.type==="user"?t.every(n=>n.type==="tool_result"):!1}function $h(e){const t=[];let n=[];const r=()=>{var l;if(n.length===0)return;const i=typeof((l=n[0])==null?void 0:l.timestamp)=="string"?n[0].timestamp:void 0;t.push({event:{type:"assistant",message:{role:"assistant",content:[]},...i?{timestamp:i}:{}},subItems:n}),n=[]};for(const i of e){if(xh(i)){n.push(i);continue}r(),t.push({event:i,subItems:[]})}return r(),t}function Uh({label:e,value:t}){return m.jsxs("div",{className:"min-w-[4.75rem] flex-1 rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:"mt-0.5 text-[11px] font-semibold leading-4 tracking-tight text-foreground",children:t})]})}function Hh({label:e}){return m.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-muted-foreground",children:e})}function qh({label:e,value:t,mono:n,action:r}){return m.jsxs("div",{className:"grid grid-cols-[3.75rem,minmax(0,1fr)] items-start gap-1.5",children:[m.jsx("span",{className:"pt-px text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground",children:e}),m.jsxs("div",{className:"flex min-w-0 items-start gap-1",children:[m.jsx("span",{className:St("min-w-0 flex-1 break-all text-[9px] leading-[0.95rem] text-foreground",n&&"font-mono"),children:t}),r]})]})}function Vh({label:e,value:t,mono:n}){return m.jsxs("div",{className:"rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:St("mt-0.5 text-[9px] font-medium leading-[0.95rem] text-foreground",n&&"font-mono"),children:t})]})}export{Jr as A,Mh as B,Bh as C,Uh as D,Rh as E,Oh as F,rh as G,Nc as H,qh as I,Ol as L,kh as M,Hh as T,zh as a,bh as b,Dh as c,Ph as d,Ch as e,Lh as f,Xr as g,$h as h,Eh as i,Vh as j,Fl as k,Th as l,vh as m,Ih as n,$e as o,jh as p,_h as q,Ah as r,wh as s,Zl as t,Sh as u,yt as v,Nh as w,sl as x,al as y,Fh as z};