db-studio 1.10.0 → 1.11.0

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.
Files changed (90) hide show
  1. package/dist/index.js +6 -6
  2. package/dist/index.js.map +1 -1
  3. package/dist/web-dist/assets/{_pathlessLayout-eo6iLvBo.js → _pathlessLayout-CJRtdlfu.js} +73 -73
  4. package/dist/web-dist/assets/_pathlessLayout-CJRtdlfu.js.map +1 -0
  5. package/dist/web-dist/assets/_pathlessLayout-ciCuJ1PR.js +1 -0
  6. package/dist/web-dist/assets/{_pathlessLayout-CEv6uosT.js.map → _pathlessLayout-ciCuJ1PR.js.map} +1 -1
  7. package/dist/web-dist/assets/_queryId-6swfGplM.js +1 -0
  8. package/dist/web-dist/assets/{_queryId-Bq64AuuI.js.map → _queryId-6swfGplM.js.map} +1 -1
  9. package/dist/web-dist/assets/{_table-Bt9of1on.js → _table-DHk3bHnN.js} +1 -1
  10. package/dist/web-dist/assets/{_table-Bt9of1on.js.map → _table-DHk3bHnN.js.map} +1 -1
  11. package/dist/web-dist/assets/_table-dUsH_2LP.js +1 -0
  12. package/dist/web-dist/assets/{_table-CQhKMAcZ.js.map → _table-dUsH_2LP.js.map} +1 -1
  13. package/dist/web-dist/assets/{browser-CFsrLhq1.js → browser-CKmBpcoz.js} +1 -1
  14. package/dist/web-dist/assets/{browser-CFsrLhq1.js.map → browser-CKmBpcoz.js.map} +1 -1
  15. package/dist/web-dist/assets/code-editor-C9H5SO98.js +9 -0
  16. package/dist/web-dist/assets/code-editor-C9H5SO98.js.map +1 -0
  17. package/dist/web-dist/assets/database.store-BvoUSH8Y.js +1 -0
  18. package/dist/web-dist/assets/database.store-BvoUSH8Y.js.map +1 -0
  19. package/dist/web-dist/assets/{dist-B90HBock.js → dist-C-7rnx4R.js} +1 -1
  20. package/dist/web-dist/assets/{dist-B90HBock.js.map → dist-C-7rnx4R.js.map} +1 -1
  21. package/dist/web-dist/assets/highlighted-body-OFNGDK62-qZDgwznf.js +1 -0
  22. package/dist/web-dist/assets/{highlighted-body-OFNGDK62-BGFI1Y6G.js.map → highlighted-body-OFNGDK62-qZDgwznf.js.map} +1 -1
  23. package/dist/web-dist/assets/icons-0UA1AvNu.js +1 -0
  24. package/dist/web-dist/assets/icons-0UA1AvNu.js.map +1 -0
  25. package/dist/web-dist/assets/index-BSNZ1oRs.js +35 -0
  26. package/dist/web-dist/assets/index-BSNZ1oRs.js.map +1 -0
  27. package/dist/web-dist/assets/index-BWKgNfEb.css +2 -0
  28. package/dist/web-dist/assets/{indexes-BKOZUa9Z.js → indexes-D-oUHra7.js} +1 -1
  29. package/dist/web-dist/assets/{indexes-BKOZUa9Z.js.map → indexes-D-oUHra7.js.map} +1 -1
  30. package/dist/web-dist/assets/{logs-DHha3vDy.js → logs-wkipM6zd.js} +1 -1
  31. package/dist/web-dist/assets/{logs-DHha3vDy.js.map → logs-wkipM6zd.js.map} +1 -1
  32. package/dist/web-dist/assets/mermaid-GHXKKRXX-BZ1Tdv8E.js +1 -0
  33. package/dist/web-dist/assets/middleware-CCyr6cvp.js +1 -0
  34. package/dist/web-dist/assets/middleware-CCyr6cvp.js.map +1 -0
  35. package/dist/web-dist/assets/popover-WwEzK7ho.js +1 -0
  36. package/dist/web-dist/assets/popover-WwEzK7ho.js.map +1 -0
  37. package/dist/web-dist/assets/query-runner-B-lngX3P.js +9 -0
  38. package/dist/web-dist/assets/query-runner-B-lngX3P.js.map +1 -0
  39. package/dist/web-dist/assets/{radix-ui-BUv2Nuc1.js → radix-ui-6dcJ5m4U.js} +1 -1
  40. package/dist/web-dist/assets/{radix-ui-BUv2Nuc1.js.map → radix-ui-6dcJ5m4U.js.map} +1 -1
  41. package/dist/web-dist/assets/react-B_x-GW6a.js +1 -0
  42. package/dist/web-dist/assets/react-B_x-GW6a.js.map +1 -0
  43. package/dist/web-dist/assets/{react-dom-0lXVP1OR.js → react-dom-CsRkF-uK.js} +1 -1
  44. package/dist/web-dist/assets/{react-dom-0lXVP1OR.js.map → react-dom-CsRkF-uK.js.map} +1 -1
  45. package/dist/web-dist/assets/{redis-value-CJoRCZun.js → redis-value-Dq29EMpv.js} +1 -1
  46. package/dist/web-dist/assets/{redis-value-CJoRCZun.js.map → redis-value-Dq29EMpv.js.map} +1 -1
  47. package/dist/web-dist/assets/runner-CL63BPMX.js +1 -0
  48. package/dist/web-dist/assets/{runner-CZKDzRoU.js.map → runner-CL63BPMX.js.map} +1 -1
  49. package/dist/web-dist/assets/schema-BNzZaUjg.js +64 -0
  50. package/dist/web-dist/assets/schema-BNzZaUjg.js.map +1 -0
  51. package/dist/web-dist/assets/{schema-0sozVL-z.js → schema-CIr5j9z3.js} +1 -1
  52. package/dist/web-dist/assets/{schema-0sozVL-z.js.map → schema-CIr5j9z3.js.map} +1 -1
  53. package/dist/web-dist/assets/{table-CPQhgD-a.js → table-BoQghHv7.js} +1 -1
  54. package/dist/web-dist/assets/{table-CPQhgD-a.js.map → table-BoQghHv7.js.map} +1 -1
  55. package/dist/web-dist/assets/tanstack-C-qfmRNM.js +10 -0
  56. package/dist/web-dist/assets/tanstack-C-qfmRNM.js.map +1 -0
  57. package/dist/web-dist/assets/toggle-group-CxRlYNqR.js +1 -0
  58. package/dist/web-dist/assets/toggle-group-CxRlYNqR.js.map +1 -0
  59. package/dist/web-dist/assets/{tooltip-DinwklI8.js → tooltip-1-bWFncb.js} +2 -2
  60. package/dist/web-dist/assets/{tooltip-DinwklI8.js.map → tooltip-1-bWFncb.js.map} +1 -1
  61. package/dist/web-dist/assets/{visualizer-DTPn0ywW.js → visualizer-qFaRAy7F.js} +1 -1
  62. package/dist/web-dist/assets/{visualizer-DTPn0ywW.js.map → visualizer-qFaRAy7F.js.map} +1 -1
  63. package/dist/web-dist/index.html +13 -11
  64. package/package.json +1 -1
  65. package/dist/web-dist/assets/_pathlessLayout-CEv6uosT.js +0 -1
  66. package/dist/web-dist/assets/_pathlessLayout-eo6iLvBo.js.map +0 -1
  67. package/dist/web-dist/assets/_queryId-Bq64AuuI.js +0 -1
  68. package/dist/web-dist/assets/_table-CQhKMAcZ.js +0 -1
  69. package/dist/web-dist/assets/code-editor-DQ86aZkm.js +0 -9
  70. package/dist/web-dist/assets/code-editor-DQ86aZkm.js.map +0 -1
  71. package/dist/web-dist/assets/database.store-KDHkiedw.js +0 -1
  72. package/dist/web-dist/assets/database.store-KDHkiedw.js.map +0 -1
  73. package/dist/web-dist/assets/highlighted-body-OFNGDK62-BGFI1Y6G.js +0 -1
  74. package/dist/web-dist/assets/icons-Bm7rSZLJ.js +0 -1
  75. package/dist/web-dist/assets/icons-Bm7rSZLJ.js.map +0 -1
  76. package/dist/web-dist/assets/index-BtqHnOp0.js +0 -23
  77. package/dist/web-dist/assets/index-BtqHnOp0.js.map +0 -1
  78. package/dist/web-dist/assets/index-ktDWx_UP.css +0 -2
  79. package/dist/web-dist/assets/mermaid-GHXKKRXX-DjR37lQN.js +0 -1
  80. package/dist/web-dist/assets/popover-Cm3PsrMh.js +0 -1
  81. package/dist/web-dist/assets/popover-Cm3PsrMh.js.map +0 -1
  82. package/dist/web-dist/assets/query-runner-6BhVPaC9.js +0 -9
  83. package/dist/web-dist/assets/query-runner-6BhVPaC9.js.map +0 -1
  84. package/dist/web-dist/assets/runner-CZKDzRoU.js +0 -1
  85. package/dist/web-dist/assets/schema-cZHeTHA0.js +0 -64
  86. package/dist/web-dist/assets/schema-cZHeTHA0.js.map +0 -1
  87. package/dist/web-dist/assets/tanstack-D6l4LIt3.js +0 -10
  88. package/dist/web-dist/assets/tanstack-D6l4LIt3.js.map +0 -1
  89. package/dist/web-dist/assets/toggle-group-BRWnLosM.js +0 -1
  90. package/dist/web-dist/assets/toggle-group-BRWnLosM.js.map +0 -1
@@ -1,62 +1,62 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-BGFI1Y6G.js","assets/rolldown-runtime-CXHxssQy.js","assets/icons-Bm7rSZLJ.js","assets/radix-ui-BUv2Nuc1.js"])))=>i.map(i=>d[i]);
2
- import{n as Gi,r as Or,t as $n}from"./rolldown-runtime-CXHxssQy.js";import{_ as qn,b as rh,c as Dr,d as ih,g as Ps,h as Dl,n as sh,r as ah,t as lh,v as Pl,x as oh}from"./tanstack-D6l4LIt3.js";import{$ as ch,A as Ml,C as uh,E as hh,I as dh,L as mh,N as fh,P as ph,Q as gh,R as Eh,V as Th,Y as Bl,_ as bh,at as xh,c as kh,et as yh,f as Ki,g as Ch,h as Xt,i as Xi,j as _h,k as Ah,l as Nh,m as Fl,ot as vh,q as Ms,t as Sh,u as Ih,v as Zi,x as wh,y as Lh}from"./icons-Bm7rSZLJ.js";import{Ot as Rh,Tt as Bs,a as Oh,c as Dh,d as Ph,f as Mh,gt as Bh,i as Fh,kt as jh,l as Hh,o as Uh,p as zh,s as $h,u as qh}from"./radix-ui-BUv2Nuc1.js";import{r as Yh}from"./monitoring-B_X9D1H-.js";import{n as Xe}from"./dist-B90HBock.js";import{n as jl,t as Hl}from"./bundle-mjs-BC_8HrWA.js";import{B as Vh,H as J,I as Wh,R as Qh,V as Gh,a as ot,c as oe,i as In,n as wn,s as Kh,t as Ln,y as Xh}from"./tooltip-DinwklI8.js";import{t as tt}from"./database.store-KDHkiedw.js";import{$ as Zh,A as Fs,D as Jh,E as ed,J as td,M as nd,N as rd,O as id,P as sd,S as Rn,X as ad,_ as On,b as Dn,f as ld,h as od,j as cd,k as Nt,m as ud,p as hd,q as Ul,v as Pn,x as Mn,y as Bn}from"./schema-cZHeTHA0.js";import{a as bt,f as Yn,o as dd,s as md}from"./popover-Cm3PsrMh.js";import{a as zl}from"./monaco-editor-CaQyRcyX.js";import{A as fd,D as pd,E as $l,F as Vn,I as Wn,M as Qn,N as Gn,O as ql,P as ct,T as Fn,_ as gd,a as Ed,b as Pr,c as Td,d as bd,f as xd,g as kd,h as yd,i as Cd,j as _d,k as Je,l as qt,m as Ad,o as Yt,p as Nd,s as js,v as vd,w as Sd}from"./index-BtqHnOp0.js";import{i as Mr,r as Id}from"./toggle-group-BRWnLosM.js";import{i as wd,n as Zr,o as Ld,r as Rd,s as Od}from"./redis-value-CJoRCZun.js";var Dd=["Show me all tables in my database","What columns are in the users table?","Write a query to find all active users","How many orders were placed last month?","Find top 5 customers by total spend","Write a JOIN between users and orders","Users who haven't made any purchase yet","Generate monthly revenue summary query","Suggest useful indexes for better performance","Show schema of the products / inventory table","Latest 20 orders with customer names","Help me write a safe UPDATE query"],Hs={AUTHOR:"Hüsam 🥑 <devhsmq@gmail.com>",AUTHOR_NAME:"Hüsam",AUTHOR_AVATAR:"/avocado.png",AUTHOR_USERNAME:"husamql3",AUTHOR_GITHUB_LINK:"https://github.com/husamql3",SITE_DESCRIPTION:"The modern pgAdmin alternative that works with every database.",SITE_KEYWORDS:["pgadmin alternative","database client","database gui","database browser","sql editor","postgresql client","mysql client","table editor","ai sql","er diagram"],SITE_TITLE:"db-studio",SITE_NAME:"dbstudio.sh",SITE_URL:"https://dbstudio.sh",SITE_X_LINK:"https://x.com/dbstudio_sh",SITE_GITHUB_LINK:"https://github.com/husamql3/db-studio",SITE_GITHUB_NEW_ISSUE_LINK:"https://github.com/husamql3/db-studio/issues/new/choose",SITE_DOCS_LINK:"https://dbstudio.sh/docs",SITE_CHANGELOG_LINK:"https://dbstudio.sh/changelog",SITE_ROADMAP_LINK:"https://dbstudio.sh/roadmap",SITE_IMAGE:"https://dbstudio.sh/og-image.png",SITE_IMAGE_WIDTH:"1200",SITE_IMAGE_HEIGHT:"630",SITE_IMAGE_ALT:"dbstudio.sh – Modern database management studio",SITE_COLOR:"#1447e6"},E=Or(vh(),1),Yl=Or(Rh(),1),h=jh();function Pd({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return(0,h.jsx)(zh,{"data-slot":"separator",decorative:n,orientation:t,className:J("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch",e),...r})}var Br=(function(e){if(e==null)return jd;if(typeof e=="function")return Fr(e);if(typeof e=="object")return Array.isArray(e)?Md(e):Bd(e);if(typeof e=="string")return Fd(e);throw new Error("Expected function, string, or object as test")});function Md(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Br(e[n]);return Fr(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Bd(e){const t=e;return Fr(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Fd(e){return Fr(t);function t(n){return n&&n.type===e}}function Fr(e){return t;function t(n,r,i){return!!(Hd(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function jd(){return!0}function Hd(e){return e!==null&&typeof e=="object"&&"type"in e}var Vl=[];var En="skip";function Ji(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Br(i),a=r?-1:1;l(e,void 0,[])();function l(o,u,m){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Vl,g,N,C;if((!t||s(o,u,m[m.length-1]||void 0))&&(p=Ud(n(o,m)),p[0]===!1))return p;if("children"in o&&o.children){const b=o;if(b.children&&p[0]!=="skip")for(N=(r?b.children.length:-1)+a,C=m.concat(b);N>-1&&N<b.children.length;){const A=b.children[N];if(g=l(A,N,C)(),g[0]===!1)return g;N=typeof g[1]=="number"?g[1]:N+a}}return p}}}function Ud(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?Vl:[e]}function et(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Ji(e,s,l,i);function l(o,u){const m=u[u.length-1],d=m?m.children.indexOf(o):void 0;return a(o,d,m)}}var Zt={indicator:"indicator",textOnly:"text-only",remove:"remove"};function zd({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:l=Zt.indicator,imageBlockPolicy:o=Zt.indicator}){const u=t.length&&!t.every(d=>d==="*"),m=n.length&&!n.every(d=>d==="*");if(!e&&(u||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const f=Qd(e,t,n,r,i,s,a,l,o);Wl(d),et(d,f)}}function Us(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function $d(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}var qd=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Yd=new Set(["javascript:","data:","file:","vbscript:"]);function zs(e,t,n,r=!1,i=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const o=e.substring(5);if(o&&o.length>0&&o!=="invalid")return e}}catch{return null}return null}const a=Us(e,n);if(!a||Yd.has(a.protocol)||!(qd.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const l=$d(e);return a&&t.some(o=>{const u=Us(o,n);return!u||u.origin!==a.origin?!1:a.href.startsWith(u.href)})?l?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:l?a.pathname+a.search+a.hash:a.href:null}function Wl(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Wl(t)}}var Jr=Symbol("node-seen");function Vd(e,t,n){return t===Zt.remove?{type:"remove"}:t===Zt.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Wd(e,t,n){if(t===Zt.remove)return{type:"remove"};if(t===Zt.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}var Qd=(e,t,n,r,i,s,a,l,o)=>{const u=(m,d,f)=>{if(m.type!=="element"||m[Jr])return!0;if(m.tagName==="a"){const p=zs(m.properties.href,t,e,!1,!1,i);if(p===null){if(m[Jr]=!0,et(m,u),f&&typeof d=="number"){const g=Vd(m,l,a);if(g.type==="remove")return f.children.splice(d,1),[En,d];f.children[d]=g.element}return En}else return m.properties.href=p,m.properties.target="_blank",m.properties.rel="noopener noreferrer",!0}if(m.tagName==="img"){const p=zs(m.properties.src,n,e,r,!0,i);if(p===null){if(m[Jr]=!0,et(m,u),f&&typeof d=="number"){const g=Wd(m,o,s);if(g.type==="remove")return f.children.splice(d,1),[En,d];f.children[d]=g.element}return En}else return m.properties.src=p,!0}return!0};return u},$s=typeof self=="object"?self:globalThis,Gd=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case 0:case-1:return n(a,i);case 1:{const l=n([],i);for(const o of a)l.push(r(o));return l}case 2:{const l=n({},i);for(const[o,u]of a)l[r(o)]=r(u);return l}case 3:return n(new Date(a),i);case 4:{const{source:l,flags:o}=a;return n(new RegExp(l,o),i)}case 5:{const l=n(new Map,i);for(const[o,u]of a)l.set(r(o),r(u));return l}case 6:{const l=n(new Set,i);for(const o of a)l.add(r(o));return l}case 7:{const{name:l,message:o}=a;return n(new $s[l](o),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(new $s[s](a),i)};return r},qs=e=>Gd(new Map,e)(0),Vt="",{toString:Kd}={},{keys:Xd}=Object,hn=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=Kd.call(e).slice(8,-1);switch(n){case"Array":return[1,Vt];case"Object":return[2,Vt];case"Date":return[3,Vt];case"RegExp":return[4,Vt];case"Map":return[5,Vt];case"Set":return[6,Vt];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},cr=([e,t])=>e===0&&(t==="function"||t==="symbol"),Zd=(e,t,n,r)=>{const i=(a,l)=>{const o=r.push(a)-1;return n.set(l,o),o},s=a=>{if(n.has(a))return n.get(a);let[l,o]=hn(a);switch(l){case 0:{let m=a;switch(o){case"bigint":l=8,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);m=null;break;case"undefined":return i([-1],a)}return i([l,m],a)}case 1:{if(o){let f=a;return o==="DataView"?f=new Uint8Array(a.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(a)),i([o,[...f]],a)}const m=[],d=i([l,m],a);for(const f of a)m.push(s(f));return d}case 2:{if(o)switch(o){case"BigInt":return i([o,a.toString()],a);case"Boolean":case"Number":case"String":return i([o,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const m=[],d=i([l,m],a);for(const f of Xd(a))(e||!cr(hn(a[f])))&&m.push([s(f),s(a[f])]);return d}case 3:return i([l,a.toISOString()],a);case 4:{const{source:m,flags:d}=a;return i([l,{source:m,flags:d}],a)}case 5:{const m=[],d=i([l,m],a);for(const[f,p]of a)(e||!(cr(hn(f))||cr(hn(p))))&&m.push([s(f),s(p)]);return d}case 6:{const m=[],d=i([l,m],a);for(const f of a)(e||!cr(hn(f)))&&m.push(s(f));return d}}const{message:u}=a;return i([l,{name:o,message:u}],a)};return s},Ys=(e,{json:t,lossy:n}={})=>{const r=[];return Zd(!(t||n),!!t,new Map,r)(e),r},Dt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?qs(Ys(e,t)):structuredClone(e):(e,t)=>qs(Ys(e,t));var Kn=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Kn.prototype.normal={};Kn.prototype.property={};Kn.prototype.space=void 0;function Ql(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Kn(n,r,t)}function jn(e){return e.toLowerCase()}var Oe=class{constructor(e,t){this.attribute=t,this.property=e}};Oe.prototype.attribute="";Oe.prototype.booleanish=!1;Oe.prototype.boolean=!1;Oe.prototype.commaOrSpaceSeparated=!1;Oe.prototype.commaSeparated=!1;Oe.prototype.defined=!1;Oe.prototype.mustUseProperty=!1;Oe.prototype.number=!1;Oe.prototype.overloadedBoolean=!1;Oe.prototype.property="";Oe.prototype.spaceSeparated=!1;Oe.prototype.space=void 0;var _i=Gi({boolean:()=>ee,booleanish:()=>xe,commaOrSpaceSeparated:()=>Be,commaSeparated:()=>Gt,number:()=>j,overloadedBoolean:()=>Ai,spaceSeparated:()=>me}),Jd=0,ee=Bt(),xe=Bt(),Ai=Bt(),j=Bt(),me=Bt(),Gt=Bt(),Be=Bt();function Bt(){return 2**++Jd}var ei=Object.keys(_i),es=class extends Oe{constructor(e,t,n,r){let i=-1;if(super(e,t),Vs(this,"space",r),typeof n=="number")for(;++i<ei.length;){const s=ei[i];Vs(this,ei[i],(n&_i[s])===_i[s])}}};es.prototype.defined=!0;function Vs(e,t,n){n&&(e[t]=n)}function tn(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new es(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[jn(r)]=r,n[jn(s.attribute)]=r}return new Kn(t,n,e.space)}var Gl=tn({properties:{ariaActiveDescendant:null,ariaAtomic:xe,ariaAutoComplete:null,ariaBusy:xe,ariaChecked:xe,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:xe,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:xe,ariaFlowTo:me,ariaGrabbed:xe,ariaHasPopup:null,ariaHidden:xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:j,ariaLive:null,ariaModal:xe,ariaMultiLine:xe,ariaMultiSelectable:xe,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:xe,ariaReadOnly:xe,ariaRelevant:null,ariaRequired:xe,ariaRoleDescription:me,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:xe,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Kl(e,t){return t in e?e[t]:t}function Xl(e,t){return Kl(e,t.toLowerCase())}var em=tn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gt,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:me,autoFocus:ee,autoPlay:ee,blocking:me,capture:null,charSet:null,checked:ee,cite:null,className:me,cols:j,colSpan:null,content:null,contentEditable:xe,controls:ee,controlsList:me,coords:j|Gt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:Ai,draggable:xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:me,height:j,hidden:Ai,high:j,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:me,itemRef:me,itemScope:ee,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:j,pattern:null,ping:me,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:me,required:ee,reversed:ee,rows:j,rowSpan:j,sandbox:me,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:xe,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:xe,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:Xl}),tm=tn({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:Be,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:me,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:Gt,g2:Gt,glyphName:Gt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Kl}),Zl=tn({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()}}),Jl=tn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xl}),eo=tn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),nm={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"},rm=/[A-Z]/g,Ws=/-[a-z]/g,im=/^data[-\w.:]+$/i;function jr(e,t){const n=jn(t);let r=t,i=Oe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&im.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Ws,am);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Ws.test(s)){let a=s.replace(rm,sm);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=es}return new i(r,t)}function sm(e){return"-"+e.toLowerCase()}function am(e){return e.charAt(1).toUpperCase()}var Xn=Ql([Gl,em,Zl,Jl,eo],"html"),yt=Ql([Gl,tm,Zl,Jl,eo],"svg");function Qs(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function to(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Gs=/[#.]/g;function lm(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){Gs.lastIndex=i;const l=Gs.exec(n),o=n.slice(i,l?l.index:n.length);o&&(s?s==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:a=o,i+=o.length),l&&(s=l[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Ks(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function no(e){return e.join(" ").trim()}function ro(e,t,n){const r=n?hm(n):void 0;function i(s,a,...l){let o;if(s==null){o={type:"root",children:[]};const u=a;l.unshift(u)}else{o=lm(s,t);const u=o.tagName.toLowerCase(),m=r?r.get(u):void 0;if(o.tagName=m||u,om(a))l.unshift(a);else for(const[d,f]of Object.entries(a))cm(e,o.properties,d,f)}for(const u of l)Ni(o.children,u);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function om(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function cm(e,t,n,r){const i=jr(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Ks(r):i.commaSeparated?s=Qs(r):i.commaOrSpaceSeparated?s=Ks(Qs(r).join(" ")):s=Xs(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?um(r):String(r);if(Array.isArray(s)){const a=[];for(const l of s)a.push(Xs(i,i.property,l));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Ni(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Ni(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ni(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Xs(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||jn(n)===jn(t)))return!0}return n}function um(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function hm(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}var dm=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],mm=ro(Xn,"div"),fm=ro(yt,"g",dm);function pm(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let l=n[a];if(l===void 0){const o=Zs(t,n[a-1]);l=o===-1?t.length+1:o+1,n[a]=l}if(l>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const l=n[n.length-1],o=Zs(t,l),u=o===-1?t.length+1:o+1;if(l===u)break;n.push(u)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Zs(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
3
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Rt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},io={}.hasOwnProperty,gm=Object.prototype;function Em(e,t){const n=t||{};return ts({file:n.file||void 0,location:!1,schema:n.space==="svg"?yt:Xn,verbose:n.verbose||!1},e)}function ts(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Tr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:so(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=pm(s),l=a.toPoint(0),o=a.toPoint(s.length);n.position={start:l,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Tr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Tr(e,r,n),n}default:return n=Tm(e,t),n}}function so(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=ts(e,t[n]);r.push(i)}return r}function Tm(e,t){const n=e.schema;e.schema=t.namespaceURI===Rt.svg?yt:Xn;let r=-1;const i={};for(;++r<t.attrs.length;){const a=t.attrs[r],l=(a.prefix?a.prefix+":":"")+a.name;io.call(gm,l)||(i[l]=a.value)}const s=(e.schema.space==="svg"?fm:mm)(t.tagName,i,so(e,t.childNodes));if(Tr(e,t,s),s.tagName==="template"){const a=t,l=a.sourceCodeLocation,o=l&&l.startTag&&Qt(l.startTag),u=l&&l.endTag&&Qt(l.endTag),m=ts(e,a.content);o&&u&&e.file&&(m.position={start:o.end,end:u.start}),s.content=m}return e.schema=n,s}function Tr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=bm(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function bm(e,t,n){const r=Qt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)io.call(n.attrs,a)&&(s[jr(e.schema,a).property]=Qt(n.attrs[a]));n.startTag;const l=Qt(n.startTag),o=n.endTag?Qt(n.endTag):void 0,u={opening:l};o&&(u.closing=o),u.properties=s,t.data={position:u}}}return r}function Qt(e){const t=Js({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Js({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Js(e){return e.line&&e.column?e:void 0}var ea={}.hasOwnProperty;function ao(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const l=r.handlers;if(i&&ea.call(i,e)){const o=String(i[e]);a=ea.call(l,o)?l[o]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var xm={},km={}.hasOwnProperty,lo=ao("type",{handlers:{root:Cm,element:Sm,text:Nm,comment:vm,doctype:Am}});function ym(e,t){const n=(t||xm).space;return lo(e,n==="svg"?yt:Xn)}function Cm(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ns(e.children,n,t),nn(e,n),n}function _m(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ns(e.children,n,t),nn(e,n),n}function Am(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return nn(e,t),t}function Nm(e){const t={nodeName:"#text",value:e.value,parentNode:null};return nn(e,t),t}function vm(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return nn(e,t),t}function Sm(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=yt);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&km.call(e.properties,s)){const o=Im(r,s,e.properties[s]);o&&i.push(o)}}const a=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Rt[a],childNodes:[],parentNode:null};return l.childNodes=ns(e.children,l,r),nn(e,l),e.tagName==="template"&&e.content&&(l.content=_m(e.content,r)),l}function Im(e,t,n){const r=jr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?to(n):no(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Rt[r.space]}return i}function ns(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=lo(e[r],n);s.parentNode=t,i.push(s)}return i}function nn(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var wm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Lm=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);var T;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(T||(T={}));var Le={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function oo(e){return e>=55296&&e<=57343}function Rm(e){return e>=56320&&e<=57343}function Om(e,t){return(e-55296)*1024+9216+t}function co(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function uo(e){return e>=64976&&e<=65007||Lm.has(e)}var R;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(R||(R={}));var Dm=65536,Pm=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Dm,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:i}=this,s=r+t,a=i+t;return{code:e,startLine:n,endLine:n,startCol:s,endCol:s,startOffset:a,endOffset:a}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(Rm(t))return this.pos++,this._addGap(),Om(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(R.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==e.charCodeAt(n))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;const n=this.html.charCodeAt(t);return n===T.CARRIAGE_RETURN?T.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;let e=this.html.charCodeAt(this.pos);return e===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):e===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,oo(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===T.LINE_FEED||e===T.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){co(e)?this._err(R.controlCharacterInInputStream):uo(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},te;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(te||(te={}));function ho(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Mm=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),ti,Bm=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),w1=(ti=String.fromCodePoint)!==null&&ti!==void 0?ti:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Fm(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Bm.get(e))!==null&&t!==void 0?t:e}var ye;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ye||(ye={}));var jm=32,Tt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Tt||(Tt={}));function vi(e){return e>=ye.ZERO&&e<=ye.NINE}function Hm(e){return e>=ye.UPPER_A&&e<=ye.UPPER_F||e>=ye.LOWER_A&&e<=ye.LOWER_F}function Um(e){return e>=ye.UPPER_A&&e<=ye.UPPER_Z||e>=ye.LOWER_A&&e<=ye.LOWER_Z||vi(e)}function zm(e){return e===ye.EQUALS||Um(e)}var ke;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ke||(ke={}));var lt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(lt||(lt={}));var $m=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=lt.Strict}startEntity(e){this.decodeMode=e,this.state=ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ke.EntityStart:return e.charCodeAt(t)===ye.NUM?(this.state=ke.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ke.NamedEntity,this.stateNamedEntity(e,t));case ke.NumericStart:return this.stateNumericStart(e,t);case ke.NumericDecimal:return this.stateNumericDecimal(e,t);case ke.NumericHex:return this.stateNumericHex(e,t);case ke.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|jm)===ye.LOWER_X?(this.state=ke.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ke.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(vi(r)||Hm(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(vi(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===ye.SEMI)this.consumed+=1;else if(this.decodeMode===lt.Strict)return 0;return this.emitCodePoint(Fm(this.result),this.consumed),this.errors&&(e!==ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&Tt.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const s=e.charCodeAt(t);if(this.treeIndex=qm(n,r,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===lt.Attribute&&(i===0||zm(s))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Tt.VALUE_LENGTH)>>14,i!==0){if(s===ye.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==lt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&Tt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Tt.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ke.NamedEntity:return this.result!==0&&(this.decodeMode!==lt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ke.NumericDecimal:return this.emitNumericEntity(0,2);case ke.NumericHex:return this.emitNumericEntity(0,3);case ke.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ke.EntityStart:return 0}}};function qm(e,t,n,r){const i=(t&Tt.BRANCH_LENGTH)>>7,s=t&Tt.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const o=r-s;return o<0||o>=i?-1:e[n+o]-1}let a=n,l=a+i-1;for(;a<=l;){const o=a+l>>>1,u=e[o];if(u<r)a=o+1;else if(u>r)l=o-1;else return e[o+i]}return-1}var M;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(M||(M={}));var Ot;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ot||(Ot={}));var Ue;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ue||(Ue={}));var L;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(L||(L={}));var c;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(c||(c={}));var Ym=new Map([[L.A,c.A],[L.ADDRESS,c.ADDRESS],[L.ANNOTATION_XML,c.ANNOTATION_XML],[L.APPLET,c.APPLET],[L.AREA,c.AREA],[L.ARTICLE,c.ARTICLE],[L.ASIDE,c.ASIDE],[L.B,c.B],[L.BASE,c.BASE],[L.BASEFONT,c.BASEFONT],[L.BGSOUND,c.BGSOUND],[L.BIG,c.BIG],[L.BLOCKQUOTE,c.BLOCKQUOTE],[L.BODY,c.BODY],[L.BR,c.BR],[L.BUTTON,c.BUTTON],[L.CAPTION,c.CAPTION],[L.CENTER,c.CENTER],[L.CODE,c.CODE],[L.COL,c.COL],[L.COLGROUP,c.COLGROUP],[L.DD,c.DD],[L.DESC,c.DESC],[L.DETAILS,c.DETAILS],[L.DIALOG,c.DIALOG],[L.DIR,c.DIR],[L.DIV,c.DIV],[L.DL,c.DL],[L.DT,c.DT],[L.EM,c.EM],[L.EMBED,c.EMBED],[L.FIELDSET,c.FIELDSET],[L.FIGCAPTION,c.FIGCAPTION],[L.FIGURE,c.FIGURE],[L.FONT,c.FONT],[L.FOOTER,c.FOOTER],[L.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[L.FORM,c.FORM],[L.FRAME,c.FRAME],[L.FRAMESET,c.FRAMESET],[L.H1,c.H1],[L.H2,c.H2],[L.H3,c.H3],[L.H4,c.H4],[L.H5,c.H5],[L.H6,c.H6],[L.HEAD,c.HEAD],[L.HEADER,c.HEADER],[L.HGROUP,c.HGROUP],[L.HR,c.HR],[L.HTML,c.HTML],[L.I,c.I],[L.IMG,c.IMG],[L.IMAGE,c.IMAGE],[L.INPUT,c.INPUT],[L.IFRAME,c.IFRAME],[L.KEYGEN,c.KEYGEN],[L.LABEL,c.LABEL],[L.LI,c.LI],[L.LINK,c.LINK],[L.LISTING,c.LISTING],[L.MAIN,c.MAIN],[L.MALIGNMARK,c.MALIGNMARK],[L.MARQUEE,c.MARQUEE],[L.MATH,c.MATH],[L.MENU,c.MENU],[L.META,c.META],[L.MGLYPH,c.MGLYPH],[L.MI,c.MI],[L.MO,c.MO],[L.MN,c.MN],[L.MS,c.MS],[L.MTEXT,c.MTEXT],[L.NAV,c.NAV],[L.NOBR,c.NOBR],[L.NOFRAMES,c.NOFRAMES],[L.NOEMBED,c.NOEMBED],[L.NOSCRIPT,c.NOSCRIPT],[L.OBJECT,c.OBJECT],[L.OL,c.OL],[L.OPTGROUP,c.OPTGROUP],[L.OPTION,c.OPTION],[L.P,c.P],[L.PARAM,c.PARAM],[L.PLAINTEXT,c.PLAINTEXT],[L.PRE,c.PRE],[L.RB,c.RB],[L.RP,c.RP],[L.RT,c.RT],[L.RTC,c.RTC],[L.RUBY,c.RUBY],[L.S,c.S],[L.SCRIPT,c.SCRIPT],[L.SEARCH,c.SEARCH],[L.SECTION,c.SECTION],[L.SELECT,c.SELECT],[L.SOURCE,c.SOURCE],[L.SMALL,c.SMALL],[L.SPAN,c.SPAN],[L.STRIKE,c.STRIKE],[L.STRONG,c.STRONG],[L.STYLE,c.STYLE],[L.SUB,c.SUB],[L.SUMMARY,c.SUMMARY],[L.SUP,c.SUP],[L.TABLE,c.TABLE],[L.TBODY,c.TBODY],[L.TEMPLATE,c.TEMPLATE],[L.TEXTAREA,c.TEXTAREA],[L.TFOOT,c.TFOOT],[L.TD,c.TD],[L.TH,c.TH],[L.THEAD,c.THEAD],[L.TITLE,c.TITLE],[L.TR,c.TR],[L.TRACK,c.TRACK],[L.TT,c.TT],[L.U,c.U],[L.UL,c.UL],[L.SVG,c.SVG],[L.VAR,c.VAR],[L.WBR,c.WBR],[L.XMP,c.XMP]]);function rn(e){var t;return(t=Ym.get(e))!==null&&t!==void 0?t:c.UNKNOWN}var F=c,Vm={[M.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[M.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[M.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},Si=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]),L1=new Set([L.STYLE,L.SCRIPT,L.XMP,L.IFRAME,L.NOEMBED,L.NOFRAMES,L.PLAINTEXT]),x;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(x||(x={}));var be={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function Wm(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function Tn(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function Qm(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function ft(e){return Qm(e)||Tn(e)}function ta(e){return ft(e)||Wm(e)}function ur(e){return e+32}function mo(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function na(e){return mo(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function Gm(e){return e===T.NULL?R.nullCharacterReference:e>1114111?R.characterReferenceOutsideUnicodeRange:oo(e)?R.surrogateCharacterReference:uo(e)?R.noncharacterCharacterReference:co(e)||e===T.CARRIAGE_RETURN?R.controlCharacterReference:null}var Km=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Pm(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new $m(Mm,(n,r)=>{this.preprocessor.pos=this.entityStartPos+r-1,this._flushCodePointConsumedAsCharacterReference(n)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const r=Gm(n);r&&this._err(r,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)===null||r===void 0||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:te.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:te.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:te.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:te.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(ho(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const r=(e=(t=n.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);r[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=rn(e.tagName),e.type===te.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case te.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case te.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case te.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:te.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=mo(e)?te.WHITESPACE_CHARACTER:e===T.NULL?te.NULL_CHARACTER:te.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(te.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?lt.Attribute:lt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case x.DATA:this._stateData(e);break;case x.RCDATA:this._stateRcdata(e);break;case x.RAWTEXT:this._stateRawtext(e);break;case x.SCRIPT_DATA:this._stateScriptData(e);break;case x.PLAINTEXT:this._statePlaintext(e);break;case x.TAG_OPEN:this._stateTagOpen(e);break;case x.END_TAG_OPEN:this._stateEndTagOpen(e);break;case x.TAG_NAME:this._stateTagName(e);break;case x.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case x.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case x.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case x.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case x.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case x.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case x.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case x.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case x.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case x.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case x.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case x.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case x.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case x.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case x.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case x.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case x.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case x.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case x.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case x.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case x.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case x.BOGUS_COMMENT:this._stateBogusComment(e);break;case x.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case x.COMMENT_START:this._stateCommentStart(e);break;case x.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case x.COMMENT:this._stateComment(e);break;case x.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case x.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case x.COMMENT_END:this._stateCommentEnd(e);break;case x.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case x.DOCTYPE:this._stateDoctype(e);break;case x.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case x.DOCTYPE_NAME:this._stateDoctypeName(e);break;case x.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case x.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case x.CDATA_SECTION:this._stateCdataSection(e);break;case x.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case x.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case x.CHARACTER_REFERENCE:this._stateCharacterReference();break;case x.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.TAG_OPEN;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case T.AMPERSAND:this._startCharacterReference();break;case T.LESS_THAN_SIGN:this.state=x.RCDATA_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.RAWTEXT_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ft(e))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){case T.EXCLAMATION_MARK:this.state=x.MARKUP_DECLARATION_OPEN;break;case T.SOLIDUS:this.state=x.END_TAG_OPEN;break;case T.QUESTION_MARK:this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e);break;case T.EOF:this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ft(e))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){case T.GREATER_THAN_SIGN:this._err(R.missingEndTagName),this.state=x.DATA;break;case T.EOF:this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_ATTRIBUTE_NAME;break;case T.SOLIDUS:this.state=x.SELF_CLOSING_START_TAG;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentTagToken();break;case T.NULL:this._err(R.unexpectedNullCharacter),t.tagName+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Tn(e)?ur(e):e)}}_stateRcdataLessThanSign(e){e===T.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){ft(e)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case T.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case T.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===T.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){ft(e)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case T.SOLIDUS:this.state=x.SCRIPT_DATA_END_TAG_OPEN;break;case T.EXCLAMATION_MARK:this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){ft(e)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case T.HYPHEN_MINUS:this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case T.GREATER_THAN_SIGN:this.state=x.SCRIPT_DATA,this._emitChars(">");break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===T.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ft(e)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ft(e)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Le.SCRIPT,!1)&&na(this.preprocessor.peek(Le.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Le.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case T.HYPHEN_MINUS:this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case T.GREATER_THAN_SIGN:this.state=x.SCRIPT_DATA,this._emitChars(">");break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===T.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Le.SCRIPT,!1)&&na(this.preprocessor.peek(Le.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Le.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case T.EQUALS_SIGN:this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case T.EQUALS_SIGN:this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break;case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(Tn(e)?ur(e):e)}}_stateAfterAttributeName(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:this.state=x.SELF_CLOSING_START_TAG;break;case T.EQUALS_SIGN:this.state=x.BEFORE_ATTRIBUTE_VALUE;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentTagToken();break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case T.APOSTROPHE:this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break;default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case T.APOSTROPHE:this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break;case T.AMPERSAND:this._startCharacterReference();break;case T.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break;case T.SOLIDUS:this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break;case T.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case T.GREATER_THAN_SIGN:{const t=this.currentToken;t.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case T.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Le.DASH_DASH,!0)?(this._createCommentToken(Le.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(Le.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Le.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(Le.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(Le.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_START_DASH;break;case T.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=x.DATA;const t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END;break;case T.GREATER_THAN_SIGN:this._err(R.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END_DASH;break;case T.LESS_THAN_SIGN:t.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case T.EXCLAMATION_MARK:t.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break;case T.LESS_THAN_SIGN:t.data+="<";break;default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==T.GREATER_THAN_SIGN&&e!==T.EOF&&this._err(R.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END;break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentComment(t);break;case T.EXCLAMATION_MARK:this.state=x.COMMENT_END_BANG;break;case T.HYPHEN_MINUS:t.data+="-";break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:t.data+="--!",this.state=x.COMMENT_END_DASH;break;case T.GREATER_THAN_SIGN:this._err(R.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=x.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_DOCTYPE_NAME;break;case T.GREATER_THAN_SIGN:this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case T.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Tn(e))this._createDoctypeToken(String.fromCharCode(ur(e))),this.state=x.DOCTYPE_NAME;else switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:this._err(R.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=x.DOCTYPE_NAME;break;case T.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break}case T.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=x.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.AFTER_DOCTYPE_NAME;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.NULL:this._err(R.unexpectedNullCharacter),t.name+="�";break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Tn(e)?ur(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Le.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Le.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case T.APOSTROPHE:this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.QUOTATION_MARK:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.QUOTATION_MARK:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case T.APOSTROPHE:this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.NULL:this._err(R.unexpectedNullCharacter);break;case T.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case T.RIGHT_SQUARE_BRACKET:this.state=x.CDATA_SECTION_BRACKET;break;case T.EOF:this._err(R.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===T.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA;break;case T.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=x.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ta(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){ta(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===T.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},fo=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),ra=new Set([...fo,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),yr=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Xm=new Set([...yr,c.OL,c.UL]),Zm=new Set([...yr,c.BUTTON]),ia=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),sa=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),Jm=new Set([c.TR,c.TEMPLATE,c.HTML]),ef=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),tf=new Set([c.TABLE,c.TEMPLATE,c.HTML]),nf=new Set([c.TD,c.TH]),rf=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==M.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Si,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(nf,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(tf,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ef,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(Jm,M.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case M.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case M.SVG:if(sa.has(r))return!1;break;case M.MATHML:if(ia.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,yr)}hasInListItemScope(e){return this.hasInDynamicScope(e,Xm)}hasInButtonScope(e){return this.hasInDynamicScope(e,Zm)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case M.HTML:if(Si.has(t))return!0;if(yr.has(t))return!1;break;case M.SVG:if(sa.has(t))return!1;break;case M.MATHML:if(ia.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===M.HTML)switch(this.tagIDs[e]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&fo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ra.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&ra.has(this.currentTagId);)this.pop()}},ni=3,Ze;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ze||(Ze={}));var aa={type:Ze.Marker},sf=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,i=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a<this.entries.length;a++){const l=this.entries[a];if(l.type===Ze.Marker)break;const{element:o}=l;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===s){const u=this.treeAdapter.getAttrList(o);u.length===r&&n.push({idx:a,attrs:u})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<ni)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<ni)return;const r=new Map(t.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<n.length;s++){const a=n[s];a.attrs.every(l=>r.get(l.name)===l.value)&&(i+=1,i>=ni&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(aa)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Ze.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Ze.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(aa);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(n=>n.type===Ze.Marker||this.treeAdapter.getTagName(n.element)===e);return t&&t.type===Ze.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Ze.Element&&t.element===e)}},pt={createDocument(){return{nodeName:"#document",mode:Ue.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};pt.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(pt.isTextNode(n)){n.value+=t;return}}pt.appendChild(e,pt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pt.isTextNode(r)?r.value+=t:pt.insertBefore(e,pt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},po="html",af="about:legacy-compat",lf="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",go=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],of=[...go,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],cf=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Eo=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],uf=[...Eo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function la(e,t){return t.some(n=>e.startsWith(n))}function hf(e){return e.name===po&&e.publicId===null&&(e.systemId===null||e.systemId===af)}function df(e){if(e.name!==po)return Ue.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===lf)return Ue.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),cf.has(n))return Ue.QUIRKS;let r=t===null?of:go;if(la(n,r))return Ue.QUIRKS;if(r=t===null?Eo:uf,la(n,r))return Ue.LIMITED_QUIRKS}return Ue.NO_QUIRKS}var oa={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},mf="definitionurl",ff="definitionURL",pf=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),gf=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),Ef=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Tf=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function bf(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:n})=>n===Ot.COLOR||n===Ot.SIZE||n===Ot.FACE)||Tf.has(t)}function To(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===mf){e.attrs[t].name=ff;break}}function bo(e){for(let t=0;t<e.attrs.length;t++){const n=pf.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function rs(e){for(let t=0;t<e.attrs.length;t++){const n=gf.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function xf(e){const t=Ef.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=rn(e.tagName))}function kf(e,t){return t===M.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function yf(e,t,n){if(t===M.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ot.ENCODING){const i=n[r].value.toLowerCase();return i===oa.TEXT_HTML||i===oa.APPLICATION_XML}}return t===M.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function Cf(e,t,n,r){return(!r||r===M.HTML)&&yf(e,t,n)||(!r||r===M.MATHML)&&kf(e,t)}var _f="hidden",Af=8,Nf=3,k;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(k||(k={}));var vf={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},xo=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),ca={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pt,onParseError:null},ua=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=k.INITIAL,this.originalInsertionMode=k.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ca,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Km(this.options,this),this.activeFormattingElements=new sf(this.treeAdapter),this.fragmentContextID=n?rn(this.treeAdapter.getTagName(n)):c.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new rf(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...ca,...t};e!=null||(e=n.treeAdapter.createElement(L.TEMPLATE,M.HTML,[]));const r=n.treeAdapter.createElement("documentmock",M.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===c.TEMPLATE&&i.tmplInsertionModeStack.unshift(k.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const i=(r=e.location)!==null&&r!==void 0?r:vf,s={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)===null||i===void 0||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)===null||r===void 0||r.call(n,e,this.openElements.current),t){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===M.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,M.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=k.TEXT}switchToPlaintextParsing(){this.insertionMode=k.TEXT,this.originalInsertionMode=k.IN_BODY,this.tokenizer.state=be.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===L.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:this.tokenizer.state=be.RCDATA;break;case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:this.tokenizer.state=be.RAWTEXT;break;case c.SCRIPT:this.tokenizer.state=be.SCRIPT_DATA;break;case c.PLAINTEXT:this.tokenizer.state=be.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const i=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));i&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,M.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,M.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(L.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:s,endCol:a,endOffset:l}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:s,endCol:a,endOffset:l})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===te.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(t)===L.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===M.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,M.HTML)}_processToken(e){switch(e.type){case te.CHARACTER:this.onCharacter(e);break;case te.NULL_CHARACTER:this.onNullCharacter(e);break;case te.COMMENT:this.onComment(e);break;case te.DOCTYPE:this.onDoctype(e);break;case te.START_TAG:this._processStartTag(e);break;case te.END_TAG:this.onEndTag(e);break;case te.EOF:this.onEof(e);break;case te.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){const r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return Cf(e,r,i,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(r=>r.type===Ze.Marker||this.openElements.contains(r.element)),n=t===-1?e-1:t-1;for(let r=n;r>=0;r--){const i=this.activeFormattingElements.entries[r];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=k.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case c.TR:this.insertionMode=k.IN_ROW;return;case c.TBODY:case c.THEAD:case c.TFOOT:this.insertionMode=k.IN_TABLE_BODY;return;case c.CAPTION:this.insertionMode=k.IN_CAPTION;return;case c.COLGROUP:this.insertionMode=k.IN_COLUMN_GROUP;return;case c.TABLE:this.insertionMode=k.IN_TABLE;return;case c.BODY:this.insertionMode=k.IN_BODY;return;case c.FRAMESET:this.insertionMode=k.IN_FRAMESET;return;case c.SELECT:this._resetInsertionModeForSelect(e);return;case c.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case c.HTML:this.insertionMode=this.headElement?k.AFTER_HEAD:k.BEFORE_HEAD;return;case c.TD:case c.TH:if(e>0){this.insertionMode=k.IN_CELL;return}break;case c.HEAD:if(e>0){this.insertionMode=k.IN_HEAD;return}}this.insertionMode=k.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const n=this.openElements.tagIDs[t];if(n===c.TEMPLATE)break;if(n===c.TABLE){this.insertionMode=k.IN_SELECT_IN_TABLE;return}}this.insertionMode=k.IN_SELECT}_isElementCausesFosterParenting(e){return xo.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case c.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Vm[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rg(this,e);return}switch(this.insertionMode){case k.INITIAL:dn(this,e);break;case k.BEFORE_HTML:kn(this,e);break;case k.BEFORE_HEAD:yn(this,e);break;case k.IN_HEAD:Cn(this,e);break;case k.IN_HEAD_NO_SCRIPT:_n(this,e);break;case k.AFTER_HEAD:An(this,e);break;case k.IN_BODY:case k.IN_CAPTION:case k.IN_CELL:case k.IN_TEMPLATE:yo(this,e);break;case k.TEXT:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:ri(this,e);break;case k.IN_TABLE_TEXT:So(this,e);break;case k.IN_COLUMN_GROUP:Cr(this,e);break;case k.AFTER_BODY:_r(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ng(this,e);return}switch(this.insertionMode){case k.INITIAL:dn(this,e);break;case k.BEFORE_HTML:kn(this,e);break;case k.BEFORE_HEAD:yn(this,e);break;case k.IN_HEAD:Cn(this,e);break;case k.IN_HEAD_NO_SCRIPT:_n(this,e);break;case k.AFTER_HEAD:An(this,e);break;case k.TEXT:this._insertCharacters(e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:ri(this,e);break;case k.IN_COLUMN_GROUP:Cr(this,e);break;case k.AFTER_BODY:_r(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ii(this,e);return}switch(this.insertionMode){case k.INITIAL:case k.BEFORE_HTML:case k.BEFORE_HEAD:case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:case k.IN_BODY:case k.IN_TABLE:case k.IN_CAPTION:case k.IN_COLUMN_GROUP:case k.IN_TABLE_BODY:case k.IN_ROW:case k.IN_CELL:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:case k.IN_TEMPLATE:case k.IN_FRAMESET:case k.AFTER_FRAMESET:Ii(this,e);break;case k.IN_TABLE_TEXT:mn(this,e);break;case k.AFTER_BODY:Df(this,e);break;case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:Pf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case k.INITIAL:Mf(this,e);break;case k.BEFORE_HEAD:case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:this._err(e,R.misplacedDoctype);break;case k.IN_TABLE_TEXT:mn(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?ig(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case k.INITIAL:dn(this,e);break;case k.BEFORE_HTML:Bf(this,e);break;case k.BEFORE_HEAD:jf(this,e);break;case k.IN_HEAD:Ve(this,e);break;case k.IN_HEAD_NO_SCRIPT:zf(this,e);break;case k.AFTER_HEAD:qf(this,e);break;case k.IN_BODY:_e(this,e);break;case k.IN_TABLE:Jt(this,e);break;case k.IN_TABLE_TEXT:mn(this,e);break;case k.IN_CAPTION:Hp(this,e);break;case k.IN_COLUMN_GROUP:as(this,e);break;case k.IN_TABLE_BODY:zr(this,e);break;case k.IN_ROW:$r(this,e);break;case k.IN_CELL:$p(this,e);break;case k.IN_SELECT:Lo(this,e);break;case k.IN_SELECT_IN_TABLE:Yp(this,e);break;case k.IN_TEMPLATE:Wp(this,e);break;case k.AFTER_BODY:Gp(this,e);break;case k.IN_FRAMESET:Kp(this,e);break;case k.AFTER_FRAMESET:Zp(this,e);break;case k.AFTER_AFTER_BODY:eg(this,e);break;case k.AFTER_AFTER_FRAMESET:tg(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?sg(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case k.INITIAL:dn(this,e);break;case k.BEFORE_HTML:Ff(this,e);break;case k.BEFORE_HEAD:Hf(this,e);break;case k.IN_HEAD:Uf(this,e);break;case k.IN_HEAD_NO_SCRIPT:$f(this,e);break;case k.AFTER_HEAD:Yf(this,e);break;case k.IN_BODY:Ur(this,e);break;case k.TEXT:wp(this,e);break;case k.IN_TABLE:Hn(this,e);break;case k.IN_TABLE_TEXT:mn(this,e);break;case k.IN_CAPTION:Up(this,e);break;case k.IN_COLUMN_GROUP:zp(this,e);break;case k.IN_TABLE_BODY:wi(this,e);break;case k.IN_ROW:wo(this,e);break;case k.IN_CELL:qp(this,e);break;case k.IN_SELECT:Ro(this,e);break;case k.IN_SELECT_IN_TABLE:Vp(this,e);break;case k.IN_TEMPLATE:Qp(this,e);break;case k.AFTER_BODY:Do(this,e);break;case k.IN_FRAMESET:Xp(this,e);break;case k.AFTER_FRAMESET:Jp(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onEof(e){switch(this.insertionMode){case k.INITIAL:dn(this,e);break;case k.BEFORE_HTML:kn(this,e);break;case k.BEFORE_HEAD:yn(this,e);break;case k.IN_HEAD:Cn(this,e);break;case k.IN_HEAD_NO_SCRIPT:_n(this,e);break;case k.AFTER_HEAD:An(this,e);break;case k.IN_BODY:case k.IN_TABLE:case k.IN_CAPTION:case k.IN_COLUMN_GROUP:case k.IN_TABLE_BODY:case k.IN_ROW:case k.IN_CELL:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:No(this,e);break;case k.TEXT:Lp(this,e);break;case k.IN_TABLE_TEXT:mn(this,e);break;case k.IN_TEMPLATE:Oo(this,e);break;case k.AFTER_BODY:case k.IN_FRAMESET:case k.AFTER_FRAMESET:case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:ss(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===T.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:case k.TEXT:case k.IN_COLUMN_GROUP:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:case k.IN_FRAMESET:case k.AFTER_FRAMESET:this._insertCharacters(e);break;case k.IN_BODY:case k.IN_CAPTION:case k.IN_CELL:case k.IN_TEMPLATE:case k.AFTER_BODY:case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:ko(this,e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:ri(this,e);break;case k.IN_TABLE_TEXT:vo(this,e)}}};function Sf(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ao(e,t),n}function If(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function wf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const l=e.activeFormattingElements.getElementEntry(a),o=l&&s>=Nf;!l||o?(o&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(a)):(a=Lf(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Lf(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Rf(e,t,n){const r=e.treeAdapter.getTagName(t),i=rn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&s===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Of(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function is(e,t){for(let n=0;n<Af;n++){const r=Sf(e,t);if(!r)break;const i=If(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=wf(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&Rf(e,a,s),Of(e,i,r)}}function Ii(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Df(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Pf(e,t){e._appendCommentNode(t,e.document)}function ss(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function Mf(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ue.QUIRKS:df(t);hf(t)||e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=k.BEFORE_HTML}function dn(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ue.QUIRKS),e.insertionMode=k.BEFORE_HTML,e._processToken(t)}function Bf(e,t){t.tagID===c.HTML?(e._insertElement(t,M.HTML),e.insertionMode=k.BEFORE_HEAD):kn(e,t)}function Ff(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&kn(e,t)}function kn(e,t){e._insertFakeRootElement(),e.insertionMode=k.BEFORE_HEAD,e._processToken(t)}function jf(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.HEAD:e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=k.IN_HEAD;break;default:yn(e,t)}}function Hf(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?yn(e,t):e._err(t,R.endTagWithoutMatchingOpenElement)}function yn(e,t){e._insertFakeElement(L.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=k.IN_HEAD,e._processToken(t)}function Ve(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TITLE:e._switchToTextParsing(t,be.RCDATA);break;case c.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=k.IN_HEAD_NO_SCRIPT);break;case c.NOFRAMES:case c.STYLE:e._switchToTextParsing(t,be.RAWTEXT);break;case c.SCRIPT:e._switchToTextParsing(t,be.SCRIPT_DATA);break;case c.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=k.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(k.IN_TEMPLATE);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:Cn(e,t)}}function Uf(e,t){switch(t.tagID){case c.HEAD:e.openElements.pop(),e.insertionMode=k.AFTER_HEAD;break;case c.BODY:case c.BR:case c.HTML:Cn(e,t);break;case c.TEMPLATE:Ft(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Ft(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function Cn(e,t){e.openElements.pop(),e.insertionMode=k.AFTER_HEAD,e._processToken(t)}function zf(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:Ve(e,t);break;case c.NOSCRIPT:e._err(t,R.nestedNoscriptInHead);break;default:_n(e,t)}}function $f(e,t){switch(t.tagID){case c.NOSCRIPT:e.openElements.pop(),e.insertionMode=k.IN_HEAD;break;case c.BR:_n(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function _n(e,t){const n=t.type===te.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=k.IN_HEAD,e._processToken(t)}function qf(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.BODY:e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=k.IN_BODY;break;case c.FRAMESET:e._insertElement(t,M.HTML),e.insertionMode=k.IN_FRAMESET;break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:e._err(t,R.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),Ve(e,t),e.openElements.remove(e.headElement);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:An(e,t)}}function Yf(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:An(e,t);break;case c.TEMPLATE:Ft(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function An(e,t){e._insertFakeElement(L.BODY,c.BODY),e.insertionMode=k.IN_BODY,Hr(e,t)}function Hr(e,t){switch(t.type){case te.CHARACTER:yo(e,t);break;case te.WHITESPACE_CHARACTER:ko(e,t);break;case te.COMMENT:Ii(e,t);break;case te.START_TAG:_e(e,t);break;case te.END_TAG:Ur(e,t);break;case te.EOF:No(e,t)}}function ko(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Vf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Wf(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Qf(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_FRAMESET)}function Gf(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function Kf(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Si.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function Xf(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Zf(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function Jf(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function ep(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=be.PLAINTEXT}function tp(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function np(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(L.A);n&&(is(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function rp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ip(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(is(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ap(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ue.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=k.IN_TABLE}function Co(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _o(e){const t=ho(e,Ot.TYPE);return t!=null&&t.toLowerCase()===_f}function lp(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),_o(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function op(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function cp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function up(e,t){t.tagName=L.IMG,t.tagID=c.IMG,Co(e,t)}function hp(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=k.TEXT}function dp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function mp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function ha(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function fp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===k.IN_TABLE||e.insertionMode===k.IN_CAPTION||e.insertionMode===k.IN_TABLE_BODY||e.insertionMode===k.IN_ROW||e.insertionMode===k.IN_CELL?k.IN_SELECT_IN_TABLE:k.IN_SELECT}function pp(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function gp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function Ep(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,M.HTML)}function Tp(e,t){e._reconstructActiveFormattingElements(),To(t),rs(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function bp(e,t){e._reconstructActiveFormattingElements(),bo(t),rs(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function da(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function _e(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:rp(e,t);break;case c.A:np(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:Kf(e,t);break;case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:Gf(e,t);break;case c.LI:case c.DD:case c.DT:Jf(e,t);break;case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:Co(e,t);break;case c.HR:cp(e,t);break;case c.RB:case c.RTC:gp(e,t);break;case c.RT:case c.RP:Ep(e,t);break;case c.PRE:case c.LISTING:Xf(e,t);break;case c.XMP:dp(e,t);break;case c.SVG:bp(e,t);break;case c.HTML:Vf(e,t);break;case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:Ve(e,t);break;case c.BODY:Wf(e,t);break;case c.FORM:Zf(e,t);break;case c.NOBR:ip(e,t);break;case c.MATH:Tp(e,t);break;case c.TABLE:ap(e,t);break;case c.INPUT:lp(e,t);break;case c.PARAM:case c.TRACK:case c.SOURCE:op(e,t);break;case c.IMAGE:up(e,t);break;case c.BUTTON:tp(e,t);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:sp(e,t);break;case c.IFRAME:mp(e,t);break;case c.SELECT:fp(e,t);break;case c.OPTION:case c.OPTGROUP:pp(e,t);break;case c.NOEMBED:case c.NOFRAMES:ha(e,t);break;case c.FRAMESET:Qf(e,t);break;case c.TEXTAREA:hp(e,t);break;case c.NOSCRIPT:e.options.scriptingEnabled?ha(e,t):da(e,t);break;case c.PLAINTEXT:ep(e,t);break;case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:da(e,t)}}function xp(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=k.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function kp(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=k.AFTER_BODY,Do(e,t))}function yp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Cp(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function _p(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(L.P,c.P),e._closePElement()}function Ap(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function Np(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Sp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Ip(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(L.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Ao(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function Ur(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:is(e,t);break;case c.P:_p(e);break;case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:yp(e,t);break;case c.LI:Ap(e);break;case c.DD:case c.DT:Np(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:vp(e);break;case c.BR:Ip(e);break;case c.BODY:xp(e,t);break;case c.HTML:kp(e,t);break;case c.FORM:Cp(e);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:Sp(e,t);break;case c.TEMPLATE:Ft(e,t);break;default:Ao(e,t)}}function No(e,t){e.tmplInsertionModeStack.length>0?Oo(e,t):ss(e,t)}function wp(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Lp(e,t){e._err(t,R.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ri(e,t){if(e.openElements.currentTagId!==void 0&&xo.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=k.IN_TABLE_TEXT,t.type){case te.CHARACTER:So(e,t);break;case te.WHITESPACE_CHARACTER:vo(e,t)}else Zn(e,t)}function Rp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_CAPTION}function Op(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_COLUMN_GROUP}function Dp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.COLGROUP,c.COLGROUP),e.insertionMode=k.IN_COLUMN_GROUP,as(e,t)}function Pp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_TABLE_BODY}function Mp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.TBODY,c.TBODY),e.insertionMode=k.IN_TABLE_BODY,zr(e,t)}function Bp(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Fp(e,t){_o(t)?e._appendElement(t,M.HTML):Zn(e,t),t.ackSelfClosing=!0}function jp(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Jt(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:Mp(e,t);break;case c.STYLE:case c.SCRIPT:case c.TEMPLATE:Ve(e,t);break;case c.COL:Dp(e,t);break;case c.FORM:jp(e,t);break;case c.TABLE:Bp(e,t);break;case c.TBODY:case c.TFOOT:case c.THEAD:Pp(e,t);break;case c.INPUT:Fp(e,t);break;case c.CAPTION:Rp(e,t);break;case c.COLGROUP:Op(e,t);break;default:Zn(e,t)}}function Hn(e,t){switch(t.tagID){case c.TABLE:e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break;case c.TEMPLATE:Ft(e,t);break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Zn(e,t)}}function Zn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Hr(e,t),e.fosterParentingEnabled=n}function vo(e,t){e.pendingCharacterTokens.push(t)}function So(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function mn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Zn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Io=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Hp(e,t){const n=t.tagID;Io.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_TABLE,Jt(e,t)):_e(e,t)}function Up(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_TABLE,n===c.TABLE&&Hn(e,t));break;case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Ur(e,t)}}function as(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.COL:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TEMPLATE:Ve(e,t);break;default:Cr(e,t)}}function zp(e,t){switch(t.tagID){case c.COLGROUP:e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=k.IN_TABLE);break;case c.TEMPLATE:Ft(e,t);break;case c.COL:break;default:Cr(e,t)}}function Cr(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=k.IN_TABLE,e._processToken(t))}function zr(e,t){switch(t.tagID){case c.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_ROW;break;case c.TH:case c.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(L.TR,c.TR),e.insertionMode=k.IN_ROW,$r(e,t);break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE,Jt(e,t));break;default:Jt(e,t)}}function wi(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE);break;case c.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE,Hn(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:Hn(e,t)}}function $r(e,t){switch(t.tagID){case c.TH:case c.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_CELL,e.activeFormattingElements.insertMarker();break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,zr(e,t));break;default:Jt(e,t)}}function wo(e,t){switch(t.tagID){case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY);break;case c.TABLE:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,wi(e,t));break;case c.TBODY:case c.TFOOT:case c.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,wi(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:Hn(e,t)}}function $p(e,t){const n=t.tagID;Io.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),$r(e,t)):_e(e,t)}function qp(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_ROW);break;case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),wo(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:Ur(e,t)}}function Lo(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.OPTGROUP:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.HR:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break;case c.SCRIPT:case c.TEMPLATE:Ve(e,t)}}function Ro(e,t){switch(t.tagID){case c.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break;case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break;case c.TEMPLATE:Ft(e,t)}}function Yp(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Lo(e,t)}function Vp(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ro(e,t)}function Wp(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:Ve(e,t);break;case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.tmplInsertionModeStack[0]=k.IN_TABLE,e.insertionMode=k.IN_TABLE,Jt(e,t);break;case c.COL:e.tmplInsertionModeStack[0]=k.IN_COLUMN_GROUP,e.insertionMode=k.IN_COLUMN_GROUP,as(e,t);break;case c.TR:e.tmplInsertionModeStack[0]=k.IN_TABLE_BODY,e.insertionMode=k.IN_TABLE_BODY,zr(e,t);break;case c.TD:case c.TH:e.tmplInsertionModeStack[0]=k.IN_ROW,e.insertionMode=k.IN_ROW,$r(e,t);break;default:e.tmplInsertionModeStack[0]=k.IN_BODY,e.insertionMode=k.IN_BODY,_e(e,t)}}function Qp(e,t){t.tagID===c.TEMPLATE&&Ft(e,t)}function Oo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ss(e,t)}function Gp(e,t){t.tagID===c.HTML?_e(e,t):_r(e,t)}function Do(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=k.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else _r(e,t)}function _r(e,t){e.insertionMode=k.IN_BODY,Hr(e,t)}function Kp(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.FRAMESET:e._insertElement(t,M.HTML);break;case c.FRAME:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.NOFRAMES:Ve(e,t)}}function Xp(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=k.AFTER_FRAMESET))}function Zp(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.NOFRAMES:Ve(e,t)}}function Jp(e,t){t.tagID===c.HTML&&(e.insertionMode=k.AFTER_AFTER_FRAMESET)}function eg(e,t){t.tagID===c.HTML?_e(e,t):br(e,t)}function br(e,t){e.insertionMode=k.IN_BODY,Hr(e,t)}function tg(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.NOFRAMES:Ve(e,t)}}function ng(e,t){t.chars="�",e._insertCharacters(t)}function rg(e,t){e._insertCharacters(t),e.framesetOk=!1}function Po(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ig(e,t){if(bf(t))Po(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?To(t):r===M.SVG&&(xf(t),bo(t)),rs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function sg(e,t){if(t.tagID===c.P||t.tagID===c.BR){Po(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}var R1=new Set([L.AREA,L.BASE,L.BASEFONT,L.BGSOUND,L.BR,L.COL,L.EMBED,L.FRAME,L.HR,L.IMG,L.INPUT,L.KEYGEN,L.LINK,L.META,L.PARAM,L.SOURCE,L.TRACK,L.WBR]),qr=Mo("end"),nt=Mo("start");function Mo(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 Bo(e){const t=nt(e),n=qr(e);if(t&&n)return{start:t,end:n}}var ag=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,lg=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ma={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Fo(e,t){const n=Eg(e),r=ao("type",{handlers:{root:og,element:cg,text:ug,comment:Ho,doctype:hg,raw:mg},unknown:fg}),i={parser:n?new ua(ma):ua.getFragmentParser(void 0,ma),handle(l){r(l,i)},stitches:!1,options:t||{}};r(e,i),sn(i,nt());const s=n?i.parser.document:i.parser.getFragment(),a=Em(s,{file:i.options.file});return i.stitches&&et(a,"comment",function(l,o,u){const m=l;if(m.value.stitch&&u&&o!==void 0){const d=u.children;return d[o]=m.value.stitch,o}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function jo(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function og(e,t){jo(e.children,t)}function cg(e,t){pg(e,t),jo(e.children,t),gg(e,t)}function ug(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:te.CHARACTER,chars:e.value,location:Jn(e)};sn(t,nt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hg(e,t){const n={type:te.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Jn(e)};sn(t,nt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function dg(e,t){t.stitches=!0;const n=Tg(e);"children"in e&&"children"in n&&(n.children=Fo({type:"root",children:e.children},t.options).children),Ho({type:"comment",value:{stitch:n}},t)}function Ho(e,t){const n=e.value,r={type:te.COMMENT,data:n,location:Jn(e)};sn(t,nt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function mg(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Uo(t,nt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ag,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function fg(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))dg(n,t);else{let r="";throw lg.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function sn(e,t){Uo(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=be.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Uo(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function pg(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===be.PLAINTEXT)return;sn(t,nt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Rt.html;i===Rt.html&&n==="svg"&&(i=Rt.svg);const s=ym({...e,children:[]},{space:i===Rt.svg?"svg":"html"}),a={type:te.START_TAG,tagName:n,tagID:rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:Jn(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function gg(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&wm.includes(n)||t.parser.tokenizer.state===be.PLAINTEXT)return;sn(t,qr(e));const r={type:te.END_TAG,tagName:n,tagID:rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Jn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===be.RCDATA||t.parser.tokenizer.state===be.RAWTEXT||t.parser.tokenizer.state===be.SCRIPT_DATA)&&(t.parser.tokenizer.state=be.DATA)}function Eg(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Jn(e){const t=nt(e)||{line:void 0,column:void 0,offset:void 0},n=qr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Tg(e){return"children"in e?Dt({...e,children:[]}):Dt(e)}function Li(e){return function(t,n){return Fo(t,{...e,file:n})}}var vt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],wt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vt],h2:[["className","sr-only"]],img:[...vt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vt],table:[...vt],ul:[...vt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},gt={}.hasOwnProperty;function bg(e,t){let n={type:"root",children:[]};const r=zo({schema:t?{...wt,...t}:wt,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function zo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return xg(e,n);case"doctype":return kg(e,n);case"element":return yg(e,n);case"root":return Cg(e,n);case"text":return _g(e,n)}}}function xg(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return er(i,t),i}}function kg(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return er(n,t),n}}function yg(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=$o(e,t.children),i=Ag(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&gt.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let o=-1;for(s=!1;++o<l.length;)e.stack.includes(l[o])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return er(a,t),a}function Cg(e,t){const n={type:"root",children:$o(e,t.children)};return er(n,t),n}function _g(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return er(n,t),n}function $o(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=zo(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function Ag(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&gt.call(r,n)?r[n]:void 0,a=r&&gt.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},o={};let u;for(u in l)if(gt.call(l,u)){const m=l[u];let d=fa(e,pa(s,u),u,m);d==null&&(d=fa(e,pa(a,u),u,m)),d!=null&&(o[u]=d)}if(i&&gt.call(i,n)){const m=i[n];for(u in m)gt.call(m,u)&&!gt.call(o,u)&&(o[u]=m[u])}return o}function fa(e,t,n,r){return t?Array.isArray(r)?Ng(e,t,n,r):qo(e,t,n,r):void 0}function Ng(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=qo(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function qo(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&vg(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function vg(e,t,n){const r=e.schema.protocols&&gt.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),l=i.indexOf("#"),o=i.indexOf("/");if(s<0||o>-1&&s>o||a>-1&&s>a||l>-1&&s>l)return!0;let u=-1;for(;++u<r.length;){const m=r[u];if(s===m.length&&i.slice(0,m.length)===m)return!0}return!1}function er(e,t){const n=Bo(t);t.data&&(e.data=Dt(t.data)),n&&(e.position=n)}function pa(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Yo(e){return function(t){return bg(t,e)}}function ga(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}var ve=Ct(/[A-Za-z]/),Ce=Ct(/[\dA-Za-z]/),Sg=Ct(/[#-'*+\--9=?A-Z^-~]/);function Ar(e){return e!==null&&(e<32||e===127)}var Ri=Ct(/\d/),Ig=Ct(/[\dA-Fa-f]/),wg=Ct(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function re(e){return e===-2||e===-1||e===32}var Yr=Ct(/\p{P}|\p{S}/u),Pt=Ct(/\s/);function Ct(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Lg(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Rg(e,t,n){const r=Br((n||{}).ignore||[]),i=Og(t);let s=-1;for(;++s<i.length;)Ji(e,"text",a);function a(o,u){let m=-1,d;for(;++m<u.length;){const f=u[m],p=d?d.children:void 0;if(r(f,p?p.indexOf(f):void 0,d))return;d=f}if(d)return l(o,u)}function l(o,u){const m=u[u.length-1],d=i[s][0],f=i[s][1];let p=0;const g=m.children.indexOf(o);let N=!1,C=[];d.lastIndex=0;let b=d.exec(o.value);for(;b;){const A=b.index,v={index:b.index,input:b.input,stack:[...u,o]};let w=f(...b,v);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?d.lastIndex=A+1:(p!==A&&C.push({type:"text",value:o.value.slice(p,A)}),Array.isArray(w)?C.push(...w):w&&C.push(w),p=A+b[0].length,N=!0),!d.global)break;b=d.exec(o.value)}return N?(p<o.value.length&&C.push({type:"text",value:o.value.slice(p)}),m.children.splice(g,1,...C)):C=[o],g+C.length}}function Og(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([Dg(i[0]),Pg(i[1])])}return t}function Dg(e){return typeof e=="string"?new RegExp(Lg(e),"g"):e}function Pg(e){return typeof e=="function"?e:function(){return e}}var ii="phrasing",si=["autolink","link","image","label"];function Mg(){return{transforms:[$g],enter:{literalAutolink:Fg,literalAutolinkEmail:ai,literalAutolinkHttp:ai,literalAutolinkWww:ai},exit:{literalAutolink:zg,literalAutolinkEmail:Ug,literalAutolinkHttp:jg,literalAutolinkWww:Hg}}}function Bg(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ii,notInConstruct:si},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ii,notInConstruct:si},{character:":",before:"[ps]",after:"\\/",inConstruct:ii,notInConstruct:si}]}}function Fg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ai(e){this.config.enter.autolinkProtocol.call(this,e)}function jg(e){this.config.exit.autolinkProtocol.call(this,e)}function Hg(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 Ug(e){this.config.exit.autolinkEmail.call(this,e)}function zg(e){this.exit(e)}function $g(e){Rg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qg],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Yg]],{ignore:["link","linkReference"]})}function qg(e,t,n,r,i){let s="";if(!Vo(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Vg(n)))return!1;const a=Wg(n+r);if(!a[0])return!1;const l={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function Yg(e,t,n,r){return!Vo(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vg(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 Wg(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=ga(e,"(");let s=ga(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Vo(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pt(n)||Yr(n))&&(!t||n!==47)}function Ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Wo.peek=nE;function Qg(){this.buffer()}function Gg(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kg(){this.buffer()}function Xg(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Zg(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jg(e){this.exit(e)}function eE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tE(e){this.exit(e)}function nE(){return"["}function Wo(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),l(),a(),s+=i.move("]"),s}function rE(){return{enter:{gfmFootnoteCallString:Qg,gfmFootnoteCall:Gg,gfmFootnoteDefinitionLabelString:Kg,gfmFootnoteDefinition:Xg},exit:{gfmFootnoteCallString:Zg,gfmFootnoteCall:Jg,gfmFootnoteDefinitionLabelString:eE,gfmFootnoteDefinition:tE}}}function iE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Wo},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const l=s.createTracker(a);let o=l.move("[^");const u=s.enter("footnoteDefinition"),m=s.enter("label");return o+=l.move(s.safe(s.associationId(r),{before:o,after:"]"})),m(),o+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),o+=l.move((t?`
4
- `:" ")+s.indentLines(s.containerFlow(r,l.current()),t?Qo:sE))),u(),o}}function sE(e,t,n){return t===0?e:Qo(e,t,n)}function Qo(e,t,n){return(n?"":" ")+e}var aE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Go.peek=hE;function lE(){return{canContainEols:["delete"],enter:{strikethrough:cE},exit:{strikethrough:uE}}}function oE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aE}],handlers:{delete:Go}}}function cE(e){this.enter({type:"delete",children:[]},e)}function uE(e){this.exit(e)}function Go(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function hE(){return"~"}function dE(e){return e.length}function mE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||dE,s=[],a=[],l=[],o=[];let u=0,m=-1;for(;++m<e.length;){const N=[],C=[];let b=-1;for(e[m].length>u&&(u=e[m].length);++b<e[m].length;){const A=fE(e[m][b]);if(n.alignDelimiters!==!1){const v=i(A);C[b]=v,(o[b]===void 0||v>o[b])&&(o[b]=v)}N.push(A)}a[m]=N,l[m]=C}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)s[d]=Ea(r[d]);else{const N=Ea(r);for(;++d<u;)s[d]=N}d=-1;const f=[],p=[];for(;++d<u;){const N=s[d];let C="",b="";N===99?(C=":",b=":"):N===108?C=":":N===114&&(b=":");let A=n.alignDelimiters===!1?1:Math.max(1,o[d]-C.length-b.length);const v=C+"-".repeat(A)+b;n.alignDelimiters!==!1&&(A=C.length+A+b.length,A>o[d]&&(o[d]=A),p[d]=A),f[d]=v}a.splice(1,0,f),l.splice(1,0,p),m=-1;const g=[];for(;++m<a.length;){const N=a[m],C=l[m];d=-1;const b=[];for(;++d<u;){const A=N[d]||"";let v="",w="";if(n.alignDelimiters!==!1){const O=o[d]-(C[d]||0),I=s[d];I===114?v=" ".repeat(O):I===99?O%2?(v=" ".repeat(O/2+.5),w=" ".repeat(O/2-.5)):(v=" ".repeat(O/2),w=v):w=" ".repeat(O)}n.delimiterStart!==!1&&!d&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||d)&&b.push(" "),n.alignDelimiters!==!1&&b.push(v),b.push(A),n.alignDelimiters!==!1&&b.push(w),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&b.push("|")}g.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return g.join(`
5
- `)}function fE(e){return e==null?"":String(e)}function Ea(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 pE(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),gE);return i(),a}function gE(e,t,n){return">"+(n?"":" ")+e}function EE(e,t){return Ta(e,t.inConstruct,!0)&&!Ta(e,t.notInConstruct,!1)}function Ta(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 ba(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
6
- `&&EE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
7
- `}function TE(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function bE(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 xE(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 kE(e,t,n,r){const i=xE(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(bE(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,yE);return d(),f}const l=n.createTracker(r),o=i.repeat(Math.max(TE(s,i)+1,3)),u=n.enter("codeFenced");let m=l.move(o);if(e.lang){const d=n.enter(`codeFencedLang${a}`);m+=l.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);m+=l.move(" "),m+=l.move(n.safe(e.meta,{before:m,after:`
8
- `,encode:["`"],...l.current()})),d()}return m+=l.move(`
9
- `),s&&(m+=l.move(s+`
10
- `)),m+=l.move(o),u(),m}function yE(e,t,n){return(n?"":" ")+e}function ls(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 CE(e,t,n,r){const i=ls(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const o=n.createTracker(r);let u=o.move("[");return u+=o.move(n.safe(n.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":`
11
- `,...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),a(),u}function _E(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 Un(e){return"&#x"+e.toString(16).toUpperCase()+";"}function en(e){if(e===null||he(e)||Pt(e))return 1;if(Yr(e))return 2}function Nr(e,t,n){const r=en(e),i=en(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}}Ko.peek=AE;function Ko(e,t,n,r){const i=_E(n),s=n.enter("emphasis"),a=n.createTracker(r),l=a.move(i);let o=a.move(n.containerPhrasing(e,{after:i,before:l,...a.current()}));const u=o.charCodeAt(0),m=Nr(r.before.charCodeAt(r.before.length-1),u,i);m.inside&&(o=Un(u)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Nr(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+Un(d));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:m.outside},l+o+p}function AE(e,t,n){return n.options.emphasis||"*"}var NE={};function os(e,t){const n=t||NE;return Xo(e,typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,typeof n.includeHtml=="boolean"?n.includeHtml:!0)}function Xo(e,t,n){if(vE(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 xa(e.children,t,n)}return Array.isArray(e)?xa(e,t,n):""}function xa(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Xo(e[i],t,n);return r.join("")}function vE(e){return!!(e&&typeof e=="object")}function SE(e,t){let n=!1;return et(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,!1}),!!((!e.depth||e.depth<3)&&os(e)&&(t.options.setext||n))}function IE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(SE(e,n)){const m=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-qZDgwznf.js","assets/rolldown-runtime-CXHxssQy.js","assets/icons-0UA1AvNu.js","assets/radix-ui-6dcJ5m4U.js"])))=>i.map(i=>d[i]);
2
+ import{n as Ki,r as Or,t as $n}from"./rolldown-runtime-CXHxssQy.js";import{_ as qn,b as uh,c as Dr,d as hh,g as Ms,h as jo,n as dh,r as mh,t as fh,v as Ho,x as ph}from"./tanstack-C-qfmRNM.js";import{$ as Zr,B as gh,C as Bs,E as Eh,I as Th,L as bh,M as xh,N as Uo,P as kh,Q as zo,S as Fs,V as yh,W as Ch,X as js,_ as _h,b as Ah,c as Hs,ct as Nh,d as vh,g as en,h as $o,i as Xi,k as Sh,l as Ih,lt as wh,nt as Lh,p as Zi,rt as Rh,t as Oh,tt as Dh,u as Ph,v as Mh,w as Bh,y as Ji,z as Fh}from"./icons-0UA1AvNu.js";import{Ot as jh,Tt as Us,a as Hh,c as Uh,d as zh,f as $h,gt as qh,i as Yh,kt as Vh,l as Wh,o as Qh,p as Gh,s as Kh,u as Xh}from"./radix-ui-6dcJ5m4U.js";import{r as Zh}from"./monitoring-B_X9D1H-.js";import{n as Ze}from"./dist-C-7rnx4R.js";import{n as qo,t as Yo}from"./bundle-mjs-BC_8HrWA.js";import{B as Jh,H as J,I as ed,R as td,V as nd,a as ct,c as le,i as Gt,n as Kt,s as rd,t as Xt,y as id}from"./tooltip-1-bWFncb.js";import{t as nt}from"./database.store-BvoUSH8Y.js";import{$ as sd,A as zs,D as Vo,E as Wo,J as ad,M as od,N as ld,O as cd,P as Qo,S as Rn,X as ud,_ as On,b as Dn,f as hd,h as dd,j as md,k as Xe,m as fd,p as pd,q as Go,v as Pn,x as Mn,y as Bn}from"./schema-BNzZaUjg.js";import{a as xt,f as Yn,o as gd,s as Ed}from"./popover-WwEzK7ho.js";import{a as Ko}from"./monaco-editor-CaQyRcyX.js";import{A as Td,D as bd,E as Xo,F as Vn,I as Wn,M as Qn,N as Gn,O as Zo,P as ut,T as Fn,_ as xd,a as kd,b as yd,c as Cd,d as _d,f as Ad,g as Nd,h as vd,i as Sd,j as Id,k as et,l as qt,m as wd,o as Yt,p as Ld,s as $s,v as Rd,w as Od,x as Pr}from"./index-BSNZ1oRs.js";import{i as Mr,r as Dd}from"./toggle-group-CxRlYNqR.js";import{i as Pd,n as Jr,o as Md,r as Bd,s as Fd}from"./redis-value-Dq29EMpv.js";var jd=["Show me all tables in my database","What columns are in the users table?","Write a query to find all active users","How many orders were placed last month?","Find top 5 customers by total spend","Write a JOIN between users and orders","Users who haven't made any purchase yet","Generate monthly revenue summary query","Suggest useful indexes for better performance","Show schema of the products / inventory table","Latest 20 orders with customer names","Help me write a safe UPDATE query"],qs={AUTHOR:"Hüsam 🥑 <devhsmq@gmail.com>",AUTHOR_NAME:"Hüsam",AUTHOR_AVATAR:"/avocado.png",AUTHOR_USERNAME:"husamql3",AUTHOR_GITHUB_LINK:"https://github.com/husamql3",SITE_DESCRIPTION:"The modern pgAdmin alternative that works with every database.",SITE_KEYWORDS:["pgadmin alternative","database client","database gui","database browser","sql editor","postgresql client","mysql client","table editor","ai sql","er diagram"],SITE_TITLE:"db-studio",SITE_NAME:"dbstudio.sh",SITE_URL:"https://dbstudio.sh",SITE_X_LINK:"https://x.com/dbstudio_sh",SITE_GITHUB_LINK:"https://github.com/husamql3/db-studio",SITE_GITHUB_NEW_ISSUE_LINK:"https://github.com/husamql3/db-studio/issues/new/choose",SITE_DOCS_LINK:"https://dbstudio.sh/docs",SITE_CHANGELOG_LINK:"https://dbstudio.sh/changelog",SITE_ROADMAP_LINK:"https://dbstudio.sh/roadmap",SITE_IMAGE:"https://dbstudio.sh/og-image.png",SITE_IMAGE_WIDTH:"1200",SITE_IMAGE_HEIGHT:"630",SITE_IMAGE_ALT:"dbstudio.sh – Modern database management studio",SITE_COLOR:"#1447e6"},E=Or(wh(),1),Jo=Or(jh(),1),h=Vh();function Hd({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return(0,h.jsx)(Gh,{"data-slot":"separator",decorative:n,orientation:t,className:J("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch",e),...r})}var Br=(function(e){if(e==null)return qd;if(typeof e=="function")return Fr(e);if(typeof e=="object")return Array.isArray(e)?Ud(e):zd(e);if(typeof e=="string")return $d(e);throw new Error("Expected function, string, or object as test")});function Ud(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Br(e[n]);return Fr(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function zd(e){const t=e;return Fr(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function $d(e){return Fr(t);function t(n){return n&&n.type===e}}function Fr(e){return t;function t(n,r,i){return!!(Yd(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function qd(){return!0}function Yd(e){return e!==null&&typeof e=="object"&&"type"in e}var el=[];var xn="skip";function es(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Br(i),a=r?-1:1;o(e,void 0,[])();function o(l,u,m){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=el,g,N,C;if((!t||s(l,u,m[m.length-1]||void 0))&&(p=Vd(n(l,m)),p[0]===!1))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!=="skip")for(N=(r?b.children.length:-1)+a,C=m.concat(b);N>-1&&N<b.children.length;){const A=b.children[N];if(g=o(A,N,C)(),g[0]===!1)return g;N=typeof g[1]=="number"?g[1]:N+a}}return p}}}function Vd(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?el:[e]}function tt(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),es(e,s,o,i);function o(l,u){const m=u[u.length-1],d=m?m.children.indexOf(l):void 0;return a(l,d,m)}}var tn={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Wd({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=tn.indicator,imageBlockPolicy:l=tn.indicator}){const u=t.length&&!t.every(d=>d==="*"),m=n.length&&!n.every(d=>d==="*");if(!e&&(u||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const f=Jd(e,t,n,r,i,s,a,o,l);tl(d),tt(d,f)}}function Ys(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Qd(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}var Gd=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Kd=new Set(["javascript:","data:","file:","vbscript:"]);function Vs(e,t,n,r=!1,i=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const l=e.substring(5);if(l&&l.length>0&&l!=="invalid")return e}}catch{return null}return null}const a=Ys(e,n);if(!a||Kd.has(a.protocol)||!(Gd.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const o=Qd(e);return a&&t.some(l=>{const u=Ys(l,n);return!u||u.origin!==a.origin?!1:a.href.startsWith(u.href)})?o?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:o?a.pathname+a.search+a.hash:a.href:null}function tl(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)tl(t)}}var ei=Symbol("node-seen");function Xd(e,t,n){return t===tn.remove?{type:"remove"}:t===tn.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Zd(e,t,n){if(t===tn.remove)return{type:"remove"};if(t===tn.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}var Jd=(e,t,n,r,i,s,a,o,l)=>{const u=(m,d,f)=>{if(m.type!=="element"||m[ei])return!0;if(m.tagName==="a"){const p=Vs(m.properties.href,t,e,!1,!1,i);if(p===null){if(m[ei]=!0,tt(m,u),f&&typeof d=="number"){const g=Xd(m,o,a);if(g.type==="remove")return f.children.splice(d,1),[xn,d];f.children[d]=g.element}return xn}else return m.properties.href=p,m.properties.target="_blank",m.properties.rel="noopener noreferrer",!0}if(m.tagName==="img"){const p=Vs(m.properties.src,n,e,r,!0,i);if(p===null){if(m[ei]=!0,tt(m,u),f&&typeof d=="number"){const g=Zd(m,l,s);if(g.type==="remove")return f.children.splice(d,1),[xn,d];f.children[d]=g.element}return xn}else return m.properties.src=p,!0}return!0};return u},Ws=typeof self=="object"?self:globalThis,em=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case 0:case-1:return n(a,i);case 1:{const o=n([],i);for(const l of a)o.push(r(l));return o}case 2:{const o=n({},i);for(const[l,u]of a)o[r(l)]=r(u);return o}case 3:return n(new Date(a),i);case 4:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case 5:{const o=n(new Map,i);for(const[l,u]of a)o.set(r(l),r(u));return o}case 6:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case 7:{const{name:o,message:l}=a;return n(new Ws[o](l),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new Ws[s](a),i)};return r},Qs=e=>em(new Map,e)(0),Vt="",{toString:tm}={},{keys:nm}=Object,fn=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=tm.call(e).slice(8,-1);switch(n){case"Array":return[1,Vt];case"Object":return[2,Vt];case"Date":return[3,Vt];case"RegExp":return[4,Vt];case"Map":return[5,Vt];case"Set":return[6,Vt];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},cr=([e,t])=>e===0&&(t==="function"||t==="symbol"),rm=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=fn(a);switch(o){case 0:{let m=a;switch(l){case"bigint":o=8,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);m=null;break;case"undefined":return i([-1],a)}return i([o,m],a)}case 1:{if(l){let f=a;return l==="DataView"?f=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(a)),i([l,[...f]],a)}const m=[],d=i([o,m],a);for(const f of a)m.push(s(f));return d}case 2:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const m=[],d=i([o,m],a);for(const f of nm(a))(e||!cr(fn(a[f])))&&m.push([s(f),s(a[f])]);return d}case 3:return i([o,a.toISOString()],a);case 4:{const{source:m,flags:d}=a;return i([o,{source:m,flags:d}],a)}case 5:{const m=[],d=i([o,m],a);for(const[f,p]of a)(e||!(cr(fn(f))||cr(fn(p))))&&m.push([s(f),s(p)]);return d}case 6:{const m=[],d=i([o,m],a);for(const f of a)(e||!cr(fn(f)))&&m.push(s(f));return d}}const{message:u}=a;return i([o,{name:l,message:u}],a)};return s},Gs=(e,{json:t,lossy:n}={})=>{const r=[];return rm(!(t||n),!!t,new Map,r)(e),r},Dt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qs(Gs(e,t)):structuredClone(e):(e,t)=>Qs(Gs(e,t));var Kn=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Kn.prototype.normal={};Kn.prototype.property={};Kn.prototype.space=void 0;function nl(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Kn(n,r,t)}function jn(e){return e.toLowerCase()}var Oe=class{constructor(e,t){this.attribute=t,this.property=e}};Oe.prototype.attribute="";Oe.prototype.booleanish=!1;Oe.prototype.boolean=!1;Oe.prototype.commaOrSpaceSeparated=!1;Oe.prototype.commaSeparated=!1;Oe.prototype.defined=!1;Oe.prototype.mustUseProperty=!1;Oe.prototype.number=!1;Oe.prototype.overloadedBoolean=!1;Oe.prototype.property="";Oe.prototype.spaceSeparated=!1;Oe.prototype.space=void 0;var Ai=Ki({boolean:()=>ee,booleanish:()=>xe,commaOrSpaceSeparated:()=>Be,commaSeparated:()=>Zt,number:()=>j,overloadedBoolean:()=>Ni,spaceSeparated:()=>me}),im=0,ee=Bt(),xe=Bt(),Ni=Bt(),j=Bt(),me=Bt(),Zt=Bt(),Be=Bt();function Bt(){return 2**++im}var ti=Object.keys(Ai),ts=class extends Oe{constructor(e,t,n,r){let i=-1;if(super(e,t),Ks(this,"space",r),typeof n=="number")for(;++i<ti.length;){const s=ti[i];Ks(this,ti[i],(n&Ai[s])===Ai[s])}}};ts.prototype.defined=!0;function Ks(e,t,n){n&&(e[t]=n)}function sn(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new ts(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[jn(r)]=r,n[jn(s.attribute)]=r}return new Kn(t,n,e.space)}var rl=sn({properties:{ariaActiveDescendant:null,ariaAtomic:xe,ariaAutoComplete:null,ariaBusy:xe,ariaChecked:xe,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:xe,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:xe,ariaFlowTo:me,ariaGrabbed:xe,ariaHasPopup:null,ariaHidden:xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:j,ariaLive:null,ariaModal:xe,ariaMultiLine:xe,ariaMultiSelectable:xe,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:xe,ariaReadOnly:xe,ariaRelevant:null,ariaRequired:xe,ariaRoleDescription:me,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:xe,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function il(e,t){return t in e?e[t]:t}function sl(e,t){return il(e,t.toLowerCase())}var sm=sn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zt,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:me,autoFocus:ee,autoPlay:ee,blocking:me,capture:null,charSet:null,checked:ee,cite:null,className:me,cols:j,colSpan:null,content:null,contentEditable:xe,controls:ee,controlsList:me,coords:j|Zt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:Ni,draggable:xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:me,height:j,hidden:Ni,high:j,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:me,itemRef:me,itemScope:ee,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:j,pattern:null,ping:me,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:me,required:ee,reversed:ee,rows:j,rowSpan:j,sandbox:me,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:xe,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:xe,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:sl}),am=sn({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:Be,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:me,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:Zt,g2:Zt,glyphName:Zt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:il}),al=sn({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()}}),ol=sn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sl}),ll=sn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),om={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"},lm=/[A-Z]/g,Xs=/-[a-z]/g,cm=/^data[-\w.:]+$/i;function jr(e,t){const n=jn(t);let r=t,i=Oe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cm.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Xs,hm);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Xs.test(s)){let a=s.replace(lm,um);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=ts}return new i(r,t)}function um(e){return"-"+e.toLowerCase()}function hm(e){return e.charAt(1).toUpperCase()}var Xn=nl([rl,sm,al,ol,ll],"html"),Ct=nl([rl,am,al,ol,ll],"svg");function Zs(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function cl(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Js=/[#.]/g;function dm(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){Js.lastIndex=i;const o=Js.exec(n),l=n.slice(i,o?o.index:n.length);l&&(s?s==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,i+=l.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function ea(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ul(e){return e.join(" ").trim()}function hl(e,t,n){const r=n?gm(n):void 0;function i(s,a,...o){let l;if(s==null){l={type:"root",children:[]};const u=a;o.unshift(u)}else{l=dm(s,t);const u=l.tagName.toLowerCase(),m=r?r.get(u):void 0;if(l.tagName=m||u,mm(a))o.unshift(a);else for(const[d,f]of Object.entries(a))fm(e,l.properties,d,f)}for(const u of o)vi(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function mm(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function fm(e,t,n,r){const i=jr(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=ea(r):i.commaSeparated?s=Zs(r):i.commaOrSpaceSeparated?s=ea(Zs(r).join(" ")):s=ta(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?pm(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(ta(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function vi(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)vi(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?vi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ta(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||jn(n)===jn(t)))return!0}return n}function pm(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function gm(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}var Em=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Tm=hl(Xn,"div"),bm=hl(Ct,"g",Em);function xm(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const l=na(t,n[a-1]);o=l===-1?t.length+1:l+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],l=na(t,o),u=l===-1?t.length+1:l+1;if(o===u)break;n.push(u)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function na(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
3
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Rt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},dl={}.hasOwnProperty,km=Object.prototype;function ym(e,t){const n=t||{};return ns({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ct:Xn,verbose:n.verbose||!1},e)}function ns(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Tr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ml(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=xm(s),o=a.toPoint(0),l=a.toPoint(s.length);n.position={start:o,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Tr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Tr(e,r,n),n}default:return n=Cm(e,t),n}}function ml(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=ns(e,t[n]);r.push(i)}return r}function Cm(e,t){const n=e.schema;e.schema=t.namespaceURI===Rt.svg?Ct:Xn;let r=-1;const i={};for(;++r<t.attrs.length;){const a=t.attrs[r],o=(a.prefix?a.prefix+":":"")+a.name;dl.call(km,o)||(i[o]=a.value)}const s=(e.schema.space==="svg"?bm:Tm)(t.tagName,i,ml(e,t.childNodes));if(Tr(e,t,s),s.tagName==="template"){const a=t,o=a.sourceCodeLocation,l=o&&o.startTag&&Qt(o.startTag),u=o&&o.endTag&&Qt(o.endTag),m=ns(e,a.content);l&&u&&e.file&&(m.position={start:l.end,end:u.start}),s.content=m}return e.schema=n,s}function Tr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=_m(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _m(e,t,n){const r=Qt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)dl.call(n.attrs,a)&&(s[jr(e.schema,a).property]=Qt(n.attrs[a]));n.startTag;const o=Qt(n.startTag),l=n.endTag?Qt(n.endTag):void 0,u={opening:o};l&&(u.closing=l),u.properties=s,t.data={position:u}}}return r}function Qt(e){const t=ra({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ra({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ra(e){return e.line&&e.column?e:void 0}var ia={}.hasOwnProperty;function fl(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&ia.call(i,e)){const l=String(i[e]);a=ia.call(o,l)?o[l]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Am={},Nm={}.hasOwnProperty,pl=fl("type",{handlers:{root:Sm,element:Om,text:Lm,comment:Rm,doctype:wm}});function vm(e,t){const n=(t||Am).space;return pl(e,n==="svg"?Ct:Xn)}function Sm(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=rs(e.children,n,t),an(e,n),n}function Im(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=rs(e.children,n,t),an(e,n),n}function wm(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return an(e,t),t}function Lm(e){const t={nodeName:"#text",value:e.value,parentNode:null};return an(e,t),t}function Rm(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return an(e,t),t}function Om(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ct);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&Nm.call(e.properties,s)){const l=Dm(r,s,e.properties[s]);l&&i.push(l)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Rt[a],childNodes:[],parentNode:null};return o.childNodes=rs(e.children,o,r),an(e,o),e.tagName==="template"&&e.content&&(o.content=Im(e.content,r)),o}function Dm(e,t,n){const r=jr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?cl(n):ul(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Rt[r.space]}return i}function rs(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=pl(e[r],n);s.parentNode=t,i.push(s)}return i}function an(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Pm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Mm=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);var T;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(T||(T={}));var Le={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gl(e){return e>=55296&&e<=57343}function Bm(e){return e>=56320&&e<=57343}function Fm(e,t){return(e-55296)*1024+9216+t}function El(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Tl(e){return e>=64976&&e<=65007||Mm.has(e)}var R;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(R||(R={}));var jm=65536,Hm=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=jm,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:i}=this,s=r+t,a=i+t;return{code:e,startLine:n,endLine:n,startCol:s,endCol:s,startOffset:a,endOffset:a}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(Bm(t))return this.pos++,this._addGap(),Fm(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(R.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==e.charCodeAt(n))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;const n=this.html.charCodeAt(t);return n===T.CARRIAGE_RETURN?T.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,T.EOF;let e=this.html.charCodeAt(this.pos);return e===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):e===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,gl(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===T.LINE_FEED||e===T.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){El(e)?this._err(R.controlCharacterInInputStream):Tl(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},te;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(te||(te={}));function bl(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Um=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),ni,zm=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),PN=(ni=String.fromCodePoint)!==null&&ni!==void 0?ni:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function $m(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=zm.get(e))!==null&&t!==void 0?t:e}var ye;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ye||(ye={}));var qm=32,bt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(bt||(bt={}));function Si(e){return e>=ye.ZERO&&e<=ye.NINE}function Ym(e){return e>=ye.UPPER_A&&e<=ye.UPPER_F||e>=ye.LOWER_A&&e<=ye.LOWER_F}function Vm(e){return e>=ye.UPPER_A&&e<=ye.UPPER_Z||e>=ye.LOWER_A&&e<=ye.LOWER_Z||Si(e)}function Wm(e){return e===ye.EQUALS||Vm(e)}var ke;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ke||(ke={}));var lt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(lt||(lt={}));var Qm=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=lt.Strict}startEntity(e){this.decodeMode=e,this.state=ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ke.EntityStart:return e.charCodeAt(t)===ye.NUM?(this.state=ke.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ke.NamedEntity,this.stateNamedEntity(e,t));case ke.NumericStart:return this.stateNumericStart(e,t);case ke.NumericDecimal:return this.stateNumericDecimal(e,t);case ke.NumericHex:return this.stateNumericHex(e,t);case ke.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|qm)===ye.LOWER_X?(this.state=ke.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ke.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(Si(r)||Ym(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(Si(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===ye.SEMI)this.consumed+=1;else if(this.decodeMode===lt.Strict)return 0;return this.emitCodePoint($m(this.result),this.consumed),this.errors&&(e!==ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&bt.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const s=e.charCodeAt(t);if(this.treeIndex=Gm(n,r,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===lt.Attribute&&(i===0||Wm(s))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&bt.VALUE_LENGTH)>>14,i!==0){if(s===ye.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==lt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&bt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~bt.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ke.NamedEntity:return this.result!==0&&(this.decodeMode!==lt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ke.NumericDecimal:return this.emitNumericEntity(0,2);case ke.NumericHex:return this.emitNumericEntity(0,3);case ke.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ke.EntityStart:return 0}}};function Gm(e,t,n,r){const i=(t&bt.BRANCH_LENGTH)>>7,s=t&bt.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:e[n+l]-1}let a=n,o=a+i-1;for(;a<=o;){const l=a+o>>>1,u=e[l];if(u<r)a=l+1;else if(u>r)o=l-1;else return e[l+i]}return-1}var M;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(M||(M={}));var Ot;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ot||(Ot={}));var Ue;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ue||(Ue={}));var L;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(L||(L={}));var c;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(c||(c={}));var Km=new Map([[L.A,c.A],[L.ADDRESS,c.ADDRESS],[L.ANNOTATION_XML,c.ANNOTATION_XML],[L.APPLET,c.APPLET],[L.AREA,c.AREA],[L.ARTICLE,c.ARTICLE],[L.ASIDE,c.ASIDE],[L.B,c.B],[L.BASE,c.BASE],[L.BASEFONT,c.BASEFONT],[L.BGSOUND,c.BGSOUND],[L.BIG,c.BIG],[L.BLOCKQUOTE,c.BLOCKQUOTE],[L.BODY,c.BODY],[L.BR,c.BR],[L.BUTTON,c.BUTTON],[L.CAPTION,c.CAPTION],[L.CENTER,c.CENTER],[L.CODE,c.CODE],[L.COL,c.COL],[L.COLGROUP,c.COLGROUP],[L.DD,c.DD],[L.DESC,c.DESC],[L.DETAILS,c.DETAILS],[L.DIALOG,c.DIALOG],[L.DIR,c.DIR],[L.DIV,c.DIV],[L.DL,c.DL],[L.DT,c.DT],[L.EM,c.EM],[L.EMBED,c.EMBED],[L.FIELDSET,c.FIELDSET],[L.FIGCAPTION,c.FIGCAPTION],[L.FIGURE,c.FIGURE],[L.FONT,c.FONT],[L.FOOTER,c.FOOTER],[L.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[L.FORM,c.FORM],[L.FRAME,c.FRAME],[L.FRAMESET,c.FRAMESET],[L.H1,c.H1],[L.H2,c.H2],[L.H3,c.H3],[L.H4,c.H4],[L.H5,c.H5],[L.H6,c.H6],[L.HEAD,c.HEAD],[L.HEADER,c.HEADER],[L.HGROUP,c.HGROUP],[L.HR,c.HR],[L.HTML,c.HTML],[L.I,c.I],[L.IMG,c.IMG],[L.IMAGE,c.IMAGE],[L.INPUT,c.INPUT],[L.IFRAME,c.IFRAME],[L.KEYGEN,c.KEYGEN],[L.LABEL,c.LABEL],[L.LI,c.LI],[L.LINK,c.LINK],[L.LISTING,c.LISTING],[L.MAIN,c.MAIN],[L.MALIGNMARK,c.MALIGNMARK],[L.MARQUEE,c.MARQUEE],[L.MATH,c.MATH],[L.MENU,c.MENU],[L.META,c.META],[L.MGLYPH,c.MGLYPH],[L.MI,c.MI],[L.MO,c.MO],[L.MN,c.MN],[L.MS,c.MS],[L.MTEXT,c.MTEXT],[L.NAV,c.NAV],[L.NOBR,c.NOBR],[L.NOFRAMES,c.NOFRAMES],[L.NOEMBED,c.NOEMBED],[L.NOSCRIPT,c.NOSCRIPT],[L.OBJECT,c.OBJECT],[L.OL,c.OL],[L.OPTGROUP,c.OPTGROUP],[L.OPTION,c.OPTION],[L.P,c.P],[L.PARAM,c.PARAM],[L.PLAINTEXT,c.PLAINTEXT],[L.PRE,c.PRE],[L.RB,c.RB],[L.RP,c.RP],[L.RT,c.RT],[L.RTC,c.RTC],[L.RUBY,c.RUBY],[L.S,c.S],[L.SCRIPT,c.SCRIPT],[L.SEARCH,c.SEARCH],[L.SECTION,c.SECTION],[L.SELECT,c.SELECT],[L.SOURCE,c.SOURCE],[L.SMALL,c.SMALL],[L.SPAN,c.SPAN],[L.STRIKE,c.STRIKE],[L.STRONG,c.STRONG],[L.STYLE,c.STYLE],[L.SUB,c.SUB],[L.SUMMARY,c.SUMMARY],[L.SUP,c.SUP],[L.TABLE,c.TABLE],[L.TBODY,c.TBODY],[L.TEMPLATE,c.TEMPLATE],[L.TEXTAREA,c.TEXTAREA],[L.TFOOT,c.TFOOT],[L.TD,c.TD],[L.TH,c.TH],[L.THEAD,c.THEAD],[L.TITLE,c.TITLE],[L.TR,c.TR],[L.TRACK,c.TRACK],[L.TT,c.TT],[L.U,c.U],[L.UL,c.UL],[L.SVG,c.SVG],[L.VAR,c.VAR],[L.WBR,c.WBR],[L.XMP,c.XMP]]);function on(e){var t;return(t=Km.get(e))!==null&&t!==void 0?t:c.UNKNOWN}var F=c,Xm={[M.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[M.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[M.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},Ii=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]),MN=new Set([L.STYLE,L.SCRIPT,L.XMP,L.IFRAME,L.NOEMBED,L.NOFRAMES,L.PLAINTEXT]),x;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(x||(x={}));var be={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function Zm(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function kn(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function Jm(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function pt(e){return Jm(e)||kn(e)}function sa(e){return pt(e)||Zm(e)}function ur(e){return e+32}function xl(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function aa(e){return xl(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function ef(e){return e===T.NULL?R.nullCharacterReference:e>1114111?R.characterReferenceOutsideUnicodeRange:gl(e)?R.surrogateCharacterReference:Tl(e)?R.noncharacterCharacterReference:El(e)||e===T.CARRIAGE_RETURN?R.controlCharacterReference:null}var tf=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Hm(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Qm(Um,(n,r)=>{this.preprocessor.pos=this.entityStartPos+r-1,this._flushCodePointConsumedAsCharacterReference(n)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const r=ef(n);r&&this._err(r,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)===null||r===void 0||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:te.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:te.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:te.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:te.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(bl(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const r=(e=(t=n.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);r[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=on(e.tagName),e.type===te.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case te.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case te.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case te.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:te.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=xl(e)?te.WHITESPACE_CHARACTER:e===T.NULL?te.NULL_CHARACTER:te.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(te.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?lt.Attribute:lt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case x.DATA:this._stateData(e);break;case x.RCDATA:this._stateRcdata(e);break;case x.RAWTEXT:this._stateRawtext(e);break;case x.SCRIPT_DATA:this._stateScriptData(e);break;case x.PLAINTEXT:this._statePlaintext(e);break;case x.TAG_OPEN:this._stateTagOpen(e);break;case x.END_TAG_OPEN:this._stateEndTagOpen(e);break;case x.TAG_NAME:this._stateTagName(e);break;case x.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case x.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case x.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case x.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case x.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case x.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case x.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case x.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case x.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case x.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case x.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case x.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case x.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case x.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case x.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case x.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case x.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case x.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case x.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case x.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case x.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case x.BOGUS_COMMENT:this._stateBogusComment(e);break;case x.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case x.COMMENT_START:this._stateCommentStart(e);break;case x.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case x.COMMENT:this._stateComment(e);break;case x.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case x.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case x.COMMENT_END:this._stateCommentEnd(e);break;case x.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case x.DOCTYPE:this._stateDoctype(e);break;case x.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case x.DOCTYPE_NAME:this._stateDoctypeName(e);break;case x.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case x.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case x.CDATA_SECTION:this._stateCdataSection(e);break;case x.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case x.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case x.CHARACTER_REFERENCE:this._stateCharacterReference();break;case x.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.TAG_OPEN;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case T.AMPERSAND:this._startCharacterReference();break;case T.LESS_THAN_SIGN:this.state=x.RCDATA_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.RAWTEXT_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(pt(e))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){case T.EXCLAMATION_MARK:this.state=x.MARKUP_DECLARATION_OPEN;break;case T.SOLIDUS:this.state=x.END_TAG_OPEN;break;case T.QUESTION_MARK:this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e);break;case T.EOF:this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(pt(e))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(e);else switch(e){case T.GREATER_THAN_SIGN:this._err(R.missingEndTagName),this.state=x.DATA;break;case T.EOF:this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_ATTRIBUTE_NAME;break;case T.SOLIDUS:this.state=x.SELF_CLOSING_START_TAG;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentTagToken();break;case T.NULL:this._err(R.unexpectedNullCharacter),t.tagName+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(kn(e)?ur(e):e)}}_stateRcdataLessThanSign(e){e===T.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){pt(e)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case T.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case T.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===T.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){pt(e)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case T.SOLIDUS:this.state=x.SCRIPT_DATA_END_TAG_OPEN;break;case T.EXCLAMATION_MARK:this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){pt(e)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case T.HYPHEN_MINUS:this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case T.GREATER_THAN_SIGN:this.state=x.SCRIPT_DATA,this._emitChars(">");break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===T.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pt(e)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){pt(e)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Le.SCRIPT,!1)&&aa(this.preprocessor.peek(Le.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Le.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case T.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case T.HYPHEN_MINUS:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case T.HYPHEN_MINUS:this._emitChars("-");break;case T.LESS_THAN_SIGN:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case T.GREATER_THAN_SIGN:this.state=x.SCRIPT_DATA,this._emitChars(">");break;case T.NULL:this._err(R.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case T.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===T.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Le.SCRIPT,!1)&&aa(this.preprocessor.peek(Le.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Le.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case T.EQUALS_SIGN:this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case T.EQUALS_SIGN:this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break;case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(kn(e)?ur(e):e)}}_stateAfterAttributeName(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:this.state=x.SELF_CLOSING_START_TAG;break;case T.EQUALS_SIGN:this.state=x.BEFORE_ATTRIBUTE_VALUE;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentTagToken();break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case T.APOSTROPHE:this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break;default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case T.APOSTROPHE:this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case T.AMPERSAND:this._startCharacterReference();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break;case T.AMPERSAND:this._startCharacterReference();break;case T.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break;case T.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break;case T.SOLIDUS:this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break;case T.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break;case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case T.GREATER_THAN_SIGN:{const t=this.currentToken;t.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case T.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Le.DASH_DASH,!0)?(this._createCommentToken(Le.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(Le.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Le.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(Le.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(Le.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_START_DASH;break;case T.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=x.DATA;const t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END;break;case T.GREATER_THAN_SIGN:this._err(R.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END_DASH;break;case T.LESS_THAN_SIGN:t.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case T.EXCLAMATION_MARK:t.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break;case T.LESS_THAN_SIGN:t.data+="<";break;default:this.state=x.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==T.GREATER_THAN_SIGN&&e!==T.EOF&&this._err(R.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:this.state=x.COMMENT_END;break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentComment(t);break;case T.EXCLAMATION_MARK:this.state=x.COMMENT_END_BANG;break;case T.HYPHEN_MINUS:t.data+="-";break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=x.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case T.HYPHEN_MINUS:t.data+="--!",this.state=x.COMMENT_END_DASH;break;case T.GREATER_THAN_SIGN:this._err(R.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(t);break;case T.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=x.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_DOCTYPE_NAME;break;case T.GREATER_THAN_SIGN:this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case T.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(kn(e))this._createDoctypeToken(String.fromCharCode(ur(e))),this.state=x.DOCTYPE_NAME;else switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:this._err(R.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=x.DOCTYPE_NAME;break;case T.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break}case T.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=x.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.AFTER_DOCTYPE_NAME;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.NULL:this._err(R.unexpectedNullCharacter),t.name+="�";break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(kn(e)?ur(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Le.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Le.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case T.APOSTROPHE:this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case T.GREATER_THAN_SIGN:this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.QUOTATION_MARK:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.QUOTATION_MARK:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case T.APOSTROPHE:t.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case T.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(t);break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case T.QUOTATION_MARK:this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case T.APOSTROPHE:this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case T.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case T.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case T.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=x.DATA;break;case T.NULL:this._err(R.unexpectedNullCharacter);break;case T.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case T.RIGHT_SQUARE_BRACKET:this.state=x.CDATA_SECTION_BRACKET;break;case T.EOF:this._err(R.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===T.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case T.GREATER_THAN_SIGN:this.state=x.DATA;break;case T.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=x.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&sa(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){sa(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===T.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},kl=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),oa=new Set([...kl,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),yr=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),nf=new Set([...yr,c.OL,c.UL]),rf=new Set([...yr,c.BUTTON]),la=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),ca=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),sf=new Set([c.TR,c.TEMPLATE,c.HTML]),af=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),of=new Set([c.TABLE,c.TEMPLATE,c.HTML]),lf=new Set([c.TD,c.TH]),cf=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==M.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ii,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(lf,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(of,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(af,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(sf,M.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case M.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case M.SVG:if(ca.has(r))return!1;break;case M.MATHML:if(la.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,yr)}hasInListItemScope(e){return this.hasInDynamicScope(e,nf)}hasInButtonScope(e){return this.hasInDynamicScope(e,rf)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case M.HTML:if(Ii.has(t))return!0;if(yr.has(t))return!1;break;case M.SVG:if(ca.has(t))return!1;break;case M.MATHML:if(la.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===M.HTML)switch(this.tagIDs[e]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&kl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&oa.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&oa.has(this.currentTagId);)this.pop()}},ri=3,Je;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Je||(Je={}));var ua={type:Je.Marker},uf=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,i=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a<this.entries.length;a++){const o=this.entries[a];if(o.type===Je.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const u=this.treeAdapter.getAttrList(l);u.length===r&&n.push({idx:a,attrs:u})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<ri)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<ri)return;const r=new Map(t.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<n.length;s++){const a=n[s];a.attrs.every(o=>r.get(o.name)===o.value)&&(i+=1,i>=ri&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(ua)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Je.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Je.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(ua);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(n=>n.type===Je.Marker||this.treeAdapter.getTagName(n.element)===e);return t&&t.type===Je.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Je.Element&&t.element===e)}},gt={createDocument(){return{nodeName:"#document",mode:Ue.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};gt.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(gt.isTextNode(n)){n.value+=t;return}}gt.appendChild(e,gt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gt.isTextNode(r)?r.value+=t:gt.insertBefore(e,gt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},yl="html",hf="about:legacy-compat",df="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Cl=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],mf=[...Cl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],ff=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),_l=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],pf=[..._l,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ha(e,t){return t.some(n=>e.startsWith(n))}function gf(e){return e.name===yl&&e.publicId===null&&(e.systemId===null||e.systemId===hf)}function Ef(e){if(e.name!==yl)return Ue.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===df)return Ue.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),ff.has(n))return Ue.QUIRKS;let r=t===null?mf:Cl;if(ha(n,r))return Ue.QUIRKS;if(r=t===null?_l:pf,ha(n,r))return Ue.LIMITED_QUIRKS}return Ue.NO_QUIRKS}var da={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Tf="definitionurl",bf="definitionURL",xf=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),kf=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),yf=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Cf=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function _f(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:n})=>n===Ot.COLOR||n===Ot.SIZE||n===Ot.FACE)||Cf.has(t)}function Al(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Tf){e.attrs[t].name=bf;break}}function Nl(e){for(let t=0;t<e.attrs.length;t++){const n=xf.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function is(e){for(let t=0;t<e.attrs.length;t++){const n=kf.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Af(e){const t=yf.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=on(e.tagName))}function Nf(e,t){return t===M.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function vf(e,t,n){if(t===M.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ot.ENCODING){const i=n[r].value.toLowerCase();return i===da.TEXT_HTML||i===da.APPLICATION_XML}}return t===M.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function Sf(e,t,n,r){return(!r||r===M.HTML)&&vf(e,t,n)||(!r||r===M.MATHML)&&Nf(e,t)}var If="hidden",wf=8,Lf=3,k;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(k||(k={}));var Rf={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vl=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),ma={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gt,onParseError:null},fa=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=k.INITIAL,this.originalInsertionMode=k.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ma,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new tf(this.options,this),this.activeFormattingElements=new uf(this.treeAdapter),this.fragmentContextID=n?on(this.treeAdapter.getTagName(n)):c.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new cf(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...ma,...t};e!=null||(e=n.treeAdapter.createElement(L.TEMPLATE,M.HTML,[]));const r=n.treeAdapter.createElement("documentmock",M.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===c.TEMPLATE&&i.tmplInsertionModeStack.unshift(k.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const i=(r=e.location)!==null&&r!==void 0?r:Rf,s={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)===null||i===void 0||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)===null||r===void 0||r.call(n,e,this.openElements.current),t){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===M.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,M.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=k.TEXT}switchToPlaintextParsing(){this.insertionMode=k.TEXT,this.originalInsertionMode=k.IN_BODY,this.tokenizer.state=be.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===L.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:this.tokenizer.state=be.RCDATA;break;case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:this.tokenizer.state=be.RAWTEXT;break;case c.SCRIPT:this.tokenizer.state=be.SCRIPT_DATA;break;case c.PLAINTEXT:this.tokenizer.state=be.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const i=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));i&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,M.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,M.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(L.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:s,endCol:a,endOffset:o}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:s,endCol:a,endOffset:o})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===te.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(t)===L.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===M.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,M.HTML)}_processToken(e){switch(e.type){case te.CHARACTER:this.onCharacter(e);break;case te.NULL_CHARACTER:this.onNullCharacter(e);break;case te.COMMENT:this.onComment(e);break;case te.DOCTYPE:this.onDoctype(e);break;case te.START_TAG:this._processStartTag(e);break;case te.END_TAG:this.onEndTag(e);break;case te.EOF:this.onEof(e);break;case te.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){const r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return Sf(e,r,i,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(r=>r.type===Je.Marker||this.openElements.contains(r.element)),n=t===-1?e-1:t-1;for(let r=n;r>=0;r--){const i=this.activeFormattingElements.entries[r];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=k.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case c.TR:this.insertionMode=k.IN_ROW;return;case c.TBODY:case c.THEAD:case c.TFOOT:this.insertionMode=k.IN_TABLE_BODY;return;case c.CAPTION:this.insertionMode=k.IN_CAPTION;return;case c.COLGROUP:this.insertionMode=k.IN_COLUMN_GROUP;return;case c.TABLE:this.insertionMode=k.IN_TABLE;return;case c.BODY:this.insertionMode=k.IN_BODY;return;case c.FRAMESET:this.insertionMode=k.IN_FRAMESET;return;case c.SELECT:this._resetInsertionModeForSelect(e);return;case c.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case c.HTML:this.insertionMode=this.headElement?k.AFTER_HEAD:k.BEFORE_HEAD;return;case c.TD:case c.TH:if(e>0){this.insertionMode=k.IN_CELL;return}break;case c.HEAD:if(e>0){this.insertionMode=k.IN_HEAD;return}}this.insertionMode=k.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const n=this.openElements.tagIDs[t];if(n===c.TEMPLATE)break;if(n===c.TABLE){this.insertionMode=k.IN_SELECT_IN_TABLE;return}}this.insertionMode=k.IN_SELECT}_isElementCausesFosterParenting(e){return vl.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case c.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Xm[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lg(this,e);return}switch(this.insertionMode){case k.INITIAL:pn(this,e);break;case k.BEFORE_HTML:_n(this,e);break;case k.BEFORE_HEAD:An(this,e);break;case k.IN_HEAD:Nn(this,e);break;case k.IN_HEAD_NO_SCRIPT:vn(this,e);break;case k.AFTER_HEAD:Sn(this,e);break;case k.IN_BODY:case k.IN_CAPTION:case k.IN_CELL:case k.IN_TEMPLATE:Il(this,e);break;case k.TEXT:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:ii(this,e);break;case k.IN_TABLE_TEXT:Pl(this,e);break;case k.IN_COLUMN_GROUP:Cr(this,e);break;case k.AFTER_BODY:_r(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){og(this,e);return}switch(this.insertionMode){case k.INITIAL:pn(this,e);break;case k.BEFORE_HTML:_n(this,e);break;case k.BEFORE_HEAD:An(this,e);break;case k.IN_HEAD:Nn(this,e);break;case k.IN_HEAD_NO_SCRIPT:vn(this,e);break;case k.AFTER_HEAD:Sn(this,e);break;case k.TEXT:this._insertCharacters(e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:ii(this,e);break;case k.IN_COLUMN_GROUP:Cr(this,e);break;case k.AFTER_BODY:_r(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){wi(this,e);return}switch(this.insertionMode){case k.INITIAL:case k.BEFORE_HTML:case k.BEFORE_HEAD:case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:case k.IN_BODY:case k.IN_TABLE:case k.IN_CAPTION:case k.IN_COLUMN_GROUP:case k.IN_TABLE_BODY:case k.IN_ROW:case k.IN_CELL:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:case k.IN_TEMPLATE:case k.IN_FRAMESET:case k.AFTER_FRAMESET:wi(this,e);break;case k.IN_TABLE_TEXT:gn(this,e);break;case k.AFTER_BODY:jf(this,e);break;case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:Hf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case k.INITIAL:Uf(this,e);break;case k.BEFORE_HEAD:case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:this._err(e,R.misplacedDoctype);break;case k.IN_TABLE_TEXT:gn(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?cg(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case k.INITIAL:pn(this,e);break;case k.BEFORE_HTML:zf(this,e);break;case k.BEFORE_HEAD:qf(this,e);break;case k.IN_HEAD:Ve(this,e);break;case k.IN_HEAD_NO_SCRIPT:Wf(this,e);break;case k.AFTER_HEAD:Gf(this,e);break;case k.IN_BODY:_e(this,e);break;case k.IN_TABLE:nn(this,e);break;case k.IN_TABLE_TEXT:gn(this,e);break;case k.IN_CAPTION:Yp(this,e);break;case k.IN_COLUMN_GROUP:os(this,e);break;case k.IN_TABLE_BODY:zr(this,e);break;case k.IN_ROW:$r(this,e);break;case k.IN_CELL:Qp(this,e);break;case k.IN_SELECT:Fl(this,e);break;case k.IN_SELECT_IN_TABLE:Kp(this,e);break;case k.IN_TEMPLATE:Zp(this,e);break;case k.AFTER_BODY:eg(this,e);break;case k.IN_FRAMESET:tg(this,e);break;case k.AFTER_FRAMESET:rg(this,e);break;case k.AFTER_AFTER_BODY:sg(this,e);break;case k.AFTER_AFTER_FRAMESET:ag(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?ug(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case k.INITIAL:pn(this,e);break;case k.BEFORE_HTML:$f(this,e);break;case k.BEFORE_HEAD:Yf(this,e);break;case k.IN_HEAD:Vf(this,e);break;case k.IN_HEAD_NO_SCRIPT:Qf(this,e);break;case k.AFTER_HEAD:Kf(this,e);break;case k.IN_BODY:Ur(this,e);break;case k.TEXT:Pp(this,e);break;case k.IN_TABLE:Hn(this,e);break;case k.IN_TABLE_TEXT:gn(this,e);break;case k.IN_CAPTION:Vp(this,e);break;case k.IN_COLUMN_GROUP:Wp(this,e);break;case k.IN_TABLE_BODY:Li(this,e);break;case k.IN_ROW:Bl(this,e);break;case k.IN_CELL:Gp(this,e);break;case k.IN_SELECT:jl(this,e);break;case k.IN_SELECT_IN_TABLE:Xp(this,e);break;case k.IN_TEMPLATE:Jp(this,e);break;case k.AFTER_BODY:Ul(this,e);break;case k.IN_FRAMESET:ng(this,e);break;case k.AFTER_FRAMESET:ig(this,e);break;case k.AFTER_AFTER_BODY:br(this,e)}}onEof(e){switch(this.insertionMode){case k.INITIAL:pn(this,e);break;case k.BEFORE_HTML:_n(this,e);break;case k.BEFORE_HEAD:An(this,e);break;case k.IN_HEAD:Nn(this,e);break;case k.IN_HEAD_NO_SCRIPT:vn(this,e);break;case k.AFTER_HEAD:Sn(this,e);break;case k.IN_BODY:case k.IN_TABLE:case k.IN_CAPTION:case k.IN_COLUMN_GROUP:case k.IN_TABLE_BODY:case k.IN_ROW:case k.IN_CELL:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:Ol(this,e);break;case k.TEXT:Mp(this,e);break;case k.IN_TABLE_TEXT:gn(this,e);break;case k.IN_TEMPLATE:Hl(this,e);break;case k.AFTER_BODY:case k.IN_FRAMESET:case k.AFTER_FRAMESET:case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:as(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===T.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case k.IN_HEAD:case k.IN_HEAD_NO_SCRIPT:case k.AFTER_HEAD:case k.TEXT:case k.IN_COLUMN_GROUP:case k.IN_SELECT:case k.IN_SELECT_IN_TABLE:case k.IN_FRAMESET:case k.AFTER_FRAMESET:this._insertCharacters(e);break;case k.IN_BODY:case k.IN_CAPTION:case k.IN_CELL:case k.IN_TEMPLATE:case k.AFTER_BODY:case k.AFTER_AFTER_BODY:case k.AFTER_AFTER_FRAMESET:Sl(this,e);break;case k.IN_TABLE:case k.IN_TABLE_BODY:case k.IN_ROW:ii(this,e);break;case k.IN_TABLE_TEXT:Dl(this,e)}}};function Of(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Rl(e,t),n}function Df(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Pf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),l=o&&s>=Lf;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=Mf(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Mf(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Bf(e,t,n){const r=e.treeAdapter.getTagName(t),i=on(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&s===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Ff(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function ss(e,t){for(let n=0;n<wf;n++){const r=Of(e,t);if(!r)break;const i=Df(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=Pf(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&Bf(e,a,s),Ff(e,i,r)}}function wi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function jf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Hf(e,t){e._appendCommentNode(t,e.document)}function as(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function Uf(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ue.QUIRKS:Ef(t);gf(t)||e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=k.BEFORE_HTML}function pn(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ue.QUIRKS),e.insertionMode=k.BEFORE_HTML,e._processToken(t)}function zf(e,t){t.tagID===c.HTML?(e._insertElement(t,M.HTML),e.insertionMode=k.BEFORE_HEAD):_n(e,t)}function $f(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&_n(e,t)}function _n(e,t){e._insertFakeRootElement(),e.insertionMode=k.BEFORE_HEAD,e._processToken(t)}function qf(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.HEAD:e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=k.IN_HEAD;break;default:An(e,t)}}function Yf(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?An(e,t):e._err(t,R.endTagWithoutMatchingOpenElement)}function An(e,t){e._insertFakeElement(L.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=k.IN_HEAD,e._processToken(t)}function Ve(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TITLE:e._switchToTextParsing(t,be.RCDATA);break;case c.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=k.IN_HEAD_NO_SCRIPT);break;case c.NOFRAMES:case c.STYLE:e._switchToTextParsing(t,be.RAWTEXT);break;case c.SCRIPT:e._switchToTextParsing(t,be.SCRIPT_DATA);break;case c.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=k.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(k.IN_TEMPLATE);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:Nn(e,t)}}function Vf(e,t){switch(t.tagID){case c.HEAD:e.openElements.pop(),e.insertionMode=k.AFTER_HEAD;break;case c.BODY:case c.BR:case c.HTML:Nn(e,t);break;case c.TEMPLATE:Ft(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Ft(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function Nn(e,t){e.openElements.pop(),e.insertionMode=k.AFTER_HEAD,e._processToken(t)}function Wf(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:Ve(e,t);break;case c.NOSCRIPT:e._err(t,R.nestedNoscriptInHead);break;default:vn(e,t)}}function Qf(e,t){switch(t.tagID){case c.NOSCRIPT:e.openElements.pop(),e.insertionMode=k.IN_HEAD;break;case c.BR:vn(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function vn(e,t){const n=t.type===te.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=k.IN_HEAD,e._processToken(t)}function Gf(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.BODY:e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=k.IN_BODY;break;case c.FRAMESET:e._insertElement(t,M.HTML),e.insertionMode=k.IN_FRAMESET;break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:e._err(t,R.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),Ve(e,t),e.openElements.remove(e.headElement);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:Sn(e,t)}}function Kf(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:Sn(e,t);break;case c.TEMPLATE:Ft(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Sn(e,t){e._insertFakeElement(L.BODY,c.BODY),e.insertionMode=k.IN_BODY,Hr(e,t)}function Hr(e,t){switch(t.type){case te.CHARACTER:Il(e,t);break;case te.WHITESPACE_CHARACTER:Sl(e,t);break;case te.COMMENT:wi(e,t);break;case te.START_TAG:_e(e,t);break;case te.END_TAG:Ur(e,t);break;case te.EOF:Ol(e,t)}}function Sl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Il(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Xf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Zf(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Jf(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_FRAMESET)}function ep(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function tp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ii.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function np(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function rp(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function ip(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function sp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=be.PLAINTEXT}function ap(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function op(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(L.A);n&&(ss(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cp(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(ss(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function up(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function hp(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ue.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=k.IN_TABLE}function wl(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ll(e){const t=bl(e,Ot.TYPE);return t!=null&&t.toLowerCase()===If}function dp(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),Ll(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function mp(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function fp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function pp(e,t){t.tagName=L.IMG,t.tagID=c.IMG,wl(e,t)}function gp(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=k.TEXT}function Ep(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function Tp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function pa(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function bp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===k.IN_TABLE||e.insertionMode===k.IN_CAPTION||e.insertionMode===k.IN_TABLE_BODY||e.insertionMode===k.IN_ROW||e.insertionMode===k.IN_CELL?k.IN_SELECT_IN_TABLE:k.IN_SELECT}function xp(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function kp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function yp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,M.HTML)}function Cp(e,t){e._reconstructActiveFormattingElements(),Al(t),is(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function _p(e,t){e._reconstructActiveFormattingElements(),Nl(t),is(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function ga(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function _e(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:lp(e,t);break;case c.A:op(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:tp(e,t);break;case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:ep(e,t);break;case c.LI:case c.DD:case c.DT:ip(e,t);break;case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:wl(e,t);break;case c.HR:fp(e,t);break;case c.RB:case c.RTC:kp(e,t);break;case c.RT:case c.RP:yp(e,t);break;case c.PRE:case c.LISTING:np(e,t);break;case c.XMP:Ep(e,t);break;case c.SVG:_p(e,t);break;case c.HTML:Xf(e,t);break;case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:Ve(e,t);break;case c.BODY:Zf(e,t);break;case c.FORM:rp(e,t);break;case c.NOBR:cp(e,t);break;case c.MATH:Cp(e,t);break;case c.TABLE:hp(e,t);break;case c.INPUT:dp(e,t);break;case c.PARAM:case c.TRACK:case c.SOURCE:mp(e,t);break;case c.IMAGE:pp(e,t);break;case c.BUTTON:ap(e,t);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:up(e,t);break;case c.IFRAME:Tp(e,t);break;case c.SELECT:bp(e,t);break;case c.OPTION:case c.OPTGROUP:xp(e,t);break;case c.NOEMBED:case c.NOFRAMES:pa(e,t);break;case c.FRAMESET:Jf(e,t);break;case c.TEXTAREA:gp(e,t);break;case c.NOSCRIPT:e.options.scriptingEnabled?pa(e,t):ga(e,t);break;case c.PLAINTEXT:sp(e,t);break;case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:ga(e,t)}}function Ap(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=k.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Np(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=k.AFTER_BODY,Ul(e,t))}function vp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Sp(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function Ip(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(L.P,c.P),e._closePElement()}function wp(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function Lp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Rp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Op(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Dp(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(L.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Rl(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function Ur(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:ss(e,t);break;case c.P:Ip(e);break;case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:vp(e,t);break;case c.LI:wp(e);break;case c.DD:case c.DT:Lp(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:Rp(e);break;case c.BR:Dp(e);break;case c.BODY:Ap(e,t);break;case c.HTML:Np(e,t);break;case c.FORM:Sp(e);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:Op(e,t);break;case c.TEMPLATE:Ft(e,t);break;default:Rl(e,t)}}function Ol(e,t){e.tmplInsertionModeStack.length>0?Hl(e,t):as(e,t)}function Pp(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Mp(e,t){e._err(t,R.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ii(e,t){if(e.openElements.currentTagId!==void 0&&vl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=k.IN_TABLE_TEXT,t.type){case te.CHARACTER:Pl(e,t);break;case te.WHITESPACE_CHARACTER:Dl(e,t)}else Zn(e,t)}function Bp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_CAPTION}function Fp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_COLUMN_GROUP}function jp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.COLGROUP,c.COLGROUP),e.insertionMode=k.IN_COLUMN_GROUP,os(e,t)}function Hp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_TABLE_BODY}function Up(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.TBODY,c.TBODY),e.insertionMode=k.IN_TABLE_BODY,zr(e,t)}function zp(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $p(e,t){Ll(t)?e._appendElement(t,M.HTML):Zn(e,t),t.ackSelfClosing=!0}function qp(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function nn(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:Up(e,t);break;case c.STYLE:case c.SCRIPT:case c.TEMPLATE:Ve(e,t);break;case c.COL:jp(e,t);break;case c.FORM:qp(e,t);break;case c.TABLE:zp(e,t);break;case c.TBODY:case c.TFOOT:case c.THEAD:Hp(e,t);break;case c.INPUT:$p(e,t);break;case c.CAPTION:Bp(e,t);break;case c.COLGROUP:Fp(e,t);break;default:Zn(e,t)}}function Hn(e,t){switch(t.tagID){case c.TABLE:e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break;case c.TEMPLATE:Ft(e,t);break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Zn(e,t)}}function Zn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Hr(e,t),e.fosterParentingEnabled=n}function Dl(e,t){e.pendingCharacterTokens.push(t)}function Pl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function gn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Zn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Ml=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Yp(e,t){const n=t.tagID;Ml.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_TABLE,nn(e,t)):_e(e,t)}function Vp(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_TABLE,n===c.TABLE&&Hn(e,t));break;case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Ur(e,t)}}function os(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.COL:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TEMPLATE:Ve(e,t);break;default:Cr(e,t)}}function Wp(e,t){switch(t.tagID){case c.COLGROUP:e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=k.IN_TABLE);break;case c.TEMPLATE:Ft(e,t);break;case c.COL:break;default:Cr(e,t)}}function Cr(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=k.IN_TABLE,e._processToken(t))}function zr(e,t){switch(t.tagID){case c.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_ROW;break;case c.TH:case c.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(L.TR,c.TR),e.insertionMode=k.IN_ROW,$r(e,t);break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE,nn(e,t));break;default:nn(e,t)}}function Li(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE);break;case c.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE,Hn(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:Hn(e,t)}}function $r(e,t){switch(t.tagID){case c.TH:case c.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=k.IN_CELL,e.activeFormattingElements.insertMarker();break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,zr(e,t));break;default:nn(e,t)}}function Bl(e,t){switch(t.tagID){case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY);break;case c.TABLE:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,Li(e,t));break;case c.TBODY:case c.TFOOT:case c.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=k.IN_TABLE_BODY,Li(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:Hn(e,t)}}function Qp(e,t){const n=t.tagID;Ml.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),$r(e,t)):_e(e,t)}function Gp(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=k.IN_ROW);break;case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Bl(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:Ur(e,t)}}function Fl(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.OPTGROUP:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.HR:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break;case c.SCRIPT:case c.TEMPLATE:Ve(e,t)}}function jl(e,t){switch(t.tagID){case c.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break;case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break;case c.TEMPLATE:Ft(e,t)}}function Kp(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Fl(e,t)}function Xp(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):jl(e,t)}function Zp(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:Ve(e,t);break;case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.tmplInsertionModeStack[0]=k.IN_TABLE,e.insertionMode=k.IN_TABLE,nn(e,t);break;case c.COL:e.tmplInsertionModeStack[0]=k.IN_COLUMN_GROUP,e.insertionMode=k.IN_COLUMN_GROUP,os(e,t);break;case c.TR:e.tmplInsertionModeStack[0]=k.IN_TABLE_BODY,e.insertionMode=k.IN_TABLE_BODY,zr(e,t);break;case c.TD:case c.TH:e.tmplInsertionModeStack[0]=k.IN_ROW,e.insertionMode=k.IN_ROW,$r(e,t);break;default:e.tmplInsertionModeStack[0]=k.IN_BODY,e.insertionMode=k.IN_BODY,_e(e,t)}}function Jp(e,t){t.tagID===c.TEMPLATE&&Ft(e,t)}function Hl(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):as(e,t)}function eg(e,t){t.tagID===c.HTML?_e(e,t):_r(e,t)}function Ul(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=k.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else _r(e,t)}function _r(e,t){e.insertionMode=k.IN_BODY,Hr(e,t)}function tg(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.FRAMESET:e._insertElement(t,M.HTML);break;case c.FRAME:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.NOFRAMES:Ve(e,t)}}function ng(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=k.AFTER_FRAMESET))}function rg(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.NOFRAMES:Ve(e,t)}}function ig(e,t){t.tagID===c.HTML&&(e.insertionMode=k.AFTER_AFTER_FRAMESET)}function sg(e,t){t.tagID===c.HTML?_e(e,t):br(e,t)}function br(e,t){e.insertionMode=k.IN_BODY,Hr(e,t)}function ag(e,t){switch(t.tagID){case c.HTML:_e(e,t);break;case c.NOFRAMES:Ve(e,t)}}function og(e,t){t.chars="�",e._insertCharacters(t)}function lg(e,t){e._insertCharacters(t),e.framesetOk=!1}function zl(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function cg(e,t){if(_f(t))zl(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?Al(t):r===M.SVG&&(Af(t),Nl(t)),is(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ug(e,t){if(t.tagID===c.P||t.tagID===c.BR){zl(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}var BN=new Set([L.AREA,L.BASE,L.BASEFONT,L.BGSOUND,L.BR,L.COL,L.EMBED,L.FRAME,L.HR,L.IMG,L.INPUT,L.KEYGEN,L.LINK,L.META,L.PARAM,L.SOURCE,L.TRACK,L.WBR]),qr=$l("end"),rt=$l("start");function $l(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 ql(e){const t=rt(e),n=qr(e);if(t&&n)return{start:t,end:n}}var hg=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,dg=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ea={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Yl(e,t){const n=yg(e),r=fl("type",{handlers:{root:mg,element:fg,text:pg,comment:Wl,doctype:gg,raw:Tg},unknown:bg}),i={parser:n?new fa(Ea):fa.getFragmentParser(void 0,Ea),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),ln(i,rt());const s=n?i.parser.document:i.parser.getFragment(),a=ym(s,{file:i.options.file});return i.stitches&&tt(a,"comment",function(o,l,u){const m=o;if(m.value.stitch&&u&&l!==void 0){const d=u.children;return d[l]=m.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Vl(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function mg(e,t){Vl(e.children,t)}function fg(e,t){xg(e,t),Vl(e.children,t),kg(e,t)}function pg(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:te.CHARACTER,chars:e.value,location:Jn(e)};ln(t,rt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function gg(e,t){const n={type:te.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Jn(e)};ln(t,rt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Eg(e,t){t.stitches=!0;const n=Cg(e);"children"in e&&"children"in n&&(n.children=Yl({type:"root",children:e.children},t.options).children),Wl({type:"comment",value:{stitch:n}},t)}function Wl(e,t){const n=e.value,r={type:te.COMMENT,data:n,location:Jn(e)};ln(t,rt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Tg(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Ql(t,rt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(hg,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function bg(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Eg(n,t);else{let r="";throw dg.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function ln(e,t){Ql(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=be.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Ql(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function xg(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===be.PLAINTEXT)return;ln(t,rt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Rt.html;i===Rt.html&&n==="svg"&&(i=Rt.svg);const s=vm({...e,children:[]},{space:i===Rt.svg?"svg":"html"}),a={type:te.START_TAG,tagName:n,tagID:on(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:Jn(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function kg(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Pm.includes(n)||t.parser.tokenizer.state===be.PLAINTEXT)return;ln(t,qr(e));const r={type:te.END_TAG,tagName:n,tagID:on(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Jn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===be.RCDATA||t.parser.tokenizer.state===be.RAWTEXT||t.parser.tokenizer.state===be.SCRIPT_DATA)&&(t.parser.tokenizer.state=be.DATA)}function yg(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Jn(e){const t=rt(e)||{line:void 0,column:void 0,offset:void 0},n=qr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Cg(e){return"children"in e?Dt({...e,children:[]}):Dt(e)}function Ri(e){return function(t,n){return Yl(t,{...e,file:n})}}var vt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],wt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vt],h2:[["className","sr-only"]],img:[...vt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vt],table:[...vt],ul:[...vt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Et={}.hasOwnProperty;function _g(e,t){let n={type:"root",children:[]};const r=Gl({schema:t?{...wt,...t}:wt,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Gl(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Ag(e,n);case"doctype":return Ng(e,n);case"element":return vg(e,n);case"root":return Sg(e,n);case"text":return Ig(e,n)}}}function Ag(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return er(i,t),i}}function Ng(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return er(n,t),n}}function vg(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Kl(e,t.children),i=wg(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&Et.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let l=-1;for(s=!1;++l<o.length;)e.stack.includes(o[l])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return er(a,t),a}function Sg(e,t){const n={type:"root",children:Kl(e,t.children)};return er(n,t),n}function Ig(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return er(n,t),n}function Kl(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=Gl(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function wg(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&Et.call(r,n)?r[n]:void 0,a=r&&Et.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let u;for(u in o)if(Et.call(o,u)){const m=o[u];let d=Ta(e,ba(s,u),u,m);d==null&&(d=Ta(e,ba(a,u),u,m)),d!=null&&(l[u]=d)}if(i&&Et.call(i,n)){const m=i[n];for(u in m)Et.call(m,u)&&!Et.call(l,u)&&(l[u]=m[u])}return l}function Ta(e,t,n,r){return t?Array.isArray(r)?Lg(e,t,n,r):Xl(e,t,n,r):void 0}function Lg(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=Xl(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function Xl(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Rg(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Rg(e,t,n){const r=e.schema.protocols&&Et.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(s<0||l>-1&&s>l||a>-1&&s>a||o>-1&&s>o)return!0;let u=-1;for(;++u<r.length;){const m=r[u];if(s===m.length&&i.slice(0,m.length)===m)return!0}return!1}function er(e,t){const n=ql(t);t.data&&(e.data=Dt(t.data)),n&&(e.position=n)}function ba(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Zl(e){return function(t){return _g(t,e)}}function xa(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}var ve=_t(/[A-Za-z]/),Ce=_t(/[\dA-Za-z]/),Og=_t(/[#-'*+\--9=?A-Z^-~]/);function Ar(e){return e!==null&&(e<32||e===127)}var Oi=_t(/\d/),Dg=_t(/[\dA-Fa-f]/),Pg=_t(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function re(e){return e===-2||e===-1||e===32}var Yr=_t(/\p{P}|\p{S}/u),Pt=_t(/\s/);function _t(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Mg(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Bg(e,t,n){const r=Br((n||{}).ignore||[]),i=Fg(t);let s=-1;for(;++s<i.length;)es(e,"text",a);function a(l,u){let m=-1,d;for(;++m<u.length;){const f=u[m],p=d?d.children:void 0;if(r(f,p?p.indexOf(f):void 0,d))return;d=f}if(d)return o(l,u)}function o(l,u){const m=u[u.length-1],d=i[s][0],f=i[s][1];let p=0;const g=m.children.indexOf(l);let N=!1,C=[];d.lastIndex=0;let b=d.exec(l.value);for(;b;){const A=b.index,v={index:b.index,input:b.input,stack:[...u,l]};let w=f(...b,v);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?d.lastIndex=A+1:(p!==A&&C.push({type:"text",value:l.value.slice(p,A)}),Array.isArray(w)?C.push(...w):w&&C.push(w),p=A+b[0].length,N=!0),!d.global)break;b=d.exec(l.value)}return N?(p<l.value.length&&C.push({type:"text",value:l.value.slice(p)}),m.children.splice(g,1,...C)):C=[l],g+C.length}}function Fg(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([jg(i[0]),Hg(i[1])])}return t}function jg(e){return typeof e=="string"?new RegExp(Mg(e),"g"):e}function Hg(e){return typeof e=="function"?e:function(){return e}}var si="phrasing",ai=["autolink","link","image","label"];function Ug(){return{transforms:[Qg],enter:{literalAutolink:$g,literalAutolinkEmail:oi,literalAutolinkHttp:oi,literalAutolinkWww:oi},exit:{literalAutolink:Wg,literalAutolinkEmail:Vg,literalAutolinkHttp:qg,literalAutolinkWww:Yg}}}function zg(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:si,notInConstruct:ai},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:si,notInConstruct:ai},{character:":",before:"[ps]",after:"\\/",inConstruct:si,notInConstruct:ai}]}}function $g(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function oi(e){this.config.enter.autolinkProtocol.call(this,e)}function qg(e){this.config.exit.autolinkProtocol.call(this,e)}function Yg(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 Vg(e){this.config.exit.autolinkEmail.call(this,e)}function Wg(e){this.exit(e)}function Qg(e){Bg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Gg],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Kg]],{ignore:["link","linkReference"]})}function Gg(e,t,n,r,i){let s="";if(!Jl(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Xg(n)))return!1;const a=Zg(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function Kg(e,t,n,r){return!Jl(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Xg(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 Zg(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=xa(e,"(");let s=xa(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Jl(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pt(n)||Yr(n))&&(!t||n!==47)}function Ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ec.peek=oE;function Jg(){this.buffer()}function eE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tE(){this.buffer()}function nE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function rE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iE(e){this.exit(e)}function sE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function aE(e){this.exit(e)}function oE(){return"["}function ec(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function lE(){return{enter:{gfmFootnoteCallString:Jg,gfmFootnoteCall:eE,gfmFootnoteDefinitionLabelString:tE,gfmFootnoteDefinition:nE},exit:{gfmFootnoteCallString:rE,gfmFootnoteCall:iE,gfmFootnoteDefinitionLabelString:sE,gfmFootnoteDefinition:aE}}}function cE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ec},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const u=s.enter("footnoteDefinition"),m=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),m(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
4
+ `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?tc:uE))),u(),l}}function uE(e,t,n){return t===0?e:tc(e,t,n)}function tc(e,t,n){return(n?"":" ")+e}var hE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nc.peek=gE;function dE(){return{canContainEols:["delete"],enter:{strikethrough:fE},exit:{strikethrough:pE}}}function mE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hE}],handlers:{delete:nc}}}function fE(e){this.enter({type:"delete",children:[]},e)}function pE(e){this.exit(e)}function nc(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function gE(){return"~"}function EE(e){return e.length}function TE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||EE,s=[],a=[],o=[],l=[];let u=0,m=-1;for(;++m<e.length;){const N=[],C=[];let b=-1;for(e[m].length>u&&(u=e[m].length);++b<e[m].length;){const A=bE(e[m][b]);if(n.alignDelimiters!==!1){const v=i(A);C[b]=v,(l[b]===void 0||v>l[b])&&(l[b]=v)}N.push(A)}a[m]=N,o[m]=C}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)s[d]=ka(r[d]);else{const N=ka(r);for(;++d<u;)s[d]=N}d=-1;const f=[],p=[];for(;++d<u;){const N=s[d];let C="",b="";N===99?(C=":",b=":"):N===108?C=":":N===114&&(b=":");let A=n.alignDelimiters===!1?1:Math.max(1,l[d]-C.length-b.length);const v=C+"-".repeat(A)+b;n.alignDelimiters!==!1&&(A=C.length+A+b.length,A>l[d]&&(l[d]=A),p[d]=A),f[d]=v}a.splice(1,0,f),o.splice(1,0,p),m=-1;const g=[];for(;++m<a.length;){const N=a[m],C=o[m];d=-1;const b=[];for(;++d<u;){const A=N[d]||"";let v="",w="";if(n.alignDelimiters!==!1){const O=l[d]-(C[d]||0),I=s[d];I===114?v=" ".repeat(O):I===99?O%2?(v=" ".repeat(O/2+.5),w=" ".repeat(O/2-.5)):(v=" ".repeat(O/2),w=v):w=" ".repeat(O)}n.delimiterStart!==!1&&!d&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||d)&&b.push(" "),n.alignDelimiters!==!1&&b.push(v),b.push(A),n.alignDelimiters!==!1&&b.push(w),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&b.push("|")}g.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return g.join(`
5
+ `)}function bE(e){return e==null?"":String(e)}function ka(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 xE(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),kE);return i(),a}function kE(e,t,n){return">"+(n?"":" ")+e}function yE(e,t){return ya(e,t.inConstruct,!0)&&!ya(e,t.notInConstruct,!1)}function ya(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 Ca(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
6
+ `&&yE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
7
+ `}function CE(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function _E(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 AE(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 NE(e,t,n,r){const i=AE(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(_E(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,vE);return d(),f}const o=n.createTracker(r),l=i.repeat(Math.max(CE(s,i)+1,3)),u=n.enter("codeFenced");let m=o.move(l);if(e.lang){const d=n.enter(`codeFencedLang${a}`);m+=o.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);m+=o.move(" "),m+=o.move(n.safe(e.meta,{before:m,after:`
8
+ `,encode:["`"],...o.current()})),d()}return m+=o.move(`
9
+ `),s&&(m+=o.move(s+`
10
+ `)),m+=o.move(l),u(),m}function vE(e,t,n){return(n?"":" ")+e}function ls(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 SE(e,t,n,r){const i=ls(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
11
+ `,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),a(),u}function IE(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 Un(e){return"&#x"+e.toString(16).toUpperCase()+";"}function rn(e){if(e===null||he(e)||Pt(e))return 1;if(Yr(e))return 2}function Nr(e,t,n){const r=rn(e),i=rn(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}}rc.peek=wE;function rc(e,t,n,r){const i=IE(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),m=Nr(r.before.charCodeAt(r.before.length-1),u,i);m.inside&&(l=Un(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Nr(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+Un(d));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:m.outside},o+l+p}function wE(e,t,n){return n.options.emphasis||"*"}var LE={};function cs(e,t){const n=t||LE;return ic(e,typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,typeof n.includeHtml=="boolean"?n.includeHtml:!0)}function ic(e,t,n){if(RE(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 _a(e.children,t,n)}return Array.isArray(e)?_a(e,t,n):""}function _a(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ic(e[i],t,n);return r.join("")}function RE(e){return!!(e&&typeof e=="object")}function OE(e,t){let n=!1;return tt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,!1}),!!((!e.depth||e.depth<3)&&cs(e)&&(t.options.setext||n))}function DE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(OE(e,n)){const m=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
12
12
  `,after:`
13
13
  `});return d(),m(),f+`
14
14
  `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
15
- `))+1))}const a="#".repeat(i),l=n.enter("headingAtx"),o=n.enter("phrasing");s.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
16
- `,...s.current()});return/^[\t ]/.test(u)&&(u=Un(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),o(),l(),u}Zo.peek=wE;function Zo(e){return e.value||""}function wE(){return"<"}Jo.peek=LE;function Jo(e,t,n,r){const i=ls(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const o=n.createTracker(r);let u=o.move("![");return u+=o.move(n.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(")"),a(),u}function LE(){return"!"}ec.peek=RE;function ec(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(r);let o=l.move("![");const u=n.safe(e.alt,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...l.current()});return a(),n.stack=m,s(),i==="full"||!u||u!==d?o+=l.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function RE(){return"!"}tc.peek=OE;function tc(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],l=n.compilePattern(a);let o;if(a.atBreak)for(;o=l.exec(r);){let u=o.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(o.index+1)}}return i+r+i}function OE(){return"`"}function nc(e,t){const n=os(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))}rc.peek=DE;function rc(e,t,n,r){const i=ls(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let l,o;if(nc(e,n)){const m=n.stack;n.stack=[],l=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),l(),n.stack=m,d}l=n.enter("link"),o=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(o=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),o()),u+=a.move(")"),l(),u}function DE(e,t,n){return nc(e,n)?"<":"["}ic.peek=PE;function ic(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(r);let o=l.move("[");const u=n.containerPhrasing(e,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...l.current()});return a(),n.stack=m,s(),i==="full"||!u||u!==d?o+=l.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function PE(){return"["}function cs(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 ME(e){const t=cs(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 BE(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 sc(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 FE(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?BE(n):cs(n);const l=e.ordered?a==="."?")":".":ME(n);let o=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.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&&(o=!0),sc(n)===a&&m){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(a=l),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),u}function jE(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 HE(e,t,n,r){const i=jE(n);let s=n.bulletCurrent||cs(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const l=n.createTracker(r);l.move(s+" ".repeat(a-s.length)),l.shift(a);const o=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),m);return o(),u;function m(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?s:s+" ".repeat(a-s.length))+d}}function UE(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}var zE=Br(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $E(e,t,n,r){return(e.children.some(function(i){return zE(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function qE(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ac.peek=YE;function ac(e,t,n,r){const i=qE(n),s=n.enter("strong"),a=n.createTracker(r),l=a.move(i+i);let o=a.move(n.containerPhrasing(e,{after:i,before:l,...a.current()}));const u=o.charCodeAt(0),m=Nr(r.before.charCodeAt(r.before.length-1),u,i);m.inside&&(o=Un(u)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Nr(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+Un(d));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:m.outside},l+o+p}function YE(e,t,n){return n.options.strong||"*"}function VE(e,t,n,r){return n.safe(e.value,r)}function WE(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 QE(e,t,n){const r=(sc(n)+(n.options.ruleSpaces?" ":"")).repeat(WE(n));return n.options.ruleSpaces?r.slice(0,-1):r}var lc={blockquote:pE,break:ba,code:kE,definition:CE,emphasis:Ko,hardBreak:ba,heading:IE,html:Zo,image:Jo,imageReference:ec,inlineCode:tc,link:rc,linkReference:ic,list:FE,listItem:HE,paragraph:UE,root:$E,strong:ac,text:VE,thematicBreak:QE},ka=document.createElement("i");function us(e){const t="&"+e+";";ka.innerHTML=t;const n=ka.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function oc(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)}var GE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KE(e){return e.replace(GE,XE)}function XE(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),i=r===120||r===88;return oc(n.slice(i?2:1),i?16:10)}return us(n)||e}function ZE(){return{enter:{table:JE,tableData:ya,tableHeader:ya,tableRow:tT},exit:{codeText:nT,table:eT,tableData:li,tableHeader:li,tableRow:li}}}function JE(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 eT(e){this.exit(e),this.data.inTable=void 0}function tT(e){this.enter({type:"tableRow",children:[]},e)}function li(e){this.exit(e)}function ya(e){this.enter({type:"tableCell",children:[]},e)}function nT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rT(e,t){return t==="|"?t:e}function iT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
17
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:o,tableRow:l}};function a(p,g,N,C){return u(m(p,N,C),p.align)}function l(p,g,N,C){const b=u([d(p,N,C)]);return b.slice(0,b.indexOf(`
18
- `))}function o(p,g,N,C){const b=N.enter("tableCell"),A=N.enter("phrasing"),v=N.containerPhrasing(p,{...C,before:s,after:s});return A(),b(),v}function u(p,g){return mE(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function m(p,g,N){const C=p.children;let b=-1;const A=[],v=g.enter("table");for(;++b<C.length;)A[b]=d(C[b],g,N);return v(),A}function d(p,g,N){const C=p.children;let b=-1;const A=[],v=g.enter("tableRow");for(;++b<C.length;)A[b]=o(C[b],p,g,N);return v(),A}function f(p,g,N){let C=lc.inlineCode(p,g,N);return N.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function sT(){return{exit:{taskListCheckValueChecked:Ca,taskListCheckValueUnchecked:Ca,paragraph:lT}}}function aT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oT}}}function Ca(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lT(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 s=-1,a;for(;++s<i.length;){const l=i[s];if(l.type==="paragraph"){a=l;break}}a===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 oT(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);s&&l.move(a);let o=lc.listItem(e,t,n,{...r,...l.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(m){return m+a}}function cT(){return[Mg(),rE(),lE(),ZE(),sT()]}function uT(e){return{extensions:[Bg(),iE(e),oE(),iT(e),aT()]}}function Fe(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function ze(e,t){return e.length>0?(Fe(e,e.length,0,t),e):t}var _a={}.hasOwnProperty;function cc(e){const t={};let n=-1;for(;++n<e.length;)hT(t,e[n]);return t}function hT(e,t){let n;for(n in t){const r=(_a.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){_a.call(r,s)||(r[s]=[]);const a=i[s];dT(r[s],Array.isArray(a)?a:a?[a]:[])}}}function dT(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Fe(e,0,0,r)}var mT={tokenize:bT,partial:!0},uc={tokenize:xT,partial:!0},hc={tokenize:kT,partial:!0},dc={tokenize:yT,partial:!0},fT={tokenize:CT,partial:!0},mc={name:"wwwAutolink",tokenize:ET,previous:pc},fc={name:"protocolAutolink",tokenize:TT,previous:gc},ut={name:"emailAutolink",tokenize:gT,previous:Ec},rt={};function pT(){return{text:rt}}var St=48;for(;St<123;)rt[St]=ut,St++,St===58?St=65:St===91&&(St=97);rt[43]=ut;rt[45]=ut;rt[46]=ut;rt[95]=ut;rt[72]=[ut,fc];rt[104]=[ut,fc];rt[87]=[ut,mc];rt[119]=[ut,mc];function gT(e,t,n){const r=this;let i,s;return a;function a(d){return!Oi(d)||!Ec.call(r,r.previous)||hs(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Oi(d)?(e.consume(d),l):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(fT,m,u)(d):d===45||d===95||Ce(d)?(s=!0,e.consume(d),o):m(d)}function u(d){return e.consume(d),i=!0,o}function m(d){return s&&i&&ve(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function ET(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!pc.call(r,r.previous)||hs(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mT,e.attempt(uc,e.attempt(hc,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function TT(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&gc.call(r,r.previous)&&!hs(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(ve(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),s?u:(s=!0,o)):n(d)}function u(d){return d===null||Ar(d)||he(d)||Pt(d)||Yr(d)?n(d):e.attempt(uc,e.attempt(hc,m),n)(d)}function m(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function bT(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function xT(e,t,n){let r,i,s;return a;function a(u){return u===46||u===95?e.check(dc,o,l)(u):u===null||he(u)||Pt(u)||u!==45&&Yr(u)?o(u):(s=!0,e.consume(u),a)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function o(u){return i||r||!s?n(u):t(u)}}function kT(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(dc,t,s)(a):a===null||he(a)||Pt(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function yT(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),s):l===93?(e.consume(l),i):l===60||l===null||he(l)||Pt(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||he(l)||Pt(l)?t(l):r(l)}function s(l){return ve(l)?a(l):n(l)}function a(l){return l===59?(e.consume(l),r):ve(l)?(e.consume(l),a):n(l)}}function CT(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ce(s)?n(s):t(s)}}function pc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function gc(e){return!ve(e)}function Ec(e){return!(e===47||Oi(e))}function Oi(e){return e===43||e===45||e===46||e===95||Ce(e)}function hs(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}function an(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Ce(e.charCodeAt(n+1))&&Ce(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(a=String.fromCharCode(s,l),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Vr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}var Di={name:"attention",resolveAll:_T,tokenize:AT};function _T(e,t){let n=-1,r,i,s,a,l,o,u,m;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;o=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 d={...e[r][1].end},f={...e[n][1].start};Aa(d,-o),Aa(f,o),a={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ze(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ze(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=ze(u,Vr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ze(u,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,u=ze(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Fe(e,r-1,n-r+3,u),n=r+u.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function AT(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=en(r);let s;return a;function a(o){return s=o,e.enter("attentionSequence"),l(o)}function l(o){if(o===s)return e.consume(o),l;const u=e.exit("attentionSequence"),m=en(o),d=!m||m===2&&i||n.includes(o),f=!i||i===2&&m||n.includes(r);return u._open=!!(s===42?d:d&&(i||!f)),u._close=!!(s===42?f:f&&(m||!d)),t(o)}}function Aa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var NT={name:"autolink",tokenize:vT};function vT(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"),s}function s(p){return ve(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||Ce(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||Ce(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function o(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||Ar(p)?n(p):(e.consume(p),o)}function u(p){return p===64?(e.consume(p),m):Sg(p)?(e.consume(p),u):n(p)}function m(p){return Ce(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,m):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Ce(p))&&r++<63){const g=p===45?f:d;return e.consume(p),g}return n(p)}}function ae(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(o){return re(o)?(e.enter(n),l(o)):t(o)}function l(o){return re(o)&&s++<i?(e.consume(o),l):(e.exit(n),t(o))}}var tr={partial:!0,tokenize:ST};function ST(e,t,n){return r;function r(s){return re(s)?ae(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||W(s)?t(s):n(s)}}var Tc={continuation:{tokenize:wT},exit:LT,name:"blockQuote",tokenize:IT};function IT(e,t,n){const r=this;return i;function i(a){if(a===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return re(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function wT(e,t,n){const r=this;return i;function i(a){return re(a)?ae(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Tc,t,n)(a)}}function LT(e){e.exit("blockQuote")}var bc={name:"characterEscape",tokenize:RT};function RT(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return wg(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}var xc={name:"characterReference",tokenize:OT};function OT(e,t,n){const r=this;let i=0,s,a;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=Ce,m(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Ig,m):(e.enter("characterReferenceValue"),s=7,a=Ri,m(d))}function m(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===Ce&&!us(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),m):n(d)}}var Na={partial:!0,tokenize:PT},va={concrete:!0,name:"codeFenced",tokenize:DT};function DT(e,t,n){const r=this,i={partial:!0,tokenize:O};let s=0,a=0,l;return o;function o(I){return u(I)}function u(I){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,l=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(I)}function m(I){return I===l?(a++,e.consume(I),m):a<3?n(I):(e.exit("codeFencedFenceSequence"),re(I)?ae(e,d,"whitespace")(I):d(I))}function d(I){return I===null||W(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(Na,N,w)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(I))}function f(I){return I===null||W(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(I)):re(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ae(e,p,"whitespace")(I)):I===96&&I===l?n(I):(e.consume(I),f)}function p(I){return I===null||W(I)?d(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(I))}function g(I){return I===null||W(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(I)):I===96&&I===l?n(I):(e.consume(I),g)}function N(I){return e.attempt(i,w,C)(I)}function C(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),b}function b(I){return s>0&&re(I)?ae(e,A,"linePrefix",s+1)(I):A(I)}function A(I){return I===null||W(I)?e.check(Na,N,w)(I):(e.enter("codeFlowValue"),v(I))}function v(I){return I===null||W(I)?(e.exit("codeFlowValue"),A(I)):(e.consume(I),v)}function w(I){return e.exit("codeFenced"),t(I)}function O(I,B,$){let Y=0;return S;function S(G){return I.enter("lineEnding"),I.consume(G),I.exit("lineEnding"),H}function H(G){return I.enter("codeFencedFence"),re(G)?ae(I,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):q(G)}function q(G){return G===l?(I.enter("codeFencedFenceSequence"),Z(G)):$(G)}function Z(G){return G===l?(Y++,I.consume(G),Z):Y>=a?(I.exit("codeFencedFenceSequence"),re(G)?ae(I,ie,"whitespace")(G):ie(G)):$(G)}function ie(G){return G===null||W(G)?(I.exit("codeFencedFence"),B(G)):$(G)}}}function PT(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}var oi={name:"codeIndented",tokenize:BT},MT={partial:!0,tokenize:FT};function BT(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ae(e,s,"linePrefix",5)(u)}function s(u){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?o(u):W(u)?e.attempt(MT,a,o)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||W(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),l)}function o(u){return e.exit("codeIndented"),t(u)}}function FT(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):W(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ae(e,s,"linePrefix",5)(a)}function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):W(a)?i(a):n(a)}}var jT={name:"codeText",previous:UT,resolve:HT,tokenize:zT};function HT(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 UT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zT(e,t,n){let r=0,i,s;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(s=e.enter("codeTextSequence"),i=0,m(d)):W(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||W(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),u)}function m(d){return d===96?(e.consume(d),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}var $T=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&fn(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),fn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);fn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);fn(this.left,t.reverse())}}};function fn(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 kc(e){const t={};let n=-1,r,i,s,a,l,o,u;const m=new $T(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,qT(m,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=m.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},l=m.slice(i,n),l.unshift(r),m.splice(i,n-i+1,l))}}return Fe(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!u}function qT(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,o=[],u={};let m,d,f=-1,p=n,g=0,N=0;const C=[N];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(m=r.sliceStream(p),p.next||m.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(N=f+1,C.push(N),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),f=C.length;f--;){const b=l.slice(C[f],C[f+1]),A=s.pop();o.push([A,A+b.length-1]),e.splice(A,2,b)}for(o.reverse(),f=-1;++f<o.length;)u[g+o[f][0]]=g+o[f][1],g+=o[f][1]-o[f][0]-1;return u}var YT={resolve:WT,tokenize:QT},VT={partial:!0,tokenize:GT};function WT(e){return kc(e),e}function QT(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):W(l)?e.check(VT,a,s)(l):(e.consume(l),i)}function s(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function a(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function GT(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ae(e,s,"linePrefix")}function s(a){if(a===null||W(a))return n(a);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function yc(e,t,n,r,i,s,a,l,o){const u=o||Number.POSITIVE_INFINITY;let m=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),f):b===null||b===32||b===41||Ar(b)?n(b):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),N(b))}function f(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(l),f(b)):b===null||b===60||W(b)?n(b):(e.consume(b),b===92?g:p)}function g(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function N(b){return!m&&(b===null||b===41||he(b))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(b)):m<u&&b===40?(e.consume(b),m++,N):b===41?(e.consume(b),m--,N):b===null||b===32||b===40||Ar(b)?n(b):(e.consume(b),b===92?C:N)}function C(b){return b===40||b===41||b===92?(e.consume(b),N):N(b)}}function Cc(e,t,n,r,i,s){const a=this;let l=0,o;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),m}function m(p){return l>999||p===null||p===91||p===93&&!o||p===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):W(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||W(p)||l++>999?(e.exit("chunkString"),m(p)):(e.consume(p),o||(o=!re(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function _c(e,t,n,r,i,s){let a;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,o):n(f)}function o(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),u(f))}function u(f){return f===a?(e.exit(s),o(a)):f===null?n(f):W(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ae(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(f))}function m(f){return f===a||f===null||W(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:m)}function d(f){return f===a||f===92?(e.consume(f),m):m(f)}}function Nn(e,t){let n;return r;function r(i){return W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):re(i)?ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var KT={name:"definition",tokenize:ZT},XT={partial:!0,tokenize:JT};function ZT(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return Cc.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return he(p)?Nn(e,u)(p):u(p)}function u(p){return yc(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function m(p){return e.attempt(XT,d,d)(p)}function d(p){return re(p)?ae(e,f,"whitespace")(p):f(p)}function f(p){return p===null||W(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function JT(e,t,n){return r;function r(l){return he(l)?Nn(e,i)(l):n(l)}function i(l){return _c(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return re(l)?ae(e,a,"whitespace")(l):a(l)}function a(l){return l===null||W(l)?t(l):n(l)}}var eb={name:"hardBreakEscape",tokenize:tb};function tb(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return W(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}var nb={name:"headingAtx",resolve:rb,tokenize:ib};function rb(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Fe(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function ib(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||he(m)?(e.exit("atxHeadingSequence"),l(m)):n(m)}function l(m){return m===35?(e.enter("atxHeadingSequence"),o(m)):m===null||W(m)?(e.exit("atxHeading"),t(m)):re(m)?ae(e,l,"whitespace")(m):(e.enter("atxHeadingText"),u(m))}function o(m){return m===35?(e.consume(m),o):(e.exit("atxHeadingSequence"),l(m))}function u(m){return m===null||m===35||he(m)?(e.exit("atxHeadingText"),l(m)):(e.consume(m),u)}}var sb=["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"],Sa=["pre","script","style","textarea"],ab={concrete:!0,name:"htmlFlow",resolveTo:cb,tokenize:ub},lb={partial:!0,tokenize:db},ob={partial:!0,tokenize:hb};function cb(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 ub(e,t,n){const r=this;let i,s,a,l,o;return u;function u(_){return m(_)}function m(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),s=!0,N):_===63?(e.consume(_),i=3,r.interrupt?t:y):ve(_)?(e.consume(_),a=String.fromCharCode(_),C):n(_)}function f(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,l=0,g):ve(_)?(e.consume(_),i=4,r.interrupt?t:y):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:y):n(_)}function g(_){return _==="CDATA[".charCodeAt(l++)?(e.consume(_),l===6?r.interrupt?t:q:g):n(_)}function N(_){return ve(_)?(e.consume(_),a=String.fromCharCode(_),C):n(_)}function C(_){if(_===null||_===47||_===62||he(_)){const De=_===47,Te=a.toLowerCase();return!De&&!s&&Sa.includes(Te)?(i=1,r.interrupt?t(_):q(_)):sb.includes(a.toLowerCase())?(i=6,De?(e.consume(_),b):r.interrupt?t(_):q(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):s?A(_):v(_))}return _===45||Ce(_)?(e.consume(_),a+=String.fromCharCode(_),C):n(_)}function b(_){return _===62?(e.consume(_),r.interrupt?t:q):n(_)}function A(_){return re(_)?(e.consume(_),A):S(_)}function v(_){return _===47?(e.consume(_),S):_===58||_===95||ve(_)?(e.consume(_),w):re(_)?(e.consume(_),v):S(_)}function w(_){return _===45||_===46||_===58||_===95||Ce(_)?(e.consume(_),w):O(_)}function O(_){return _===61?(e.consume(_),I):re(_)?(e.consume(_),O):v(_)}function I(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,B):re(_)?(e.consume(_),I):$(_)}function B(_){return _===o?(e.consume(_),o=null,Y):_===null||W(_)?n(_):(e.consume(_),B)}function $(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||he(_)?O(_):(e.consume(_),$)}function Y(_){return _===47||_===62||re(_)?v(_):n(_)}function S(_){return _===62?(e.consume(_),H):n(_)}function H(_){return _===null||W(_)?q(_):re(_)?(e.consume(_),H):n(_)}function q(_){return _===45&&i===2?(e.consume(_),U):_===60&&i===1?(e.consume(_),P):_===62&&i===4?(e.consume(_),ce):_===63&&i===3?(e.consume(_),y):_===93&&i===5?(e.consume(_),X):W(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(lb,Q,Z)(_)):_===null||W(_)?(e.exit("htmlFlowData"),Z(_)):(e.consume(_),q)}function Z(_){return e.check(ob,ie,Q)(_)}function ie(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),G}function G(_){return _===null||W(_)?Z(_):(e.enter("htmlFlowData"),q(_))}function U(_){return _===45?(e.consume(_),y):q(_)}function P(_){return _===47?(e.consume(_),a="",V):q(_)}function V(_){if(_===62){const De=a.toLowerCase();return Sa.includes(De)?(e.consume(_),ce):q(_)}return ve(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),V):q(_)}function X(_){return _===93?(e.consume(_),y):q(_)}function y(_){return _===62?(e.consume(_),ce):_===45&&i===2?(e.consume(_),y):q(_)}function ce(_){return _===null||W(_)?(e.exit("htmlFlowData"),Q(_)):(e.consume(_),ce)}function Q(_){return e.exit("htmlFlow"),t(_)}}function hb(e,t,n){const r=this;return i;function i(a){return W(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function db(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tr,t,n)}}var mb={name:"htmlText",tokenize:fb};function fb(e,t,n){const r=this;let i,s,a;return l;function l(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),o}function o(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),O):y===63?(e.consume(y),v):ve(y)?(e.consume(y),$):n(y)}function u(y){return y===45?(e.consume(y),m):y===91?(e.consume(y),s=0,g):ve(y)?(e.consume(y),A):n(y)}function m(y){return y===45?(e.consume(y),p):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),f):W(y)?(a=d,P(y)):(e.consume(y),d)}function f(y){return y===45?(e.consume(y),p):d(y)}function p(y){return y===62?U(y):y===45?f(y):d(y)}function g(y){return y==="CDATA[".charCodeAt(s++)?(e.consume(y),s===6?N:g):n(y)}function N(y){return y===null?n(y):y===93?(e.consume(y),C):W(y)?(a=N,P(y)):(e.consume(y),N)}function C(y){return y===93?(e.consume(y),b):N(y)}function b(y){return y===62?U(y):y===93?(e.consume(y),b):N(y)}function A(y){return y===null||y===62?U(y):W(y)?(a=A,P(y)):(e.consume(y),A)}function v(y){return y===null?n(y):y===63?(e.consume(y),w):W(y)?(a=v,P(y)):(e.consume(y),v)}function w(y){return y===62?U(y):v(y)}function O(y){return ve(y)?(e.consume(y),I):n(y)}function I(y){return y===45||Ce(y)?(e.consume(y),I):B(y)}function B(y){return W(y)?(a=B,P(y)):re(y)?(e.consume(y),B):U(y)}function $(y){return y===45||Ce(y)?(e.consume(y),$):y===47||y===62||he(y)?Y(y):n(y)}function Y(y){return y===47?(e.consume(y),U):y===58||y===95||ve(y)?(e.consume(y),S):W(y)?(a=Y,P(y)):re(y)?(e.consume(y),Y):U(y)}function S(y){return y===45||y===46||y===58||y===95||Ce(y)?(e.consume(y),S):H(y)}function H(y){return y===61?(e.consume(y),q):W(y)?(a=H,P(y)):re(y)?(e.consume(y),H):Y(y)}function q(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,Z):W(y)?(a=q,P(y)):re(y)?(e.consume(y),q):(e.consume(y),ie)}function Z(y){return y===i?(e.consume(y),i=void 0,G):y===null?n(y):W(y)?(a=Z,P(y)):(e.consume(y),Z)}function ie(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||he(y)?Y(y):(e.consume(y),ie)}function G(y){return y===47||y===62||he(y)?Y(y):n(y)}function U(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function P(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),V}function V(y){return re(y)?ae(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):X(y)}function X(y){return e.enter("htmlTextData"),a(y)}}var ds={name:"labelEnd",resolveAll:Tb,resolveTo:bb,tokenize:xb},pb={tokenize:kb},gb={tokenize:yb},Eb={tokenize:Cb};function Tb(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&&Fe(e,0,e.length,n),e}function bb(e,t){let n=e.length,r=0,i,s,a,l;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const o={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return l=[["enter",o,t],["enter",u,t]],l=ze(l,e.slice(s+1,s+r+3)),l=ze(l,[["enter",m,t]]),l=ze(l,Vr(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),l=ze(l,[["exit",m,t],e[a-2],e[a-1],["exit",u,t]]),l=ze(l,e.slice(a+1)),l=ze(l,[["exit",o,t]]),Fe(e,s,e.length,l),e}function xb(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return l;function l(f){return s?s._inactive?d(f):(a=r.parser.defined.includes(Ye(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(pb,m,a?m:d)(f):f===91?e.attempt(gb,m,a?u:d)(f):a?m(f):d(f)}function u(f){return e.attempt(Eb,m,d)(f)}function m(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function kb(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return he(d)?Nn(e,s)(d):s(d)}function s(d){return d===41?m(d):yc(e,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return he(d)?Nn(e,o)(d):m(d)}function l(d){return n(d)}function o(d){return d===34||d===39||d===40?_c(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):m(d)}function u(d){return he(d)?Nn(e,m)(d):m(d)}function m(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function yb(e,t,n){const r=this;return i;function i(l){return Cc.call(r,e,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function a(l){return n(l)}}function Cb(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}var _b={name:"labelStartImage",resolveAll:ds.resolveAll,tokenize:Ab};function Ab(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}var Nb={name:"labelStartLink",resolveAll:ds.resolveAll,tokenize:vb};function vb(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}var ci={name:"lineEnding",tokenize:Sb};function Sb(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ae(e,t,"linePrefix")}}var xr={name:"thematicBreak",tokenize:Ib};function Ib(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):r>=3&&(u===null||W(u))?(e.exit("thematicBreak"),t(u)):n(u)}function o(u){return u===i?(e.consume(u),r++,o):(e.exit("thematicBreakSequence"),re(u)?ae(e,l,"whitespace")(u):l(u))}}var Re={continuation:{tokenize:Ob},exit:Pb,name:"list",tokenize:Rb},wb={partial:!0,tokenize:Mb},Lb={partial:!0,tokenize:Db};function Rb(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return l;function l(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Ri(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(xr,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Ri(p)&&++a<10?(e.consume(p),o):(!r.interrupt||a<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(tr,r.interrupt?n:m,e.attempt(wb,f,d))}function m(p){return r.containerState.initialBlankLine=!0,s++,f(p)}function d(p){return re(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ob(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tr,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ae(e,t,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!re(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Lb,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ae(e,e.attempt(Re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Db(e,t,n){const r=this;return ae(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Pb(e){e.exit(this.containerState.type)}function Mb(e,t,n){const r=this;return ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!re(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}var Ia={name:"setextUnderline",resolveTo:Bb,tokenize:Fb};function Bb(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Fb(e,t,n){const r=this;let i;return s;function s(u){let m=r.events.length,d;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){d=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),re(u)?ae(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||W(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}var jb={tokenize:Wb,partial:!0};function Hb(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:qb,continuation:{tokenize:Yb},exit:Vb}},text:{91:{name:"gfmFootnoteCall",tokenize:$b},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ub,resolveTo:zb}}}}function Ub(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){a=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return l;function l(o){if(!a||!a._balanced)return n(o);const u=Ye(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function zb(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function $b(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(s>999||d===93&&!a||d===null||d===91||he(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ye(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return he(d)||(a=!0),s++,e.consume(d),d===92?m:u}function m(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function qb(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,l;return o;function o(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(g)}function m(g){if(a>999||g===93&&!l||g===null||g===91||he(g))return n(g);if(g===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return s=Ye(r.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return he(g)||(l=!0),a++,e.consume(g),g===92?d:m}function d(g){return g===91||g===92||g===93?(e.consume(g),a++,m):m(g)}function f(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function Yb(e,t,n){return e.check(tr,t,e.attempt(jb,t,n))}function Vb(e){e.exit("gfmFootnoteDefinition")}function Wb(e,t,n){const r=this;return ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Qb(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let o=l;for(;o--;)if(s[o][0]==="exit"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[o][1].end.offset-s[o][1].start.offset){s[l][1].type="strikethroughSequence",s[o][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[o][1].start),end:Object.assign({},s[l][1].end)},m={type:"strikethroughText",start:Object.assign({},s[o][1].end),end:Object.assign({},s[l][1].start)},d=[["enter",u,a],["enter",s[o][1],a],["exit",s[o][1],a],["enter",m,a]],f=a.parser.constructs.insideSpan.null;f&&Fe(d,d.length,0,Vr(f,s.slice(o+1,l),a)),Fe(d,d.length,0,[["exit",m,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",u,a]]),Fe(s,o-1,l-o+3,d),l=o+d.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function i(s,a,l){const o=this.previous,u=this.events;let m=0;return d;function d(p){return o===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(s.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const g=en(o);if(p===126)return m>1?l(p):(s.consume(p),m++,f);if(m<2&&!t)return l(p);const N=s.exit("strikethroughSequenceTemporary"),C=en(p);return N._open=!C||C===2&&!!g,N._close=!g||g===2&&!!C,a(p)}}}var Gb=class{constructor(){this.map=[]}add(e,t,n){Kb(this,e,t,n)}consume(e){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function Kb(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 Xb(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 s=r.length-1;r[s]=r[s]==="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 Zb(){return{flow:{null:{name:"table",tokenize:Jb,resolveAll:e0}}}}function Jb(e,t,n){const r=this;let i=0,s=0,a;return l;function l(S){let H=r.events.length-1;for(;H>-1;){const ie=r.events[H][1].type;if(ie==="lineEnding"||ie==="linePrefix")H--;else break}const q=H>-1?r.events[H][1].type:null,Z=q==="tableHead"||q==="tableRow"?I:o;return Z===I&&r.parser.lazy[r.now().line]?n(S):Z(S)}function o(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===124||(a=!0,s+=1),m(S)}function m(S){return S===null?n(S):W(S)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p):n(S):re(S)?ae(e,m,"whitespace")(S):(s+=1,a&&(a=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||he(S)?(e.exit("data"),m(S)):(e.consume(S),S===92?f:d)}function f(S){return S===92||S===124?(e.consume(S),d):d(S)}function p(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),a=!1,re(S)?ae(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):g(S))}function g(S){return S===45||S===58?C(S):S===124?(a=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),N):O(S)}function N(S){return re(S)?ae(e,C,"whitespace")(S):C(S)}function C(S){return S===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),b):S===45?(s+=1,b(S)):S===null||W(S)?w(S):O(S)}function b(S){return S===45?(e.enter("tableDelimiterFiller"),A(S)):O(S)}function A(S){return S===45?(e.consume(S),A):S===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(S))}function v(S){return re(S)?ae(e,w,"whitespace")(S):w(S)}function w(S){return S===124?g(S):S===null||W(S)?!a||i!==s?O(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):O(S)}function O(S){return n(S)}function I(S){return e.enter("tableRow"),B(S)}function B(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),B):S===null||W(S)?(e.exit("tableRow"),t(S)):re(S)?ae(e,B,"whitespace")(S):(e.enter("data"),$(S))}function $(S){return S===null||S===124||he(S)?(e.exit("data"),B(S)):(e.consume(S),S===92?Y:$)}function Y(S){return S===92||S===124?(e.consume(S),$):$(S)}}function e0(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],l=!1,o=0,u,m,d;const f=new Gb;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(l=!1,o!==0&&(wa(f,t,o,u,m),m=void 0,o=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],l&&(l=!1,m={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",m,t]])),i=g.type==="tableDelimiterRow"?2:m?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=hr(f,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=hr(f,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(l=!0,o=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],d=hr(f,t,s,i,n,d)):a[1]!==0&&(d=hr(f,t,a,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&wa(f,t,o,u,m),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Xb(t.events,n))}return e}function hr(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(s.end=Object.assign({},Wt(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=Wt(t.events,n[1]);if(s={type:a,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=Wt(t.events,n[2]),m=Wt(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,N=n[3]-n[2]-1;e.add(g,N,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},Wt(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function wa(e,t,n,r,i){const s=[],a=Wt(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Wt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var t0={name:"tasklistCheck",tokenize:r0};function n0(){return{text:{91:t0}}}function r0(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),s)}function s(o){return he(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),a):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),a):n(o)}function a(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(o)}function l(o){return W(o)?t(o):re(o)?e.check({tokenize:i0},t,n)(o):n(o)}}function i0(e,t,n){return ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function s0(e){return cc([pT(),Hb(),Qb(e),Zb(),n0()])}var a0={};function l0(e){const t=this,n=e||a0,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(s0(n)),s.push(cT()),a.push(uT(n))}var o0=Object.defineProperty,c0=Object.defineProperties,u0=Object.getOwnPropertyDescriptors,La=Object.getOwnPropertySymbols,h0=Object.prototype.hasOwnProperty,d0=Object.prototype.propertyIsEnumerable,Ra=(e,t,n)=>t in e?o0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ac=(e,t)=>{for(var n in t||(t={}))h0.call(t,n)&&Ra(e,n,t[n]);if(La)for(var n of La(t))d0.call(t,n)&&Ra(e,n,t[n]);return e},Nc=(e,t)=>c0(e,u0(t)),Ie=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},m0=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},f0=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!m0(e,n)&&(t+=1)}return t},xt=(e,t)=>{let n=!1,r=!1,i=-1;for(let s=0;s<e.length;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}if(!r&&e[s]==="`")if(n){if(i<t&&t<s)return!0;n=!1,i=-1}else n=!0,i=s}return!1},p0=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,g0=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(p0,(t,n,r,i)=>Ie(e,i)?t:`${n}\\>${r}`),E0=/(\*\*)([^*]*\*?)$/,T0=/(__)([^_]*?)$/,b0=/(\*\*\*)([^*]*?)$/,x0=/(\*)([^*]*?)$/,k0=/(_)([^_]*?)$/,y0=/(`)([^`]*?)$/,C0=/(~~)([^~]*?)$/,jt=/^[\s_~*`]*$/,vc=/^[\s]*[-*+][\s]+$/,_0=/[\p{L}\p{N}_]/u,A0=/^```[^`\n]*```?$/,N0=/^\*{4,}$/,v0=/(__)([^_]+)_$/,S0=/(~~)([^~]+)~$/,Oa=/~~/g,kt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:_0.test(e)},I0=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Sc=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Wr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},w0=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
19
- `)return!1}return!1},Ic=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?w0(e,t):!1;if(e[n]===`
20
- `)return!1}return!1},L0=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
21
- `)return!1}return!1},ms=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
22
- `){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
23
- `){i=o;break}let s=e.substring(r,i),a=0,l=!1;for(let o of s)if(o===n)a+=1;else if(o!==" "&&o!==" "){l=!0;break}return a>=3&&!l},R0=(e,t,n,r)=>n==="\\"||e.includes("$")&&Wr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&kt(n)&&kt(r)||(!n||n===" "||n===" "||n===`
15
+ `))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
16
+ `,...s.current()});return/^[\t ]/.test(u)&&(u=Un(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),o(),u}sc.peek=PE;function sc(e){return e.value||""}function PE(){return"<"}ac.peek=ME;function ac(e,t,n,r){const i=ls(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function ME(){return"!"}oc.peek=BE;function oc(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const u=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=m,s(),i==="full"||!u||u!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function BE(){return"!"}lc.peek=FE;function lc(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function FE(){return"`"}function cc(e,t){const n=cs(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))}uc.peek=jE;function uc(e,t,n,r){const i=ls(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(cc(e,n)){const m=n.stack;n.stack=[],o=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),o(),n.stack=m,d}o=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),o(),u}function jE(e,t,n){return cc(e,n)?"<":"["}hc.peek=HE;function hc(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=m,s(),i==="full"||!u||u!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function HE(){return"["}function us(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 UE(e){const t=us(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 zE(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 dc(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 $E(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?zE(n):us(n);const o=e.ordered?a==="."?")":".":UE(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.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&&(l=!0),dc(n)===a&&m){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),u}function qE(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 YE(e,t,n,r){const i=qE(n);let s=n.bulletCurrent||us(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),m);return l(),u;function m(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?s:s+" ".repeat(a-s.length))+d}}function VE(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}var WE=Br(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function QE(e,t,n,r){return(e.children.some(function(i){return WE(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function GE(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mc.peek=KE;function mc(e,t,n,r){const i=GE(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),m=Nr(r.before.charCodeAt(r.before.length-1),u,i);m.inside&&(l=Un(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Nr(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+Un(d));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:f.outside,before:m.outside},o+l+p}function KE(e,t,n){return n.options.strong||"*"}function XE(e,t,n,r){return n.safe(e.value,r)}function ZE(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 JE(e,t,n){const r=(dc(n)+(n.options.ruleSpaces?" ":"")).repeat(ZE(n));return n.options.ruleSpaces?r.slice(0,-1):r}var fc={blockquote:xE,break:Ca,code:NE,definition:SE,emphasis:rc,hardBreak:Ca,heading:DE,html:sc,image:ac,imageReference:oc,inlineCode:lc,link:uc,linkReference:hc,list:$E,listItem:YE,paragraph:VE,root:QE,strong:mc,text:XE,thematicBreak:JE},Aa=document.createElement("i");function hs(e){const t="&"+e+";";Aa.innerHTML=t;const n=Aa.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function pc(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)}var eT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tT(e){return e.replace(eT,nT)}function nT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),i=r===120||r===88;return pc(n.slice(i?2:1),i?16:10)}return hs(n)||e}function rT(){return{enter:{table:iT,tableData:Na,tableHeader:Na,tableRow:aT},exit:{codeText:oT,table:sT,tableData:li,tableHeader:li,tableRow:li}}}function iT(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 sT(e){this.exit(e),this.data.inTable=void 0}function aT(e){this.enter({type:"tableRow",children:[]},e)}function li(e){this.exit(e)}function Na(e){this.enter({type:"tableCell",children:[]},e)}function oT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lT(e,t){return t==="|"?t:e}function cT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
17
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:l,tableRow:o}};function a(p,g,N,C){return u(m(p,N,C),p.align)}function o(p,g,N,C){const b=u([d(p,N,C)]);return b.slice(0,b.indexOf(`
18
+ `))}function l(p,g,N,C){const b=N.enter("tableCell"),A=N.enter("phrasing"),v=N.containerPhrasing(p,{...C,before:s,after:s});return A(),b(),v}function u(p,g){return TE(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function m(p,g,N){const C=p.children;let b=-1;const A=[],v=g.enter("table");for(;++b<C.length;)A[b]=d(C[b],g,N);return v(),A}function d(p,g,N){const C=p.children;let b=-1;const A=[],v=g.enter("tableRow");for(;++b<C.length;)A[b]=l(C[b],p,g,N);return v(),A}function f(p,g,N){let C=fc.inlineCode(p,g,N);return N.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function uT(){return{exit:{taskListCheckValueChecked:va,taskListCheckValueUnchecked:va,paragraph:dT}}}function hT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mT}}}function va(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function dT(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 s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===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 mT(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=fc.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(m){return m+a}}function fT(){return[Ug(),lE(),dE(),rT(),uT()]}function pT(e){return{extensions:[zg(),cE(e),mE(),cT(e),hT()]}}function Fe(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function ze(e,t){return e.length>0?(Fe(e,e.length,0,t),e):t}var Sa={}.hasOwnProperty;function gc(e){const t={};let n=-1;for(;++n<e.length;)gT(t,e[n]);return t}function gT(e,t){let n;for(n in t){const r=(Sa.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){Sa.call(r,s)||(r[s]=[]);const a=i[s];ET(r[s],Array.isArray(a)?a:a?[a]:[])}}}function ET(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Fe(e,0,0,r)}var TT={tokenize:_T,partial:!0},Ec={tokenize:AT,partial:!0},Tc={tokenize:NT,partial:!0},bc={tokenize:vT,partial:!0},bT={tokenize:ST,partial:!0},xc={name:"wwwAutolink",tokenize:yT,previous:yc},kc={name:"protocolAutolink",tokenize:CT,previous:Cc},ht={name:"emailAutolink",tokenize:kT,previous:_c},it={};function xT(){return{text:it}}var St=48;for(;St<123;)it[St]=ht,St++,St===58?St=65:St===91&&(St=97);it[43]=ht;it[45]=ht;it[46]=ht;it[95]=ht;it[72]=[ht,kc];it[104]=[ht,kc];it[87]=[ht,xc];it[119]=[ht,xc];function kT(e,t,n){const r=this;let i,s;return a;function a(d){return!Di(d)||!_c.call(r,r.previous)||ds(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Di(d)?(e.consume(d),o):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(bT,m,u)(d):d===45||d===95||Ce(d)?(s=!0,e.consume(d),l):m(d)}function u(d){return e.consume(d),i=!0,l}function m(d){return s&&i&&ve(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function yT(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!yc.call(r,r.previous)||ds(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(TT,e.attempt(Ec,e.attempt(Tc,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function CT(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&Cc.call(r,r.previous)&&!ds(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(ve(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?u:(s=!0,l)):n(d)}function u(d){return d===null||Ar(d)||he(d)||Pt(d)||Yr(d)?n(d):e.attempt(Ec,e.attempt(Tc,m),n)(d)}function m(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function _T(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function AT(e,t,n){let r,i,s;return a;function a(u){return u===46||u===95?e.check(bc,l,o)(u):u===null||he(u)||Pt(u)||u!==45&&Yr(u)?l(u):(s=!0,e.consume(u),a)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!s?n(u):t(u)}}function NT(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(bc,t,s)(a):a===null||he(a)||Pt(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function vT(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||he(o)||Pt(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||he(o)||Pt(o)?t(o):r(o)}function s(o){return ve(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):ve(o)?(e.consume(o),a):n(o)}}function ST(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ce(s)?n(s):t(s)}}function yc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function Cc(e){return!ve(e)}function _c(e){return!(e===47||Di(e))}function Di(e){return e===43||e===45||e===46||e===95||Ce(e)}function ds(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}function cn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Ce(e.charCodeAt(n+1))&&Ce(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Vr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}var Pi={name:"attention",resolveAll:IT,tokenize:wT};function IT(e,t){let n=-1,r,i,s,a,o,l,u,m;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;l=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 d={...e[r][1].end},f={...e[n][1].start};Ia(d,-l),Ia(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ze(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ze(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=ze(u,Vr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ze(u,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,u=ze(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Fe(e,r-1,n-r+3,u),n=r+u.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function wT(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=rn(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const u=e.exit("attentionSequence"),m=rn(l),d=!m||m===2&&i||n.includes(l),f=!i||i===2&&m||n.includes(r);return u._open=!!(s===42?d:d&&(i||!f)),u._close=!!(s===42?f:f&&(m||!d)),t(l)}}function Ia(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var LT={name:"autolink",tokenize:RT};function RT(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"),s}function s(p){return ve(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||Ce(p)?(r=1,o(p)):u(p)}function o(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Ce(p))&&r++<32?(e.consume(p),o):(r=0,u(p))}function l(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||Ar(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),m):Og(p)?(e.consume(p),u):n(p)}function m(p){return Ce(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,m):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Ce(p))&&r++<63){const g=p===45?f:d;return e.consume(p),g}return n(p)}}function ae(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return re(l)?(e.enter(n),o(l)):t(l)}function o(l){return re(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}var tr={partial:!0,tokenize:OT};function OT(e,t,n){return r;function r(s){return re(s)?ae(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||W(s)?t(s):n(s)}}var Ac={continuation:{tokenize:PT},exit:MT,name:"blockQuote",tokenize:DT};function DT(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return re(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function PT(e,t,n){const r=this;return i;function i(a){return re(a)?ae(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Ac,t,n)(a)}}function MT(e){e.exit("blockQuote")}var Nc={name:"characterEscape",tokenize:BT};function BT(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Pg(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}var vc={name:"characterReference",tokenize:FT};function FT(e,t,n){const r=this;let i=0,s,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=Ce,m(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Dg,m):(e.enter("characterReferenceValue"),s=7,a=Oi,m(d))}function m(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===Ce&&!hs(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),m):n(d)}}var wa={partial:!0,tokenize:HT},La={concrete:!0,name:"codeFenced",tokenize:jT};function jT(e,t,n){const r=this,i={partial:!0,tokenize:O};let s=0,a=0,o;return l;function l(I){return u(I)}function u(I){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(I)}function m(I){return I===o?(a++,e.consume(I),m):a<3?n(I):(e.exit("codeFencedFenceSequence"),re(I)?ae(e,d,"whitespace")(I):d(I))}function d(I){return I===null||W(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(wa,N,w)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(I))}function f(I){return I===null||W(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(I)):re(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ae(e,p,"whitespace")(I)):I===96&&I===o?n(I):(e.consume(I),f)}function p(I){return I===null||W(I)?d(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(I))}function g(I){return I===null||W(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(I)):I===96&&I===o?n(I):(e.consume(I),g)}function N(I){return e.attempt(i,w,C)(I)}function C(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),b}function b(I){return s>0&&re(I)?ae(e,A,"linePrefix",s+1)(I):A(I)}function A(I){return I===null||W(I)?e.check(wa,N,w)(I):(e.enter("codeFlowValue"),v(I))}function v(I){return I===null||W(I)?(e.exit("codeFlowValue"),A(I)):(e.consume(I),v)}function w(I){return e.exit("codeFenced"),t(I)}function O(I,B,$){let Y=0;return S;function S(G){return I.enter("lineEnding"),I.consume(G),I.exit("lineEnding"),H}function H(G){return I.enter("codeFencedFence"),re(G)?ae(I,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):q(G)}function q(G){return G===o?(I.enter("codeFencedFenceSequence"),Z(G)):$(G)}function Z(G){return G===o?(Y++,I.consume(G),Z):Y>=a?(I.exit("codeFencedFenceSequence"),re(G)?ae(I,ie,"whitespace")(G):ie(G)):$(G)}function ie(G){return G===null||W(G)?(I.exit("codeFencedFence"),B(G)):$(G)}}}function HT(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}var ci={name:"codeIndented",tokenize:zT},UT={partial:!0,tokenize:$T};function zT(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ae(e,s,"linePrefix",5)(u)}function s(u){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):W(u)?e.attempt(UT,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||W(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function $T(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):W(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ae(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):W(a)?i(a):n(a)}}var qT={name:"codeText",previous:VT,resolve:YT,tokenize:WT};function YT(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 VT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function WT(e,t,n){let r=0,i,s;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,m(d)):W(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||W(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function m(d){return d===96?(e.consume(d),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}var QT=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&En(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),En(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),En(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);En(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);En(this.left,t.reverse())}}};function En(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 Sc(e){const t={};let n=-1,r,i,s,a,o,l,u;const m=new QT(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,GT(m,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=m.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},o=m.slice(i,n),o.unshift(r),m.splice(i,n-i+1,o))}}return Fe(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!u}function GT(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],u={};let m,d,f=-1,p=n,g=0,N=0;const C=[N];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(m=r.sliceStream(p),p.next||m.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(N=f+1,C.push(N),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),f=C.length;f--;){const b=o.slice(C[f],C[f+1]),A=s.pop();l.push([A,A+b.length-1]),e.splice(A,2,b)}for(l.reverse(),f=-1;++f<l.length;)u[g+l[f][0]]=g+l[f][1],g+=l[f][1]-l[f][0]-1;return u}var KT={resolve:ZT,tokenize:JT},XT={partial:!0,tokenize:eb};function ZT(e){return Sc(e),e}function JT(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):W(o)?e.check(XT,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function eb(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ae(e,s,"linePrefix")}function s(a){if(a===null||W(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Ic(e,t,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let m=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),f):b===null||b===32||b===41||Ar(b)?n(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),N(b))}function f(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(o),f(b)):b===null||b===60||W(b)?n(b):(e.consume(b),b===92?g:p)}function g(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function N(b){return!m&&(b===null||b===41||he(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(b)):m<u&&b===40?(e.consume(b),m++,N):b===41?(e.consume(b),m--,N):b===null||b===32||b===40||Ar(b)?n(b):(e.consume(b),b===92?C:N)}function C(b){return b===40||b===41||b===92?(e.consume(b),N):N(b)}}function wc(e,t,n,r,i,s){const a=this;let o=0,l;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),m}function m(p){return o>999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):W(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||W(p)||o++>999?(e.exit("chunkString"),m(p)):(e.consume(p),l||(l=!re(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),o++,d):d(p)}}function Lc(e,t,n,r,i,s){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),u(f))}function u(f){return f===a?(e.exit(s),l(a)):f===null?n(f):W(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ae(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(f))}function m(f){return f===a||f===null||W(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:m)}function d(f){return f===a||f===92?(e.consume(f),m):m(f)}}function In(e,t){let n;return r;function r(i){return W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):re(i)?ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var tb={name:"definition",tokenize:rb},nb={partial:!0,tokenize:ib};function rb(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return wc.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return he(p)?In(e,u)(p):u(p)}function u(p){return Ic(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function m(p){return e.attempt(nb,d,d)(p)}function d(p){return re(p)?ae(e,f,"whitespace")(p):f(p)}function f(p){return p===null||W(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ib(e,t,n){return r;function r(o){return he(o)?In(e,i)(o):n(o)}function i(o){return Lc(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return re(o)?ae(e,a,"whitespace")(o):a(o)}function a(o){return o===null||W(o)?t(o):n(o)}}var sb={name:"hardBreakEscape",tokenize:ab};function ab(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return W(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}var ob={name:"headingAtx",resolve:lb,tokenize:cb};function lb(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Fe(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function cb(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||he(m)?(e.exit("atxHeadingSequence"),o(m)):n(m)}function o(m){return m===35?(e.enter("atxHeadingSequence"),l(m)):m===null||W(m)?(e.exit("atxHeading"),t(m)):re(m)?ae(e,o,"whitespace")(m):(e.enter("atxHeadingText"),u(m))}function l(m){return m===35?(e.consume(m),l):(e.exit("atxHeadingSequence"),o(m))}function u(m){return m===null||m===35||he(m)?(e.exit("atxHeadingText"),o(m)):(e.consume(m),u)}}var ub=["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"],Ra=["pre","script","style","textarea"],hb={concrete:!0,name:"htmlFlow",resolveTo:fb,tokenize:pb},db={partial:!0,tokenize:Eb},mb={partial:!0,tokenize:gb};function fb(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 pb(e,t,n){const r=this;let i,s,a,o,l;return u;function u(_){return m(_)}function m(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),s=!0,N):_===63?(e.consume(_),i=3,r.interrupt?t:y):ve(_)?(e.consume(_),a=String.fromCharCode(_),C):n(_)}function f(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,o=0,g):ve(_)?(e.consume(_),i=4,r.interrupt?t:y):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:y):n(_)}function g(_){return _==="CDATA[".charCodeAt(o++)?(e.consume(_),o===6?r.interrupt?t:q:g):n(_)}function N(_){return ve(_)?(e.consume(_),a=String.fromCharCode(_),C):n(_)}function C(_){if(_===null||_===47||_===62||he(_)){const De=_===47,Te=a.toLowerCase();return!De&&!s&&Ra.includes(Te)?(i=1,r.interrupt?t(_):q(_)):ub.includes(a.toLowerCase())?(i=6,De?(e.consume(_),b):r.interrupt?t(_):q(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):s?A(_):v(_))}return _===45||Ce(_)?(e.consume(_),a+=String.fromCharCode(_),C):n(_)}function b(_){return _===62?(e.consume(_),r.interrupt?t:q):n(_)}function A(_){return re(_)?(e.consume(_),A):S(_)}function v(_){return _===47?(e.consume(_),S):_===58||_===95||ve(_)?(e.consume(_),w):re(_)?(e.consume(_),v):S(_)}function w(_){return _===45||_===46||_===58||_===95||Ce(_)?(e.consume(_),w):O(_)}function O(_){return _===61?(e.consume(_),I):re(_)?(e.consume(_),O):v(_)}function I(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),l=_,B):re(_)?(e.consume(_),I):$(_)}function B(_){return _===l?(e.consume(_),l=null,Y):_===null||W(_)?n(_):(e.consume(_),B)}function $(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||he(_)?O(_):(e.consume(_),$)}function Y(_){return _===47||_===62||re(_)?v(_):n(_)}function S(_){return _===62?(e.consume(_),H):n(_)}function H(_){return _===null||W(_)?q(_):re(_)?(e.consume(_),H):n(_)}function q(_){return _===45&&i===2?(e.consume(_),U):_===60&&i===1?(e.consume(_),P):_===62&&i===4?(e.consume(_),ce):_===63&&i===3?(e.consume(_),y):_===93&&i===5?(e.consume(_),X):W(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(db,Q,Z)(_)):_===null||W(_)?(e.exit("htmlFlowData"),Z(_)):(e.consume(_),q)}function Z(_){return e.check(mb,ie,Q)(_)}function ie(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),G}function G(_){return _===null||W(_)?Z(_):(e.enter("htmlFlowData"),q(_))}function U(_){return _===45?(e.consume(_),y):q(_)}function P(_){return _===47?(e.consume(_),a="",V):q(_)}function V(_){if(_===62){const De=a.toLowerCase();return Ra.includes(De)?(e.consume(_),ce):q(_)}return ve(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),V):q(_)}function X(_){return _===93?(e.consume(_),y):q(_)}function y(_){return _===62?(e.consume(_),ce):_===45&&i===2?(e.consume(_),y):q(_)}function ce(_){return _===null||W(_)?(e.exit("htmlFlowData"),Q(_)):(e.consume(_),ce)}function Q(_){return e.exit("htmlFlow"),t(_)}}function gb(e,t,n){const r=this;return i;function i(a){return W(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Eb(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tr,t,n)}}var Tb={name:"htmlText",tokenize:bb};function bb(e,t,n){const r=this;let i,s,a;return o;function o(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),O):y===63?(e.consume(y),v):ve(y)?(e.consume(y),$):n(y)}function u(y){return y===45?(e.consume(y),m):y===91?(e.consume(y),s=0,g):ve(y)?(e.consume(y),A):n(y)}function m(y){return y===45?(e.consume(y),p):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),f):W(y)?(a=d,P(y)):(e.consume(y),d)}function f(y){return y===45?(e.consume(y),p):d(y)}function p(y){return y===62?U(y):y===45?f(y):d(y)}function g(y){return y==="CDATA[".charCodeAt(s++)?(e.consume(y),s===6?N:g):n(y)}function N(y){return y===null?n(y):y===93?(e.consume(y),C):W(y)?(a=N,P(y)):(e.consume(y),N)}function C(y){return y===93?(e.consume(y),b):N(y)}function b(y){return y===62?U(y):y===93?(e.consume(y),b):N(y)}function A(y){return y===null||y===62?U(y):W(y)?(a=A,P(y)):(e.consume(y),A)}function v(y){return y===null?n(y):y===63?(e.consume(y),w):W(y)?(a=v,P(y)):(e.consume(y),v)}function w(y){return y===62?U(y):v(y)}function O(y){return ve(y)?(e.consume(y),I):n(y)}function I(y){return y===45||Ce(y)?(e.consume(y),I):B(y)}function B(y){return W(y)?(a=B,P(y)):re(y)?(e.consume(y),B):U(y)}function $(y){return y===45||Ce(y)?(e.consume(y),$):y===47||y===62||he(y)?Y(y):n(y)}function Y(y){return y===47?(e.consume(y),U):y===58||y===95||ve(y)?(e.consume(y),S):W(y)?(a=Y,P(y)):re(y)?(e.consume(y),Y):U(y)}function S(y){return y===45||y===46||y===58||y===95||Ce(y)?(e.consume(y),S):H(y)}function H(y){return y===61?(e.consume(y),q):W(y)?(a=H,P(y)):re(y)?(e.consume(y),H):Y(y)}function q(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,Z):W(y)?(a=q,P(y)):re(y)?(e.consume(y),q):(e.consume(y),ie)}function Z(y){return y===i?(e.consume(y),i=void 0,G):y===null?n(y):W(y)?(a=Z,P(y)):(e.consume(y),Z)}function ie(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||he(y)?Y(y):(e.consume(y),ie)}function G(y){return y===47||y===62||he(y)?Y(y):n(y)}function U(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function P(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),V}function V(y){return re(y)?ae(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):X(y)}function X(y){return e.enter("htmlTextData"),a(y)}}var ms={name:"labelEnd",resolveAll:Cb,resolveTo:_b,tokenize:Ab},xb={tokenize:Nb},kb={tokenize:vb},yb={tokenize:Sb};function Cb(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&&Fe(e,0,e.length,n),e}function _b(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=ze(o,e.slice(s+1,s+r+3)),o=ze(o,[["enter",m,t]]),o=ze(o,Vr(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=ze(o,[["exit",m,t],e[a-2],e[a-1],["exit",u,t]]),o=ze(o,e.slice(a+1)),o=ze(o,[["exit",l,t]]),Fe(e,s,e.length,o),e}function Ab(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(f){return s?s._inactive?d(f):(a=r.parser.defined.includes(Ye(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(xb,m,a?m:d)(f):f===91?e.attempt(kb,m,a?u:d)(f):a?m(f):d(f)}function u(f){return e.attempt(yb,m,d)(f)}function m(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function Nb(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return he(d)?In(e,s)(d):s(d)}function s(d){return d===41?m(d):Ic(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return he(d)?In(e,l)(d):m(d)}function o(d){return n(d)}function l(d){return d===34||d===39||d===40?Lc(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):m(d)}function u(d){return he(d)?In(e,m)(d):m(d)}function m(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function vb(e,t,n){const r=this;return i;function i(o){return wc.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function Sb(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}var Ib={name:"labelStartImage",resolveAll:ms.resolveAll,tokenize:wb};function wb(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}var Lb={name:"labelStartLink",resolveAll:ms.resolveAll,tokenize:Rb};function Rb(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}var ui={name:"lineEnding",tokenize:Ob};function Ob(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ae(e,t,"linePrefix")}}var xr={name:"thematicBreak",tokenize:Db};function Db(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||W(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),re(u)?ae(e,o,"whitespace")(u):o(u))}}var Re={continuation:{tokenize:Fb},exit:Hb,name:"list",tokenize:Bb},Pb={partial:!0,tokenize:Ub},Mb={partial:!0,tokenize:jb};function Bb(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Oi(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(xr,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Oi(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<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(tr,r.interrupt?n:m,e.attempt(Pb,f,d))}function m(p){return r.containerState.initialBlankLine=!0,s++,f(p)}function d(p){return re(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Fb(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tr,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ae(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!re(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Mb,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ae(e,e.attempt(Re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function jb(e,t,n){const r=this;return ae(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Hb(e){e.exit(this.containerState.type)}function Ub(e,t,n){const r=this;return ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!re(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}var Oa={name:"setextUnderline",resolveTo:zb,tokenize:$b};function zb(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function $b(e,t,n){const r=this;let i;return s;function s(u){let m=r.events.length,d;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){d=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),re(u)?ae(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||W(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}var qb={tokenize:Zb,partial:!0};function Yb(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gb,continuation:{tokenize:Kb},exit:Xb}},text:{91:{name:"gfmFootnoteCall",tokenize:Qb},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Vb,resolveTo:Wb}}}}function Vb(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const u=Ye(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Wb(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Qb(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(s>999||d===93&&!a||d===null||d===91||he(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ye(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return he(d)||(a=!0),s++,e.consume(d),d===92?m:u}function m(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function Gb(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(g)}function m(g){if(a>999||g===93&&!o||g===null||g===91||he(g))return n(g);if(g===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return s=Ye(r.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return he(g)||(o=!0),a++,e.consume(g),g===92?d:m}function d(g){return g===91||g===92||g===93?(e.consume(g),a++,m):m(g)}function f(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function Kb(e,t,n){return e.check(tr,t,e.attempt(qb,t,n))}function Xb(e){e.exit("gfmFootnoteDefinition")}function Zb(e,t,n){const r=this;return ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Jb(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(s,a){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},m={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},d=[["enter",u,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",m,a]],f=a.parser.constructs.insideSpan.null;f&&Fe(d,d.length,0,Vr(f,s.slice(l+1,o),a)),Fe(d,d.length,0,[["exit",m,a],["enter",s[o][1],a],["exit",s[o][1],a],["exit",u,a]]),Fe(s,l-1,o-l+3,d),o=l+d.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function i(s,a,o){const l=this.previous,u=this.events;let m=0;return d;function d(p){return l===126&&u[u.length-1][1].type!=="characterEscape"?o(p):(s.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const g=rn(l);if(p===126)return m>1?o(p):(s.consume(p),m++,f);if(m<2&&!t)return o(p);const N=s.exit("strikethroughSequenceTemporary"),C=rn(p);return N._open=!C||C===2&&!!g,N._close=!g||g===2&&!!C,a(p)}}}var e0=class{constructor(){this.map=[]}add(e,t,n){t0(this,e,t,n)}consume(e){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function t0(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 n0(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 s=r.length-1;r[s]=r[s]==="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 r0(){return{flow:{null:{name:"table",tokenize:i0,resolveAll:s0}}}}function i0(e,t,n){const r=this;let i=0,s=0,a;return o;function o(S){let H=r.events.length-1;for(;H>-1;){const ie=r.events[H][1].type;if(ie==="lineEnding"||ie==="linePrefix")H--;else break}const q=H>-1?r.events[H][1].type:null,Z=q==="tableHead"||q==="tableRow"?I:l;return Z===I&&r.parser.lazy[r.now().line]?n(S):Z(S)}function l(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===124||(a=!0,s+=1),m(S)}function m(S){return S===null?n(S):W(S)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p):n(S):re(S)?ae(e,m,"whitespace")(S):(s+=1,a&&(a=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||he(S)?(e.exit("data"),m(S)):(e.consume(S),S===92?f:d)}function f(S){return S===92||S===124?(e.consume(S),d):d(S)}function p(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),a=!1,re(S)?ae(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):g(S))}function g(S){return S===45||S===58?C(S):S===124?(a=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),N):O(S)}function N(S){return re(S)?ae(e,C,"whitespace")(S):C(S)}function C(S){return S===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),b):S===45?(s+=1,b(S)):S===null||W(S)?w(S):O(S)}function b(S){return S===45?(e.enter("tableDelimiterFiller"),A(S)):O(S)}function A(S){return S===45?(e.consume(S),A):S===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(S))}function v(S){return re(S)?ae(e,w,"whitespace")(S):w(S)}function w(S){return S===124?g(S):S===null||W(S)?!a||i!==s?O(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):O(S)}function O(S){return n(S)}function I(S){return e.enter("tableRow"),B(S)}function B(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),B):S===null||W(S)?(e.exit("tableRow"),t(S)):re(S)?ae(e,B,"whitespace")(S):(e.enter("data"),$(S))}function $(S){return S===null||S===124||he(S)?(e.exit("data"),B(S)):(e.consume(S),S===92?Y:$)}function Y(S){return S===92||S===124?(e.consume(S),$):$(S)}}function s0(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,m,d;const f=new e0;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,l!==0&&(Da(f,t,l,u,m),m=void 0,l=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,m={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",m,t]])),i=g.type==="tableDelimiterRow"?2:m?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=hr(f,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=hr(f,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],d=hr(f,t,s,i,n,d)):a[1]!==0&&(d=hr(f,t,a,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Da(f,t,l,u,m),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=n0(t.events,n))}return e}function hr(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Wt(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=Wt(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=Wt(t.events,n[2]),m=Wt(t.events,n[3]),d={type:o,start:Object.assign({},u),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,N=n[3]-n[2]-1;e.add(g,N,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},Wt(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Da(e,t,n,r,i){const s=[],a=Wt(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Wt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var a0={name:"tasklistCheck",tokenize:l0};function o0(){return{text:{91:a0}}}function l0(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return he(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return W(l)?t(l):re(l)?e.check({tokenize:c0},t,n)(l):n(l)}}function c0(e,t,n){return ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function u0(e){return gc([xT(),Yb(),Jb(e),r0(),o0()])}var h0={};function d0(e){const t=this,n=e||h0,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(u0(n)),s.push(fT()),a.push(pT(n))}var m0=Object.defineProperty,f0=Object.defineProperties,p0=Object.getOwnPropertyDescriptors,Pa=Object.getOwnPropertySymbols,g0=Object.prototype.hasOwnProperty,E0=Object.prototype.propertyIsEnumerable,Ma=(e,t,n)=>t in e?m0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rc=(e,t)=>{for(var n in t||(t={}))g0.call(t,n)&&Ma(e,n,t[n]);if(Pa)for(var n of Pa(t))E0.call(t,n)&&Ma(e,n,t[n]);return e},Oc=(e,t)=>f0(e,p0(t)),Ie=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},T0=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},b0=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!T0(e,n)&&(t+=1)}return t},kt=(e,t)=>{let n=!1,r=!1,i=-1;for(let s=0;s<e.length;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}if(!r&&e[s]==="`")if(n){if(i<t&&t<s)return!0;n=!1,i=-1}else n=!0,i=s}return!1},x0=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,k0=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(x0,(t,n,r,i)=>Ie(e,i)?t:`${n}\\>${r}`),y0=/(\*\*)([^*]*\*?)$/,C0=/(__)([^_]*?)$/,_0=/(\*\*\*)([^*]*?)$/,A0=/(\*)([^*]*?)$/,N0=/(_)([^_]*?)$/,v0=/(`)([^`]*?)$/,S0=/(~~)([^~]*?)$/,jt=/^[\s_~*`]*$/,Dc=/^[\s]*[-*+][\s]+$/,I0=/[\p{L}\p{N}_]/u,w0=/^```[^`\n]*```?$/,L0=/^\*{4,}$/,R0=/(__)([^_]+)_$/,O0=/(~~)([^~]+)~$/,Ba=/~~/g,yt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:I0.test(e)},D0=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Pc=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Wr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},P0=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
19
+ `)return!1}return!1},Mc=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?P0(e,t):!1;if(e[n]===`
20
+ `)return!1}return!1},M0=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
21
+ `)return!1}return!1},fs=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
22
+ `){r=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
23
+ `){i=l;break}let s=e.substring(r,i),a=0,o=!1;for(let l of s)if(l===n)a+=1;else if(l!==" "&&l!==" "){o=!0;break}return a>=3&&!o},B0=(e,t,n,r)=>n==="\\"||e.includes("$")&&Wr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&yt(n)&&yt(r)||(!n||n===" "||n===" "||n===`
24
24
  `)&&(!r||r===" "||r===" "||r===`
25
- `)),wc=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";R0(e,i,s,a)||(t+=1)}return t},O0=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Wr(e,t)||Ic(e,t)||L0(e,t)||n==="_"||r==="_"||n&&r&&kt(n)&&kt(r)),D0=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";O0(e,i,s,a)||(t+=1)}return t},P0=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},fs=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},Da=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},M0=(e,t,n)=>{if(!t||jt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
26
- `),i=r===-1?0:r+1,s=e.substring(i,n);return vc.test(s)&&t.includes(`
27
- `)?!0:ms(e,n,"*")},B0=e=>{let t=e.match(E0);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||xt(e,r)||M0(e,n,r)?e:fs(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},F0=(e,t,n)=>{if(!t||jt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
28
- `),i=r===-1?0:r+1,s=e.substring(i,n);return vc.test(s)&&t.includes(`
29
- `)?!0:ms(e,n,"_")},j0=e=>{let t=e.match(T0);if(!t){let i=e.match(v0);if(i){let s=e.lastIndexOf(i[1]);if(!(Ie(e,s)||xt(e,s))&&Da(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||xt(e,r)||F0(e,n,r)?e:Da(e)%2===1?`${e}__`:e},H0=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Wr(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
25
+ `)),Bc=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";B0(e,i,s,a)||(t+=1)}return t},F0=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Wr(e,t)||Mc(e,t)||M0(e,t)||n==="_"||r==="_"||n&&r&&yt(n)&&yt(r)),j0=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";F0(e,i,s,a)||(t+=1)}return t},H0=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},ps=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},Fa=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},U0=(e,t,n)=>{if(!t||jt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
26
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return Dc.test(s)&&t.includes(`
27
+ `)?!0:fs(e,n,"*")},z0=e=>{let t=e.match(y0);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||kt(e,r)||U0(e,n,r)?e:ps(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},$0=(e,t,n)=>{if(!t||jt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
28
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return Dc.test(s)&&t.includes(`
29
+ `)?!0:fs(e,n,"_")},q0=e=>{let t=e.match(C0);if(!t){let i=e.match(R0);if(i){let s=e.lastIndexOf(i[1]);if(!(Ie(e,s)||kt(e,s))&&Fa(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||kt(e,r)||$0(e,n,r)?e:Fa(e)%2===1?`${e}__`:e},Y0=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Wr(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
30
30
  `)&&(!i||i===" "||i===" "||i===`
31
- `)||r&&i&&kt(r)&&kt(i))continue;return n}}return-1},U0=e=>{if(!e.match(x0))return e;let t=H0(e);if(t===-1||Ie(e,t)||xt(e,t))return e;let n=e.substring(t+1);return!n||jt.test(n)?e:wc(e)%2===1?`${e}*`:e},Lc=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Wr(e,n)&&!Ic(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&kt(r)&&kt(i))continue;return n}}return-1},z0=e=>{let t=e.length;for(;t>0&&e[t-1]===`
32
- `;)t-=1;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},$0=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(fs(t)%2!==1)return null;let n=t.indexOf("**"),r=Lc(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},q0=e=>{if(!e.match(k0))return e;let t=Lc(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||jt.test(n)||Ie(e,t)||xt(e,t))return e;if(D0(e)%2===1){let r=$0(e);return r!==null?r:z0(e)}return e},Y0=e=>{let t=fs(e),n=wc(e);return t%2===0&&n%2===0},V0=(e,t,n)=>!t||jt.test(t)||Ie(e,n)||xt(e,n)?!0:ms(e,n,"*"),W0=e=>{if(N0.test(e))return e;let t=e.match(b0);if(!t)return e;let n=t[2];return V0(e,n,e.lastIndexOf(t[1]))?e:P0(e)%2===1?Y0(e)?e:`${e}***`:e},Q0=/<[a-zA-Z/][^>]*$/,G0=e=>{let t=e.match(Q0);return!t||t.index===void 0||Ie(e,t.index)?e:e.substring(0,t.index).trimEnd()},K0=e=>!e.match(A0)||e.includes(`
33
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,X0=e=>(e.match(/```/g)||[]).length%2===1,Z0=e=>{let t=K0(e);if(t!==null)return t;let n=e.match(y0);if(n&&!X0(e)){let r=n[2];if(!r||jt.test(r))return e;if(f0(e)%2===1)return`${e}\``}return e},Rc=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",J0=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Rc(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},ex=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Rc(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},tx=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
31
+ `)||r&&i&&yt(r)&&yt(i))continue;return n}}return-1},V0=e=>{if(!e.match(A0))return e;let t=Y0(e);if(t===-1||Ie(e,t)||kt(e,t))return e;let n=e.substring(t+1);return!n||jt.test(n)?e:Bc(e)%2===1?`${e}*`:e},Fc=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Wr(e,n)&&!Mc(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&yt(r)&&yt(i))continue;return n}}return-1},W0=e=>{let t=e.length;for(;t>0&&e[t-1]===`
32
+ `;)t-=1;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},Q0=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ps(t)%2!==1)return null;let n=t.indexOf("**"),r=Fc(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},G0=e=>{if(!e.match(N0))return e;let t=Fc(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||jt.test(n)||Ie(e,t)||kt(e,t))return e;if(j0(e)%2===1){let r=Q0(e);return r!==null?r:W0(e)}return e},K0=e=>{let t=ps(e),n=Bc(e);return t%2===0&&n%2===0},X0=(e,t,n)=>!t||jt.test(t)||Ie(e,n)||kt(e,n)?!0:fs(e,n,"*"),Z0=e=>{if(L0.test(e))return e;let t=e.match(_0);if(!t)return e;let n=t[2];return X0(e,n,e.lastIndexOf(t[1]))?e:H0(e)%2===1?K0(e)?e:`${e}***`:e},J0=/<[a-zA-Z/][^>]*$/,ex=e=>{let t=e.match(J0);return!t||t.index===void 0||Ie(e,t.index)?e:e.substring(0,t.index).trimEnd()},tx=e=>!e.match(w0)||e.includes(`
33
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,nx=e=>(e.match(/```/g)||[]).length%2===1,rx=e=>{let t=tx(e);if(t!==null)return t;let n=e.match(v0);if(n&&!nx(e)){let r=n[2];if(!r||jt.test(r))return e;if(b0(e)%2===1)return`${e}\``}return e},jc=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",ix=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!jc(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},sx=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!jc(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},ax=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
34
34
  `,t)!==-1&&!e.endsWith(`
35
35
  `)?`${e}
36
- $$`:`${e}$$`},nx=e=>J0(e)%2===0?e:tx(e),rx=e=>ex(e)%2===1?`${e}$`:e,ix=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=I0(e,t);if(r===-1||Ie(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let l=e.substring(r+1,t);return n==="text-only"?`${a}${l}`:`${a}[${l}](streamdown:incomplete-link)`},Pa=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Ie(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Sc(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},sx=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=Pa(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Sc(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=Pa(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},Oc=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Ie(e,n)){let r=ix(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ie(e,r)){let i=sx(e,r,t);if(i!==null)return i}return e},ax=/^-{1,2}$/,lx=/^[\s]*-{1,2}[\s]+$/,ox=/^={1,2}$/,cx=/^[\s]*={1,2}[\s]+$/,ux=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
37
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(ax.test(i)&&!n.match(lx)){let s=r.split(`
38
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(ox.test(i)&&!n.match(cx)){let s=r.split(`
39
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},hx=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),dx=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(hx,(t,n)=>Ie(e,n)?t:"\\~"),mx=e=>{var t,n;let r=e.match(C0);if(r){let i=r[2];if(!i||jt.test(i))return e;let s=e.lastIndexOf(r[1]);if(Ie(e,s)||xt(e,s))return e;if(((t=e.match(Oa))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(S0);if(i){let s=e.lastIndexOf(i[0].slice(0,2));if(Ie(e,s)||xt(e,s))return e;if(((n=e.match(Oa))==null?void 0:n.length)%2===1)return`${e}~`}}return e},ui=e=>e!==!1,fx=e=>e===!0,Ne={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},px=[{handler:{name:"singleTilde",handle:dx,priority:Ne.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:g0,priority:Ne.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:G0,priority:Ne.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:ux,priority:Ne.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Oc,priority:Ne.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:W0,priority:Ne.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:B0,priority:Ne.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:j0,priority:Ne.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:U0,priority:Ne.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:q0,priority:Ne.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Z0,priority:Ne.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:mx,priority:Ne.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:nx,priority:Ne.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:rx,priority:Ne.INLINE_KATEX},optionKey:"inlineKatex"}],gx=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return px.filter(({handler:r,optionKey:i})=>r.name==="links"?ui(e?.links)||ui(e?.images):r.name==="inlineKatex"?fx(e?.inlineKatex):ui(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Nc(Ac({},r),{handle:s=>Oc(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},Ex=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=gx(t),s=((n=t?.handlers)!=null?n:[]).map(l=>{var o;return{handler:Nc(Ac({},l),{priority:(o=l.priority)!=null?o:Ne.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((l,o)=>{var u,m;return((u=l.handler.priority)!=null?u:0)-((m=o.handler.priority)!=null?m:0)});for(let{handler:l,earlyReturn:o}of a)if(r=l.handle(r),o!=null&&o(r))return r;return r},Tx=Ex,bx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kx={};function Ma(e,t){return((t||kx).jsx?xx:bx).test(e)}var yx=/[ \t\n\f\r]/g;function Cx(e){return typeof e=="object"?e.type==="text"?Ba(e.value):!1:Ba(e)}function Ba(e){return e.replace(yx,"")===""}var _x=$n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,m=`
40
- `,d="/",f="*",p="",g="comment",N="declaration";function C(A,v){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];v=v||{};var w=1,O=1;function I(U){var P=U.match(r);P&&(w+=P.length);var V=U.lastIndexOf(m);O=~V?U.length-V:O+U.length}function B(){var U={line:w,column:O};return function(P){return P.position=new $(U),H(),P}}function $(U){this.start=U,this.end={line:w,column:O},this.source=v.source}$.prototype.content=A;function Y(U){var P=new Error(v.source+":"+w+":"+O+": "+U);if(P.reason=U,P.filename=v.source,P.line=w,P.column=O,P.source=A,!v.silent)throw P}function S(U){var P=U.exec(A);if(P){var V=P[0];return I(V),A=A.slice(V.length),P}}function H(){S(i)}function q(U){var P;for(U=U||[];P=Z();)P!==!1&&U.push(P);return U}function Z(){var U=B();if(!(d!=A.charAt(0)||f!=A.charAt(1))){for(var P=2;p!=A.charAt(P)&&(f!=A.charAt(P)||d!=A.charAt(P+1));)++P;if(P+=2,p===A.charAt(P-1))return Y("End of comment missing");var V=A.slice(2,P-2);return O+=2,I(V),A=A.slice(P),O+=2,U({type:g,comment:V})}}function ie(){var U=B(),P=S(s);if(P){if(Z(),!S(a))return Y("property missing ':'");var V=S(l),X=U({type:N,property:b(P[0].replace(n,p)),value:V?b(V[0].replace(n,p)):p});return S(o),X}}function G(){var U=[];q(U);for(var P;P=ie();)P!==!1&&(U.push(P),q(U));return U}return H(),G()}function b(A){return A?A.replace(u,p):p}t.exports=C})),Ax=$n((e=>{var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(_x());function r(i,s){let a=null;if(!i||typeof i!="string")return a;const l=(0,n.default)(i),o=typeof s=="function";return l.forEach(u=>{if(u.type!=="declaration")return;const{property:m,value:d}=u;o?s(m,d,u):d&&(a=a||{},a[m]=d)}),a}})),Nx=$n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(m){return!m||r.test(m)||t.test(m)},l=function(m,d){return d.toUpperCase()},o=function(m,d){return"".concat(d,"-")},u=function(m,d){return d===void 0&&(d={}),a(m)?m:(m=m.toLowerCase(),d.reactCompat?m=m.replace(s,o):m=m.replace(i,o),m.replace(n,l))};e.camelCase=u})),vx=$n(((e,t)=>{var n=(e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}})(Ax()),r=Nx();function i(s,a){var l={};return!s||typeof s!="string"||(0,n.default)(s,function(o,u){o&&u&&(l[(0,r.camelCase)(o,a)]=u)}),l}i.default=i,t.exports=i}));function vn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fa(e.position):"start"in e||"end"in e?Fa(e):"line"in e||"column"in e?Pi(e):""}function Pi(e){return ja(e&&e.line)+":"+ja(e&&e.column)}function Fa(e){return Pi(e&&e.start)+"-"+Pi(e&&e.end)}function ja(e){return e&&typeof e=="number"?e:1}var Ae=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},s=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(s=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=vn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;var Sx=Or(vx(),1),ps={}.hasOwnProperty,Ix=new Map,wx=/[A-Z]/g,Lx=new Set(["table","tbody","thead","tfoot","tr"]),Rx=new Set(["td","th"]),Dc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ox(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=Ux(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=Hx(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"?yt:Xn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Pc(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Pc(e,t,n){if(t.type==="element")return Dx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Px(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Bx(e,t,n);if(t.type==="mdxjsEsm")return Mx(e,t);if(t.type==="root")return Fx(e,t,n);if(t.type==="text")return jx(e,t)}function Dx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=yt,e.schema=i),e.ancestors.push(t);const s=Bc(e,t.tagName,!1),a=zx(e,t);let l=Es(e,t);return Lx.has(t.tagName)&&(l=l.filter(function(o){return typeof o=="string"?!Cx(o):!0})),Mc(e,a,s,t),gs(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Px(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}zn(e,t.position)}function Mx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zn(e,t.position)}function Bx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=yt,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Bc(e,t.name,!0),a=$x(e,t),l=Es(e,t);return Mc(e,a,s,t),gs(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Fx(e,t,n){const r={};return gs(r,Es(e,t)),e.create(t,e.Fragment,r,n)}function jx(e,t){return t.value}function Mc(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Hx(e,t,n){return r;function r(i,s,a,l){const o=Array.isArray(a.children)?n:t;return l?o(s,a,l):o(s,a)}}function Ux(e,t){return n;function n(r,i,s,a){const l=Array.isArray(s.children),o=nt(r);return t(i,s,a,l,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function zx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ps.call(t.properties,i)){const s=qx(e,i,t.properties[i]);if(s){const[a,l]=s;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&Rx.has(t.tagName)?r=l:n[a]=l}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function $x(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else zn(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else zn(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Es(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ix;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const u=i.get(o)||0;a=o+"-"+u,i.set(o,u+1)}}const l=Pc(e,s,a);l!==void 0&&n.push(l)}return n}function qx(e,t,n){const r=jr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?to(n):no(n)),r.property==="style"){let i=typeof n=="object"?n:Yx(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Vx(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?nm[r.property]||r.property:r.attribute,n]}}function Yx(e,t){try{return(0,Sx.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ae("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=Dc+"#cannot-parse-style-attribute",i}}function Bc(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const l=Ma(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=a}else r=Ma(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ps.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);zn(e)}function zn(e,t){const n=new Ae("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=Dc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Vx(e){const t={};let n;for(n in e)ps.call(e,n)&&(t[Wx(n)]=e[n]);return t}function Wx(e){let t=e.replace(wx,Qx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Qx(e){return"-"+e.toLowerCase()}var hi={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"]},Gx={tokenize:Kx};function Kx(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ae(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),s(l)}function s(l){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,a(l)}function a(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return W(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),a)}}var Xx={tokenize:Zx},Ha={tokenize:Jx};function Zx(e){const t=this,n=[];let r=0,i,s,a;return l;function l(v){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,o,u)(v)}return u(v)}function o(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const w=t.events.length;let O=w,I;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){I=t.events[O][1].end;break}b(r);let B=w;for(;B<t.events.length;)t.events[B][1].end={...I},B++;return Fe(t.events,O+1,0,t.events.slice(w)),t.events.length=B,u(v)}return l(v)}function u(v){if(r===n.length){if(!i)return f(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ha,m,d)(v)}function m(v){return i&&A(),b(r),f(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(v)}function f(v){return t.containerState={},e.attempt(Ha,p,g)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),f(v)}function g(v){if(v===null){i&&A(),b(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),N(v)}function N(v){if(v===null){C(e.exit("chunkFlow"),!0),b(0),e.consume(v);return}return W(v)?(e.consume(v),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(v),N)}function C(v,w){const O=t.sliceStream(v);if(w&&O.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(O),t.parser.lazy[v.start.line]){let I=i.events.length;for(;I--;)if(i.events[I][1].start.offset<a&&(!i.events[I][1].end||i.events[I][1].end.offset>a))return;const B=t.events.length;let $=B,Y,S;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(Y){S=t.events[$][1].end;break}Y=!0}for(b(r),I=B;I<t.events.length;)t.events[I][1].end={...S},I++;Fe(t.events,$+1,0,t.events.slice(B)),t.events.length=I}}function b(v){let w=n.length;for(;w-- >v;){const O=n[w];t.containerState=O[1],O[0].exit.call(t,e)}n.length=v}function A(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Jx(e,t,n){return ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var ek={tokenize:tk};function tk(e){const t=this,n=e.attempt(tr,r,e.attempt(this.parser.constructs.flowInitial,i,ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(YT,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var nk={resolveAll:jc()},rk=Fc("string"),ik=Fc("text");function Fc(e){return{resolveAll:jc(e==="text"?sk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,l);return a;function a(m){return u(m)?s(m):l(m)}function l(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),o}function o(m){return u(m)?(n.exit("data"),s(m)):(n.consume(m),o)}function u(m){if(m===null)return!0;const d=i[m];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function jc(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function sk(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 s=i.length,a=-1,l=0,o;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(u===-2)o=!0,l++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},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}var ak=Gi({attentionMarkers:()=>fk,contentInitial:()=>ok,disable:()=>pk,document:()=>lk,flow:()=>uk,flowInitial:()=>ck,insideSpan:()=>mk,string:()=>hk,text:()=>dk}),lk={42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:Tc},ok={91:KT},ck={[-2]:oi,[-1]:oi,32:oi},uk={35:nb,42:xr,45:[Ia,xr],60:ab,61:Ia,95:xr,96:va,126:va},hk={38:xc,92:bc},dk={[-5]:ci,[-4]:ci,[-3]:ci,33:_b,38:xc,42:Di,60:[NT,mb],91:Nb,92:[eb,bc],93:ds,95:Di,96:jT},mk={null:[Di,nk]},fk={null:[42,95]},pk={null:[]};function gk(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={},s=[];let a=[],l=[];const o={attempt:B(O),check:B(I),consume:A,enter:v,exit:w,interrupt:B(I,{interrupt:!0})},u={code:null,containerState:{},defineSkip:N,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let m=t.tokenize.call(u,o);return t.resolveAll&&s.push(t),u;function d(H){return a=ze(a,H),C(),a[a.length-1]!==null?[]:($(t,0),u.events=Vr(s,u.events,u),u.events)}function f(H,q){return Tk(p(H),q)}function p(H){return Ek(a,H)}function g(){const{_bufferIndex:H,_index:q,line:Z,column:ie,offset:G}=r;return{_bufferIndex:H,_index:q,line:Z,column:ie,offset:G}}function N(H){i[H.line]=H.column,S()}function C(){let H;for(;r._index<a.length;){const q=a[r._index];if(typeof q=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<q.length;)b(q.charCodeAt(r._bufferIndex));else b(q)}}function b(H){m=m(H)}function A(H){W(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,S()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=H}function v(H,q){const Z=q||{};return Z.type=H,Z.start=g(),u.events.push(["enter",Z,u]),l.push(Z),Z}function w(H){const q=l.pop();return q.end=g(),u.events.push(["exit",q,u]),q}function O(H,q){$(H,q.from)}function I(H,q){q.restore()}function B(H,q){return Z;function Z(ie,G,U){let P,V,X,y;return Array.isArray(ie)?Q(ie):"tokenize"in ie?Q([ie]):ce(ie);function ce(ge){return _t;function _t(Pe){const He=Pe!==null&&ge[Pe],it=Pe!==null&&ge.null;return Q([...Array.isArray(He)?He:He?[He]:[],...Array.isArray(it)?it:it?[it]:[]])(Pe)}}function Q(ge){return P=ge,V=0,ge.length===0?U:_(ge[V])}function _(ge){return _t;function _t(Pe){return y=Y(),X=ge,ge.partial||(u.currentConstruct=ge),ge.name&&u.parser.constructs.disable.null.includes(ge.name)?Te(Pe):ge.tokenize.call(q?Object.assign(Object.create(u),q):u,o,De,Te)(Pe)}}function De(ge){return H(X,y),G}function Te(ge){return y.restore(),++V<P.length?_(P[V]):U}}}function $(H,q){H.resolveAll&&!s.includes(H)&&s.push(H),H.resolve&&Fe(u.events,q,u.events.length-q,H.resolve(u.events.slice(q),u)),H.resolveTo&&(u.events=H.resolveTo(u.events,u))}function Y(){const H=g(),q=u.previous,Z=u.currentConstruct,ie=u.events.length,G=Array.from(l);return{from:ie,restore:U};function U(){r=H,u.previous=q,u.currentConstruct=Z,u.events.length=ie,l=G,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ek(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Tk(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:a="\r";break;case-4:a=`
36
+ $$`:`${e}$$`},ox=e=>ix(e)%2===0?e:ax(e),lx=e=>sx(e)%2===1?`${e}$`:e,cx=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=D0(e,t);if(r===-1||Ie(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let o=e.substring(r+1,t);return n==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},ja=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Ie(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Pc(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},ux=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=ja(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Pc(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=ja(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},Hc=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Ie(e,n)){let r=cx(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ie(e,r)){let i=ux(e,r,t);if(i!==null)return i}return e},hx=/^-{1,2}$/,dx=/^[\s]*-{1,2}[\s]+$/,mx=/^={1,2}$/,fx=/^[\s]*={1,2}[\s]+$/,px=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
37
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(hx.test(i)&&!n.match(dx)){let s=r.split(`
38
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(mx.test(i)&&!n.match(fx)){let s=r.split(`
39
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},gx=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Ex=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(gx,(t,n)=>Ie(e,n)?t:"\\~"),Tx=e=>{var t,n;let r=e.match(S0);if(r){let i=r[2];if(!i||jt.test(i))return e;let s=e.lastIndexOf(r[1]);if(Ie(e,s)||kt(e,s))return e;if(((t=e.match(Ba))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(O0);if(i){let s=e.lastIndexOf(i[0].slice(0,2));if(Ie(e,s)||kt(e,s))return e;if(((n=e.match(Ba))==null?void 0:n.length)%2===1)return`${e}~`}}return e},hi=e=>e!==!1,bx=e=>e===!0,Ne={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},xx=[{handler:{name:"singleTilde",handle:Ex,priority:Ne.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:k0,priority:Ne.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:ex,priority:Ne.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:px,priority:Ne.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Hc,priority:Ne.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Z0,priority:Ne.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:z0,priority:Ne.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:q0,priority:Ne.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:V0,priority:Ne.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:G0,priority:Ne.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:rx,priority:Ne.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Tx,priority:Ne.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:ox,priority:Ne.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:lx,priority:Ne.INLINE_KATEX},optionKey:"inlineKatex"}],kx=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return xx.filter(({handler:r,optionKey:i})=>r.name==="links"?hi(e?.links)||hi(e?.images):r.name==="inlineKatex"?bx(e?.inlineKatex):hi(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Oc(Rc({},r),{handle:s=>Hc(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},yx=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=kx(t),s=((n=t?.handlers)!=null?n:[]).map(o=>{var l;return{handler:Oc(Rc({},o),{priority:(l=o.priority)!=null?l:Ne.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((o,l)=>{var u,m;return((u=o.handler.priority)!=null?u:0)-((m=l.handler.priority)!=null?m:0)});for(let{handler:o,earlyReturn:l}of a)if(r=o.handle(r),l!=null&&l(r))return r;return r},Cx=yx,_x=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ax=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nx={};function Ha(e,t){return((t||Nx).jsx?Ax:_x).test(e)}var vx=/[ \t\n\f\r]/g;function Sx(e){return typeof e=="object"?e.type==="text"?Ua(e.value):!1:Ua(e)}function Ua(e){return e.replace(vx,"")===""}var Ix=$n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,m=`
40
+ `,d="/",f="*",p="",g="comment",N="declaration";function C(A,v){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];v=v||{};var w=1,O=1;function I(U){var P=U.match(r);P&&(w+=P.length);var V=U.lastIndexOf(m);O=~V?U.length-V:O+U.length}function B(){var U={line:w,column:O};return function(P){return P.position=new $(U),H(),P}}function $(U){this.start=U,this.end={line:w,column:O},this.source=v.source}$.prototype.content=A;function Y(U){var P=new Error(v.source+":"+w+":"+O+": "+U);if(P.reason=U,P.filename=v.source,P.line=w,P.column=O,P.source=A,!v.silent)throw P}function S(U){var P=U.exec(A);if(P){var V=P[0];return I(V),A=A.slice(V.length),P}}function H(){S(i)}function q(U){var P;for(U=U||[];P=Z();)P!==!1&&U.push(P);return U}function Z(){var U=B();if(!(d!=A.charAt(0)||f!=A.charAt(1))){for(var P=2;p!=A.charAt(P)&&(f!=A.charAt(P)||d!=A.charAt(P+1));)++P;if(P+=2,p===A.charAt(P-1))return Y("End of comment missing");var V=A.slice(2,P-2);return O+=2,I(V),A=A.slice(P),O+=2,U({type:g,comment:V})}}function ie(){var U=B(),P=S(s);if(P){if(Z(),!S(a))return Y("property missing ':'");var V=S(o),X=U({type:N,property:b(P[0].replace(n,p)),value:V?b(V[0].replace(n,p)):p});return S(l),X}}function G(){var U=[];q(U);for(var P;P=ie();)P!==!1&&(U.push(P),q(U));return U}return H(),G()}function b(A){return A?A.replace(u,p):p}t.exports=C})),wx=$n((e=>{var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Ix());function r(i,s){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof s=="function";return o.forEach(u=>{if(u.type!=="declaration")return;const{property:m,value:d}=u;l?s(m,d,u):d&&(a=a||{},a[m]=d)}),a}})),Lx=$n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(m){return!m||r.test(m)||t.test(m)},o=function(m,d){return d.toUpperCase()},l=function(m,d){return"".concat(d,"-")},u=function(m,d){return d===void 0&&(d={}),a(m)?m:(m=m.toLowerCase(),d.reactCompat?m=m.replace(s,l):m=m.replace(i,l),m.replace(n,o))};e.camelCase=u})),Rx=$n(((e,t)=>{var n=(e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}})(wx()),r=Lx();function i(s,a){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(l,u){l&&u&&(o[(0,r.camelCase)(l,a)]=u)}),o}i.default=i,t.exports=i}));function wn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?za(e.position):"start"in e||"end"in e?za(e):"line"in e||"column"in e?Mi(e):""}function Mi(e){return $a(e&&e.line)+":"+$a(e&&e.column)}function za(e){return Mi(e&&e.start)+"-"+Mi(e&&e.end)}function $a(e){return e&&typeof e=="number"?e:1}var Ae=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},s=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(s=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const o=n.indexOf(":");o===-1?i.ruleId=n:(i.source=n.slice(0,o),i.ruleId=n.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){const o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=wn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;var Ox=Or(Rx(),1),gs={}.hasOwnProperty,Dx=new Map,Px=/[A-Z]/g,Mx=new Set(["table","tbody","thead","tfoot","tr"]),Bx=new Set(["td","th"]),Uc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fx(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=Vx(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=Yx(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"?Ct:Xn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=zc(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function zc(e,t,n){if(t.type==="element")return jx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Hx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zx(e,t,n);if(t.type==="mdxjsEsm")return Ux(e,t);if(t.type==="root")return $x(e,t,n);if(t.type==="text")return qx(e,t)}function jx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ct,e.schema=i),e.ancestors.push(t);const s=qc(e,t.tagName,!1),a=Wx(e,t);let o=Ts(e,t);return Mx.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!Sx(l):!0})),$c(e,a,s,t),Es(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Hx(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}zn(e,t.position)}function Ux(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zn(e,t.position)}function zx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ct,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:qc(e,t.name,!0),a=Qx(e,t),o=Ts(e,t);return $c(e,a,s,t),Es(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function $x(e,t,n){const r={};return Es(r,Ts(e,t)),e.create(t,e.Fragment,r,n)}function qx(e,t){return t.value}function $c(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Es(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Yx(e,t,n){return r;function r(i,s,a,o){const l=Array.isArray(a.children)?n:t;return o?l(s,a,o):l(s,a)}}function Vx(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=rt(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Wx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&gs.call(t.properties,i)){const s=Gx(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Bx.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Qx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else zn(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else zn(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ts(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Dx;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const o=zc(e,s,a);o!==void 0&&n.push(o)}return n}function Gx(e,t,n){const r=jr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?cl(n):ul(n)),r.property==="style"){let i=typeof n=="object"?n:Kx(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Xx(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?om[r.property]||r.property:r.attribute,n]}}function Kx(e,t){try{return(0,Ox.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ae("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=Uc+"#cannot-parse-style-attribute",i}}function qc(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Ha(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=Ha(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return gs.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);zn(e)}function zn(e,t){const n=new Ae("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=Uc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Xx(e){const t={};let n;for(n in e)gs.call(e,n)&&(t[Zx(n)]=e[n]);return t}function Zx(e){let t=e.replace(Px,Jx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Jx(e){return"-"+e.toLowerCase()}var di={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"]},ek={tokenize:tk};function tk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ae(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return W(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}var nk={tokenize:rk},qa={tokenize:ik};function rk(e){const t=this,n=[];let r=0,i,s,a;return o;function o(v){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,l,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const w=t.events.length;let O=w,I;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){I=t.events[O][1].end;break}b(r);let B=w;for(;B<t.events.length;)t.events[B][1].end={...I},B++;return Fe(t.events,O+1,0,t.events.slice(w)),t.events.length=B,u(v)}return o(v)}function u(v){if(r===n.length){if(!i)return f(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qa,m,d)(v)}function m(v){return i&&A(),b(r),f(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(v)}function f(v){return t.containerState={},e.attempt(qa,p,g)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),f(v)}function g(v){if(v===null){i&&A(),b(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),N(v)}function N(v){if(v===null){C(e.exit("chunkFlow"),!0),b(0),e.consume(v);return}return W(v)?(e.consume(v),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),N)}function C(v,w){const O=t.sliceStream(v);if(w&&O.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(O),t.parser.lazy[v.start.line]){let I=i.events.length;for(;I--;)if(i.events[I][1].start.offset<a&&(!i.events[I][1].end||i.events[I][1].end.offset>a))return;const B=t.events.length;let $=B,Y,S;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(Y){S=t.events[$][1].end;break}Y=!0}for(b(r),I=B;I<t.events.length;)t.events[I][1].end={...S},I++;Fe(t.events,$+1,0,t.events.slice(B)),t.events.length=I}}function b(v){let w=n.length;for(;w-- >v;){const O=n[w];t.containerState=O[1],O[0].exit.call(t,e)}n.length=v}function A(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ik(e,t,n){return ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var sk={tokenize:ak};function ak(e){const t=this,n=e.attempt(tr,r,e.attempt(this.parser.constructs.flowInitial,i,ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(KT,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var ok={resolveAll:Vc()},lk=Yc("string"),ck=Yc("text");function Yc(e){return{resolveAll:Vc(e==="text"?uk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(m){return u(m)?s(m):o(m)}function o(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),l}function l(m){return u(m)?(n.exit("data"),s(m)):(n.consume(m),l)}function u(m){if(m===null)return!0;const d=i[m];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Vc(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function uk(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 s=i.length,a=-1,o=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},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}var hk=Ki({attentionMarkers:()=>bk,contentInitial:()=>mk,disable:()=>xk,document:()=>dk,flow:()=>pk,flowInitial:()=>fk,insideSpan:()=>Tk,string:()=>gk,text:()=>Ek}),dk={42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:Ac},mk={91:tb},fk={[-2]:ci,[-1]:ci,32:ci},pk={35:ob,42:xr,45:[Oa,xr],60:hb,61:Oa,95:xr,96:La,126:La},gk={38:vc,92:Nc},Ek={[-5]:ui,[-4]:ui,[-3]:ui,33:Ib,38:vc,42:Pi,60:[LT,Tb],91:Lb,92:[sb,Nc],93:ms,95:Pi,96:qT},Tk={null:[Pi,ok]},bk={null:[42,95]},xk={null:[]};function kk(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={},s=[];let a=[],o=[];const l={attempt:B(O),check:B(I),consume:A,enter:v,exit:w,interrupt:B(I,{interrupt:!0})},u={code:null,containerState:{},defineSkip:N,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let m=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function d(H){return a=ze(a,H),C(),a[a.length-1]!==null?[]:($(t,0),u.events=Vr(s,u.events,u),u.events)}function f(H,q){return Ck(p(H),q)}function p(H){return yk(a,H)}function g(){const{_bufferIndex:H,_index:q,line:Z,column:ie,offset:G}=r;return{_bufferIndex:H,_index:q,line:Z,column:ie,offset:G}}function N(H){i[H.line]=H.column,S()}function C(){let H;for(;r._index<a.length;){const q=a[r._index];if(typeof q=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<q.length;)b(q.charCodeAt(r._bufferIndex));else b(q)}}function b(H){m=m(H)}function A(H){W(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,S()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=H}function v(H,q){const Z=q||{};return Z.type=H,Z.start=g(),u.events.push(["enter",Z,u]),o.push(Z),Z}function w(H){const q=o.pop();return q.end=g(),u.events.push(["exit",q,u]),q}function O(H,q){$(H,q.from)}function I(H,q){q.restore()}function B(H,q){return Z;function Z(ie,G,U){let P,V,X,y;return Array.isArray(ie)?Q(ie):"tokenize"in ie?Q([ie]):ce(ie);function ce(ge){return At;function At(Pe){const He=Pe!==null&&ge[Pe],st=Pe!==null&&ge.null;return Q([...Array.isArray(He)?He:He?[He]:[],...Array.isArray(st)?st:st?[st]:[]])(Pe)}}function Q(ge){return P=ge,V=0,ge.length===0?U:_(ge[V])}function _(ge){return At;function At(Pe){return y=Y(),X=ge,ge.partial||(u.currentConstruct=ge),ge.name&&u.parser.constructs.disable.null.includes(ge.name)?Te(Pe):ge.tokenize.call(q?Object.assign(Object.create(u),q):u,l,De,Te)(Pe)}}function De(ge){return H(X,y),G}function Te(ge){return y.restore(),++V<P.length?_(P[V]):U}}}function $(H,q){H.resolveAll&&!s.includes(H)&&s.push(H),H.resolve&&Fe(u.events,q,u.events.length-q,H.resolve(u.events.slice(q),u)),H.resolveTo&&(u.events=H.resolveTo(u.events,u))}function Y(){const H=g(),q=u.previous,Z=u.currentConstruct,ie=u.events.length,G=Array.from(o);return{from:ie,restore:U};function U(){r=H,u.previous=q,u.currentConstruct=Z,u.events.length=ie,o=G,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function yk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Ck(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:a="\r";break;case-4:a=`
41
41
  `;break;case-3:a=`\r
42
- `;break;case-2:a=t?" ":" ";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function bk(e){const t={constructs:cc([ak,...(e||{}).extensions||[]]),content:n(Gx),defined:[],document:n(Xx),flow:n(ek),lazy:{},string:n(rk),text:n(ik)};return t;function n(r){return i;function i(s){return gk(t,r,s)}}}function xk(e){for(;!kc(e););return e}var Ua=/[\0\t\n\r]/g;function kk(){let e=1,t="",n=!0,r;return i;function i(s,a,l){const o=[];let u,m,d,f,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Ua.lastIndex=d,u=Ua.exec(s),f=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(f),!u){t=s.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(s.slice(d,f)),e+=f-d),p){case 0:o.push(65533),e++;break;case 9:for(m=Math.ceil(e/4)*4,o.push(-2);e++<m;)o.push(-1);break;case 10:o.push(-4),e=1;break;default:r=!0,e=1}d=f+1}return l&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}var Hc={}.hasOwnProperty;function yk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ck(n)(xk(bk(n).document().write(kk()(e,t,!0))))}function Ck(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(de),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(on),blockQuote:s(it),characterEscape:Y,characterReference:Y,codeFenced:s(ir),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ir,a),codeText:s(sr,a),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(ar),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(lr),hardBreakEscape:s(Ut),hardBreakTrailing:s(Ut),htmlFlow:s(or,a),htmlFlowData:Y,htmlText:s(or,a),htmlTextData:Y,image:s(se),label:a,link:s(de),listItem:s(Qe),listItemValue:f,listOrdered:s(we,d),listUnordered:s(we),paragraph:s(At),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(on),strong:s(eh),thematicBreak:s(nh)},exit:{atxHeading:o(),atxHeadingSequence:O,autolink:o(),autolinkEmail:He,autolinkProtocol:Pe,blockQuote:o(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:ge,characterReference:_t,codeFenced:o(C),codeFencedFence:N,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:S,codeIndented:o(b),codeText:o(G),codeTextData:S,data:S,definition:o(),definitionDestinationString:w,definitionLabelString:A,definitionTitleString:v,emphasis:o(),hardBreakEscape:o(q),hardBreakTrailing:o(q),htmlFlow:o(Z),htmlFlowData:S,htmlText:o(ie),htmlTextData:S,image:o(P),label:X,labelText:V,lineEnding:H,link:o(U),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:De,resourceDestinationString:y,resourceTitleString:ce,resource:Q,setextHeading:o($),setextHeadingLineSequence:B,setextHeadingText:I,strong:o(),thematicBreak:o()}};Uc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let z={type:"root",children:[]};const K={stack:[z],tokenStack:[],config:t,enter:l,exit:u,buffer:a,resume:m,data:n},fe=[];let pe=-1;for(;++pe<D.length;)(D[pe][1].type==="listOrdered"||D[pe][1].type==="listUnordered")&&(D[pe][0]==="enter"?fe.push(pe):pe=i(D,fe.pop(),pe));for(pe=-1;++pe<D.length;){const dt=t[D[pe][0]];Hc.call(dt,D[pe][1].type)&&dt[D[pe][1].type].call(Object.assign({sliceSerialize:D[pe][2].sliceSerialize},K),D[pe][1])}if(K.tokenStack.length>0){const dt=K.tokenStack[K.tokenStack.length-1];(dt[1]||za).call(K,void 0,dt[0])}for(z.position={start:mt(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:mt(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)z=t.transforms[pe](z)||z;return z}function i(D,z,K){let fe=z-1,pe=-1,dt=!1,zt,st,cn,un;for(;++fe<=K;){const Me=D[fe];switch(Me[1].type){case"listUnordered":case"listOrdered":case"blockQuote":Me[0]==="enter"?pe++:pe--,un=void 0;break;case"lineEndingBlank":Me[0]==="enter"&&(zt&&!un&&!pe&&!cn&&(cn=fe),un=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:un=void 0}if(!pe&&Me[0]==="enter"&&Me[1].type==="listItemPrefix"||pe===-1&&Me[0]==="exit"&&(Me[1].type==="listUnordered"||Me[1].type==="listOrdered")){if(zt){let $t=fe;for(st=void 0;$t--;){const at=D[$t];if(at[1].type==="lineEnding"||at[1].type==="lineEndingBlank"){if(at[0]==="exit")continue;st&&(D[st][1].type="lineEndingBlank",dt=!0),at[1].type="lineEnding",st=$t}else if(!(at[1].type==="linePrefix"||at[1].type==="blockQuotePrefix"||at[1].type==="blockQuotePrefixWhitespace"||at[1].type==="blockQuoteMarker"||at[1].type==="listItemIndent"))break}cn&&(!st||cn<st)&&(zt._spread=!0),zt.end=Object.assign({},st?D[st][1].start:Me[1].end),D.splice(st||fe,0,["exit",zt,Me[2]]),fe++,K++}if(Me[1].type==="listItemPrefix"){const $t={type:"listItem",_spread:!1,start:Object.assign({},Me[1].start),end:void 0};zt=$t,D.splice(fe,0,["enter",$t,Me[2]]),fe++,K++,cn=void 0,un=!0}}}return D[z][1]._spread=dt,K}function s(D,z){return K;function K(fe){l.call(this,D(fe),fe),z&&z.call(this,fe)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(D,z,K){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([z,K||void 0]),D.position={start:mt(z.start),end:void 0}}function o(D){return z;function z(K){D&&D.call(this,K),u.call(this,K)}}function u(D,z){const K=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==D.type&&(z?z.call(this,D,fe[0]):(fe[1]||za).call(this,D,fe[0]));else throw new Error("Cannot close `"+D.type+"` ("+vn({start:D.start,end:D.end})+"): it’s not open");K.position.end=mt(D.end)}function m(){return os(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function p(){const D=this.resume(),z=this.stack[this.stack.length-1];z.lang=D}function g(){const D=this.resume(),z=this.stack[this.stack.length-1];z.meta=D}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D.replace(/(\r?\n|\r)$/g,"")}function A(D){const z=this.resume(),K=this.stack[this.stack.length-1];K.label=z,K.identifier=Ye(this.sliceSerialize(D)).toLowerCase()}function v(){const D=this.resume(),z=this.stack[this.stack.length-1];z.title=D}function w(){const D=this.resume(),z=this.stack[this.stack.length-1];z.url=D}function O(D){const z=this.stack[this.stack.length-1];z.depth||(z.depth=this.sliceSerialize(D).length)}function I(){this.data.setextHeadingSlurpLineEnding=!0}function B(D){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(D){const z=this.stack[this.stack.length-1].children;let K=z[z.length-1];(!K||K.type!=="text")&&(K=th(),K.position={start:mt(D.start),end:void 0},z.push(K)),this.stack.push(K)}function S(D){const z=this.stack.pop();z.value+=this.sliceSerialize(D),z.position.end=mt(D.end)}function H(D){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=z.children[z.children.length-1];K.position.end=mt(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(Y.call(this,D),S.call(this,D))}function q(){this.data.atHardBreak=!0}function Z(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D}function ie(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D}function G(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D}function U(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=z,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function P(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=z,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function V(D){const z=this.sliceSerialize(D),K=this.stack[this.stack.length-2];K.label=KE(z),K.identifier=Ye(z).toLowerCase()}function X(){const D=this.stack[this.stack.length-1],z=this.resume(),K=this.stack[this.stack.length-1];this.data.inReference=!0,K.type==="link"?K.children=D.children:K.alt=z}function y(){const D=this.resume(),z=this.stack[this.stack.length-1];z.url=D}function ce(){const D=this.resume(),z=this.stack[this.stack.length-1];z.title=D}function Q(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function De(D){const z=this.resume(),K=this.stack[this.stack.length-1];K.label=z,K.identifier=Ye(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function Te(D){this.data.characterReferenceType=D.type}function ge(D){const z=this.sliceSerialize(D),K=this.data.characterReferenceType;let fe;K?(fe=oc(z,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=us(z);const pe=this.stack[this.stack.length-1];pe.value+=fe}function _t(D){const z=this.stack.pop();z.position.end=mt(D.end)}function Pe(D){S.call(this,D);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(D)}function He(D){S.call(this,D);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(D)}function it(){return{type:"blockquote",children:[]}}function ir(){return{type:"code",lang:null,meta:null,value:""}}function sr(){return{type:"inlineCode",value:""}}function ar(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function lr(){return{type:"emphasis",children:[]}}function on(){return{type:"heading",depth:0,children:[]}}function Ut(){return{type:"break"}}function or(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function we(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Qe(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function At(){return{type:"paragraph",children:[]}}function eh(){return{type:"strong",children:[]}}function th(){return{type:"text",value:""}}function nh(){return{type:"thematicBreak"}}}function mt(e){return{line:e.line,column:e.column,offset:e.offset}}function Uc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Uc(e,r):_k(e,r)}}function _k(e,t){let n;for(n in t)if(Hc.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 za(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vn({start:t.start,end:t.end})+") is still open")}function Ak(e){const t=this;t.parser=n;function n(r){return yk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Nk(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 vk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
43
- `}]}function Sk(e,t){const n=t.value?t.value+`
44
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Ik(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=an(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,l+=1,e.footnoteCounts.set(r,l);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function Rk(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 Ok(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zc(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),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Dk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zc(e,t);const i={src:an(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Pk(e,t){const n={src:an(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 Mk(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 Bk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zc(e,t);const i={href:an(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Fk(e,t){const n={href:an(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 jk(e,t,n){const r=e.all(t),i=n?Hk(n):$c(t),s={},a=[];if(typeof t.checked=="boolean"){const m=r[0];let d;m&&m.type==="element"&&m.tagName==="p"?d=m:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const m=r[l];(i||l!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
45
- `}),m.type==="element"&&m.tagName==="p"&&!i?a.push(...m.children):a.push(m)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&a.push({type:"text",value:`
46
- `});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function Hk(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=$c(n[r])}return t}function $c(e){const t=e.spread;return t??e.children.length>1}function Uk(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function zk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $k(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yk(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=nt(t.children[1]),o=qr(t.children[t.children.length-1]);l&&o&&(a.position={start:l,end:o}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function Vk(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const o=[];for(;++l<a;){const m=t.children[l],d={},f=s?s[l]:void 0;f&&(d.align=f);let p={type:"element",tagName:i,properties:d,children:[]};m&&(p.children=e.all(m),e.patch(m,p),p=e.applyData(m,p)),o.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function Wk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var $a=9,qa=32;function Qk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Ya(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Ya(t.slice(i),i>0,!1)),s.join("")}function Ya(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===$a||s===qa;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===$a||s===qa;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Gk(e,t){const n={type:"text",value:Qk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Kk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Xk={blockquote:Nk,break:vk,code:Sk,delete:Ik,emphasis:wk,footnoteReference:Lk,heading:Rk,html:Ok,imageReference:Dk,image:Pk,inlineCode:Mk,linkReference:Bk,link:Fk,listItem:jk,list:Uk,paragraph:zk,root:$k,strong:qk,table:Yk,tableCell:Wk,tableRow:Vk,text:Gk,thematicBreak:Kk,toml:dr,yaml:dr,definition:dr,footnoteDefinition:dr};function dr(){}function Zk(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 Jk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ey(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Zk,r=e.options.footnoteBackLabel||Jk,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const m=e.all(u),d=String(u.identifier).toUpperCase(),f=an(d.toLowerCase());let p=0;const g=[],N=e.footnoteCounts.get(d);for(;N!==void 0&&++p<=N;){g.length>0&&g.push({type:"text",value:" "});let A=typeof n=="string"?n:n(o,p);typeof A=="string"&&(A={type:"text",value:A}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const A=C.children[C.children.length-1];A&&A.type==="text"?A.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else m.push(...g);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(m,!0)};e.patch(u,b),l.push(b)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Dt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
47
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
48
- `}]}}var Mi={}.hasOwnProperty,ty={};function ny(e,t){const n=t||ty,r=new Map,i=new Map,s={all:l,applyData:iy,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Xk,...n.handlers},one:a,options:n,patch:ry,wrap:ay};return et(e,function(o){if(o.type==="definition"||o.type==="footnoteDefinition"){const u=o.type==="definition"?r:i,m=String(o.identifier).toUpperCase();u.has(m)||u.set(m,o)}}),s;function a(o,u){const m=o.type,d=s.handlers[m];if(Mi.call(s.handlers,m)&&d)return d(s,o,u);if(s.options.passThrough&&s.options.passThrough.includes(m)){if("children"in o){const{children:f,...p}=o,g=Dt(p);return g.children=s.all(o),g}return Dt(o)}return(s.options.unknownHandler||sy)(s,o,u)}function l(o){const u=[];if("children"in o){const m=o.children;let d=-1;for(;++d<m.length;){const f=s.one(m[d],o);if(f){if(d&&m[d-1].type==="break"&&(!Array.isArray(f)&&f.type==="text"&&(f.value=Va(f.value)),!Array.isArray(f)&&f.type==="element")){const p=f.children[0];p&&p.type==="text"&&(p.value=Va(p.value))}Array.isArray(f)?u.push(...f):u.push(f)}}}return u}}function ry(e,t){e.position&&(t.position=Bo(e))}function iy(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&s&&Object.assign(n.properties,Dt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function sy(e,t){const n=t.data||{},r="value"in t&&!(Mi.call(n,"hProperties")||Mi.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 ay(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
42
+ `;break;case-2:a=t?" ":" ";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function _k(e){const t={constructs:gc([hk,...(e||{}).extensions||[]]),content:n(ek),defined:[],document:n(nk),flow:n(sk),lazy:{},string:n(lk),text:n(ck)};return t;function n(r){return i;function i(s){return kk(t,r,s)}}}function Ak(e){for(;!Sc(e););return e}var Ya=/[\0\t\n\r]/g;function Nk(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let u,m,d,f,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Ya.lastIndex=d,u=Ya.exec(s),f=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(f),!u){t=s.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(s.slice(d,f)),e+=f-d),p){case 0:l.push(65533),e++;break;case 9:for(m=Math.ceil(e/4)*4,l.push(-2);e++<m;)l.push(-1);break;case 10:l.push(-4),e=1;break;default:r=!0,e=1}d=f+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}var Wc={}.hasOwnProperty;function vk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Sk(n)(Ak(_k(n).document().write(Nk()(e,t,!0))))}function Sk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(de),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(hn),blockQuote:s(st),characterEscape:Y,characterReference:Y,codeFenced:s(ir),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ir,a),codeText:s(sr,a),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(ar),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(or),hardBreakEscape:s(Ut),hardBreakTrailing:s(Ut),htmlFlow:s(lr,a),htmlFlowData:Y,htmlText:s(lr,a),htmlTextData:Y,image:s(se),label:a,link:s(de),listItem:s(Qe),listItemValue:f,listOrdered:s(we,d),listUnordered:s(we),paragraph:s(Nt),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(hn),strong:s(oh),thematicBreak:s(ch)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:He,autolinkProtocol:Pe,blockQuote:l(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:ge,characterReference:At,codeFenced:l(C),codeFencedFence:N,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:S,codeIndented:l(b),codeText:l(G),codeTextData:S,data:S,definition:l(),definitionDestinationString:w,definitionLabelString:A,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(q),hardBreakTrailing:l(q),htmlFlow:l(Z),htmlFlowData:S,htmlText:l(ie),htmlTextData:S,image:l(P),label:X,labelText:V,lineEnding:H,link:l(U),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:De,resourceDestinationString:y,resourceTitleString:ce,resource:Q,setextHeading:l($),setextHeadingLineSequence:B,setextHeadingText:I,strong:l(),thematicBreak:l()}};Qc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let z={type:"root",children:[]};const K={stack:[z],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:m,data:n},fe=[];let pe=-1;for(;++pe<D.length;)(D[pe][1].type==="listOrdered"||D[pe][1].type==="listUnordered")&&(D[pe][0]==="enter"?fe.push(pe):pe=i(D,fe.pop(),pe));for(pe=-1;++pe<D.length;){const mt=t[D[pe][0]];Wc.call(mt,D[pe][1].type)&&mt[D[pe][1].type].call(Object.assign({sliceSerialize:D[pe][2].sliceSerialize},K),D[pe][1])}if(K.tokenStack.length>0){const mt=K.tokenStack[K.tokenStack.length-1];(mt[1]||Va).call(K,void 0,mt[0])}for(z.position={start:ft(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:ft(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)z=t.transforms[pe](z)||z;return z}function i(D,z,K){let fe=z-1,pe=-1,mt=!1,zt,at,dn,mn;for(;++fe<=K;){const Me=D[fe];switch(Me[1].type){case"listUnordered":case"listOrdered":case"blockQuote":Me[0]==="enter"?pe++:pe--,mn=void 0;break;case"lineEndingBlank":Me[0]==="enter"&&(zt&&!mn&&!pe&&!dn&&(dn=fe),mn=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mn=void 0}if(!pe&&Me[0]==="enter"&&Me[1].type==="listItemPrefix"||pe===-1&&Me[0]==="exit"&&(Me[1].type==="listUnordered"||Me[1].type==="listOrdered")){if(zt){let $t=fe;for(at=void 0;$t--;){const ot=D[$t];if(ot[1].type==="lineEnding"||ot[1].type==="lineEndingBlank"){if(ot[0]==="exit")continue;at&&(D[at][1].type="lineEndingBlank",mt=!0),ot[1].type="lineEnding",at=$t}else if(!(ot[1].type==="linePrefix"||ot[1].type==="blockQuotePrefix"||ot[1].type==="blockQuotePrefixWhitespace"||ot[1].type==="blockQuoteMarker"||ot[1].type==="listItemIndent"))break}dn&&(!at||dn<at)&&(zt._spread=!0),zt.end=Object.assign({},at?D[at][1].start:Me[1].end),D.splice(at||fe,0,["exit",zt,Me[2]]),fe++,K++}if(Me[1].type==="listItemPrefix"){const $t={type:"listItem",_spread:!1,start:Object.assign({},Me[1].start),end:void 0};zt=$t,D.splice(fe,0,["enter",$t,Me[2]]),fe++,K++,dn=void 0,mn=!0}}}return D[z][1]._spread=mt,K}function s(D,z){return K;function K(fe){o.call(this,D(fe),fe),z&&z.call(this,fe)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(D,z,K){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([z,K||void 0]),D.position={start:ft(z.start),end:void 0}}function l(D){return z;function z(K){D&&D.call(this,K),u.call(this,K)}}function u(D,z){const K=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==D.type&&(z?z.call(this,D,fe[0]):(fe[1]||Va).call(this,D,fe[0]));else throw new Error("Cannot close `"+D.type+"` ("+wn({start:D.start,end:D.end})+"): it’s not open");K.position.end=ft(D.end)}function m(){return cs(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function p(){const D=this.resume(),z=this.stack[this.stack.length-1];z.lang=D}function g(){const D=this.resume(),z=this.stack[this.stack.length-1];z.meta=D}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D.replace(/(\r?\n|\r)$/g,"")}function A(D){const z=this.resume(),K=this.stack[this.stack.length-1];K.label=z,K.identifier=Ye(this.sliceSerialize(D)).toLowerCase()}function v(){const D=this.resume(),z=this.stack[this.stack.length-1];z.title=D}function w(){const D=this.resume(),z=this.stack[this.stack.length-1];z.url=D}function O(D){const z=this.stack[this.stack.length-1];z.depth||(z.depth=this.sliceSerialize(D).length)}function I(){this.data.setextHeadingSlurpLineEnding=!0}function B(D){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(D){const z=this.stack[this.stack.length-1].children;let K=z[z.length-1];(!K||K.type!=="text")&&(K=lh(),K.position={start:ft(D.start),end:void 0},z.push(K)),this.stack.push(K)}function S(D){const z=this.stack.pop();z.value+=this.sliceSerialize(D),z.position.end=ft(D.end)}function H(D){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=z.children[z.children.length-1];K.position.end=ft(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(Y.call(this,D),S.call(this,D))}function q(){this.data.atHardBreak=!0}function Z(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D}function ie(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D}function G(){const D=this.resume(),z=this.stack[this.stack.length-1];z.value=D}function U(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=z,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function P(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=z,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function V(D){const z=this.sliceSerialize(D),K=this.stack[this.stack.length-2];K.label=tT(z),K.identifier=Ye(z).toLowerCase()}function X(){const D=this.stack[this.stack.length-1],z=this.resume(),K=this.stack[this.stack.length-1];this.data.inReference=!0,K.type==="link"?K.children=D.children:K.alt=z}function y(){const D=this.resume(),z=this.stack[this.stack.length-1];z.url=D}function ce(){const D=this.resume(),z=this.stack[this.stack.length-1];z.title=D}function Q(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function De(D){const z=this.resume(),K=this.stack[this.stack.length-1];K.label=z,K.identifier=Ye(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function Te(D){this.data.characterReferenceType=D.type}function ge(D){const z=this.sliceSerialize(D),K=this.data.characterReferenceType;let fe;K?(fe=pc(z,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=hs(z);const pe=this.stack[this.stack.length-1];pe.value+=fe}function At(D){const z=this.stack.pop();z.position.end=ft(D.end)}function Pe(D){S.call(this,D);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(D)}function He(D){S.call(this,D);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(D)}function st(){return{type:"blockquote",children:[]}}function ir(){return{type:"code",lang:null,meta:null,value:""}}function sr(){return{type:"inlineCode",value:""}}function ar(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function or(){return{type:"emphasis",children:[]}}function hn(){return{type:"heading",depth:0,children:[]}}function Ut(){return{type:"break"}}function lr(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function we(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Qe(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function Nt(){return{type:"paragraph",children:[]}}function oh(){return{type:"strong",children:[]}}function lh(){return{type:"text",value:""}}function ch(){return{type:"thematicBreak"}}}function ft(e){return{line:e.line,column:e.column,offset:e.offset}}function Qc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qc(e,r):Ik(e,r)}}function Ik(e,t){let n;for(n in t)if(Wc.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 Va(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wn({start:t.start,end:t.end})+") is still open")}function wk(e){const t=this;t.parser=n;function n(r){return vk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Lk(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 Rk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
43
+ `}]}function Ok(e,t){const n=t.value?t.value+`
44
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Dk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=cn(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function Bk(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 Fk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Gc(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),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function jk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gc(e,t);const i={src:cn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Hk(e,t){const n={src:cn(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 Uk(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 zk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gc(e,t);const i={href:cn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function $k(e,t){const n={href:cn(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 qk(e,t,n){const r=e.all(t),i=n?Yk(n):Kc(t),s={},a=[];if(typeof t.checked=="boolean"){const m=r[0];let d;m&&m.type==="element"&&m.tagName==="p"?d=m:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const m=r[o];(i||o!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
45
+ `}),m.type==="element"&&m.tagName==="p"&&!i?a.push(...m.children):a.push(m)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
46
+ `});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function Yk(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=Kc(n[r])}return t}function Kc(e){const t=e.spread;return t??e.children.length>1}function Vk(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Wk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Gk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kk(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=rt(t.children[1]),l=qr(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function Xk(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<a;){const m=t.children[o],d={},f=s?s[o]:void 0;f&&(d.align=f);let p={type:"element",tagName:i,properties:d,children:[]};m&&(p.children=e.all(m),e.patch(m,p),p=e.applyData(m,p)),l.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)}function Zk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Wa=9,Qa=32;function Jk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Ga(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Ga(t.slice(i),i>0,!1)),s.join("")}function Ga(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Wa||s===Qa;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Wa||s===Qa;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ey(e,t){const n={type:"text",value:Jk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ty(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var ny={blockquote:Lk,break:Rk,code:Ok,delete:Dk,emphasis:Pk,footnoteReference:Mk,heading:Bk,html:Fk,imageReference:jk,image:Hk,inlineCode:Uk,linkReference:zk,link:$k,listItem:qk,list:Vk,paragraph:Wk,root:Qk,strong:Gk,table:Kk,tableCell:Zk,tableRow:Xk,text:ey,thematicBreak:ty,toml:dr,yaml:dr,definition:dr,footnoteDefinition:dr};function dr(){}function ry(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 iy(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sy(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ry,r=e.options.footnoteBackLabel||iy,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const m=e.all(u),d=String(u.identifier).toUpperCase(),f=cn(d.toLowerCase());let p=0;const g=[],N=e.footnoteCounts.get(d);for(;N!==void 0&&++p<=N;){g.length>0&&g.push({type:"text",value:" "});let A=typeof n=="string"?n:n(l,p);typeof A=="string"&&(A={type:"text",value:A}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const A=C.children[C.children.length-1];A&&A.type==="text"?A.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else m.push(...g);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(m,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Dt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
47
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
48
+ `}]}}var Bi={}.hasOwnProperty,ay={};function oy(e,t){const n=t||ay,r=new Map,i=new Map,s={all:o,applyData:cy,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ny,...n.handlers},one:a,options:n,patch:ly,wrap:hy};return tt(e,function(l){if(l.type==="definition"||l.type==="footnoteDefinition"){const u=l.type==="definition"?r:i,m=String(l.identifier).toUpperCase();u.has(m)||u.set(m,l)}}),s;function a(l,u){const m=l.type,d=s.handlers[m];if(Bi.call(s.handlers,m)&&d)return d(s,l,u);if(s.options.passThrough&&s.options.passThrough.includes(m)){if("children"in l){const{children:f,...p}=l,g=Dt(p);return g.children=s.all(l),g}return Dt(l)}return(s.options.unknownHandler||uy)(s,l,u)}function o(l){const u=[];if("children"in l){const m=l.children;let d=-1;for(;++d<m.length;){const f=s.one(m[d],l);if(f){if(d&&m[d-1].type==="break"&&(!Array.isArray(f)&&f.type==="text"&&(f.value=Ka(f.value)),!Array.isArray(f)&&f.type==="element")){const p=f.children[0];p&&p.type==="text"&&(p.value=Ka(p.value))}Array.isArray(f)?u.push(...f):u.push(f)}}}return u}}function ly(e,t){e.position&&(t.position=ql(e))}function cy(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&s&&Object.assign(n.properties,Dt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function uy(e,t){const n=t.data||{},r="value"in t&&!(Bi.call(n,"hProperties")||Bi.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 hy(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
49
49
  `});++r<e.length;)r&&n.push({type:"text",value:`
50
50
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
51
- `}),n}function Va(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Wa(e,t){const n=ny(e,t),r=n.one(e,void 0),i=ey(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
52
- `},i)),s}function ly(e,t){return e&&"run"in e?async function(n,r){const i=Wa(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Wa(n,{file:r,...e||t})}}function Qa(e){if(e)throw e}var oy=$n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):r.call(d)==="[object Array]"},l=function(d){if(!d||r.call(d)!=="[object Object]")return!1;var f=n.call(d,"constructor"),p=d.constructor&&d.constructor.prototype&&n.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!f&&!p)return!1;var g;for(g in d);return typeof g>"u"||n.call(d,g)},o=function(d,f){i&&f.name==="__proto__"?i(d,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):d[f.name]=f.newValue},u=function(d,f){if(f==="__proto__")if(n.call(d,f)){if(s)return s(d,f).value}else return;return d[f]};t.exports=function m(){var d,f,p,g,N,C,b=arguments[0],A=1,v=arguments.length,w=!1;for(typeof b=="boolean"&&(w=b,b=arguments[1]||{},A=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});A<v;++A)if(d=arguments[A],d!=null)for(f in d)p=u(b,f),g=u(d,f),b!==g&&(w&&g&&(l(g)||(N=a(g)))?(N?(N=!1,C=p&&a(p)?p:[]):C=p&&l(p)?p:{},o(b,{name:f,newValue:m(w,C,g)})):typeof g<"u"&&o(b,{name:f,newValue:g}));return b}}));function Bi(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 cy(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...i);function l(o,...u){const m=e[++s];let d=-1;if(o){a(o);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,m?uy(m,l)(...u):a(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 uy(e,t){let n;return r;function r(...a){const l=e.length>a.length;let o;l&&a.push(i);try{o=e.apply(this,a)}catch(u){const m=u;if(l&&n)throw m;return i(m)}l||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(a,...l){n||(n=!0,t(a,...l))}function s(a){i(null,a)}}var Ke={basename:hy,dirname:dy,extname:my,join:fy,sep:"/"};function hy(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nr(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function dy(e){if(nr(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 my(e){nr(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function fy(...e){let t=-1,n;for(;++t<e.length;)nr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":py(n)}function py(e){nr(e);const t=e.codePointAt(0)===47;let n=gy(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function gy(e,t){let n="",r=0,i=-1,s=0,a=-1,l,o;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else l===46&&s>-1?s++:s=-1}return n}function nr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Ey={cwd:Ty};function Ty(){return"/"}function Fi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function by(e){if(typeof e=="string")e=new URL(e);else if(!Fi(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 xy(e)}function xy(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)}var di=["history","path","basename","stem","extname","dirname"],ky=class{constructor(e){let t;e?Fi(e)?t={path:e}:typeof e=="string"||yy(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":Ey.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<di.length;){const i=di[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)di.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?Ke.basename(this.path):void 0}set basename(e){fi(e,"basename"),mi(e,"basename"),this.path=Ke.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ke.dirname(this.path):void 0}set dirname(e){Ga(this.basename,"dirname"),this.path=Ke.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ke.extname(this.path):void 0}set extname(e){if(mi(e,"extname"),Ga(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ke.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Fi(e)&&(e=by(e)),fi(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ke.basename(this.path,this.extname):void 0}set stem(e){fi(e,"stem"),mi(e,"stem"),this.path=Ke.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Ae(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function mi(e,t){if(e&&e.includes(Ke.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ke.sep+"`")}function fi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ga(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function yy(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Cy=(function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),pi=Or(oy(),1),_y={}.hasOwnProperty,Ay=class qc extends Cy{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=cy()}copy(){const t=new qc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,pi.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ti("data",this.frozen),this.namespace[t]=n,this):_y.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ti("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=mr(t),r=this.parser||this.Parser;return gi("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gi("process",this.parser||this.Parser),Ei("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const l=mr(t),o=r.parse(l);r.run(o,l,function(m,d,f){if(m||!d||!f)return u(m);const p=d,g=r.stringify(p,f);Sy(g)?f.value=g:f.result=g,u(m,f)});function u(m,d){m||!d?a(m):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),gi("processSync",this.parser||this.Parser),Ei("processSync",this.compiler||this.Compiler),this.process(t,i),Xa("processSync","process",n),r;function i(s,a){n=!0,Qa(s),r=a}}run(t,n,r){Ka(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,l){const o=mr(n);i.run(t,o,u);function u(m,d,f){const p=d||t;m?l(m):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Xa("runSync","run",r),i;function s(a,l){Qa(a),i=l,r=!0}}stringify(t,n){this.freeze();const r=mr(n),i=this.compiler||this.Compiler;return Ei("stringify",i),Ka(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ti("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[m,...d]=u;o(m,d)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(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");l(u.plugins),u.settings&&(i.settings=(0,pi.default)(!0,i.settings,u.settings))}function l(u){let m=-1;if(u!=null)if(Array.isArray(u))for(;++m<u.length;){const d=u[m];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,m){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...m]);else if(m.length>0){let[p,...g]=m;const N=r[f][1];Bi(N)&&Bi(p)&&(p=(0,pi.default)(!0,N,p)),r[f]=[u,p,...g]}}}},Ny=new Ay().freeze();function gi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ei(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ti(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 Ka(e){if(!Bi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xa(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mr(e){return vy(e)?e:new ky(e)}function vy(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Sy(e){return typeof e=="string"||Iy(e)}function Iy(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ts(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ht=Ts();function Yc(e){Ht=e}var Lt={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Se.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var wy=(()=>{try{return!0}catch{return!1}})(),Se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Ly=/^(?:[ \t]*(?:\n|$))+/,Ry=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bs=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Vc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wc=le(Vc).replace(/bull/g,bs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Py=le(Vc).replace(/bull/g,bs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),xs=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,My=/^[^\n]+/,ks=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,By=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ks).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fy=le(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bs).getRegex(),Qr="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ys=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jy=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ys).replace("tag",Qr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Za=le(xs).replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex(),Cs={blockquote:le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Za).getRegex(),code:Ry,def:By,fences:Oy,heading:Dy,hr:rr,html:jy,lheading:Wc,list:Fy,newline:Ly,paragraph:Za,table:Lt,text:My},Ja=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex(),Hy={...Cs,lheading:Py,table:Ja,paragraph:le(xs).replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ja).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex()},Uy={...Cs,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ys).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Lt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(xs).replace("hr",rr).replace("heading",` *#{1,6} *[^
53
- ]`).replace("lheading",Wc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$y=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qc=/^( {2,}|\\)\n(?!\s*$)/,qy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ln=/[\p{P}\p{S}]/u,Gr=/[\s\p{P}\p{S}]/u,_s=/[^\s\p{P}\p{S}]/u,Yy=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gr).getRegex(),Gc=/(?!~)[\p{P}\p{S}]/u,Vy=/(?!~)[\s\p{P}\p{S}]/u,Wy=/(?:[^\s\p{P}\p{S}]|~)/u,Qy=le(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wy?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Kc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Gy=le(Kc,"u").replace(/punct/g,ln).getRegex(),Ky=le(Kc,"u").replace(/punct/g,Gc).getRegex(),Xc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xy=le(Xc,"gu").replace(/notPunctSpace/g,_s).replace(/punctSpace/g,Gr).replace(/punct/g,ln).getRegex(),Zy=le(Xc,"gu").replace(/notPunctSpace/g,Wy).replace(/punctSpace/g,Vy).replace(/punct/g,Gc).getRegex(),Jy=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_s).replace(/punctSpace/g,Gr).replace(/punct/g,ln).getRegex(),eC=le(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ln).getRegex(),tC=le("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,_s).replace(/punctSpace/g,Gr).replace(/punct/g,ln).getRegex(),nC=le(/\\(punct)/,"gu").replace(/punct/g,ln).getRegex(),rC=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),iC=le(ys).replace("(?:-->|$)","-->").getRegex(),sC=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",iC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,aC=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",vr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Zc=le(/^!?\[(label)\]\[(ref)\]/).replace("label",vr).replace("ref",ks).getRegex(),Jc=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",ks).getRegex(),lC=le("reflink|nolink(?!\\()","g").replace("reflink",Zc).replace("nolink",Jc).getRegex(),el=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,As={_backpedal:Lt,anyPunctuation:nC,autolink:rC,blockSkip:Qy,br:Qc,code:$y,del:Lt,delLDelim:Lt,delRDelim:Lt,emStrongLDelim:Gy,emStrongRDelimAst:Xy,emStrongRDelimUnd:Jy,escape:zy,link:aC,nolink:Jc,punctuation:Yy,reflink:Zc,reflinkSearch:lC,tag:sC,text:qy,url:Lt},oC={...As,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",vr).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vr).getRegex()},ji={...As,emStrongRDelimAst:Zy,emStrongLDelim:Ky,delLDelim:eC,delRDelim:tC,url:le(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",el).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:le(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",el).getRegex()},cC={...ji,br:le(Qc).replace("{2,}","*").getRegex(),text:le(ji.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},fr={normal:Cs,gfm:Hy,pedantic:Uy},pn={normal:As,gfm:ji,breaks:cC,pedantic:oC},uC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tl=e=>uC[e];function Ge(e,t){if(t){if(Se.escapeTest.test(e))return e.replace(Se.escapeReplace,tl)}else if(Se.escapeTestNoEncode.test(e))return e.replace(Se.escapeReplaceNoEncode,tl);return e}function nl(e){try{e=encodeURI(e).replace(Se.percentDecode,"%")}catch{return null}return e}function rl(e,t){let n=e.replace(Se.findPipe,(i,s,a)=>{let l=!1,o=s;for(;--o>=0&&a[o]==="\\";)l=!l;return l?"|":" |"}).split(Se.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Se.slashPipe,"|");return n}function gn(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r;){let s=e.charAt(r-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return e.slice(0,r-i)}function hC(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function dC(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function il(e,t,n,r,i){let s=t.href,a=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function mC(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
54
- `).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[l]=a;return l.length>=i.length?s.slice(i.length):s}).join(`
55
- `)}var Sr=class{options;rules;lexer;constructor(e){this.options=e||Ht}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:gn(n,`
56
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=mC(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=gn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:gn(t[0],`
57
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=gn(t[0],`
51
+ `}),n}function Ka(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Xa(e,t){const n=oy(e,t),r=n.one(e,void 0),i=sy(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
52
+ `},i)),s}function dy(e,t){return e&&"run"in e?async function(n,r){const i=Xa(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Xa(n,{file:r,...e||t})}}function Za(e){if(e)throw e}var my=$n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):r.call(d)==="[object Array]"},o=function(d){if(!d||r.call(d)!=="[object Object]")return!1;var f=n.call(d,"constructor"),p=d.constructor&&d.constructor.prototype&&n.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!f&&!p)return!1;var g;for(g in d);return typeof g>"u"||n.call(d,g)},l=function(d,f){i&&f.name==="__proto__"?i(d,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):d[f.name]=f.newValue},u=function(d,f){if(f==="__proto__")if(n.call(d,f)){if(s)return s(d,f).value}else return;return d[f]};t.exports=function m(){var d,f,p,g,N,C,b=arguments[0],A=1,v=arguments.length,w=!1;for(typeof b=="boolean"&&(w=b,b=arguments[1]||{},A=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});A<v;++A)if(d=arguments[A],d!=null)for(f in d)p=u(b,f),g=u(d,f),b!==g&&(w&&g&&(o(g)||(N=a(g)))?(N?(N=!1,C=p&&a(p)?p:[]):C=p&&o(p)?p:{},l(b,{name:f,newValue:m(w,C,g)})):typeof g<"u"&&l(b,{name:f,newValue:g}));return b}}));function Fi(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 fy(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...u){const m=e[++s];let d=-1;if(l){a(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,m?py(m,o)(...u):a(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 py(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(u){const m=u;if(o&&n)throw m;return i(m)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}var Ke={basename:gy,dirname:Ey,extname:Ty,join:by,sep:"/"};function gy(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nr(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Ey(e){if(nr(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 Ty(e){nr(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function by(...e){let t=-1,n;for(;++t<e.length;)nr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":xy(n)}function xy(e){nr(e);const t=e.codePointAt(0)===47;let n=ky(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ky(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function nr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var yy={cwd:Cy};function Cy(){return"/"}function ji(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _y(e){if(typeof e=="string")e=new URL(e);else if(!ji(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 Ay(e)}function Ay(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)}var mi=["history","path","basename","stem","extname","dirname"],Ny=class{constructor(e){let t;e?ji(e)?t={path:e}:typeof e=="string"||vy(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":yy.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<mi.length;){const i=mi[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)mi.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?Ke.basename(this.path):void 0}set basename(e){pi(e,"basename"),fi(e,"basename"),this.path=Ke.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ke.dirname(this.path):void 0}set dirname(e){Ja(this.basename,"dirname"),this.path=Ke.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ke.extname(this.path):void 0}set extname(e){if(fi(e,"extname"),Ja(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ke.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ji(e)&&(e=_y(e)),pi(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ke.basename(this.path,this.extname):void 0}set stem(e){pi(e,"stem"),fi(e,"stem"),this.path=Ke.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Ae(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function fi(e,t){if(e&&e.includes(Ke.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ke.sep+"`")}function pi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ja(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vy(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Sy=(function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),gi=Or(my(),1),Iy={}.hasOwnProperty,wy=class Xc extends Sy{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=fy()}copy(){const t=new Xc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,gi.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(bi("data",this.frozen),this.namespace[t]=n,this):Iy.call(this.namespace,t)&&this.namespace[t]||void 0:t?(bi("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=mr(t),r=this.parser||this.Parser;return Ei("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ei("process",this.parser||this.Parser),Ti("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=mr(t),l=r.parse(o);r.run(l,o,function(m,d,f){if(m||!d||!f)return u(m);const p=d,g=r.stringify(p,f);Oy(g)?f.value=g:f.result=g,u(m,f)});function u(m,d){m||!d?a(m):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ei("processSync",this.parser||this.Parser),Ti("processSync",this.compiler||this.Compiler),this.process(t,i),to("processSync","process",n),r;function i(s,a){n=!0,Za(s),r=a}}run(t,n,r){eo(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=mr(n);i.run(t,l,u);function u(m,d,f){const p=d||t;m?o(m):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),to("runSync","run",r),i;function s(a,o){Za(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=mr(n),i=this.compiler||this.Compiler;return Ti("stringify",i),eo(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(bi("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[m,...d]=u;l(m,d)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(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");o(u.plugins),u.settings&&(i.settings=(0,gi.default)(!0,i.settings,u.settings))}function o(u){let m=-1;if(u!=null)if(Array.isArray(u))for(;++m<u.length;){const d=u[m];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,m){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...m]);else if(m.length>0){let[p,...g]=m;const N=r[f][1];Fi(N)&&Fi(p)&&(p=(0,gi.default)(!0,N,p)),r[f]=[u,p,...g]}}}},Ly=new wy().freeze();function Ei(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ti(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function bi(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 eo(e){if(!Fi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function to(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mr(e){return Ry(e)?e:new Ny(e)}function Ry(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Oy(e){return typeof e=="string"||Dy(e)}function Dy(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function bs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ht=bs();function Zc(e){Ht=e}var Lt={exec:()=>null};function oe(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Se.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var Py=(()=>{try{return!0}catch{return!1}})(),Se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},My=/^(?:[ \t]*(?:\n|$))+/,By=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xs=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Jc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,eu=oe(Jc).replace(/bull/g,xs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Hy=oe(Jc).replace(/bull/g,xs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ks=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Uy=/^[^\n]+/,ys=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,zy=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ys).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$y=oe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xs).getRegex(),Qr="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qy=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Cs).replace("tag",Qr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),no=oe(ks).replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex(),_s={blockquote:oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",no).getRegex(),code:By,def:zy,fences:Fy,heading:jy,hr:rr,html:qy,lheading:eu,list:$y,newline:My,paragraph:no,table:Lt,text:Uy},ro=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex(),Yy={..._s,lheading:Hy,table:ro,paragraph:oe(ks).replace("hr",rr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ro).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qr).getRegex()},Vy={..._s,html:oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cs).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Lt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(ks).replace("hr",rr).replace("heading",` *#{1,6} *[^
53
+ ]`).replace("lheading",eu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Wy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tu=/^( {2,}|\\)\n(?!\s*$)/,Gy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,un=/[\p{P}\p{S}]/u,Gr=/[\s\p{P}\p{S}]/u,As=/[^\s\p{P}\p{S}]/u,Ky=oe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gr).getRegex(),nu=/(?!~)[\p{P}\p{S}]/u,Xy=/(?!~)[\s\p{P}\p{S}]/u,Zy=/(?:[^\s\p{P}\p{S}]|~)/u,Jy=oe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Py?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ru=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,eC=oe(ru,"u").replace(/punct/g,un).getRegex(),tC=oe(ru,"u").replace(/punct/g,nu).getRegex(),iu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nC=oe(iu,"gu").replace(/notPunctSpace/g,As).replace(/punctSpace/g,Gr).replace(/punct/g,un).getRegex(),rC=oe(iu,"gu").replace(/notPunctSpace/g,Zy).replace(/punctSpace/g,Xy).replace(/punct/g,nu).getRegex(),iC=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,As).replace(/punctSpace/g,Gr).replace(/punct/g,un).getRegex(),sC=oe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,un).getRegex(),aC=oe("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,As).replace(/punctSpace/g,Gr).replace(/punct/g,un).getRegex(),oC=oe(/\\(punct)/,"gu").replace(/punct/g,un).getRegex(),lC=oe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),cC=oe(Cs).replace("(?:-->|$)","-->").getRegex(),uC=oe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",cC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,hC=oe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",vr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),su=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",vr).replace("ref",ys).getRegex(),au=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ys).getRegex(),dC=oe("reflink|nolink(?!\\()","g").replace("reflink",su).replace("nolink",au).getRegex(),io=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ns={_backpedal:Lt,anyPunctuation:oC,autolink:lC,blockSkip:Jy,br:tu,code:Qy,del:Lt,delLDelim:Lt,delRDelim:Lt,emStrongLDelim:eC,emStrongRDelimAst:nC,emStrongRDelimUnd:iC,escape:Wy,link:hC,nolink:au,punctuation:Ky,reflink:su,reflinkSearch:dC,tag:uC,text:Gy,url:Lt},mC={...Ns,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",vr).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vr).getRegex()},Hi={...Ns,emStrongRDelimAst:rC,emStrongLDelim:tC,delLDelim:sC,delRDelim:aC,url:oe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",io).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:oe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",io).getRegex()},fC={...Hi,br:oe(tu).replace("{2,}","*").getRegex(),text:oe(Hi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},fr={normal:_s,gfm:Yy,pedantic:Vy},Tn={normal:Ns,gfm:Hi,breaks:fC,pedantic:mC},pC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},so=e=>pC[e];function Ge(e,t){if(t){if(Se.escapeTest.test(e))return e.replace(Se.escapeReplace,so)}else if(Se.escapeTestNoEncode.test(e))return e.replace(Se.escapeReplaceNoEncode,so);return e}function ao(e){try{e=encodeURI(e).replace(Se.percentDecode,"%")}catch{return null}return e}function oo(e,t){let n=e.replace(Se.findPipe,(i,s,a)=>{let o=!1,l=s;for(;--l>=0&&a[l]==="\\";)o=!o;return o?"|":" |"}).split(Se.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Se.slashPipe,"|");return n}function bn(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r;){let s=e.charAt(r-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return e.slice(0,r-i)}function gC(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function EC(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function lo(e,t,n,r,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function TC(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
54
+ `).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(`
55
+ `)}var Sr=class{options;rules;lexer;constructor(e){this.options=e||Ht}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:bn(n,`
56
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=TC(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=bn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bn(t[0],`
57
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=bn(t[0],`
58
58
  `).split(`
59
- `),r="",i="",s=[];for(;n.length>0;){let a=!1,l=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))l.push(n[o]),a=!0;else if(!a)l.push(n[o]);else break;n=n.slice(o);let u=l.join(`
59
+ `),r="",i="",s=[];for(;n.length>0;){let a=!1,o=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))o.push(n[l]),a=!0;else if(!a)o.push(n[l]);else break;n=n.slice(l);let u=o.join(`
60
60
  `),m=u.replace(this.rules.other.blockquoteSetextReplace,`
61
61
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
62
62
  ${u}`:u,i=i?`${i}
@@ -65,16 +65,16 @@ ${m}`:m;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
65
65
  `),N=this.blockquote(g);s[s.length-1]=N,r=r.substring(0,r.length-p.raw.length)+N.raw,i=i.substring(0,i.length-p.text.length)+N.text;break}else if(f?.type==="list"){let p=f,g=p.raw+`
66
66
  `+n.join(`
67
67
  `),N=this.list(g);s[s.length-1]=N,r=r.substring(0,r.length-f.raw.length)+N.raw,i=i.substring(0,i.length-p.raw.length)+N.raw,n=g.substring(s.at(-1).raw.length).split(`
68
- `);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=!1;for(;e;){let o=!1,u="",m="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let d=dC(t[2].split(`
68
+ `);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=!1;for(;e;){let l=!1,u="",m="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let d=EC(t[2].split(`
69
69
  `,1)[0],t[1].length),f=e.split(`
70
70
  `,1)[0],p=!d.trim(),g=0;if(this.options.pedantic?(g=2,m=d.trimStart()):p?g=t[1].length+1:(g=d.search(this.rules.other.nonSpaceChar),g=g>4?1:g,m=d.slice(g),g+=t[1].length),p&&this.rules.other.blankLine.test(f)&&(u+=f+`
71
- `,e=e.substring(f.length+1),o=!0),!o){let N=this.rules.other.nextBulletRegex(g),C=this.rules.other.hrRegex(g),b=this.rules.other.fencesBeginRegex(g),A=this.rules.other.headingBeginRegex(g),v=this.rules.other.htmlBeginRegex(g),w=this.rules.other.blockquoteBeginRegex(g);for(;e;){let O=e.split(`
71
+ `,e=e.substring(f.length+1),l=!0),!l){let N=this.rules.other.nextBulletRegex(g),C=this.rules.other.hrRegex(g),b=this.rules.other.fencesBeginRegex(g),A=this.rules.other.headingBeginRegex(g),v=this.rules.other.htmlBeginRegex(g),w=this.rules.other.blockquoteBeginRegex(g);for(;e;){let O=e.split(`
72
72
  `,1)[0],I;if(f=O,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),I=f):I=f.replace(this.rules.other.tabCharGlobal," "),b.test(f)||A.test(f)||v.test(f)||w.test(f)||N.test(f)||C.test(f))break;if(I.search(this.rules.other.nonSpaceChar)>=g||!f.trim())m+=`
73
73
  `+I.slice(g);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(d)||A.test(d)||C.test(d))break;m+=`
74
74
  `+f}p=!f.trim(),u+=O+`
75
- `,e=e.substring(O.length+1),d=I.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),i.raw+=u}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(o.raw);if(u){let m={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};o.checked=m.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=m.raw+o.tokens[0].raw,o.tokens[0].text=m.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(m)):o.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):o.tokens.unshift(m)}}if(!i.loose){let u=o.tokens.filter(m=>m.type==="space");i.loose=u.length>0&&u.some(m=>this.rules.other.anyLine.test(m.raw))}}if(i.loose)for(let o of i.items){o.loose=!0;for(let u of o.tokens)u.type==="text"&&(u.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=rl(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
76
- `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(rl(a,s.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[o]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
77
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=gn(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=hC(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),il(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return il(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,l=i,o=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){l+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){o+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+o);let m=[...r[0]][0].length,d=e.slice(0,i+r.index+m+a);if(Math.min(i,a)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,l=i,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+i);(r=o.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(a=[...s].length,a!==i))continue;if(r[3]||r[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let u=[...r[0]][0].length,m=e.slice(0,i+r.index+u+a),d=m.slice(i,-i);return{type:"del",raw:m,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},$e=class Hi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ht,this.options.tokenizer=this.options.tokenizer||new Sr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Se,block:fr.normal,inline:pn.normal};this.options.pedantic?(n.block=fr.pedantic,n.inline=pn.pedantic):this.options.gfm&&(n.block=fr.gfm,this.options.breaks?n.inline=pn.breaks:n.inline=pn.gfm),this.tokenizer.rules=n}static get rules(){return{block:fr,inline:pn}}static lex(t,n){return new Hi(n).lex(t)}static lexInline(t,n){return new Hi(n).inlineTokens(t)}lex(t){t=t.replace(Se.carriageReturn,`
75
+ `,e=e.substring(O.length+1),d=I.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),i.raw+=u}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(l.raw);if(u){let m={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};l.checked=m.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=m.raw+l.tokens[0].raw,l.tokens[0].text=m.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(m)):l.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):l.tokens.unshift(m)}}if(!i.loose){let u=l.tokens.filter(m=>m.type==="space");i.loose=u.length>0&&u.some(m=>this.rules.other.anyLine.test(m.raw))}}if(i.loose)for(let l of i.items){l.loose=!0;for(let u of l.tokens)u.type==="text"&&(u.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=oo(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
76
+ `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(oo(a,s.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[l]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
77
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=bn(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=gC(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),lo(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return lo(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,o=i,l=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let m=[...r[0]][0].length,d=e.slice(0,i+r.index+m+a);if(Math.min(i,a)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(a=[...s].length,a!==i))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let u=[...r[0]][0].length,m=e.slice(0,i+r.index+u+a),d=m.slice(i,-i);return{type:"del",raw:m,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},$e=class Ui{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ht,this.options.tokenizer=this.options.tokenizer||new Sr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Se,block:fr.normal,inline:Tn.normal};this.options.pedantic?(n.block=fr.pedantic,n.inline=Tn.pedantic):this.options.gfm&&(n.block=fr.gfm,this.options.breaks?n.inline=Tn.breaks:n.inline=Tn.gfm),this.tokenizer.rules=n}static get rules(){return{block:fr,inline:Tn}}static lex(t,n){return new Ui(n).lex(t)}static lexInline(t,n){return new Ui(n).inlineTokens(t)}lex(t){t=t.replace(Se.carriageReturn,`
78
78
  `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Se.tabCharGlobal," ").replace(Se.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
79
79
  `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
80
80
  `)?"":`
@@ -82,20 +82,20 @@ ${m}`:m;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
82
82
  `+i.text,this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
83
83
  `)?"":`
84
84
  `)+i.raw,a.text+=`
85
- `+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,l=t.slice(1),o;this.options.extensions.startBlock.forEach(u=>{o=u.call({lexer:this},l),typeof o=="number"&&o>=0&&(a=Math.min(a,o))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
85
+ `+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},o),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
86
86
  `)?"":`
87
87
  `)+i.raw,a.text+=`
88
88
  `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),r=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
89
89
  `)?"":`
90
90
  `)+i.raw,a.text+=`
91
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,l="";for(;t;){a||(l=""),a=!1;let o;if(this.options.extensions?.inline?.some(m=>(o=m.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let m=n.at(-1);o.type==="text"&&m?.type==="text"?(m.raw+=o.raw,m.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,l)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t,r,l)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let u=t;if(this.options.extensions?.startInline){let m=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(m=Math.min(m,f))}),m<1/0&&m>=0&&(u=t.substring(0,m+1))}if(o=this.tokenizer.inlineText(u)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(l=o.raw.slice(-1)),a=!0;let m=n.at(-1);m?.type==="text"?(m.raw+=o.raw,m.text+=o.text):n.push(o);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},Ir=class{options;parser;constructor(e){this.options=e||Ht}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Se.notSpaceStart)?.[0],i=e.replace(Se.endingNewline,"")+`
91
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="";for(;t;){a||(o=""),a=!1;let l;if(this.options.extensions?.inline?.some(m=>(l=m.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let m=n.at(-1);l.type==="text"&&m?.type==="text"?(m.raw+=l.raw,m.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(t,r,o)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(t,r,o)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),n.push(l);continue}let u=t;if(this.options.extensions?.startInline){let m=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(m=Math.min(m,f))}),m<1/0&&m>=0&&(u=t.substring(0,m+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),a=!0;let m=n.at(-1);m?.type==="text"?(m.raw+=l.raw,m.text+=l.text):n.push(l);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},Ir=class{options;parser;constructor(e){this.options=e||Ht}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Se.notSpaceStart)?.[0],i=e.replace(Se.endingNewline,"")+`
92
92
  `;return r?'<pre><code class="language-'+Ge(r)+'">'+(n?i:Ge(i,!0))+`</code></pre>
93
93
  `:"<pre><code>"+(n?i:Ge(i,!0))+`</code></pre>
94
94
  `}blockquote({tokens:e}){return`<blockquote>
95
95
  ${this.parser.parse(e)}</blockquote>
96
96
  `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
97
97
  `}hr(e){return`<hr>
98
- `}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let l=e.items[a];r+=this.listitem(l)}let i=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
98
+ `}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let o=e.items[a];r+=this.listitem(o)}let i=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
99
99
  `+r+"</"+i+`>
100
100
  `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
101
101
  `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
@@ -106,27 +106,27 @@ ${this.parser.parse(e)}</blockquote>
106
106
  `}tablerow({text:e}){return`<tr>
107
107
  ${e}</tr>
108
108
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
109
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ge(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=nl(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Ge(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=nl(e);if(i===null)return Ge(n);e=i;let s=`<img src="${e}" alt="${Ge(n)}"`;return t&&(s+=` title="${Ge(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ge(e.text)}},Ns=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},qe=class Ui{options;renderer;textRenderer;constructor(t){this.options=t||Ht,this.options.renderer=this.options.renderer||new Ir,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ns}static parse(t,n){return new Ui(n).parse(t)}static parseInline(t,n){return new Ui(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let a=i,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=l||"";continue}}let s=i;switch(s.type){case"space":n+=this.renderer.space(s);break;case"hr":n+=this.renderer.hr(s);break;case"heading":n+=this.renderer.heading(s);break;case"code":n+=this.renderer.code(s);break;case"table":n+=this.renderer.table(s);break;case"blockquote":n+=this.renderer.blockquote(s);break;case"list":n+=this.renderer.list(s);break;case"checkbox":n+=this.renderer.checkbox(s);break;case"html":n+=this.renderer.html(s);break;case"def":n+=this.renderer.def(s);break;case"paragraph":n+=this.renderer.paragraph(s);break;case"text":n+=this.renderer.text(s);break;default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=l||"";continue}}let a=s;switch(a.type){case"escape":r+=n.text(a);break;case"html":r+=n.html(a);break;case"link":r+=n.link(a);break;case"image":r+=n.image(a);break;case"checkbox":r+=n.checkbox(a);break;case"strong":r+=n.strong(a);break;case"em":r+=n.em(a);break;case"codespan":r+=n.codespan(a);break;case"br":r+=n.br(a);break;case"del":r+=n.del(a);break;case"text":r+=n.text(a);break;default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},bn=class{options;block;constructor(e){this.options=e||Ht}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?$e.lex:$e.lexInline}provideParser(e=this.block){return e?qe.parse:qe.parseInline}},fC=class{defaults=Ts();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=qe;Renderer=Ir;TextRenderer=Ns;Lexer=$e;Tokenizer=Sr;Hooks=bn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new Ir(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=n.renderer[a],o=i[a];i[a]=(...u)=>{let m=l.apply(i,u);return m===!1&&(m=o.apply(i,u)),m||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Sr(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=n.tokenizer[a],o=i[a];i[a]=(...u)=>{let m=l.apply(i,u);return m===!1&&(m=o.apply(i,u)),m}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new bn;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,l=n.hooks[a],o=i[a];bn.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async&&bn.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(i,u);return o.call(i,d)})();let m=l.call(i,u);return o.call(i,m)}:i[a]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(i,u);return d===!1&&(d=await o.apply(i,u)),d})();let m=l.apply(i,u);return m===!1&&(m=o.apply(i,u)),m}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return $e.lex(e,t??this.defaults)}parser(e,t){return qe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(t):t,l=await(i.hooks?await i.hooks.provideLexer(e):e?$e.lex:$e.lexInline)(a,i),o=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser(e):e?qe.parse:qe.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let a=(i.hooks?i.hooks.provideLexer(e):e?$e.lex:$e.lexInline)(t,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let l=(i.hooks?i.hooks.provideParser(e):e?qe.parse:qe.parseInline)(a,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(a){return s(a)}}}onError(e,t){return n=>{if(n.message+=`
110
- Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Ge(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Mt=new fC;function ue(e,t){return Mt.parse(e,t)}ue.options=ue.setOptions=function(e){return Mt.setOptions(e),ue.defaults=Mt.defaults,Yc(ue.defaults),ue};ue.getDefaults=Ts;ue.defaults=Ht;ue.use=function(...e){return Mt.use(...e),ue.defaults=Mt.defaults,Yc(ue.defaults),ue};ue.walkTokens=function(e,t){return Mt.walkTokens(e,t)};ue.parseInline=Mt.parseInline;ue.Parser=qe;ue.parser=qe.parse;ue.Renderer=Ir;ue.TextRenderer=Ns;ue.Lexer=$e;ue.lexer=$e.lex;ue.Tokenizer=Sr;ue.Hooks=bn;ue.parse=ue;var O1=ue.options,D1=ue.setOptions,P1=ue.use,M1=ue.walkTokens,B1=ue.parseInline,F1=qe.parse,j1=$e.lex,pC=300,gC="300px",EC=500;function TC(e={}){let{immediate:t=!1,debounceDelay:n=pC,rootMargin:r=gC,idleTimeout:i=EC}=e,[s,a]=(0,E.useState)(!1),l=(0,E.useRef)(null),o=(0,E.useRef)(null),u=(0,E.useRef)(null),m=(0,E.useMemo)(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),d=(0,E.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):m,[m]),f=(0,E.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return(0,E.useEffect)(()=>{if(t){a(!0);return}let p=l.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),u.current&&(f(u.current),u.current=null);let g=()=>{o.current&&(clearTimeout(o.current),o.current=null),u.current&&(f(u.current),u.current=null)},N=v=>{u.current=d(w=>{w.timeRemaining()>0||w.didTimeout?(a(!0),v.disconnect()):u.current=d(()=>{a(!0),v.disconnect()},{timeout:i/2})},{timeout:i})},C=v=>{g(),o.current=window.setTimeout(()=>{var w,O;let I=v.takeRecords();(I.length===0||(O=(w=I.at(-1))==null?void 0:w.isIntersecting)!=null&&O)&&N(v)},n)},b=(v,w)=>{v.isIntersecting?C(w):g()},A=new IntersectionObserver(v=>{for(let w of v)b(w,A)},{rootMargin:r,threshold:0});return A.observe(p),()=>{o.current&&clearTimeout(o.current),u.current&&f(u.current),A.disconnect()}},[t,n,r,i,f,d]),{shouldRender:s,containerRef:l}}var eu=/\s/,bC=/^\s+$/,xC=new Set(["code","pre","svg","math","annotation"]),kC=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",yC=e=>e.some(t=>kC(t)&&xC.has(t.tagName)),CC=e=>{let t=[],n="",r=!1;for(let i of e){let s=eu.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},_C=e=>{let t=[],n="";for(let r of e)eu.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},AC=(e,t,n,r,i,s)=>{let a=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return s&&(a+=`;--sd-delay:${s}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a},children:[{type:"text",value:e}]}},NC=(e,t,n,r,i)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(yC(t))return En;let a=s,l=a.children.indexOf(e);if(l===-1)return;let o=e.value;if(!o.trim()){i.count+=o.length;return}let u=n.sep==="char"?_C(o):CC(o),m=r.prevContentLength,d=u.map(f=>{let p=i.count;if(i.count+=f.length,bC.test(f))return{type:"text",value:f};let g=m>0&&p<m,N=g?0:i.newIndex++*n.stagger;return AC(f,n.animation,n.duration,n.easing,g,N)});return a.children.splice(l,1,...d),l+d.length},vC=0;function zi(e){var t,n,r,i,s;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(s=e?.stagger)!=null?s:40},l={prevContentLength:0,lastRenderCharCount:0},o=vC++,u=()=>m=>{let d={count:0,newIndex:0};Ji(m,"text",(f,p)=>NC(f,p,a,l,d)),l.lastRenderCharCount=d.count,l.prevContentLength=0};return Object.defineProperty(u,"name",{value:`rehypeAnimate$${o}`}),{name:"animate",type:"animate",rehypePlugin:u,setPrevContentLength(m){l.prevContentLength=m},getLastRenderCharCount(){let m=l.lastRenderCharCount;return l.lastRenderCharCount=0,m}}}zi();var tu=(0,E.createContext)(!1),SC=()=>(0,E.useContext)(tu),vs=(...e)=>Hl(jl(e)),IC=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},wC=e=>e?(...t)=>IC(e,Hl(jl(t))):vs,Kt=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)},$i=(0,E.createContext)(vs),ne=()=>(0,E.useContext)($i),LC=vs("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),RC=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),s=n.slice(r+1).trim();i&&s&&(t[i]=s)}}return t},OC=(0,E.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:s=!0,...a})=>{let l=ne(),o=(0,E.useMemo)(()=>l(LC),[l]),u=(0,E.useMemo)(()=>{let m={};return t.bg&&(m["--sdm-bg"]=t.bg),t.fg&&(m["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(m,RC(t.rootStyle)),m},[t.bg,t.fg,t.rootStyle]);return(0,h.jsx)("div",{className:l(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...a,children:(0,h.jsx)("pre",{className:l(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:u,children:(0,h.jsx)("code",{className:s?l("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((m,d)=>(0,h.jsx)("span",{className:s?o:void 0,children:m.length===0||m.length===1&&m[0].content===""?`
111
- `:m.map((f,p)=>{let g={},N=!!f.bgColor;if(f.color&&(g["--sdm-c"]=f.color),f.bgColor&&(g["--sdm-tbg"]=f.bgColor),f.htmlStyle)for(let[C,b]of Object.entries(f.htmlStyle))C==="color"?g["--sdm-c"]=b:C==="background-color"?(g["--sdm-tbg"]=b,N=!0):g[C]=b;return(0,h.jsx)("span",{className:l("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",N&&"bg-[var(--sdm-tbg)]",N&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:g,...f.htmlAttrs,children:f.content},p)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),DC=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let s=ne();return(0,h.jsx)("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},nu=(0,E.createContext)({code:""}),ru=()=>(0,E.useContext)(nu),PC=({language:e})=>{let t=ne();return(0,h.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,h.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},MC=e=>{let t=e.length;for(;t>0&&e[t-1]===`
112
- `;)t--;return e.slice(0,t)},BC=(0,E.lazy)(()=>zl(()=>import("./highlighted-body-OFNGDK62-BGFI1Y6G.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),FC=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:s,lineNumbers:a,...l})=>{let o=ne(),u=(0,E.useMemo)(()=>MC(e),[e]),m=(0,E.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:u.split(`
113
- `).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[u]);return(0,h.jsx)(nu.Provider,{value:{code:e},children:(0,h.jsxs)(DC,{isIncomplete:i,language:t,children:[(0,h.jsx)(PC,{language:t}),r?(0,h.jsx)("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,h.jsx)("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,(0,h.jsx)(E.Suspense,{fallback:(0,h.jsx)(OC,{className:n,language:t,lineNumbers:a,result:m,startLine:s,...l}),children:(0,h.jsx)(BC,{className:n,code:u,language:t,lineNumbers:a,raw:m,startLine:s,...l})})]})})},jC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),HC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),UC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),zC=e=>(0,h.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,h.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),$C=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),qC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),YC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),VC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),WC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),QC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),xn={CheckIcon:jC,CopyIcon:HC,DownloadIcon:UC,ExternalLinkIcon:VC,Loader2Icon:zC,Maximize2Icon:$C,RotateCcwIcon:qC,XIcon:YC,ZoomInIcon:WC,ZoomOutIcon:QC},iu=(0,E.createContext)(xn),GC=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},sl=({icons:e,children:t})=>{let n=(0,E.useRef)(e),r=(0,E.useRef)(e?{...xn,...e}:xn);GC(n.current,e)||(n.current=e,r.current=e?{...xn,...e}:xn);let i=r.current;return(0,h.jsx)(iu.Provider,{value:i,children:t})},We=()=>(0,E.useContext)(iu),su={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},qi=(0,E.createContext)(su),ht=()=>(0,E.useContext)(qi),al=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let l=ne(),[o,u]=(0,E.useState)(!1),m=(0,E.useRef)(0),{code:d}=ru(),{isAnimating:f}=(0,E.useContext)(je),p=ht(),g=s??d,N=async()=>{var A;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(g),u(!0),e?.(),m.current=window.setTimeout(()=>u(!1),n))}catch(v){t?.(v)}};(0,E.useEffect)(()=>()=>{window.clearTimeout(m.current)},[]);let C=We(),b=o?C.CheckIcon:C.CopyIcon;return(0,h.jsx)("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:f,onClick:N,title:p.copyCode,type:"button",...a,children:r??(0,h.jsx)(b,{size:14})})},ll={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},KC=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let l=ne(),{code:o}=ru(),{isAnimating:u}=(0,E.useContext)(je),m=ht(),d=We(),f=s??o,p=`file.${n&&n in ll?ll[n]:"txt"}`,g="text/plain",N=()=>{try{Kt(p,f,g),e?.()}catch(C){t?.(C)}};return(0,h.jsx)("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:N,title:m.downloadFile,type:"button",...a,children:r??(0,h.jsx)(d.DownloadIcon,{size:14})})},ol=()=>{let{Loader2Icon:e}=We(),t=ne();return(0,h.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,h.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,h.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,h.jsx)(e,{className:t("size-4 animate-spin")})})]})},XC=/\.[^/.]+$/,ZC=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let{DownloadIcon:l}=We(),o=ne(),u=(0,E.useRef)(null),[m,d]=(0,E.useState)(!1),[f,p]=(0,E.useState)(!1),g=ht(),N=a.width!=null||a.height!=null,C=(m||N)&&!f,b=f&&!N;(0,E.useEffect)(()=>{let O=u.current;if(O!=null&&O.complete){let I=O.naturalWidth>0;d(I),p(!I)}},[]);let A=(0,E.useCallback)(O=>{d(!0),p(!1),i?.(O)},[i]),v=(0,E.useCallback)(O=>{d(!1),p(!0),s?.(O)},[s]),w=async()=>{if(n)try{let O=await(await fetch(n)).blob(),I=new URL(n,window.location.origin).pathname.split("/").pop()||"",B=I.split(".").pop(),$=I.includes(".")&&B!==void 0&&B.length<=4,Y="";if($)Y=I;else{let S=O.type,H="png";S.includes("jpeg")||S.includes("jpg")?H="jpg":S.includes("png")?H="png":S.includes("svg")?H="svg":S.includes("gif")?H="gif":S.includes("webp")&&(H="webp"),Y=`${(r||I||"image").replace(XC,"")}.${H}`}Kt(Y,O,O.type)}catch{window.open(n,"_blank")}};return n?(0,h.jsxs)("div",{className:o("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,h.jsx)("img",{alt:r,className:o("max-w-full rounded-lg",b&&"hidden",t),"data-streamdown":"image",onError:v,onLoad:A,ref:u,src:n,...a}),b&&(0,h.jsx)("span",{className:o("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:g.imageNotAvailable}),(0,h.jsx)("div",{className:o("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),C&&(0,h.jsx)("button",{className:o("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:g.downloadImage,type:"button",children:(0,h.jsx)(l,{size:14})})]}):null},Sn=0,Ss=()=>{Sn+=1,Sn===1&&(document.body.style.overflow="hidden")},Is=()=>{Sn=Math.max(0,Sn-1),Sn===0&&(document.body.style.overflow="")},JC=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:s,ExternalLinkIcon:a,XIcon:l}=We(),o=ne(),[u,m]=(0,E.useState)(!1),d=ht(),f=(0,E.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),p=(0,E.useCallback)(()=>{r(),n()},[r,n]);return(0,E.useEffect)(()=>{if(t){Ss();let g=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),Is()}}},[t,n]),t?(0,h.jsx)("div",{className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:g=>{g.key==="Escape"&&n()},role:"button",tabIndex:0,children:(0,h.jsxs)("div",{className:o("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[(0,h.jsx)("button",{className:o("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:(0,h.jsx)(l,{size:16})}),(0,h.jsxs)("div",{className:o("flex flex-col gap-2"),children:[(0,h.jsxs)("div",{className:o("flex items-center gap-2 font-semibold text-lg"),children:[(0,h.jsx)(a,{size:20}),(0,h.jsx)("span",{children:d.openExternalLink})]}),(0,h.jsx)("p",{className:o("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),(0,h.jsx)("div",{className:o("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,h.jsxs)("div",{className:o("flex gap-2"),children:[(0,h.jsx)("button",{className:o("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:f,type:"button",children:u?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i,{size:14}),(0,h.jsx)("span",{children:d.copied})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s,{size:14}),(0,h.jsx)("span",{children:d.copyLink})]})}),(0,h.jsxs)("button",{className:o("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:p,type:"button",children:[(0,h.jsx)(a,{size:14}),(0,h.jsx)("span",{children:d.openLink})]})]})]})}):null},Yi=(0,E.createContext)(null),ws=()=>(0,E.useContext)(Yi),H1=()=>{var e;let t=ws();return(e=t?.code)!=null?e:null},Ls=()=>{var e;let t=ws();return(e=t?.mermaid)!=null?e:null},e_=e=>{var t;let n=ws();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},t_=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let o=document.createElement("canvas"),u=l.width*r,m=l.height*r;o.width=u,o.height=m;let d=o.getContext("2d");if(!d){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(l,0,0,u,m),o.toBlob(f=>{if(!f){s(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},l.onerror=()=>s(new Error("Failed to load SVG image")),l.src=a})},n_=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let a=ne(),[l,o]=(0,E.useState)(!1),u=(0,E.useRef)(null),{isAnimating:m}=(0,E.useContext)(je),d=We(),f=Ls(),p=ht(),g=async N=>{try{if(N==="mmd"){Kt("diagram.mmd",e,"text/plain"),o(!1),r?.(N);return}if(!f){s?.(new Error("Mermaid plugin not available"));return}let C=f.getMermaid(i),b=e.split("").reduce((w,O)=>(w<<5)-w+O.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:v}=await C.render(A,e);if(!v){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(N==="svg"){Kt("diagram.svg",v,"image/svg+xml"),o(!1),r?.(N);return}if(N==="png"){Kt("diagram.png",await t_(v),"image/png"),r?.(N),o(!1);return}}catch(C){s?.(C)}};return(0,E.useEffect)(()=>{let N=C=>{let b=C.composedPath();u.current&&!b.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),(0,h.jsxs)("div",{className:a("relative"),ref:u,children:[(0,h.jsx)("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>o(!l),title:p.downloadDiagram,type:"button",children:t??(0,h.jsx)(d.DownloadIcon,{size:14})}),l?(0,h.jsxs)("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,h.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("svg"),title:p.downloadDiagramAsSvg,type:"button",children:p.mermaidFormatSvg}),(0,h.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("png"),title:p.downloadDiagramAsPng,type:"button",children:p.mermaidFormatPng}),(0,h.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("mmd"),title:p.downloadDiagramAsMmd,type:"button",children:p.mermaidFormatMmd})]}):null]})},r_=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let{Maximize2Icon:a,XIcon:l}=We(),o=ne(),[u,m]=(0,E.useState)(!1),{isAnimating:d,controls:f}=(0,E.useContext)(je),p=ht(),g=(()=>{if(typeof f=="boolean")return f;let C=f.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),N=()=>{m(!u)};return(0,E.useEffect)(()=>{if(u){Ss();let C=b=>{b.key==="Escape"&&m(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),Is()}}},[u]),(0,E.useEffect)(()=>{u?n?.():r&&r()},[u,n,r]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:N,title:p.viewFullscreen,type:"button",...s,children:(0,h.jsx)(a,{size:14})}),u?(0,Yl.createPortal)((0,h.jsxs)("div",{className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:N,onKeyDown:C=>{C.key==="Escape"&&N()},role:"button",tabIndex:0,children:[(0,h.jsx)("button",{className:o("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:N,title:p.exitFullscreen,type:"button",children:(0,h.jsx)(l,{size:20})}),(0,h.jsx)("div",{className:o("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:(0,h.jsx)(K_,{chart:e,className:o("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:g})})]}),document.body):null]})},au=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let l of s)r.push(((t=l.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let l of a){let o=[],u=l.querySelectorAll("td");for(let m of u)o.push(((n=m.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},lu=e=>{let{headers:t,rows:n}=e,r=l=>{let o=!1,u=!1;for(let m of l){if(m==='"'){o=!0,u=!0;break}(m===","||m===`
114
- `)&&(o=!0)}return o?u?`"${l.replace(/"/g,'""')}"`:`"${l}"`:l},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(","),a+=1);for(let l of n)s[a]=l.map(r).join(","),a+=1;return s.join(`
115
- `)},i_=e=>{let{headers:t,rows:n}=e,r=l=>{let o=!1;for(let m of l)if(m===" "||m===`
116
- `||m==="\r"){o=!0;break}if(!o)return l;let u=[];for(let m of l)m===" "?u.push("\\t"):m===`
117
- `?u.push("\\n"):m==="\r"?u.push("\\r"):u.push(m);return u.join("")},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(" "),a+=1);for(let l of n)s[a]=l.map(r).join(" "),a+=1;return s.join(`
118
- `)},bi=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Vi=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(l=>bi(l));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let l=0;l<t.length;l+=1)a[l]="---";r[i]=`| ${a.join(" | ")} |`,i+=1;for(let l of n)if(l.length<t.length){let o=new Array(t.length);for(let u=0;u<t.length;u+=1)o[u]=u<l.length?bi(l[u]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=l.map(u=>bi(u));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
119
- `)},ou=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let s=ne(),[a,l]=(0,E.useState)(!1),[o,u]=(0,E.useState)(!1),m=(0,E.useRef)(null),d=(0,E.useRef)(0),{isAnimating:f}=(0,E.useContext)(je),p=ht(),g=async b=>{var A,v;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.write)){r?.(new Error("Clipboard API not available"));return}try{let w=(v=m.current)==null?void 0:v.closest('[data-streamdown="table-wrapper"]'),O=w?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let I=au(O),B=({csv:lu,tsv:i_,md:Vi}[b]||Vi)(I),$=new ClipboardItem({"text/plain":new Blob([B],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([$]),u(!0),l(!1),n?.(b),d.current=window.setTimeout(()=>u(!1),i)}catch(w){r?.(w)}};(0,E.useEffect)(()=>{let b=A=>{let v=A.composedPath();m.current&&!v.includes(m.current)&&l(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(d.current)}},[]);let N=We(),C=o?N.CheckIcon:N.CopyIcon;return(0,h.jsxs)("div",{className:s("relative"),ref:m,children:[(0,h.jsx)("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>l(!a),title:p.copyTable,type:"button",children:e??(0,h.jsx)(C,{height:14,width:14})}),a?(0,h.jsxs)("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,h.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:p.copyTableAsMarkdown,type:"button",children:p.tableFormatMarkdown}),(0,h.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:p.copyTableAsCsv,type:"button",children:p.tableFormatCsv}),(0,h.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:p.copyTableAsTsv,type:"button",children:p.tableFormatTsv})]}):null]})},cu=({children:e,className:t,onDownload:n,onError:r})=>{let i=ne(),[s,a]=(0,E.useState)(!1),l=(0,E.useRef)(null),{isAnimating:o}=(0,E.useContext)(je),u=ht(),m=We(),d=f=>{var p;try{let g=(p=l.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),N=g?.querySelector("table");if(!N){r?.(new Error("Table not found"));return}let C=au(N),b=f==="csv"?lu(C):Vi(C);Kt(`table.${f==="csv"?"csv":"md"}`,b,f==="csv"?"text/csv":"text/markdown"),a(!1),n?.(f)}catch(g){r?.(g)}};return(0,E.useEffect)(()=>{let f=p=>{let g=p.composedPath();l.current&&!g.includes(l.current)&&a(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),(0,h.jsxs)("div",{className:i("relative"),ref:l,children:[(0,h.jsx)("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!s),title:u.downloadTable,type:"button",children:e??(0,h.jsx)(m.DownloadIcon,{size:14})}),s?(0,h.jsxs)("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,h.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:u.downloadTableAsCsv,type:"button",children:u.tableFormatCsv}),(0,h.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:u.downloadTableAsMarkdown,type:"button",children:u.tableFormatMarkdown})]}):null]})},s_=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:s}=We(),a=ne(),[l,o]=(0,E.useState)(!1),{isAnimating:u}=(0,E.useContext)(je),m=ht(),d=()=>{o(!0)},f=()=>{o(!1)};return(0,E.useEffect)(()=>{if(l){Ss();let p=g=>{g.key==="Escape"&&o(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),Is()}}},[l]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:d,title:m.viewFullscreen,type:"button",children:(0,h.jsx)(i,{size:14})}),l?(0,Yl.createPortal)((0,h.jsx)("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:p=>{p.key==="Escape"&&f()},role:"dialog",children:(0,h.jsxs)("div",{className:a("flex h-full flex-col"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[(0,h.jsxs)("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?(0,h.jsx)(ou,{}):null,r?(0,h.jsx)(cu,{}):null,(0,h.jsx)("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:m.exitFullscreen,type:"button",children:(0,h.jsx)(s,{size:20})})]}),(0,h.jsx)("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,h.jsx)("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},a_=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:s=!0,...a})=>{let l=ne(),o=n&&r,u=n&&i,m=n&&s,d=o||u||m;return(0,h.jsxs)("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[d?(0,h.jsxs)("div",{className:l("flex items-center justify-end gap-1"),children:[o?(0,h.jsx)(ou,{}):null,u?(0,h.jsx)(cu,{}):null,m?(0,h.jsx)(s_,{showCopy:o,showDownload:u,children:e}):null]}):null,(0,h.jsx)("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:(0,h.jsx)("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},l_=/startLine=(\d+)/,o_=/\bnoLineNumbers\b/,c_=(0,E.lazy)(()=>zl(()=>import("./mermaid-GHXKKRXX-DjR37lQN.js").then(e=>({default:e.Mermaid})),[])),u_=/language-([^\s]+)/;function Kr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,s=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===s?.line&&i?.column===s?.column}function Ee(e,t){return e.className===t.className&&Kr(e.node,t.node)}var Wi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,xi=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},cl=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},pr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Rs=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>Ee(e,t));Rs.displayName="MarkdownOl";var uu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Kr(e.node,t.node));uu.displayName="MarkdownLi";var hu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>Ee(e,t));hu.displayName="MarkdownUl";var du=(0,E.memo)(({className:e,node:t,...n})=>{let r=ne();return(0,h.jsx)("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Ee(e,t));du.displayName="MarkdownHr";var mu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>Ee(e,t));mu.displayName="MarkdownStrong";var h_=({children:e,className:t,href:n,node:r,...i})=>{let s=ne(),{linkSafety:a}=(0,E.useContext)(je),[l,o]=(0,E.useState)(!1),u=n==="streamdown:incomplete-link",m=(0,E.useCallback)(async g=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(g.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,u]),d=(0,E.useCallback)(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),f=(0,E.useCallback)(()=>{o(!1)},[]),p={url:n??"",isOpen:l,onClose:f,onConfirm:d};return a!=null&&a.enabled&&n?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:m,type:"button",children:e}),a.renderModal?a.renderModal(p):(0,h.jsx)(JC,{...p})]}):(0,h.jsx)("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},fu=(0,E.memo)(h_,(e,t)=>Ee(e,t)&&e.href===t.href);fu.displayName="MarkdownA";var pu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>Ee(e,t));pu.displayName="MarkdownH1";var gu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>Ee(e,t));gu.displayName="MarkdownH2";var Eu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>Ee(e,t));Eu.displayName="MarkdownH3";var Tu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>Ee(e,t));Tu.displayName="MarkdownH4";var bu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>Ee(e,t));bu.displayName="MarkdownH5";var xu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>Ee(e,t));xu.displayName="MarkdownH6";var ku=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,E.useContext)(je),s=Wi(i,"table"),a=xi(i,"copy"),l=xi(i,"download"),o=xi(i,"fullscreen");return(0,h.jsx)(a_,{className:t,showControls:s,showCopy:a,showDownload:l,showFullscreen:o,...r,children:e})},(e,t)=>Ee(e,t));ku.displayName="MarkdownTable";var yu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>Ee(e,t));yu.displayName="MarkdownThead";var Cu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>Ee(e,t));Cu.displayName="MarkdownTbody";var _u=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>Ee(e,t));_u.displayName="MarkdownTr";var Au=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>Ee(e,t));Au.displayName="MarkdownTh";var Nu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>Ee(e,t));Nu.displayName="MarkdownTd";var vu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>Ee(e,t));vu.displayName="MarkdownBlockquote";var Su=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>Ee(e,t));Su.displayName="MarkdownSup";var Iu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>Ee(e,t));Iu.displayName="MarkdownSub";var wu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var l,o;if(!(0,E.isValidElement)(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],m=!1,d=!1;for(let f of u)if(f){if(typeof f=="string")f.trim()!==""&&(m=!0);else if((0,E.isValidElement)(f))if(((l=f.props)==null?void 0:l["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let g of p){if(typeof g=="string"&&g.trim()!==""){m=!0;break}if((0,E.isValidElement)(g)&&((o=g.props)==null?void 0:o["data-footnote-backref"])===void 0){m=!0;break}}}}return d&&!m},s=Array.isArray(e)?e.map(a=>{if(!(0,E.isValidElement)(a))return a;if(a.type===Rs){let l=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(o=>!i(o));return l.length===0?null:{...a,props:{...a.props,children:l}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?(0,h.jsx)("section",{className:t,...r,children:s}):null}return(0,h.jsx)("section",{className:t,...r,children:e})},(e,t)=>Ee(e,t));wu.displayName="MarkdownSection";var d_=({node:e,className:t,children:n,...r})=>{var i,s;let a=ne(),l=!("data-block"in r),{mermaid:o,controls:u,lineNumbers:m}=(0,E.useContext)(je),d=Ls(),f=SC(),p=t?.match(u_),g=(i=p?.at(1))!=null?i:"",N=e_(g);if(l)return(0,h.jsx)("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let C=(s=e?.properties)==null?void 0:s.metastring,b=C?.match(l_),A=b?Number.parseInt(b[1],10):void 0,v=A!==void 0&&A>=1?A:void 0,w=!(C&&o_.test(C))&&m!==!1,O="";if((0,E.isValidElement)(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?O=n.props.children:typeof n=="string"&&(O=n),N){let Y=N.component;return(0,h.jsx)(E.Suspense,{fallback:(0,h.jsx)(ol,{}),children:(0,h.jsx)(Y,{code:O,isIncomplete:f,language:g,meta:C})})}if(g==="mermaid"&&d){let Y=Wi(u,"mermaid"),S=pr(u,"download"),H=pr(u,"copy"),q=pr(u,"fullscreen"),Z=pr(u,"panZoom"),ie=Y&&(S||H||q);return(0,h.jsx)(E.Suspense,{fallback:(0,h.jsx)(ol,{}),children:(0,h.jsxs)("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[(0,h.jsx)("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:(0,h.jsx)("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),ie?(0,h.jsx)("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,h.jsxs)("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[S?(0,h.jsx)(n_,{chart:O,config:o?.config}):null,H?(0,h.jsx)(al,{code:O}):null,q?(0,h.jsx)(r_,{chart:O,config:o?.config}):null]})}):null,(0,h.jsx)("div",{className:a("rounded-md border border-border bg-background"),children:(0,h.jsx)(c_,{chart:O,config:o?.config,showControls:Z})})]})})}let I=Wi(u,"code"),B=cl(u,"download"),$=cl(u,"copy");return(0,h.jsx)(FC,{className:t,code:O,isIncomplete:f,language:g,lineNumbers:w,startLine:v,children:I?(0,h.jsxs)(h.Fragment,{children:[B?(0,h.jsx)(KC,{code:O,language:g}):null,$?(0,h.jsx)(al,{}):null]}):null})},Lu=(0,E.memo)(d_,(e,t)=>e.className===t.className&&Kr(e.node,t.node));Lu.displayName="MarkdownCode";var Ru=(0,E.memo)(ZC,(e,t)=>e.className===t.className&&Kr(e.node,t.node));Ru.displayName="MarkdownImg";var Ou=(0,E.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&(0,E.isValidElement)(r[0])){let i=r[0].props.node,s=i?.tagName;if(s==="img")return(0,h.jsx)(h.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return(0,h.jsx)(h.Fragment,{children:e})}return(0,h.jsx)("p",{...n,children:e})},(e,t)=>Ee(e,t));Ou.displayName="MarkdownParagraph";var m_={ol:Rs,li:uu,ul:hu,hr:du,strong:mu,a:fu,h1:pu,h2:gu,h3:Eu,h4:Tu,h5:bu,h6:xu,table:ku,thead:yu,tbody:Cu,tr:_u,th:Au,td:Nu,blockquote:vu,code:Lu,img:Ru,pre:({children:e})=>(0,E.isValidElement)(e)?(0,E.cloneElement)(e,{"data-block":"true"}):e,sup:Su,sub:Iu,p:Ou,section:wu},f_=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,p_=/\p{L}/u;function ul(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(f_.test(n))return"rtl";if(p_.test(n))return"ltr"}return"ltr"}var g_=/^[ \t]{0,3}(`{3,}|~{3,})/,E_=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,hl=e=>{let t=e.split(`
120
- `),n=null,r=0;for(let i of t){let s=g_.exec(i);if(n===null){if(s){let a=s[1];n=a[0],r=a.length}}else if(s){let a=s[1],l=a[0],o=a.length;l===n&&o>=r&&(n=null,r=0)}}return n!==null},T_=e=>{let t=e.split(`
121
- `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&E_.test(r))return!0}return!1},b_=()=>e=>{et(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},dl=[],ml={allowDangerousHtml:!0},gr=new WeakMap,x_=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let o="default";return this.keyCache.set(e,o),o}let s=o=>{if(!o||o.length===0)return"";let u="";for(let m=0;m<o.length;m+=1){let d=o[m];if(m>0&&(u+=","),Array.isArray(d)){let[f,p]=d;if(typeof f=="function"){let g=gr.get(f);g||(g=f.name,gr.set(f,g)),u+=g}else u+=String(f);u+=":",u+=JSON.stringify(p)}else if(typeof d=="function"){let f=gr.get(d);f||(f=d.name,gr.set(d,f)),u+=f}else u+=String(d)}return u},a=s(n),l=`${s(r)}::${a}::${i?JSON.stringify(i):""}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},fl=new x_,Du=e=>{let t=k_(e),n=e.children||"";return S_(t.runSync(t.parse(n),n),e)},k_=e=>{let t=fl.get(e);if(t)return t;let n=C_(e);return fl.set(e,n),n},y_=e=>e.some(t=>Array.isArray(t)?t[0]===Li:t===Li),C_=e=>{let t=e.rehypePlugins||dl,n=e.remarkPlugins||dl,r=y_(t)?n:[...n,b_],i=e.remarkRehypeOptions?{...ml,...e.remarkRehypeOptions}:ml;return Ny().use(Ak).use(r).use(ly,i).use(t)},__=e=>e,A_=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},N_=(e,t)=>{var n;for(let r in hi)if(Object.hasOwn(hi,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=hi[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},v_=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},S_=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:l}=t;if(n||r||i||s||l){let o=l||__;et(e,(u,m,d)=>{if(u.type==="raw"&&d&&typeof m=="number")return A_(d,m,s,u.value),m;if(u.type==="element"&&(N_(u,o),v_(u,m,d,r,i,n)&&d&&typeof m=="number"))return a&&u.children?d.children.splice(m,1,...u.children):d.children.splice(m,1),m})}return Ox(e,{Fragment:h.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0})},I_=/\[\^[\w-]{1,200}\](?!:)/,w_=/\[\^[\w-]{1,200}\]:/,L_=/<(\w+)[\s>]/,R_=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),pl=new Map,gl=new Map,O_=e=>{let t=e.toLowerCase(),n=pl.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return pl.set(t,r),r},D_=e=>{let t=e.toLowerCase(),n=gl.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return gl.set(t,r),r},El=(e,t)=>{if(R_.has(t.toLowerCase()))return 0;let n=e.match(O_(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Tl=(e,t)=>{let n=e.match(D_(t));return n?n.length:0},P_=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},M_=e=>{let t=I_.test(e),n=w_.test(e);if(t||n)return[e];let r=$e.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let l of r){let o=l.raw,u=i.length;if(s.length>0){i[u-1]+=o;let m=s.at(-1),d=El(o,m),f=Tl(o,m);for(let p=0;p<d;p+=1)s.push(m);for(let p=0;p<f;p+=1)s.length>0&&s.at(-1)===m&&s.pop();continue}if(l.type==="html"&&l.block){let m=o.match(L_);if(m){let d=m[1];El(o,d)>Tl(o,d)&&s.push(d)}}if(u>0&&!a){let m=i[u-1];if(P_(m)%2===1){i[u-1]=m+o;continue}}i.push(o),l.type!=="space"&&(a=l.type==="code")}return i},B_=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(s,a,l,o)=>{if(!l.includes(`
109
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ge(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ao(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Ge(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ao(e);if(i===null)return Ge(n);e=i;let s=`<img src="${e}" alt="${Ge(n)}"`;return t&&(s+=` title="${Ge(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ge(e.text)}},vs=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},qe=class zi{options;renderer;textRenderer;constructor(t){this.options=t||Ht,this.options.renderer=this.options.renderer||new Ir,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vs}static parse(t,n){return new zi(n).parse(t)}static parseInline(t,n){return new zi(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=o||"";continue}}let s=i;switch(s.type){case"space":n+=this.renderer.space(s);break;case"hr":n+=this.renderer.hr(s);break;case"heading":n+=this.renderer.heading(s);break;case"code":n+=this.renderer.code(s);break;case"table":n+=this.renderer.table(s);break;case"blockquote":n+=this.renderer.blockquote(s);break;case"list":n+=this.renderer.list(s);break;case"checkbox":n+=this.renderer.checkbox(s);break;case"html":n+=this.renderer.html(s);break;case"def":n+=this.renderer.def(s);break;case"paragraph":n+=this.renderer.paragraph(s);break;case"text":n+=this.renderer.text(s);break;default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=o||"";continue}}let a=s;switch(a.type){case"escape":r+=n.text(a);break;case"html":r+=n.html(a);break;case"link":r+=n.link(a);break;case"image":r+=n.image(a);break;case"checkbox":r+=n.checkbox(a);break;case"strong":r+=n.strong(a);break;case"em":r+=n.em(a);break;case"codespan":r+=n.codespan(a);break;case"br":r+=n.br(a);break;case"del":r+=n.del(a);break;case"text":r+=n.text(a);break;default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},yn=class{options;block;constructor(e){this.options=e||Ht}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?$e.lex:$e.lexInline}provideParser(e=this.block){return e?qe.parse:qe.parseInline}},bC=class{defaults=bs();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=qe;Renderer=Ir;TextRenderer=vs;Lexer=$e;Tokenizer=Sr;Hooks=yn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new Ir(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],l=i[a];i[a]=(...u)=>{let m=o.apply(i,u);return m===!1&&(m=l.apply(i,u)),m||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Sr(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],l=i[a];i[a]=(...u)=>{let m=o.apply(i,u);return m===!1&&(m=l.apply(i,u)),m}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new yn;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],l=i[a];yn.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async&&yn.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await o.call(i,u);return l.call(i,d)})();let m=o.call(i,u);return l.call(i,m)}:i[a]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await o.apply(i,u);return d===!1&&(d=await l.apply(i,u)),d})();let m=o.apply(i,u);return m===!1&&(m=l.apply(i,u)),m}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return $e.lex(e,t??this.defaults)}parser(e,t){return qe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer(e):e?$e.lex:$e.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser(e):e?qe.parse:qe.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let a=(i.hooks?i.hooks.provideLexer(e):e?$e.lex:$e.lexInline)(t,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(e):e?qe.parse:qe.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(e,t){return n=>{if(n.message+=`
110
+ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Ge(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Mt=new bC;function ue(e,t){return Mt.parse(e,t)}ue.options=ue.setOptions=function(e){return Mt.setOptions(e),ue.defaults=Mt.defaults,Zc(ue.defaults),ue};ue.getDefaults=bs;ue.defaults=Ht;ue.use=function(...e){return Mt.use(...e),ue.defaults=Mt.defaults,Zc(ue.defaults),ue};ue.walkTokens=function(e,t){return Mt.walkTokens(e,t)};ue.parseInline=Mt.parseInline;ue.Parser=qe;ue.parser=qe.parse;ue.Renderer=Ir;ue.TextRenderer=vs;ue.Lexer=$e;ue.lexer=$e.lex;ue.Tokenizer=Sr;ue.Hooks=yn;ue.parse=ue;var FN=ue.options,jN=ue.setOptions,HN=ue.use,UN=ue.walkTokens,zN=ue.parseInline,$N=qe.parse,qN=$e.lex,xC=300,kC="300px",yC=500;function CC(e={}){let{immediate:t=!1,debounceDelay:n=xC,rootMargin:r=kC,idleTimeout:i=yC}=e,[s,a]=(0,E.useState)(!1),o=(0,E.useRef)(null),l=(0,E.useRef)(null),u=(0,E.useRef)(null),m=(0,E.useMemo)(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),d=(0,E.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):m,[m]),f=(0,E.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return(0,E.useEffect)(()=>{if(t){a(!0);return}let p=o.current;if(!p)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(f(u.current),u.current=null);let g=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(f(u.current),u.current=null)},N=v=>{u.current=d(w=>{w.timeRemaining()>0||w.didTimeout?(a(!0),v.disconnect()):u.current=d(()=>{a(!0),v.disconnect()},{timeout:i/2})},{timeout:i})},C=v=>{g(),l.current=window.setTimeout(()=>{var w,O;let I=v.takeRecords();(I.length===0||(O=(w=I.at(-1))==null?void 0:w.isIntersecting)!=null&&O)&&N(v)},n)},b=(v,w)=>{v.isIntersecting?C(w):g()},A=new IntersectionObserver(v=>{for(let w of v)b(w,A)},{rootMargin:r,threshold:0});return A.observe(p),()=>{l.current&&clearTimeout(l.current),u.current&&f(u.current),A.disconnect()}},[t,n,r,i,f,d]),{shouldRender:s,containerRef:o}}var ou=/\s/,_C=/^\s+$/,AC=new Set(["code","pre","svg","math","annotation"]),NC=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",vC=e=>e.some(t=>NC(t)&&AC.has(t.tagName)),SC=e=>{let t=[],n="",r=!1;for(let i of e){let s=ou.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},IC=e=>{let t=[],n="";for(let r of e)ou.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},wC=(e,t,n,r,i,s)=>{let a=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return s&&(a+=`;--sd-delay:${s}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a},children:[{type:"text",value:e}]}},LC=(e,t,n,r,i)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(vC(t))return xn;let a=s,o=a.children.indexOf(e);if(o===-1)return;let l=e.value;if(!l.trim()){i.count+=l.length;return}let u=n.sep==="char"?IC(l):SC(l),m=r.prevContentLength,d=u.map(f=>{let p=i.count;if(i.count+=f.length,_C.test(f))return{type:"text",value:f};let g=m>0&&p<m,N=g?0:i.newIndex++*n.stagger;return wC(f,n.animation,n.duration,n.easing,g,N)});return a.children.splice(o,1,...d),o+d.length},RC=0;function $i(e){var t,n,r,i,s;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(s=e?.stagger)!=null?s:40},o={prevContentLength:0,lastRenderCharCount:0},l=RC++,u=()=>m=>{let d={count:0,newIndex:0};es(m,"text",(f,p)=>LC(f,p,a,o,d)),o.lastRenderCharCount=d.count,o.prevContentLength=0};return Object.defineProperty(u,"name",{value:`rehypeAnimate$${l}`}),{name:"animate",type:"animate",rehypePlugin:u,setPrevContentLength(m){o.prevContentLength=m},getLastRenderCharCount(){let m=o.lastRenderCharCount;return o.lastRenderCharCount=0,m}}}$i();var lu=(0,E.createContext)(!1),OC=()=>(0,E.useContext)(lu),Ss=(...e)=>Yo(qo(e)),DC=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},PC=e=>e?(...t)=>DC(e,Yo(qo(t))):Ss,Jt=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)},qi=(0,E.createContext)(Ss),ne=()=>(0,E.useContext)(qi),MC=Ss("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),BC=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),s=n.slice(r+1).trim();i&&s&&(t[i]=s)}}return t},FC=(0,E.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:s=!0,...a})=>{let o=ne(),l=(0,E.useMemo)(()=>o(MC),[o]),u=(0,E.useMemo)(()=>{let m={};return t.bg&&(m["--sdm-bg"]=t.bg),t.fg&&(m["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(m,BC(t.rootStyle)),m},[t.bg,t.fg,t.rootStyle]);return(0,h.jsx)("div",{className:o(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...a,children:(0,h.jsx)("pre",{className:o(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:u,children:(0,h.jsx)("code",{className:s?o("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((m,d)=>(0,h.jsx)("span",{className:s?l:void 0,children:m.length===0||m.length===1&&m[0].content===""?`
111
+ `:m.map((f,p)=>{let g={},N=!!f.bgColor;if(f.color&&(g["--sdm-c"]=f.color),f.bgColor&&(g["--sdm-tbg"]=f.bgColor),f.htmlStyle)for(let[C,b]of Object.entries(f.htmlStyle))C==="color"?g["--sdm-c"]=b:C==="background-color"?(g["--sdm-tbg"]=b,N=!0):g[C]=b;return(0,h.jsx)("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",N&&"bg-[var(--sdm-tbg)]",N&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:g,...f.htmlAttrs,children:f.content},p)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),jC=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let s=ne();return(0,h.jsx)("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},cu=(0,E.createContext)({code:""}),uu=()=>(0,E.useContext)(cu),HC=({language:e})=>{let t=ne();return(0,h.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,h.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},UC=e=>{let t=e.length;for(;t>0&&e[t-1]===`
112
+ `;)t--;return e.slice(0,t)},zC=(0,E.lazy)(()=>Ko(()=>import("./highlighted-body-OFNGDK62-qZDgwznf.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),$C=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:s,lineNumbers:a,...o})=>{let l=ne(),u=(0,E.useMemo)(()=>UC(e),[e]),m=(0,E.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:u.split(`
113
+ `).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[u]);return(0,h.jsx)(cu.Provider,{value:{code:e},children:(0,h.jsxs)(jC,{isIncomplete:i,language:t,children:[(0,h.jsx)(HC,{language:t}),r?(0,h.jsx)("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,h.jsx)("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,(0,h.jsx)(E.Suspense,{fallback:(0,h.jsx)(FC,{className:n,language:t,lineNumbers:a,result:m,startLine:s,...o}),children:(0,h.jsx)(zC,{className:n,code:u,language:t,lineNumbers:a,raw:m,startLine:s,...o})})]})})},qC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),YC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),VC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),WC=e=>(0,h.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,h.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,h.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),QC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),GC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),KC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),XC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),ZC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),JC=e=>(0,h.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,h.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Cn={CheckIcon:qC,CopyIcon:YC,DownloadIcon:VC,ExternalLinkIcon:XC,Loader2Icon:WC,Maximize2Icon:QC,RotateCcwIcon:GC,XIcon:KC,ZoomInIcon:ZC,ZoomOutIcon:JC},hu=(0,E.createContext)(Cn),e_=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},co=({icons:e,children:t})=>{let n=(0,E.useRef)(e),r=(0,E.useRef)(e?{...Cn,...e}:Cn);e_(n.current,e)||(n.current=e,r.current=e?{...Cn,...e}:Cn);let i=r.current;return(0,h.jsx)(hu.Provider,{value:i,children:t})},We=()=>(0,E.useContext)(hu),du={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Yi=(0,E.createContext)(du),dt=()=>(0,E.useContext)(Yi),uo=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let o=ne(),[l,u]=(0,E.useState)(!1),m=(0,E.useRef)(0),{code:d}=uu(),{isAnimating:f}=(0,E.useContext)(je),p=dt(),g=s??d,N=async()=>{var A;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.writeText)){t?.(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(g),u(!0),e?.(),m.current=window.setTimeout(()=>u(!1),n))}catch(v){t?.(v)}};(0,E.useEffect)(()=>()=>{window.clearTimeout(m.current)},[]);let C=We(),b=l?C.CheckIcon:C.CopyIcon;return(0,h.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:f,onClick:N,title:p.copyCode,type:"button",...a,children:r??(0,h.jsx)(b,{size:14})})},ho={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},t_=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let o=ne(),{code:l}=uu(),{isAnimating:u}=(0,E.useContext)(je),m=dt(),d=We(),f=s??l,p=`file.${n&&n in ho?ho[n]:"txt"}`,g="text/plain",N=()=>{try{Jt(p,f,g),e?.()}catch(C){t?.(C)}};return(0,h.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:N,title:m.downloadFile,type:"button",...a,children:r??(0,h.jsx)(d.DownloadIcon,{size:14})})},mo=()=>{let{Loader2Icon:e}=We(),t=ne();return(0,h.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,h.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,h.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,h.jsx)(e,{className:t("size-4 animate-spin")})})]})},n_=/\.[^/.]+$/,r_=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let{DownloadIcon:o}=We(),l=ne(),u=(0,E.useRef)(null),[m,d]=(0,E.useState)(!1),[f,p]=(0,E.useState)(!1),g=dt(),N=a.width!=null||a.height!=null,C=(m||N)&&!f,b=f&&!N;(0,E.useEffect)(()=>{let O=u.current;if(O!=null&&O.complete){let I=O.naturalWidth>0;d(I),p(!I)}},[]);let A=(0,E.useCallback)(O=>{d(!0),p(!1),i?.(O)},[i]),v=(0,E.useCallback)(O=>{d(!1),p(!0),s?.(O)},[s]),w=async()=>{if(n)try{let O=await(await fetch(n)).blob(),I=new URL(n,window.location.origin).pathname.split("/").pop()||"",B=I.split(".").pop(),$=I.includes(".")&&B!==void 0&&B.length<=4,Y="";if($)Y=I;else{let S=O.type,H="png";S.includes("jpeg")||S.includes("jpg")?H="jpg":S.includes("png")?H="png":S.includes("svg")?H="svg":S.includes("gif")?H="gif":S.includes("webp")&&(H="webp"),Y=`${(r||I||"image").replace(n_,"")}.${H}`}Jt(Y,O,O.type)}catch{window.open(n,"_blank")}};return n?(0,h.jsxs)("div",{className:l("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,h.jsx)("img",{alt:r,className:l("max-w-full rounded-lg",b&&"hidden",t),"data-streamdown":"image",onError:v,onLoad:A,ref:u,src:n,...a}),b&&(0,h.jsx)("span",{className:l("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:g.imageNotAvailable}),(0,h.jsx)("div",{className:l("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),C&&(0,h.jsx)("button",{className:l("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:g.downloadImage,type:"button",children:(0,h.jsx)(o,{size:14})})]}):null},Ln=0,Is=()=>{Ln+=1,Ln===1&&(document.body.style.overflow="hidden")},ws=()=>{Ln=Math.max(0,Ln-1),Ln===0&&(document.body.style.overflow="")},i_=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:s,ExternalLinkIcon:a,XIcon:o}=We(),l=ne(),[u,m]=(0,E.useState)(!1),d=dt(),f=(0,E.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),p=(0,E.useCallback)(()=>{r(),n()},[r,n]);return(0,E.useEffect)(()=>{if(t){Is();let g=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),ws()}}},[t,n]),t?(0,h.jsx)("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:g=>{g.key==="Escape"&&n()},role:"button",tabIndex:0,children:(0,h.jsxs)("div",{className:l("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[(0,h.jsx)("button",{className:l("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:(0,h.jsx)(o,{size:16})}),(0,h.jsxs)("div",{className:l("flex flex-col gap-2"),children:[(0,h.jsxs)("div",{className:l("flex items-center gap-2 font-semibold text-lg"),children:[(0,h.jsx)(a,{size:20}),(0,h.jsx)("span",{children:d.openExternalLink})]}),(0,h.jsx)("p",{className:l("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),(0,h.jsx)("div",{className:l("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,h.jsxs)("div",{className:l("flex gap-2"),children:[(0,h.jsx)("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:f,type:"button",children:u?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i,{size:14}),(0,h.jsx)("span",{children:d.copied})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s,{size:14}),(0,h.jsx)("span",{children:d.copyLink})]})}),(0,h.jsxs)("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:p,type:"button",children:[(0,h.jsx)(a,{size:14}),(0,h.jsx)("span",{children:d.openLink})]})]})]})}):null},Vi=(0,E.createContext)(null),Ls=()=>(0,E.useContext)(Vi),YN=()=>{var e;let t=Ls();return(e=t?.code)!=null?e:null},Rs=()=>{var e;let t=Ls();return(e=t?.mermaid)!=null?e:null},s_=e=>{var t;let n=Ls();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},a_=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),u=o.width*r,m=o.height*r;l.width=u,l.height=m;let d=l.getContext("2d");if(!d){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,u,m),l.toBlob(f=>{if(!f){s(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},o_=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let a=ne(),[o,l]=(0,E.useState)(!1),u=(0,E.useRef)(null),{isAnimating:m}=(0,E.useContext)(je),d=We(),f=Rs(),p=dt(),g=async N=>{try{if(N==="mmd"){Jt("diagram.mmd",e,"text/plain"),l(!1),r?.(N);return}if(!f){s?.(new Error("Mermaid plugin not available"));return}let C=f.getMermaid(i),b=e.split("").reduce((w,O)=>(w<<5)-w+O.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:v}=await C.render(A,e);if(!v){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(N==="svg"){Jt("diagram.svg",v,"image/svg+xml"),l(!1),r?.(N);return}if(N==="png"){Jt("diagram.png",await a_(v),"image/png"),r?.(N),l(!1);return}}catch(C){s?.(C)}};return(0,E.useEffect)(()=>{let N=C=>{let b=C.composedPath();u.current&&!b.includes(u.current)&&l(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),(0,h.jsxs)("div",{className:a("relative"),ref:u,children:[(0,h.jsx)("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>l(!o),title:p.downloadDiagram,type:"button",children:t??(0,h.jsx)(d.DownloadIcon,{size:14})}),o?(0,h.jsxs)("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,h.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("svg"),title:p.downloadDiagramAsSvg,type:"button",children:p.mermaidFormatSvg}),(0,h.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("png"),title:p.downloadDiagramAsPng,type:"button",children:p.mermaidFormatPng}),(0,h.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("mmd"),title:p.downloadDiagramAsMmd,type:"button",children:p.mermaidFormatMmd})]}):null]})},l_=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let{Maximize2Icon:a,XIcon:o}=We(),l=ne(),[u,m]=(0,E.useState)(!1),{isAnimating:d,controls:f}=(0,E.useContext)(je),p=dt(),g=(()=>{if(typeof f=="boolean")return f;let C=f.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),N=()=>{m(!u)};return(0,E.useEffect)(()=>{if(u){Is();let C=b=>{b.key==="Escape"&&m(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),ws()}}},[u]),(0,E.useEffect)(()=>{u?n?.():r&&r()},[u,n,r]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:N,title:p.viewFullscreen,type:"button",...s,children:(0,h.jsx)(a,{size:14})}),u?(0,Jo.createPortal)((0,h.jsxs)("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:N,onKeyDown:C=>{C.key==="Escape"&&N()},role:"button",tabIndex:0,children:[(0,h.jsx)("button",{className:l("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:N,title:p.exitFullscreen,type:"button",children:(0,h.jsx)(o,{size:20})}),(0,h.jsx)("div",{className:l("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:(0,h.jsx)(tA,{chart:e,className:l("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:g})})]}),document.body):null]})},mu=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let o of s)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let l=[],u=o.querySelectorAll("td");for(let m of u)l.push(((n=m.textContent)==null?void 0:n.trim())||"");i.push(l)}return{headers:r,rows:i}},fu=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1,u=!1;for(let m of o){if(m==='"'){l=!0,u=!0;break}(m===","||m===`
114
+ `)&&(l=!0)}return l?u?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(","),a+=1);for(let o of n)s[a]=o.map(r).join(","),a+=1;return s.join(`
115
+ `)},c_=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1;for(let m of o)if(m===" "||m===`
116
+ `||m==="\r"){l=!0;break}if(!l)return o;let u=[];for(let m of o)m===" "?u.push("\\t"):m===`
117
+ `?u.push("\\n"):m==="\r"?u.push("\\r"):u.push(m);return u.join("")},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(" "),a+=1);for(let o of n)s[a]=o.map(r).join(" "),a+=1;return s.join(`
118
+ `)},xi=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Wi=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(o=>xi(o));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";r[i]=`| ${a.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let l=new Array(t.length);for(let u=0;u<t.length;u+=1)l[u]=u<o.length?xi(o[u]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(u=>xi(u));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
119
+ `)},pu=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let s=ne(),[a,o]=(0,E.useState)(!1),[l,u]=(0,E.useState)(!1),m=(0,E.useRef)(null),d=(0,E.useRef)(0),{isAnimating:f}=(0,E.useContext)(je),p=dt(),g=async b=>{var A,v;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.write)){r?.(new Error("Clipboard API not available"));return}try{let w=(v=m.current)==null?void 0:v.closest('[data-streamdown="table-wrapper"]'),O=w?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let I=mu(O),B=({csv:fu,tsv:c_,md:Wi}[b]||Wi)(I),$=new ClipboardItem({"text/plain":new Blob([B],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([$]),u(!0),o(!1),n?.(b),d.current=window.setTimeout(()=>u(!1),i)}catch(w){r?.(w)}};(0,E.useEffect)(()=>{let b=A=>{let v=A.composedPath();m.current&&!v.includes(m.current)&&o(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(d.current)}},[]);let N=We(),C=l?N.CheckIcon:N.CopyIcon;return(0,h.jsxs)("div",{className:s("relative"),ref:m,children:[(0,h.jsx)("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>o(!a),title:p.copyTable,type:"button",children:e??(0,h.jsx)(C,{height:14,width:14})}),a?(0,h.jsxs)("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,h.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:p.copyTableAsMarkdown,type:"button",children:p.tableFormatMarkdown}),(0,h.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:p.copyTableAsCsv,type:"button",children:p.tableFormatCsv}),(0,h.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:p.copyTableAsTsv,type:"button",children:p.tableFormatTsv})]}):null]})},gu=({children:e,className:t,onDownload:n,onError:r})=>{let i=ne(),[s,a]=(0,E.useState)(!1),o=(0,E.useRef)(null),{isAnimating:l}=(0,E.useContext)(je),u=dt(),m=We(),d=f=>{var p;try{let g=(p=o.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),N=g?.querySelector("table");if(!N){r?.(new Error("Table not found"));return}let C=mu(N),b=f==="csv"?fu(C):Wi(C);Jt(`table.${f==="csv"?"csv":"md"}`,b,f==="csv"?"text/csv":"text/markdown"),a(!1),n?.(f)}catch(g){r?.(g)}};return(0,E.useEffect)(()=>{let f=p=>{let g=p.composedPath();o.current&&!g.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),(0,h.jsxs)("div",{className:i("relative"),ref:o,children:[(0,h.jsx)("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:()=>a(!s),title:u.downloadTable,type:"button",children:e??(0,h.jsx)(m.DownloadIcon,{size:14})}),s?(0,h.jsxs)("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,h.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:u.downloadTableAsCsv,type:"button",children:u.tableFormatCsv}),(0,h.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:u.downloadTableAsMarkdown,type:"button",children:u.tableFormatMarkdown})]}):null]})},u_=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:s}=We(),a=ne(),[o,l]=(0,E.useState)(!1),{isAnimating:u}=(0,E.useContext)(je),m=dt(),d=()=>{l(!0)},f=()=>{l(!1)};return(0,E.useEffect)(()=>{if(o){Is();let p=g=>{g.key==="Escape"&&l(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),ws()}}},[o]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:d,title:m.viewFullscreen,type:"button",children:(0,h.jsx)(i,{size:14})}),o?(0,Jo.createPortal)((0,h.jsx)("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:p=>{p.key==="Escape"&&f()},role:"dialog",children:(0,h.jsxs)("div",{className:a("flex h-full flex-col"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[(0,h.jsxs)("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?(0,h.jsx)(pu,{}):null,r?(0,h.jsx)(gu,{}):null,(0,h.jsx)("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:m.exitFullscreen,type:"button",children:(0,h.jsx)(s,{size:20})})]}),(0,h.jsx)("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,h.jsx)("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},h_=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:s=!0,...a})=>{let o=ne(),l=n&&r,u=n&&i,m=n&&s,d=l||u||m;return(0,h.jsxs)("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[d?(0,h.jsxs)("div",{className:o("flex items-center justify-end gap-1"),children:[l?(0,h.jsx)(pu,{}):null,u?(0,h.jsx)(gu,{}):null,m?(0,h.jsx)(u_,{showCopy:l,showDownload:u,children:e}):null]}):null,(0,h.jsx)("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:(0,h.jsx)("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},d_=/startLine=(\d+)/,m_=/\bnoLineNumbers\b/,f_=(0,E.lazy)(()=>Ko(()=>import("./mermaid-GHXKKRXX-BZ1Tdv8E.js").then(e=>({default:e.Mermaid})),[])),p_=/language-([^\s]+)/;function Kr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,s=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===s?.line&&i?.column===s?.column}function Ee(e,t){return e.className===t.className&&Kr(e.node,t.node)}var Qi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ki=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},fo=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},pr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Os=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>Ee(e,t));Os.displayName="MarkdownOl";var Eu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Kr(e.node,t.node));Eu.displayName="MarkdownLi";var Tu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>Ee(e,t));Tu.displayName="MarkdownUl";var bu=(0,E.memo)(({className:e,node:t,...n})=>{let r=ne();return(0,h.jsx)("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Ee(e,t));bu.displayName="MarkdownHr";var xu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>Ee(e,t));xu.displayName="MarkdownStrong";var g_=({children:e,className:t,href:n,node:r,...i})=>{let s=ne(),{linkSafety:a}=(0,E.useContext)(je),[o,l]=(0,E.useState)(!1),u=n==="streamdown:incomplete-link",m=(0,E.useCallback)(async g=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(g.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}l(!0)}},[a,n,u]),d=(0,E.useCallback)(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),f=(0,E.useCallback)(()=>{l(!1)},[]),p={url:n??"",isOpen:o,onClose:f,onConfirm:d};return a!=null&&a.enabled&&n?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:m,type:"button",children:e}),a.renderModal?a.renderModal(p):(0,h.jsx)(i_,{...p})]}):(0,h.jsx)("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},ku=(0,E.memo)(g_,(e,t)=>Ee(e,t)&&e.href===t.href);ku.displayName="MarkdownA";var yu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>Ee(e,t));yu.displayName="MarkdownH1";var Cu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>Ee(e,t));Cu.displayName="MarkdownH2";var _u=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>Ee(e,t));_u.displayName="MarkdownH3";var Au=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>Ee(e,t));Au.displayName="MarkdownH4";var Nu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>Ee(e,t));Nu.displayName="MarkdownH5";var vu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>Ee(e,t));vu.displayName="MarkdownH6";var Su=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,E.useContext)(je),s=Qi(i,"table"),a=ki(i,"copy"),o=ki(i,"download"),l=ki(i,"fullscreen");return(0,h.jsx)(h_,{className:t,showControls:s,showCopy:a,showDownload:o,showFullscreen:l,...r,children:e})},(e,t)=>Ee(e,t));Su.displayName="MarkdownTable";var Iu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>Ee(e,t));Iu.displayName="MarkdownThead";var wu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>Ee(e,t));wu.displayName="MarkdownTbody";var Lu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>Ee(e,t));Lu.displayName="MarkdownTr";var Ru=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>Ee(e,t));Ru.displayName="MarkdownTh";var Ou=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>Ee(e,t));Ou.displayName="MarkdownTd";var Du=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>Ee(e,t));Du.displayName="MarkdownBlockquote";var Pu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>Ee(e,t));Pu.displayName="MarkdownSup";var Mu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{let i=ne();return(0,h.jsx)("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>Ee(e,t));Mu.displayName="MarkdownSub";var Bu=(0,E.memo)(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var o,l;if(!(0,E.isValidElement)(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],m=!1,d=!1;for(let f of u)if(f){if(typeof f=="string")f.trim()!==""&&(m=!0);else if((0,E.isValidElement)(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let g of p){if(typeof g=="string"&&g.trim()!==""){m=!0;break}if((0,E.isValidElement)(g)&&((l=g.props)==null?void 0:l["data-footnote-backref"])===void 0){m=!0;break}}}}return d&&!m},s=Array.isArray(e)?e.map(a=>{if(!(0,E.isValidElement)(a))return a;if(a.type===Os){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(l=>!i(l));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?(0,h.jsx)("section",{className:t,...r,children:s}):null}return(0,h.jsx)("section",{className:t,...r,children:e})},(e,t)=>Ee(e,t));Bu.displayName="MarkdownSection";var E_=({node:e,className:t,children:n,...r})=>{var i,s;let a=ne(),o=!("data-block"in r),{mermaid:l,controls:u,lineNumbers:m}=(0,E.useContext)(je),d=Rs(),f=OC(),p=t?.match(p_),g=(i=p?.at(1))!=null?i:"",N=s_(g);if(o)return(0,h.jsx)("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let C=(s=e?.properties)==null?void 0:s.metastring,b=C?.match(d_),A=b?Number.parseInt(b[1],10):void 0,v=A!==void 0&&A>=1?A:void 0,w=!(C&&m_.test(C))&&m!==!1,O="";if((0,E.isValidElement)(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?O=n.props.children:typeof n=="string"&&(O=n),N){let Y=N.component;return(0,h.jsx)(E.Suspense,{fallback:(0,h.jsx)(mo,{}),children:(0,h.jsx)(Y,{code:O,isIncomplete:f,language:g,meta:C})})}if(g==="mermaid"&&d){let Y=Qi(u,"mermaid"),S=pr(u,"download"),H=pr(u,"copy"),q=pr(u,"fullscreen"),Z=pr(u,"panZoom"),ie=Y&&(S||H||q);return(0,h.jsx)(E.Suspense,{fallback:(0,h.jsx)(mo,{}),children:(0,h.jsxs)("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[(0,h.jsx)("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:(0,h.jsx)("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),ie?(0,h.jsx)("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,h.jsxs)("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[S?(0,h.jsx)(o_,{chart:O,config:l?.config}):null,H?(0,h.jsx)(uo,{code:O}):null,q?(0,h.jsx)(l_,{chart:O,config:l?.config}):null]})}):null,(0,h.jsx)("div",{className:a("rounded-md border border-border bg-background"),children:(0,h.jsx)(f_,{chart:O,config:l?.config,showControls:Z})})]})})}let I=Qi(u,"code"),B=fo(u,"download"),$=fo(u,"copy");return(0,h.jsx)($C,{className:t,code:O,isIncomplete:f,language:g,lineNumbers:w,startLine:v,children:I?(0,h.jsxs)(h.Fragment,{children:[B?(0,h.jsx)(t_,{code:O,language:g}):null,$?(0,h.jsx)(uo,{}):null]}):null})},Fu=(0,E.memo)(E_,(e,t)=>e.className===t.className&&Kr(e.node,t.node));Fu.displayName="MarkdownCode";var ju=(0,E.memo)(r_,(e,t)=>e.className===t.className&&Kr(e.node,t.node));ju.displayName="MarkdownImg";var Hu=(0,E.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&(0,E.isValidElement)(r[0])){let i=r[0].props.node,s=i?.tagName;if(s==="img")return(0,h.jsx)(h.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return(0,h.jsx)(h.Fragment,{children:e})}return(0,h.jsx)("p",{...n,children:e})},(e,t)=>Ee(e,t));Hu.displayName="MarkdownParagraph";var T_={ol:Os,li:Eu,ul:Tu,hr:bu,strong:xu,a:ku,h1:yu,h2:Cu,h3:_u,h4:Au,h5:Nu,h6:vu,table:Su,thead:Iu,tbody:wu,tr:Lu,th:Ru,td:Ou,blockquote:Du,code:Fu,img:ju,pre:({children:e})=>(0,E.isValidElement)(e)?(0,E.cloneElement)(e,{"data-block":"true"}):e,sup:Pu,sub:Mu,p:Hu,section:Bu},b_=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,x_=/\p{L}/u;function po(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(b_.test(n))return"rtl";if(x_.test(n))return"ltr"}return"ltr"}var k_=/^[ \t]{0,3}(`{3,}|~{3,})/,y_=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,go=e=>{let t=e.split(`
120
+ `),n=null,r=0;for(let i of t){let s=k_.exec(i);if(n===null){if(s){let a=s[1];n=a[0],r=a.length}}else if(s){let a=s[1],o=a[0],l=a.length;o===n&&l>=r&&(n=null,r=0)}}return n!==null},C_=e=>{let t=e.split(`
121
+ `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&y_.test(r))return!0}return!1},__=()=>e=>{tt(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Eo=[],To={allowDangerousHtml:!0},gr=new WeakMap,A_=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let l="default";return this.keyCache.set(e,l),l}let s=l=>{if(!l||l.length===0)return"";let u="";for(let m=0;m<l.length;m+=1){let d=l[m];if(m>0&&(u+=","),Array.isArray(d)){let[f,p]=d;if(typeof f=="function"){let g=gr.get(f);g||(g=f.name,gr.set(f,g)),u+=g}else u+=String(f);u+=":",u+=JSON.stringify(p)}else if(typeof d=="function"){let f=gr.get(d);f||(f=d.name,gr.set(d,f)),u+=f}else u+=String(d)}return u},a=s(n),o=`${s(r)}::${a}::${i?JSON.stringify(i):""}`;return this.keyCache.set(e,o),o}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},bo=new A_,Uu=e=>{let t=N_(e),n=e.children||"";return O_(t.runSync(t.parse(n),n),e)},N_=e=>{let t=bo.get(e);if(t)return t;let n=S_(e);return bo.set(e,n),n},v_=e=>e.some(t=>Array.isArray(t)?t[0]===Ri:t===Ri),S_=e=>{let t=e.rehypePlugins||Eo,n=e.remarkPlugins||Eo,r=v_(t)?n:[...n,__],i=e.remarkRehypeOptions?{...To,...e.remarkRehypeOptions}:To;return Ly().use(wk).use(r).use(dy,i).use(t)},I_=e=>e,w_=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},L_=(e,t)=>{var n;for(let r in di)if(Object.hasOwn(di,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=di[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},R_=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},O_=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||i||s||o){let l=o||I_;tt(e,(u,m,d)=>{if(u.type==="raw"&&d&&typeof m=="number")return w_(d,m,s,u.value),m;if(u.type==="element"&&(L_(u,l),R_(u,m,d,r,i,n)&&d&&typeof m=="number"))return a&&u.children?d.children.splice(m,1,...u.children):d.children.splice(m,1),m})}return Fx(e,{Fragment:h.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0})},D_=/\[\^[\w-]{1,200}\](?!:)/,P_=/\[\^[\w-]{1,200}\]:/,M_=/<(\w+)[\s>]/,B_=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xo=new Map,ko=new Map,F_=e=>{let t=e.toLowerCase(),n=xo.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return xo.set(t,r),r},j_=e=>{let t=e.toLowerCase(),n=ko.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return ko.set(t,r),r},yo=(e,t)=>{if(B_.has(t.toLowerCase()))return 0;let n=e.match(F_(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Co=(e,t)=>{let n=e.match(j_(t));return n?n.length:0},H_=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},U_=e=>{let t=D_.test(e),n=P_.test(e);if(t||n)return[e];let r=$e.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let o of r){let l=o.raw,u=i.length;if(s.length>0){i[u-1]+=l;let m=s.at(-1),d=yo(l,m),f=Co(l,m);for(let p=0;p<d;p+=1)s.push(m);for(let p=0;p<f;p+=1)s.length>0&&s.at(-1)===m&&s.pop();continue}if(o.type==="html"&&o.block){let m=l.match(M_);if(m){let d=m[1];yo(l,d)>Co(l,d)&&s.push(d)}}if(u>0&&!a){let m=i[u-1];if(H_(m)%2===1){i[u-1]=m+l;continue}}i.push(l),o.type!=="space"&&(a=o.type==="code")}return i},z_=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(s,a,o,l)=>{if(!o.includes(`
122
122
 
123
- `))return a+l+o;let u=l.replace(/\n\n/g,`
123
+ `))return a+o+l;let u=o.replace(/\n\n/g,`
124
124
  <!---->
125
125
  `);return`${a}${(u.startsWith(`
126
126
  `)?"":`
127
127
  `)+u+(u.endsWith(`
128
128
  `)?"":`
129
- `)}${o}
129
+ `)}${l}
130
130
 
131
- `})}return n},F_=/([\\`*_~[\]|])/g,j_=e=>e.replace(F_,"\\$1"),H_=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(s,a,l,o)=>a+j_(l).replace(/\n\n/g,"&#10;&#10;")+o)}return n},Pu=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Pu).join(""):"",U_=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));et(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Pu(r);r.children=i?[{type:"text",value:i}]:[]}})},z_=()=>e=>{et(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},$_=/^[ \t]*<[\w!/?-]/,q_=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Y_=e=>typeof e!="string"||e.length===0||!$_.test(e)?e:e.replace(q_,"$1"),bl,xl,kl,yl,kr={...wt,protocols:{...wt.protocols,href:[...(xl=(bl=wt.protocols)==null?void 0:bl.href)!=null?xl:[],"tel"]},attributes:{...wt.attributes,code:[...(yl=(kl=wt.attributes)==null?void 0:kl.code)!=null?yl:[],"metastring"]}},Qi={raw:Li,sanitize:[Yo,kr],harden:[zd,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},V_={gfm:[l0,{}],codeMeta:z_},Cl=Object.values(Qi),W_=Object.values(V_),Q_={block:" ▋",circle:" ●"},Mu=["github-light","github-dark"],Bu={enabled:!0},je=(0,E.createContext)({shikiTheme:Mu,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Bu}),Fu=(0,E.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:s,animatePlugin:a,...l})=>{if(a){let m=a.getLastRenderCharCount();a.setPrevContentLength(m)}let o=typeof e=="string"&&n?Y_(e):e,u=(0,h.jsx)(Du,{...l,children:o});return(0,h.jsx)(tu.Provider,{value:i,children:s?(0,h.jsx)("div",{dir:s,style:{display:"contents"},children:u}):u})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Fu.displayName="Block";var Os=(0,E.memo)(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:s,rehypePlugins:a=Cl,remarkPlugins:l=W_,className:o,shikiTheme:u=Mu,mermaid:m,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:g=Fu,parseMarkdownIntoBlocksFn:N=M_,caret:C,plugins:b,remend:A,linkSafety:v=Bu,lineNumbers:w=!0,allowedTags:O,literalTagContent:I,translations:B,icons:$,prefix:Y,onAnimationStart:S,onAnimationEnd:H,...q})=>{let Z=(0,E.useId)(),[ie,G]=(0,E.useTransition)(),U=(0,E.useMemo)(()=>wC(Y),[Y]),P=(0,E.useRef)(null),V=(0,E.useRef)(S),X=(0,E.useRef)(H);V.current=S,X.current=H,(0,E.useEffect)(()=>{var se,de,we;if(t==="static")return;let Qe=P.current;if(P.current=f,Qe===null){f&&((se=V.current)==null||se.call(V));return}f&&!Qe?(de=V.current)==null||de.call(V):!f&&Qe&&((we=X.current)==null||we.call(X))},[f,t]);let y=(0,E.useMemo)(()=>O?Object.keys(O):[],[O]),ce=(0,E.useMemo)(()=>{if(typeof e!="string")return"";let se=t==="streaming"&&r?Tx(e,A):e;return I&&I.length>0&&(se=H_(se,I)),y.length>0&&(se=B_(se,y)),se},[e,t,r,A,y,I]),Q=(0,E.useMemo)(()=>N(ce),[ce,N]),[_,De]=(0,E.useState)(Q);(0,E.useEffect)(()=>{t==="streaming"&&!He?G(()=>{De(Q)}):De(Q)},[Q,t]);let Te=t==="streaming"?_:Q,ge=(0,E.useMemo)(()=>n==="auto"?Te.map(ul):void 0,[Te,n]),_t=(0,E.useMemo)(()=>Te.map((se,de)=>`${Z}-${de}`),[Te.length,Z]),Pe=(0,E.useMemo)(()=>p===!0?"true":p?JSON.stringify(p):"",[p]),He=(0,E.useMemo)(()=>Pe?Pe==="true"?zi():zi(p):null,[Pe]),it=(0,E.useMemo)(()=>{var se,de;return{shikiTheme:(de=(se=b?.code)==null?void 0:se.getThemes())!=null?de:u,controls:d,isAnimating:f,lineNumbers:w,mode:t,mermaid:m,linkSafety:v}},[u,d,f,w,t,m,v,b?.code]),ir=(0,E.useMemo)(()=>B?JSON.stringify(B):"",[B]),sr=(0,E.useMemo)(()=>({...su,...B}),[ir]),ar=(0,E.useMemo)(()=>{let{inlineCode:se,...de}=s??{},we={...m_,...de};if(se){let Qe=we.code;we.code=At=>"data-block"in At?Qe?(0,E.createElement)(Qe,At):null:(0,E.createElement)(se,At)}return we},[s]),lr=(0,E.useMemo)(()=>{let se=[];return b!=null&&b.cjk&&(se=[...se,...b.cjk.remarkPluginsBefore]),se=[...se,...l],b!=null&&b.cjk&&(se=[...se,...b.cjk.remarkPluginsAfter]),b!=null&&b.math&&(se=[...se,b.math.remarkPlugin]),se},[l,b?.math,b?.cjk]),on=(0,E.useMemo)(()=>{var se;let de=a;if(O&&Object.keys(O).length>0&&a===Cl){let we={...kr,tagNames:[...(se=kr.tagNames)!=null?se:[],...Object.keys(O)],attributes:{...kr.attributes,...O}};de=[Qi.raw,[Yo,we],Qi.harden]}return I&&I.length>0&&(de=[...de,[U_,I]]),b!=null&&b.math&&(de=[...de,b.math.rehypePlugin]),He&&f&&(de=[...de,He.rehypePlugin]),de},[a,b?.math,He,f,O,I]),Ut=(0,E.useMemo)(()=>{if(!f||Te.length===0)return!1;let se=Te.at(-1);return hl(se)||T_(se)},[f,Te]),or=(0,E.useMemo)(()=>C&&f&&!Ut?{"--streamdown-caret":`"${Q_[C]}"`}:void 0,[C,f,Ut]);return t==="static"?(0,h.jsx)(qi.Provider,{value:sr,children:(0,h.jsx)(Yi.Provider,{value:b??null,children:(0,h.jsx)(je.Provider,{value:it,children:(0,h.jsx)(sl,{icons:$,children:(0,h.jsx)($i.Provider,{value:U,children:(0,h.jsx)("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",o),dir:n==="auto"?ul(ce):n,children:(0,h.jsx)(Du,{components:ar,rehypePlugins:on,remarkPlugins:lr,...q,children:ce})})})})})})}):(0,h.jsx)(qi.Provider,{value:sr,children:(0,h.jsx)(Yi.Provider,{value:b??null,children:(0,h.jsx)(je.Provider,{value:it,children:(0,h.jsx)(sl,{icons:$,children:(0,h.jsx)($i.Provider,{value:U,children:(0,h.jsxs)("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&!Ut?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,o),style:or,children:[Te.length===0&&C&&f&&(0,h.jsx)("span",{}),Te.map((se,de)=>{var we;let Qe=de===Te.length-1,At=f&&Qe&&hl(se);return(0,h.jsx)(g,{animatePlugin:He,components:ar,content:se,dir:(we=ge?.[de])!=null?we:n!=="auto"?n:void 0,index:de,isIncomplete:At,rehypePlugins:on,remarkPlugins:lr,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...q},_t[de])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Os.displayName="Streamdown";var G_=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:l=!1})=>{let{RotateCcwIcon:o,ZoomInIcon:u,ZoomOutIcon:m}=We(),d=ne(),f=(0,E.useRef)(null),p=(0,E.useRef)(null),[g,N]=(0,E.useState)(a),[C,b]=(0,E.useState)({x:0,y:0}),[A,v]=(0,E.useState)(!1),[w,O]=(0,E.useState)({x:0,y:0}),[I,B]=(0,E.useState)({x:0,y:0}),$=(0,E.useCallback)(U=>{N(P=>Math.max(n,Math.min(r,P+U)))},[n,r]),Y=(0,E.useCallback)(()=>{$(i)},[$,i]),S=(0,E.useCallback)(()=>{$(-i)},[$,i]),H=(0,E.useCallback)(()=>{N(a),b({x:0,y:0})},[a]),q=(0,E.useCallback)(U=>{U.preventDefault();let P=U.deltaY>0?-i:i;$(P)},[$,i]),Z=(0,E.useCallback)(U=>{if(U.button!==0||U.isPrimary===!1)return;v(!0),O({x:U.clientX,y:U.clientY}),B(C);let P=U.currentTarget;P instanceof HTMLElement&&P.setPointerCapture(U.pointerId)},[C]),ie=(0,E.useCallback)(U=>{if(!A)return;U.preventDefault();let P=U.clientX-w.x,V=U.clientY-w.y;b({x:I.x+P,y:I.y+V})},[A,w,I]),G=(0,E.useCallback)(U=>{v(!1);let P=U.currentTarget;P instanceof HTMLElement&&P.releasePointerCapture(U.pointerId)},[]);return(0,E.useEffect)(()=>{let U=f.current;if(U)return U.addEventListener("wheel",q,{passive:!1}),()=>{U.removeEventListener("wheel",q)}},[q]),(0,E.useEffect)(()=>{let U=p.current;if(U&&A)return document.body.style.userSelect="none",U.addEventListener("pointermove",ie,{passive:!1}),U.addEventListener("pointerup",G),U.addEventListener("pointercancel",G),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",ie),U.removeEventListener("pointerup",G),U.removeEventListener("pointercancel",G)}},[A,ie,G]),(0,h.jsxs)("div",{className:d("relative flex flex-col",l?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:A?"grabbing":"grab"},children:[s?(0,h.jsxs)("div",{className:d("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",l?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,h.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=r,onClick:Y,title:"Zoom in",type:"button",children:(0,h.jsx)(u,{size:16})}),(0,h.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=n,onClick:S,title:"Zoom out",type:"button",children:(0,h.jsx)(m,{size:16})}),(0,h.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:H,title:"Reset zoom and pan",type:"button",children:(0,h.jsx)(o,{size:16})})]}):null,(0,h.jsx)("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",l?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Z,ref:p,role:"application",style:{transform:`translate(${C.x}px, ${C.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},K_=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let s=ne(),[a,l]=(0,E.useState)(null),[o,u]=(0,E.useState)(!1),[m,d]=(0,E.useState)(""),[f,p]=(0,E.useState)(""),[g,N]=(0,E.useState)(0),{mermaid:C}=(0,E.useContext)(je),b=Ls(),A=C?.errorComponent,{shouldRender:v,containerRef:w}=TC({immediate:r});if((0,E.useEffect)(()=>{if(v){if(!b){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),u(!0);let I=b.getMermaid(n),B=e.split("").reduce((S,H)=>(S<<5)-S+H.charCodeAt(0)|0,0),$=`mermaid-${Math.abs(B)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:Y}=await I.render($,e);d(Y),p(Y)}catch(I){if(!(f||m)){let B=I instanceof Error?I.message:"Failed to render Mermaid chart";l(B)}}finally{u(!1)}})()}},[e,n,g,v,b]),!(v||m||f))return(0,h.jsx)("div",{className:s("my-4 min-h-[200px]",t),ref:w});if(o&&!m&&!f)return(0,h.jsx)("div",{className:s("my-4 flex justify-center p-4",t),ref:w,children:(0,h.jsxs)("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[(0,h.jsx)("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,h.jsx)("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(a&&!m&&!f){let I=()=>N(B=>B+1);return A?(0,h.jsx)("div",{ref:w,children:(0,h.jsx)(A,{chart:e,error:a,retry:I})}):(0,h.jsxs)("div",{className:s("rounded-md bg-red-50 p-4",t),ref:w,children:[(0,h.jsxs)("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),(0,h.jsxs)("details",{className:s("mt-2"),children:[(0,h.jsx)("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,h.jsx)("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let O=m||f;return(0,h.jsx)("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:w,children:(0,h.jsx)(G_,{className:s(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,h.jsx)("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:O},role:"img"})})})},ju={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},_l=E.createContext&&E.createContext(ju),X_=["attr","size","title"];function Z_(e,t){if(e==null)return{};var n,r,i=J_(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function J_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wr.apply(null,arguments)}function Al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Al(Object(n),!0).forEach(function(r){eA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Al(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eA(e,t,n){return(t=tA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tA(e){var t=nA(e,"string");return typeof t=="symbol"?t:t+""}function nA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hu(e){return e&&e.map((t,n)=>E.createElement(t.tag,Lr({key:n},t.attr),Hu(t.child)))}function rA(e){return t=>E.createElement(iA,wr({attr:Lr({},e.attr)},t),Hu(e.child))}function iA(e){var t=n=>{var{attr:r,size:i,title:s}=e,a=Z_(e,X_),l=i||n.size||"1em",o;return n.className&&(o=n.className),e.className&&(o=(o?o+" ":"")+e.className),E.createElement("svg",wr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:o,style:Lr(Lr({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&E.createElement("title",null,s),e.children)};return _l!==void 0?E.createElement(_l.Consumer,null,n=>t(n)):t(ju)}function sA(e){return rA({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"},child:[]},{tag:"path",attr:{d:"M9 18c-4.51 2-5-2-7-2"},child:[]}]})(e)}var aA={damping:.7,stiffness:.05,mass:1.25},lA=70,oA=1e3/60,cA=350,Xr=!1;globalThis.document?.addEventListener("mousedown",()=>{Xr=!0});globalThis.document?.addEventListener("mouseup",()=>{Xr=!1});globalThis.document?.addEventListener("click",()=>{Xr=!1});var uA=(e={})=>{const[t,n]=(0,E.useState)(!1),[r,i]=(0,E.useState)(e.initial!==!1),[s,a]=(0,E.useState)(!1),l=(0,E.useRef)(null);l.current=e;const o=(0,E.useCallback)(()=>{if(!Xr)return!1;const A=window.getSelection();if(!A||!A.rangeCount)return!1;const v=A.getRangeAt(0);return v.commonAncestorContainer.contains(C.current)||C.current?.contains(v.commonAncestorContainer)},[]),u=(0,E.useCallback)(A=>{d.isAtBottom=A,i(A)},[]),m=(0,E.useCallback)(A=>{d.escapedFromLock=A,n(A)},[]),d=(0,E.useMemo)(()=>{let A;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return C.current?.scrollTop??0},set scrollTop(v){if(C.current){const{scrollBehavior:w}=getComputedStyle(C.current);w!=="auto"&&(C.current.style.scrollBehavior="auto"),C.current.scrollTop=v,d.ignoreScrollToTop=C.current.scrollTop,w!=="auto"&&(C.current.style.scrollBehavior=w)}},get targetScrollTop(){return!C.current||!b.current?0:C.current.scrollHeight-1-C.current.clientHeight},get calculatedTargetScrollTop(){if(!C.current||!b.current)return 0;const{targetScrollTop:v}=this;if(!e.targetScrollTop)return v;if(A?.targetScrollTop===v)return A.calculatedScrollTop;const w=Math.max(Math.min(e.targetScrollTop(v,{scrollElement:C.current,contentElement:b.current}),v),0);return A={targetScrollTop:v,calculatedScrollTop:w},requestAnimationFrame(()=>{A=void 0}),w},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=lA}}},[]),f=(0,E.useCallback)((A={})=>{typeof A=="string"&&(A={animation:A}),A.preserveScrollPosition||u(!0);const v=Date.now()+(Number(A.wait)||0),w=yi(l.current,A.animation),{ignoreEscapes:O=!1}=A;let I,B=d.calculatedTargetScrollTop;A.duration instanceof Promise?A.duration.finally(()=>{I=Date.now()}):I=v+(A.duration??0);const $=async()=>{const Y=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:S}=d,H=performance.now(),q=(H-(d.lastTick??H))/oA;if(d.animation||(d.animation={behavior:w,promise:Y,ignoreEscapes:O}),d.animation.behavior===w&&(d.lastTick=H),o()||v>Date.now())return $();if(S<Math.min(B,d.calculatedTargetScrollTop)){if(d.animation?.behavior===w){if(w==="instant")return d.scrollTop=d.calculatedTargetScrollTop,$();d.velocity=(w.damping*d.velocity+w.stiffness*d.scrollDifference)/w.mass,d.accumulated+=d.velocity*q,d.scrollTop+=d.accumulated,d.scrollTop!==S&&(d.accumulated=0)}return $()}return I>Date.now()?(B=d.calculatedTargetScrollTop,$()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:yi(l.current,l.current.resize),ignoreEscapes:O,duration:Math.max(0,I-Date.now())||void 0}):d.isAtBottom)});return Y.then(S=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),S))};return A.wait!==!0&&(d.animation=void 0),d.animation?.behavior===w?d.animation.promise:$()},[u,o,d]),p=(0,E.useCallback)(()=>{m(!0),u(!1)},[m,u]),g=(0,E.useCallback)(({target:A})=>{if(A!==C.current)return;const{scrollTop:v,ignoreScrollToTop:w}=d;let{lastScrollTop:O=v}=d;d.lastScrollTop=v,d.ignoreScrollToTop=void 0,w&&w>v&&(O=w),a(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||v===w)return;if(o()){m(!0),u(!1);return}const I=v>O,B=v<O;if(d.animation?.ignoreEscapes){d.scrollTop=O;return}B&&(m(!0),u(!1)),I&&m(!1),!d.escapedFromLock&&d.isNearBottom&&u(!0)},1)},[m,u,o,d]),N=(0,E.useCallback)(({target:A,deltaY:v})=>{let w=A;for(;!["scroll","auto"].includes(getComputedStyle(w).overflow);){if(!w.parentElement)return;w=w.parentElement}w===C.current&&v<0&&C.current.scrollHeight>C.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),u(!1))},[m,u,d]),C=Nl(A=>{C.current?.removeEventListener("scroll",g),C.current?.removeEventListener("wheel",N),A?.addEventListener("scroll",g,{passive:!0}),A?.addEventListener("wheel",N,{passive:!0})},[]),b=Nl(A=>{if(d.resizeObserver?.disconnect(),!A)return;let v;d.resizeObserver=new ResizeObserver(([w])=>{const{height:O}=w.contentRect,I=O-(v??O);if(d.resizeDifference=I,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),a(d.isNearBottom),I>=0){const B=yi(l.current,v?l.current.resize:l.current.initial);f({animation:B,wait:!0,preserveScrollPosition:!0,duration:B==="instant"?void 0:cA})}else d.isNearBottom&&(m(!1),u(!0));v=O,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===I&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(A)},[]);return{contentRef:b,scrollRef:C,scrollToBottom:f,stopScroll:p,isAtBottom:r||s,isNearBottom:s,escapedFromLock:t,state:d}};function Nl(e,t){const n=(0,E.useCallback)(r=>(n.current=r,e(r)),t);return n}var ki=new Map;function yi(...e){const t={...aA};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return ki.has(r)||ki.set(r,Object.freeze(t)),n?"instant":ki.get(r)}var Uu=(0,E.createContext)(null),hA=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Rr({instance:e,children:t,resize:n,initial:r,mass:i,damping:s,stiffness:a,targetScrollTop:l,contextRef:o,...u}){const m=(0,E.useRef)(null),d=E.useCallback((O,I)=>(w?.targetScrollTop??l)?.(O,I)??O,[l]),f=uA({mass:i,damping:s,stiffness:a,resize:n,initial:r,targetScrollTop:d}),{scrollRef:p,contentRef:g,scrollToBottom:N,stopScroll:C,isAtBottom:b,escapedFromLock:A,state:v}=e??f,w=(0,E.useMemo)(()=>({scrollToBottom:N,stopScroll:C,scrollRef:p,isAtBottom:b,escapedFromLock:A,contentRef:g,state:v,get targetScrollTop(){return m.current},set targetScrollTop(O){m.current=O}}),[N,b,g,p,C,A,v]);return(0,E.useImperativeHandle)(o,()=>w,[w]),hA(()=>{p.current&&getComputedStyle(p.current).overflow==="visible"&&(p.current.style.overflow="auto")},[]),E.createElement(Uu.Provider,{value:w},E.createElement("div",{...u},typeof t=="function"?t(w):t))}(function(e){function t({children:n,scrollClassName:r,...i}){const s=zu();return E.createElement("div",{ref:s.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},E.createElement("div",{...i,ref:s.contentRef},typeof n=="function"?n(s):n))}e.Content=t})(Rr||(Rr={}));function zu(){const e=(0,E.useContext)(Uu);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}var dA=({className:e,...t})=>(0,h.jsx)(Rr,{className:J("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),mA=({className:e,...t})=>(0,h.jsx)(Rr.Content,{className:J("flex flex-col gap-8 p-4",e),...t}),fA=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:r}=zu(),i=(0,E.useCallback)(()=>{r()},[r]);return!n&&(0,h.jsx)(oe,{className:J("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:(0,h.jsx)(xh,{className:"size-4"})})},vl=[{variant:"shine",component:({children:e,className:t,...n})=>(0,h.jsx)("span",{...n,className:J("bg-[linear-gradient(110deg,#bfbfbf,35%,#000,50%,#bfbfbf,75%,#bfbfbf)] dark:bg-[linear-gradient(110deg,#404040,35%,#fff,50%,#404040,75%,#404040)]","bg-size-[200%_100%] bg-clip-text text-transparent","animate-shine",t),children:e})}];function pA({variant:e="shine",className:t,...n}){const r=vl.find(i=>i.variant===e)?.component||vl[0].component;return(0,h.jsx)(Bh,{className:J("font-medium text-sm"),children:(0,h.jsx)(r,{...n,className:t})})}var Sl=({className:e,from:t,...n})=>(0,h.jsx)("div",{className:J("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),Il=({children:e,className:t,...n})=>(0,h.jsx)("div",{className:J("is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e}),$u=(0,E.createContext)(null),gA=()=>{const e=(0,E.use)($u);if(!e)throw new Error("MessageBranch components must be used within MessageBranch");return e},wl=({defaultBranch:e=0,onBranchChange:t,className:n,...r})=>{const[i,s]=(0,E.useState)(e),[a,l]=(0,E.useState)([]),o=f=>{s(f),t?.(f)},u=()=>{const f=i>0?i-1:a.length-1;o(f)},m=()=>{const f=i<a.length-1?i+1:0;o(f)},d={currentBranch:i,totalBranches:a.length,goToPrevious:u,goToNext:m,branches:a,setBranches:l};return(0,h.jsx)($u.Provider,{value:d,children:(0,h.jsx)("div",{className:J("grid w-full gap-2 [&>div]:pb-0",n),...r})})},Ll=({children:e,...t})=>{const{currentBranch:n,setBranches:r,branches:i}=gA(),s=Array.isArray(e)?e:[e];return(0,E.useEffect)(()=>{i.length!==s.length&&r(s)},[s,i,r]),s.map((a,l)=>(0,h.jsx)("div",{className:J("grid gap-2 overflow-hidden [&>div]:pb-0",l===n?"block":"hidden"),...t,children:a},a.key))},qu=(0,E.memo)(({className:e,...t})=>(0,h.jsx)(Os,{className:J("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);qu.displayName="MessageResponse";var EA="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",TA=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=EA[n[e]&63];return t},bA=(0,E.createContext)(null),xA=(0,E.createContext)(null),Yu=()=>(0,E.useContext)(bA),kA=()=>(0,E.useContext)(xA),Vu=(0,E.createContext)(null),yA=()=>{const e=kA(),t=(0,E.use)(Vu),n=e??t;if(!n)throw new Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return n},CA=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:i,maxFiles:s,maxFileSize:a,onError:l,onSubmit:o,children:u,...m})=>{const d=Yu(),f=!!d,p=(0,E.useRef)(null),g=(0,E.useRef)(null),[N,C]=(0,E.useState)([]),b=f?d.attachments.files:N,A=(0,E.useRef)(b);A.current=b;const v=(0,E.useCallback)(()=>{p.current?.click()},[]),w=(0,E.useCallback)(P=>!t||t.trim()===""?!0:t.split(",").map(V=>V.trim()).filter(Boolean).some(V=>{if(V.endsWith("/*")){const X=V.slice(0,-1);return P.type.startsWith(X)}return P.type===V}),[t]),O=(0,E.useCallback)(P=>{const V=Array.from(P),X=V.filter(Q=>w(Q));if(V.length&&X.length===0){l?.({code:"accept",message:"No files match the accepted types."});return}const y=Q=>a?Q.size<=a:!0,ce=X.filter(y);if(X.length>0&&ce.length===0){l?.({code:"max_file_size",message:"All files exceed the maximum size."});return}C(Q=>{const _=typeof s=="number"?Math.max(0,s-Q.length):void 0,De=typeof _=="number"?ce.slice(0,_):ce;typeof _=="number"&&ce.length>_&&l?.({code:"max_files",message:"Too many files. Some were not added."});const Te=[];for(const ge of De)Te.push({id:TA(),type:"file",url:URL.createObjectURL(ge),mediaType:ge.type,filename:ge.name});return Q.concat(Te)})},[w,s,a,l]),I=(0,E.useCallback)(P=>C(V=>{const X=V.find(y=>y.id===P);return X?.url&&URL.revokeObjectURL(X.url),V.filter(y=>y.id!==P)}),[]),B=(0,E.useCallback)(()=>C(P=>{for(const V of P)V.url&&URL.revokeObjectURL(V.url);return[]}),[]),$=f?d.attachments.add:O,Y=f?d.attachments.remove:I,S=f?d.attachments.clear:B,H=f?d.attachments.openFileDialog:v;(0,E.useEffect)(()=>{f&&d.__registerFileInput(p,()=>p.current?.click())},[f,d]),(0,E.useEffect)(()=>{i&&p.current&&b.length===0&&(p.current.value="")},[b,i]),(0,E.useEffect)(()=>{const P=g.current;if(!P||r)return;const V=y=>{y.dataTransfer?.types?.includes("Files")&&y.preventDefault()},X=y=>{y.dataTransfer?.types?.includes("Files")&&y.preventDefault(),y.dataTransfer?.files&&y.dataTransfer.files.length>0&&$(y.dataTransfer.files)};return P.addEventListener("dragover",V),P.addEventListener("drop",X),()=>{P.removeEventListener("dragover",V),P.removeEventListener("drop",X)}},[$,r]),(0,E.useEffect)(()=>{if(!r)return;const P=X=>{X.dataTransfer?.types?.includes("Files")&&X.preventDefault()},V=X=>{X.dataTransfer?.types?.includes("Files")&&X.preventDefault(),X.dataTransfer?.files&&X.dataTransfer.files.length>0&&$(X.dataTransfer.files)};return document.addEventListener("dragover",P),document.addEventListener("drop",V),()=>{document.removeEventListener("dragover",P),document.removeEventListener("drop",V)}},[$,r]),(0,E.useEffect)(()=>()=>{if(!f)for(const P of A.current)P.url&&URL.revokeObjectURL(P.url)},[f]);const q=P=>{P.currentTarget.files&&$(P.currentTarget.files),P.currentTarget.value=""},Z=async P=>{try{const V=await(await fetch(P)).blob();return new Promise(X=>{const y=new FileReader;y.onloadend=()=>X(y.result),y.onerror=()=>X(null),y.readAsDataURL(V)})}catch{return null}},ie=(0,E.useMemo)(()=>({files:b.map(P=>({...P,id:P.id})),add:$,remove:Y,clear:S,openFileDialog:H,fileInputRef:p}),[b,$,Y,S,H]),G=P=>{P.preventDefault();const V=P.currentTarget,X=f?d.textInput.value:new FormData(V).get("message")||"";f||V.reset(),Promise.all(b.map(async({id:y,...ce})=>{if(ce.url?.startsWith("blob:")){const Q=await Z(ce.url);return{...ce,url:Q??ce.url}}return ce})).then(y=>{try{const ce=o({text:X,files:y},P);ce instanceof Promise?ce.then(()=>{S(),f&&d.textInput.clear()}).catch(()=>{}):(S(),f&&d.textInput.clear())}catch{}}).catch(()=>{})},U=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:q,ref:p,title:"Upload files",type:"file"}),(0,h.jsx)("form",{className:J("w-full",e),onSubmit:G,ref:g,...m,children:(0,h.jsx)(ld,{className:"overflow-hidden",children:u})})]});return f?U:(0,h.jsx)(Vu.Provider,{value:ie,children:U})},_A=({className:e,...t})=>(0,h.jsx)("div",{className:J("contents",e),...t}),AA=({onChange:e,className:t,placeholder:n="What would you like to know?",...r})=>{const i=Yu(),s=yA(),[a,l]=(0,E.useState)(!1),o=d=>{if(d.key==="Enter"){if(a||d.nativeEvent.isComposing||d.shiftKey)return;d.preventDefault();const f=d.currentTarget.form;if(f?.querySelector('button[type="submit"]')?.disabled)return;f?.requestSubmit()}if(d.key==="Backspace"&&d.currentTarget.value===""&&s.files.length>0){d.preventDefault();const f=s.files.at(-1);f&&s.remove(f.id)}},u=d=>{const f=d.clipboardData?.items;if(!f)return;const p=[];for(const g of f)if(g.kind==="file"){const N=g.getAsFile();N&&p.push(N)}p.length>0&&(d.preventDefault(),s.add(p))},m=i?{value:i.textInput.value,onChange:d=>{i.textInput.setInput(d.currentTarget.value),e?.(d)}}:{onChange:e};return(0,h.jsx)(od,{className:J("field-sizing-content max-h-48 min-h-16",t),name:"message",onCompositionEnd:()=>l(!1),onCompositionStart:()=>l(!0),onKeyDown:o,onPaste:u,placeholder:n,...r,...m})},NA=({className:e,...t})=>(0,h.jsx)(hd,{align:"block-end",className:J("justify-between justify-end gap-1",e),...t}),vA=({className:e,variant:t="default",size:n="icon-sm",status:r,children:i,...s})=>{let a=(0,h.jsx)(mh,{className:"size-4"});return r==="submitted"?a=(0,h.jsx)(wh,{className:"size-4 animate-spin"}):r==="streaming"?a=(0,h.jsx)(Nh,{className:"size-4"}):r==="error"&&(a=(0,h.jsx)(Sh,{className:"size-4"})),(0,h.jsx)(ud,{"aria-label":"Submit",className:J(e),size:n,type:"submit",variant:t,...s,children:i??a})};function SA({...e}){return(0,h.jsx)(Ph,{"data-slot":"collapsible",...e})}function IA({...e}){return(0,h.jsx)(Mh,{"data-slot":"collapsible-trigger",...e})}function wA({...e}){return(0,h.jsx)(qh,{"data-slot":"collapsible-content",...e})}var LA=({children:e,as:t="p",className:n,duration:r=2,spread:i=2})=>{const s=(0,E.useMemo)(()=>(e?.length??0)*i,[e,i]);return(0,h.jsx)(t,{className:J("relative inline-block bg-size-[250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",n),style:{"--spread":`${s}px`,"--duration":`${r}s`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},children:e})},RA=(0,E.memo)(LA),Wu=(0,E.createContext)(null),OA=()=>{const e=(0,E.use)(Wu);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},DA=1e3,PA=1e3,Qu=(0,E.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:s,children:a,...l})=>{const[o,u]=Bs({prop:n,defaultProp:r,onChange:i}),[m,d]=Bs({prop:s,defaultProp:void 0}),[f,p]=(0,E.useState)(!1),[g,N]=(0,E.useState)(null);(0,E.useEffect)(()=>{t?g===null&&N(Date.now()):g!==null&&(d(Math.ceil((Date.now()-g)/PA)),N(null))},[t,g,d]),(0,E.useEffect)(()=>{if(r&&!t&&o&&!f){const b=setTimeout(()=>{u(!1),p(!0)},DA);return()=>clearTimeout(b)}},[t,o,r,u,f]);const C=b=>{u(b)};return(0,h.jsx)(Wu.Provider,{value:{isStreaming:t,isOpen:o,setIsOpen:u,duration:m},children:(0,h.jsx)(SA,{className:J("not-prose mb-4",e),onOpenChange:C,open:o,...l,children:a})})}),MA=(e,t)=>e||t===0?(0,h.jsx)(RA,{duration:1,children:"Thinking..."}):t===void 0?(0,h.jsx)("p",{children:"Thought for a few seconds"}):(0,h.jsxs)("p",{children:["Thought for ",t," seconds"]}),Gu=(0,E.memo)(({className:e,children:t,getThinkingMessage:n=MA,...r})=>{const{isStreaming:i,isOpen:s,duration:a}=OA();return(0,h.jsx)(IA,{className:J("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ch,{className:"size-4"}),n(i,a),(0,h.jsx)(Bl,{className:J("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),Ku=(0,E.memo)(({className:e,children:t,...n})=>(0,h.jsx)(wA,{className:J("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:(0,h.jsx)(Os,{children:t})}));Qu.displayName="Reasoning";Gu.displayName="ReasoningTrigger";Ku.displayName="ReasoningContent";var BA=({className:e,children:t,...n})=>(0,h.jsxs)($l,{className:"w-full overflow-x-auto whitespace-nowrap",...n,children:[(0,h.jsx)("div",{className:J("flex w-max flex-nowrap items-center gap-2",e),children:t}),(0,h.jsx)(pd,{className:"hidden",orientation:"horizontal"})]}),FA=({suggestion:e,onClick:t,className:n,variant:r="outline",size:i="sm",children:s,...a})=>{const l=()=>{t?.(e)};return(0,h.jsx)(oe,{className:J("cursor-pointer rounded-full px-4",n),onClick:l,size:i,type:"button",variant:r,...a,children:s||e})},Ds=()=>{const{data:e,isLoading:t,error:n,refetch:r}=oh({queryKey:md.rateLimit(),queryFn:async()=>{try{return(await Wh()).data}catch{return{limit:0,used:0,remaining:0}}}});return{rateLimit:e,isLoadingRateLimit:t,errorRateLimit:n,refetchRateLimit:r}},jA=({db:e,onRateLimitRefetch:t,onControllerReady:n})=>{const[r,i]=(0,E.useState)(""),{rateLimit:s}=Ds(),{remaining:a}=s??{remaining:0,limit:0},{messages:l,sendMessage:o,isLoading:u,clear:m,stop:d}=lh({connection:sh(`${Qh()}${Vh.API_PREFIX}/chat`),body:{db:e},onError:C=>console.error("Error:",C.message),onFinish:()=>{t()}});(0,E.useEffect)(()=>{n({clear:()=>{m(),i("")},isLoading:u})},[m,u,n]);const f=C=>{const b=!!C.text,A=!!C.files?.length;!(b||A)||u||(o(C.text),i(""))},p=C=>{o(C),i("")},g=()=>{d(),i("")},N=u?"streaming":"ready";return(0,h.jsxs)("div",{className:"relative flex size-full flex-col divide-y overflow-hidden",children:[(0,h.jsxs)(dA,{children:[(0,h.jsx)(mA,{children:l.length===0?(0,h.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:(0,h.jsxs)("div",{className:"text-center space-y-2",children:[(0,h.jsx)("p",{className:"text-lg font-medium",children:"Start a new conversation"}),(0,h.jsx)("p",{className:"text-sm",children:"Ask me anything to get started"})]})}):(0,h.jsxs)(h.Fragment,{children:[l.map(C=>{const b=C.parts.filter(w=>w.type==="thinking"),A=C.parts.reduce((w,O)=>O.type==="text"?w+(O.content??""):w,""),v=b.length>0;return(0,h.jsx)(wl,{defaultBranch:0,children:(0,h.jsx)(Ll,{children:(0,h.jsx)(Sl,{from:C.role==="user"?"user":"assistant",children:(0,h.jsxs)("div",{children:[v&&C.role==="assistant"&&(0,h.jsxs)(Qu,{duration:0,children:[(0,h.jsx)(Gu,{}),(0,h.jsx)(Ku,{children:b.map(w=>w.content).join(`
132
- `)})]}),(0,h.jsx)(Il,{children:(0,h.jsx)(qu,{children:A})})]})})})},C.id)}),u&&(0,h.jsx)(wl,{defaultBranch:0,children:(0,h.jsx)(Ll,{children:(0,h.jsx)(Sl,{from:"assistant",children:(0,h.jsx)(Il,{children:(0,h.jsx)(pA,{children:"Thinking..."})})})})})]})}),(0,h.jsx)(fA,{})]}),(0,h.jsxs)("div",{className:"grid shrink-0 gap-4 pt-3",children:[l.length===0&&a>0&&(0,h.jsx)(BA,{className:"px-4",children:Dd.map(C=>(0,h.jsx)(FA,{onClick:()=>p(C),suggestion:C,size:"lg",children:C},C))}),(0,h.jsx)("div",{className:"w-full px-4 pb-4",children:(0,h.jsxs)(CA,{globalDrop:!0,multiple:!0,onSubmit:f,children:[(0,h.jsx)(_A,{children:(0,h.jsx)(AA,{onChange:C=>i(C.target.value),value:r,placeholder:"Type a message..."})}),(0,h.jsx)(NA,{children:(0,h.jsx)(vA,{className:"h-8!",status:N,onClick:u?g:void 0,disabled:s&&s.remaining===0})})]})})]})]})},HA=()=>{const{rateLimit:e,refetchRateLimit:t}=Ds(),{isOverlayOpen:n,closeOverlay:r}=Yn(),{selectedDatabase:i}=tt(),[s,a]=(0,E.useState)(null),l=(0,E.useRef)(o=>a(o));return(0,h.jsx)(Ul,{title:"AI Assistant",cta:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[e&&(0,h.jsxs)(Ln,{children:[(0,h.jsx)(In,{asChild:!0,children:(0,h.jsxs)("span",{className:"text-xs px-2 py-1 cursor-default text-muted-foreground",children:[e.remaining,"/",e.limit]})}),(0,h.jsx)(wn,{side:"bottom",children:(0,h.jsxs)("p",{children:[e.remaining," messages remaining"]})})]}),i&&s&&(0,h.jsxs)(oe,{type:"button",variant:"outline",size:"lg",onClick:s.clear,disabled:s.isLoading,children:[(0,h.jsx)(Xt,{className:"size-4 mr-1"}),"New Chat"]})]}),closeButton:!1,open:n("chat.assistant"),size:"max-w-2xl!",contentClassName:"p-0 flex flex-col h-[calc(100vh-4rem)] flex-1",onOpenChange:o=>{o||r("chat.assistant")},children:i?(0,h.jsx)(jA,{db:i,onRateLimitRefetch:t,onControllerReady:l.current},i):(0,h.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground p-8",children:(0,h.jsxs)("div",{className:"text-center space-y-2",children:[(0,h.jsx)("p",{className:"text-lg font-medium",children:"No database selected"}),(0,h.jsx)("p",{className:"text-sm",children:"Select a database from the sidebar to start chatting."})]})})})},UA=()=>{const{openOverlay:e}=Yn(),{dbType:t}=tt(),{rateLimit:n,isLoadingRateLimit:r}=Ds(),{remaining:i=0,limit:s=0}=n??{remaining:0,limit:0},l=(o=>o===0?"bg-red-500":o<=5?"bg-yellow-500":"bg-emerald-500")(i);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(Ln,{children:[(0,h.jsx)(In,{asChild:!0,children:(0,h.jsxs)(oe,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-zinc-800 rounded-none h-full w-12 relative",onClick:()=>{e("chat.assistant"),t&&Yh.capture("chat_opened",{db_type:t})},children:[(0,h.jsx)(Ih,{className:"size-5"}),(0,h.jsx)("span",{className:J("absolute top-2 right-2 h-2 w-2 rounded-full ring-2 ring-background",l)})]})}),(0,h.jsx)(wn,{side:"bottom",className:"text-xs",children:!r&&(i>0?(0,h.jsxs)("p",{children:[i,"/",s," messages remaining"]}):(0,h.jsx)("p",{children:"AI Assistant"}))})]}),(0,h.jsx)(HA,{})]})},zA=()=>{const{pathname:e}=Dr(),t=e.split("/")[1]||"table",{dbType:n}=tt();return(0,h.jsx)("div",{className:"flex h-full items-center",children:(n==="redis"?["browser","runner"]:Kh).map(r=>(0,h.jsx)(Dl,{to:`/${r}`,className:"h-full flex items-center",children:(0,h.jsx)(oe,{variant:"ghost",className:J("flex-1 px-4 border-l-0 border-y-0 border-r border-zinc-800 h-full rounded-none",t===r?"bg-zinc-900 text-white":"text-zinc-400"),children:r})},r))})},$A=()=>{const{sidebar:{isOpen:e,isPinned:t},setSidebarOpen:n,setSidebarPinned:r}=Pr(),i=()=>{n(!e),r(!t)};return(0,h.jsx)(oe,{variant:"ghost",onClick:i,className:"h-full aspect-square border-l-0 border-y-0 border-r border-zinc-800 rounded-none",children:(0,h.jsx)(Lh,{className:"size-5"})})},qA=()=>(0,h.jsxs)("div",{className:"border-b border-zinc-800 w-full flex items-center justify-between bg-zinc-950 h-12",children:[(0,h.jsxs)("div",{className:"flex items-center h-full",children:[(0,h.jsx)($A,{}),(0,h.jsx)(zA,{})]}),(0,h.jsxs)("div",{className:"flex items-center h-full",children:[(0,h.jsx)(UA,{}),(0,h.jsxs)(Ln,{children:[(0,h.jsx)(In,{asChild:!0,children:(0,h.jsx)(oe,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-zinc-800 rounded-none h-full w-12",asChild:!0,children:(0,h.jsx)("a",{href:Hs.SITE_GITHUB_NEW_ISSUE_LINK,target:"_blank",rel:"noopener noreferrer","aria-label":"Create a new GitHub issue",children:(0,h.jsx)(gh,{className:"size-5"})})})}),(0,h.jsx)(wn,{children:(0,h.jsx)("p",{children:"Report a bug"})})]}),(0,h.jsxs)(Ln,{children:[(0,h.jsx)(In,{asChild:!0,children:(0,h.jsx)(oe,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-zinc-800 rounded-none h-full w-12",asChild:!0,children:(0,h.jsx)("a",{href:Hs.SITE_GITHUB_LINK,target:"_blank",rel:"noopener noreferrer","aria-label":"View the db-studio GitHub repository",children:(0,h.jsx)(sA,{className:"size-5"})})})}),(0,h.jsx)(wn,{children:(0,h.jsx)("p",{children:"View on GitHub"})})]})]})]});function Xu({...e}){return(0,h.jsx)($h,{"data-slot":"context-menu",...e})}function Zu({className:e,...t}){return(0,h.jsx)(Hh,{"data-slot":"context-menu-trigger",className:J("select-none",e),...t})}function Ju({className:e,...t}){return(0,h.jsx)(Uh,{children:(0,h.jsx)(Fh,{"data-slot":"context-menu-content",className:J("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",e),...t})})}function Et({className:e,inset:t,variant:n="default",...r}){return(0,h.jsx)(Oh,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:J("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r})}function Rl({className:e,...t}){return(0,h.jsx)(Dh,{"data-slot":"context-menu-separator",className:J("bg-border/50 -mx-1 my-1 h-px",e),...t})}var Ci=({folderId:e,isExpanded:t,onToggle:n,count:r,name:i,showContextMenu:s=!1})=>{const a=qn(),{deleteFolder:l,getQueriesByFolder:o,addQuery:u,updateFolder:m}=Mr(),[d,f]=(0,E.useState)(!1),[p,g]=(0,E.useState)(""),[N,C]=(0,E.useState)(!1),b=(0,E.useCallback)(()=>{if(e){if(o(e).length>0){C(!0);return}l(e)}},[l,e,o]),A=(0,E.useCallback)(()=>{e&&(l(e),C(!1))},[l,e]),v=(0,E.useCallback)(()=>{const I=u(void 0,e);a({to:"/runner/$queryId",params:{queryId:I}})},[u,e,a]),w=(0,E.useCallback)(()=>{g(i),f(!0)},[i]),O=(0,E.useCallback)(()=>{e&&p.trim()&&(m(e,{name:p.trim()}),f(!1),g(""))},[e,p,m]);return(0,h.jsxs)(h.Fragment,{children:[s?(0,h.jsxs)(Xu,{children:[(0,h.jsx)(Zu,{asChild:!0,children:(0,h.jsxs)("button",{type:"button",onClick:n,className:J("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-zinc-800/50 hover:text-zinc-100 focus:outline-none focus:bg-zinc-800/50","text-zinc-400 items-center"),children:[(0,h.jsx)(Ms,{className:J("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,h.jsx)("span",{className:"flex-1",children:i}),(0,h.jsx)(Fn,{children:r})]})}),(0,h.jsxs)(Ju,{children:[(0,h.jsxs)(Et,{onClick:v,children:[(0,h.jsx)(Xt,{className:"size-4"}),"Add a new query"]}),(0,h.jsxs)(Et,{onClick:w,children:[(0,h.jsx)(Zi,{className:"size-4"}),"Rename folder"]}),(0,h.jsxs)(Et,{onClick:b,children:[(0,h.jsx)(Xi,{className:"size-4"}),"Delete folder"]})]})]}):(0,h.jsxs)("button",{type:"button",onClick:n,className:J("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-zinc-800/50 hover:text-zinc-100 focus:outline-none focus:bg-zinc-800/50","text-zinc-400 items-center"),children:[(0,h.jsx)(Ms,{className:J("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,h.jsx)("span",{className:"flex-1",children:i}),(0,h.jsx)(Fn,{children:r})]}),(0,h.jsx)(On,{open:d,onOpenChange:f,children:(0,h.jsxs)(Pn,{children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Rename Folder"}),(0,h.jsx)(Bn,{children:"Enter a new name for this folder."})]}),(0,h.jsx)(bt,{value:p,onChange:I=>g(I.target.value),placeholder:"Folder name",onKeyDown:I=>{I.key==="Enter"&&O()},autoFocus:!0}),(0,h.jsxs)(Dn,{children:[(0,h.jsx)(oe,{variant:"outline",onClick:()=>{f(!1),g("")},children:"Cancel"}),(0,h.jsx)(oe,{onClick:O,disabled:!p.trim(),children:"Rename"})]})]})}),(0,h.jsx)(bd,{open:N,onOpenChange:C,children:(0,h.jsxs)(Ad,{children:[(0,h.jsxs)(gd,{children:[(0,h.jsx)(vd,{children:"Delete Folder"}),(0,h.jsxs)(yd,{children:["This folder contains ",r," ",r===1?"query":"queries",". Deleting this folder will also delete all queries inside it. This action cannot be undone."]})]}),(0,h.jsxs)(kd,{children:[(0,h.jsx)(Nd,{children:"Cancel"}),(0,h.jsx)(xd,{onClick:A,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Folder"})]})]})})]})},Er=({id:e,tableName:t,isNested:n=!1,showContextMenu:r=!0})=>{const i=qn(),{deleteQuery:s,addQuery:a,getQuery:l,toggleFavorite:o,updateQuery:u,moveQuery:m,folders:d,addFolder:f}=Mr(),{queryId:p}=Pl({strict:!1}),g=p===e,N=l(e),C=N?.isFavorite??!1,[b,A]=(0,E.useState)(!1),[v,w]=(0,E.useState)(""),[O,I]=(0,E.useState)(!1),[B,$]=(0,E.useState)(void 0),[Y,S]=(0,E.useState)(!1),[H,q]=(0,E.useState)(""),Z=(0,E.useCallback)(()=>{i({to:"/runner/$queryId",params:{queryId:e}})},[i,e]),ie=(0,E.useCallback)(()=>{s(e),p===e&&i({to:"/runner"}),Xe.success("Query deleted successfully")},[s,e,i,p]),G=(0,E.useCallback)(()=>{const Q=l(e),_=a(`${Q?.name} (Copy)`);i({to:"/runner/$queryId",params:{queryId:_}}),Xe.success("Query duplicated successfully")},[a,l,i,e]),U=(0,E.useCallback)(()=>{o(e),Xe.success("Query favorited successfully")},[o,e]),P=(0,E.useCallback)(()=>{w(N?.name??""),A(!0)},[N?.name]),V=(0,E.useCallback)(()=>{v.trim()&&(u(e,{name:v.trim()}),A(!1),w(""),Xe.success("Query renamed successfully"))},[e,v,u]),X=(0,E.useCallback)(()=>{$(N?.folderId),S(!1),q(""),I(!0)},[N?.folderId]),y=(0,E.useCallback)(Q=>{Q==="__create_new__"?(S(!0),$(void 0)):(S(!1),$(Q==="__none__"?void 0:Q))},[]),ce=(0,E.useCallback)(()=>{if(Y&&H.trim()){const Q=Math.random().toString(36).substring(2,15);f({id:Q,name:H.trim(),isExpanded:!0,isFavorite:!1}),m(e,Q),Xe.success("Query moved to new folder successfully")}else Y||(m(e,B),Xe.success("Query moved to selected folder successfully"));I(!1),S(!1),q(""),$(void 0)},[Y,H,B,e,f,m]);return(0,h.jsxs)("li",{className:"relative",children:[r?(0,h.jsxs)(Xu,{children:[(0,h.jsx)(Zu,{asChild:!0,children:(0,h.jsxs)("button",{type:"button",onClick:Z,className:J("w-full flex gap-2 py-2 text-sm transition-colors text-left","hover:text-zinc-100 focus:outline-none focus:bg-accent/10 focus:text-zinc-100 justify-start items-center",g?"text-zinc-100 bg-accent/10":"text-zinc-400",n?"px-4 pl-12":"px-4"),children:[g&&(0,h.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-accent"}),(0,h.jsx)("span",{className:"flex-1",children:t})]})}),(0,h.jsxs)(Ju,{children:[(0,h.jsxs)(Et,{onClick:P,children:[(0,h.jsx)(Zi,{className:"size-4"}),"Rename query"]}),(0,h.jsxs)(Et,{onClick:G,children:[(0,h.jsx)(Eh,{className:"size-4"}),"Duplicate query"]}),(0,h.jsxs)(Et,{onClick:U,children:[(0,h.jsx)(kh,{className:C?"size-4 fill-current":"size-4"}),C?"Remove from favorites":"Add to favorites"]}),(0,h.jsx)(Rl,{}),(0,h.jsxs)(Et,{onClick:X,children:[(0,h.jsx)(Ah,{className:"size-4"}),"Move to folder"]}),(0,h.jsx)(Rl,{}),(0,h.jsxs)(Et,{onClick:ie,children:[(0,h.jsx)(Xi,{className:"size-4"}),"Delete query"]})]})]}):(0,h.jsxs)("button",{type:"button",onClick:Z,className:J("w-full flex gap-2 py-2 text-sm transition-colors text-left","hover:text-zinc-100 focus:outline-none focus:bg-accent/10 focus:text-zinc-100 justify-start items-center",g?"text-zinc-100 bg-accent/10":"text-zinc-400",n?"px-4 pl-12":"px-4"),children:[g&&(0,h.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-accent"}),(0,h.jsx)("span",{className:"flex-1",children:t})]}),(0,h.jsx)(On,{open:b,onOpenChange:A,children:(0,h.jsxs)(Pn,{children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Rename Query"}),(0,h.jsx)(Bn,{children:"Enter a new name for this query."})]}),(0,h.jsx)(bt,{value:v,onChange:Q=>w(Q.target.value),placeholder:"Query name",onKeyDown:Q=>{Q.key==="Enter"&&V()},autoFocus:!0}),(0,h.jsxs)(Dn,{children:[(0,h.jsx)(oe,{variant:"outline",onClick:()=>{A(!1),w("")},children:"Cancel"}),(0,h.jsx)(oe,{onClick:V,disabled:!v.trim(),children:"Rename"})]})]})}),(0,h.jsx)(On,{open:O,onOpenChange:Q=>{I(Q),Q||(S(!1),q(""),$(void 0))},children:(0,h.jsxs)(Pn,{children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Move to Folder"}),(0,h.jsx)(Bn,{children:"Select a folder to move this query to."})]}),(0,h.jsx)("div",{className:"space-y-4",children:Y?(0,h.jsx)(bt,{value:H,onChange:Q=>q(Q.target.value),placeholder:"Folder name",onKeyDown:Q=>{Q.key==="Enter"&&H.trim()&&ce(),Q.key==="Escape"&&(S(!1),q(""))},autoFocus:!0}):(0,h.jsxs)(Qn,{value:B??"__none__",onValueChange:y,children:[(0,h.jsx)(Vn,{className:"w-full",children:(0,h.jsx)(Wn,{placeholder:"Select a folder"})}),(0,h.jsxs)(Gn,{children:[(0,h.jsx)(ct,{value:"__none__",children:"No folder"}),d.map(Q=>(0,h.jsx)(ct,{value:Q.id,children:Q.name},Q.id)),(0,h.jsx)(ct,{value:"__create_new__",children:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(Ml,{className:"size-4"}),"Create a new folder"]})})]})]})}),(0,h.jsxs)(Dn,{children:[(0,h.jsx)(oe,{variant:"outline",onClick:()=>{I(!1),S(!1),q(""),$(void 0)},children:"Cancel"}),(0,h.jsx)(oe,{onClick:ce,disabled:Y&&!H.trim(),children:Y?"Create & Move":"Move"})]})]})})]})},YA=()=>{const[e]=Je(ot.SIDEBAR_SEARCH,{defaultValue:""}),{folders:t,queries:n,getFavoriteQueries:r,getQueriesByFolder:i,toggleFolder:s}=Mr(),[a,l]=(0,E.useState)(!0),[o,u]=(0,E.useState)(!0),m=n.filter(g=>!g.isFavorite).length,d=r(),f=d.length,p=n.filter(g=>!g.folderId&&!g.isFavorite);if(e){const g=n.filter(N=>N.name.toLowerCase().includes(e.toLowerCase()));return g.length===0?(0,h.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:"No queries found matching"}):(0,h.jsx)("div",{className:"flex-1 overflow-y-auto",children:g.map(N=>(0,h.jsx)(Er,{id:N.id,tableName:N.name},N.id))})}return(0,h.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,h.jsx)(Ci,{name:"Favorites",isExpanded:a,onToggle:()=>l(!a),count:f}),a&&d.map(g=>(0,h.jsx)(Er,{id:g.id,tableName:g.name},g.id)),(0,h.jsx)(Pd,{className:"bg-zinc-800"}),(0,h.jsx)(Ci,{name:"Queries",isExpanded:o,onToggle:()=>u(!o),count:m}),o&&(0,h.jsxs)(h.Fragment,{children:[t.map(g=>{const N=i(g.id),C=N.length;return(0,h.jsxs)("div",{children:[(0,h.jsx)(Ci,{folderId:g.id,name:g.name,isExpanded:g.isExpanded,onToggle:()=>s(g.id),count:C,showContextMenu:!0}),g.isExpanded&&N.map(b=>(0,h.jsx)(Er,{id:b.id,tableName:b.name,isNested:!0,showContextMenu:!0},b.id))]},g.id)}),p.map(g=>(0,h.jsx)(Er,{id:g.id,tableName:g.name,showContextMenu:!0},g.id))]})]})},VA=()=>{const{addQuery:e,addFolder:t}=Mr(),n=qn(),r=(0,E.useRef)(null),[i,s]=Je(ot.SIDEBAR_SEARCH,{defaultValue:""}),a=u=>{s(u.target.value)},l=()=>{const u=e();n({to:"/runner/$queryId",params:{queryId:u}})},o=()=>{const u=Math.random().toString(36).substring(2,15);t({id:u,name:"New Folder",isExpanded:!0,isFavorite:!1})};return(0,h.jsxs)("div",{className:"p-3 space-y-2 border-b border-zinc-800",children:[(0,h.jsxs)("div",{className:"flex gap-2",children:[(0,h.jsxs)(oe,{className:"flex-1 justify-start h-8",onClick:l,children:[(0,h.jsx)(Xt,{className:"size-4"}),"Add Query"]}),(0,h.jsxs)(oe,{className:"flex-1 justify-start h-8",onClick:o,children:[(0,h.jsx)(Ml,{className:"size-4"}),"Add Folder"]})]}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsx)(Ki,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,h.jsx)(bt,{ref:r,placeholder:"Search queries",value:i??"",onChange:a,className:"rounded-sm h-8 pl-8 pr-8"}),(0,h.jsx)(Fn,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]})]})},WA=()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(VA,{}),(0,h.jsx)(YA,{})]}),QA=()=>{const{selectedDatabase:e}=tt(),{mutateAsync:t,isPending:n}=rh({mutationFn:async i=>{const s=(await Xh(i,e)).data.data.schema;return await navigator.clipboard.writeText(s),s}});return{copyTableSchema:async i=>Xe.promise(t(i),{loading:"Copying table schema...",success:"Table schema copied to clipboard",error:s=>s.message||"Failed to copy table schema"}),isCopyingSchema:n}},GA=({tableName:e})=>{const t=qn(),{copyTableSchema:n,isCopyingSchema:r}=QA(),{exportFile:i,isExportingFile:s}=fd(),{deleteTable:a,forceDeleteTable:l,isDeletingTable:o}=_d(),[u,m]=(0,E.useState)(!1),[d,f]=(0,E.useState)(!1),[p,g]=(0,E.useState)([]),N=()=>{navigator.clipboard.writeText(e),Xe.success("Table name copied to clipboard")},C=async()=>{const v=await a(e);v.fkViolation?(g(v.relatedRecords),m(!1),f(!0)):(m(!1),t({to:"/"}))},b=async()=>{await l(e),f(!1),t({to:"/"})},A=()=>{f(!1),g([])};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(ed,{children:[(0,h.jsx)(sd,{children:(0,h.jsx)(oe,{variant:"ghost",size:"icon-sm",children:(0,h.jsx)(fh,{})})}),(0,h.jsx)(Jh,{className:"w-56",align:"start",children:(0,h.jsxs)(id,{children:[(0,h.jsxs)(Nt,{onClick:N,children:[(0,h.jsx)(Th,{className:"size-4"}),"Copy name"]}),(0,h.jsxs)(Nt,{onClick:()=>n(e),disabled:r,children:[(0,h.jsx)(_h,{className:"size-4"}),"Copy table schema"]}),(0,h.jsx)(Fs,{}),(0,h.jsxs)(Nt,{onClick:()=>t({to:"/schema/$table",params:{table:e}}),children:[(0,h.jsx)(Zi,{className:"size-4"}),"Edit table"]}),(0,h.jsxs)(cd,{children:[(0,h.jsxs)(rd,{children:[(0,h.jsx)(ph,{className:"size-4"}),"Export data"]}),(0,h.jsxs)(nd,{children:[(0,h.jsx)(Nt,{onClick:()=>i({tableName:e,format:"csv"}),disabled:s,children:"Export as CSV"}),(0,h.jsx)(Nt,{onClick:()=>i({tableName:e,format:"json"}),disabled:s,children:"Export as JSON"}),(0,h.jsx)(Nt,{onClick:()=>i({tableName:e,format:"xlsx"}),disabled:s,children:"Export as Excel"})]})]}),(0,h.jsx)(Fs,{}),(0,h.jsxs)(Nt,{variant:"destructive",onClick:()=>m(!0),children:[(0,h.jsx)(Xi,{className:"size-4"}),"Delete table"]})]})})]}),(0,h.jsx)(KA,{isOpen:u,onOpenChange:m,tableName:e,onDelete:C,isDeleting:o}),(0,h.jsx)(XA,{isOpen:d,onOpenChange:f,tableName:e,relatedRecords:p,onForceDelete:b,onCancel:A,isDeleting:o})]})},KA=({isOpen:e,onOpenChange:t,tableName:n,onDelete:r,isDeleting:i})=>(0,h.jsx)(On,{open:e,onOpenChange:t,children:(0,h.jsxs)(Pn,{className:"max-w-md",children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Delete Table"}),(0,h.jsxs)(Bn,{children:["Are you sure you want to delete the table"," ",(0,h.jsxs)("span",{className:"font-semibold text-foreground",children:['"',n,'"']}),"? This action cannot be undone and all data will be permanently lost."]})]}),(0,h.jsxs)(Dn,{className:"gap-2",children:[(0,h.jsx)(oe,{variant:"outline",onClick:()=>t(!1),disabled:i,children:"Cancel"}),(0,h.jsx)(oe,{variant:"destructive",onClick:r,disabled:i,children:i?"Deleting...":"Delete Table"})]})]})}),XA=({isOpen:e,onOpenChange:t,tableName:n,relatedRecords:r,onForceDelete:i,onCancel:s,isDeleting:a})=>(0,h.jsx)(On,{open:e,onOpenChange:t,children:(0,h.jsxs)(Pn,{className:"max-w-xl! max-h-[calc(100vh-1rem)]!",children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Cannot Delete - Foreign Key Constraint"}),(0,h.jsxs)(Bn,{children:["The table ",(0,h.jsxs)("span",{className:"font-semibold text-foreground",children:['"',n,'"']})," ","cannot be deleted because it is referenced by records in other tables. You can either cancel the operation or force delete, which will also delete all related records."]})]}),(0,h.jsx)("div",{className:"space-y-4 max-h-64 overflow-y-auto",children:r.map((l,o)=>(0,h.jsxs)("div",{className:"border border-zinc-700 rounded-md p-3",children:[(0,h.jsxs)("div",{className:"font-medium text-sm mb-2",children:["Table: ",(0,h.jsx)("span",{className:"text-primary",children:l.tableName}),(0,h.jsxs)("span",{className:"text-muted-foreground ml-2",children:["(",l.records.length," record",l.records.length!==1?"s":"",")"]})]}),(0,h.jsxs)("div",{className:"text-xs text-muted-foreground mb-2",children:["References column: ",l.columnName]}),(0,h.jsx)("div",{className:"bg-zinc-900 rounded p-2 text-xs overflow-x-auto",children:(0,h.jsxs)("pre",{className:"whitespace-pre-wrap",children:[JSON.stringify(l.records.slice(0,5),null,2),l.records.length>5&&(0,h.jsxs)("div",{className:"text-muted-foreground mt-2",children:["... and ",l.records.length-5," more"]})]})})]},`${l.tableName}-${l.columnName}-${o}`))}),(0,h.jsxs)(Dn,{className:"gap-2",children:[(0,h.jsx)(oe,{variant:"outline",onClick:s,disabled:a,children:"Cancel"}),(0,h.jsx)(oe,{variant:"destructive",onClick:i,disabled:a,children:a?"Deleting...":"Force Delete All"})]})]})}),ZA=({tableName:e,rowCount:t,schemaName:n})=>{const r=Pl({strict:!1}),{pathname:i}=Dr(),s=r.table===e,a=i.startsWith("/schema")?"/schema/$table":"/table/$table";return(0,h.jsx)("li",{className:"relative",children:(0,h.jsxs)(Dl,{to:a,params:{table:e},className:J("w-full flex gap-0.5 px-4 py-1.5 text-sm transition-colors text-left","hover:text-zinc-100 focus:outline-none focus:bg-accent/10 focus:text-zinc-100 justify-start items-center",s?"text-white bg-zinc-800/50":"text-zinc-400"),children:[s&&(0,h.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-accent"}),(0,h.jsxs)("span",{className:"flex-1 truncate",children:[n&&n!=="public"?`${n}.`:"",e]}),(0,h.jsxs)("div",{className:"flex items-center gap-1 h-5",children:[s&&(0,h.jsx)(GA,{tableName:e}),(0,h.jsx)(Fn,{children:t})]})]})})},JA=()=>{const[e]=Je(ot.SIDEBAR_SEARCH,{defaultValue:""}),[t,n]=Je(ot.ACTIVE_SCHEMA,{defaultValue:"all"}),{dbType:r}=tt(),{tablesList:i=[],isLoadingTablesList:s,errorTablesList:a}=ql(),l=(0,E.useMemo)(()=>Array.from(new Set(i.reduce((m,d)=>(d.schemaName&&m.push(d.schemaName),m),[]))).sort(),[i]),o=r==="pg"&&l.length>1,u=i?.filter(m=>{const d=t==="all"||m.schemaName===t,f=m.tableName.toLowerCase().includes(e.toLowerCase());return d&&f});return(0,E.useEffect)(()=>{!o||t==="all"||l.includes(t)||n("all")},[l,t,n,o]),s?(0,h.jsx)("div",{className:"flex-1 h-full overflow-y-auto pb-3 flex items-center justify-center",children:(0,h.jsx)(Gh,{size:"size-6"})}):a?(0,h.jsxs)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:["Error: ",a.message]}):(0,h.jsx)("div",{className:"flex-1 overflow-y-auto pb-3",children:u&&u.length>0?(0,h.jsx)("ul",{children:u?.map(m=>(0,h.jsx)(ZA,{schemaName:m.schemaName,tableName:m.tableName,rowCount:m.rowCount},m.schemaName?`${m.schemaName}.${m.tableName}`:m.tableName))}):e?(0,h.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables found matching"}):(0,h.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables available"})})},e1=()=>{const e=(0,E.useRef)(null),[t,n]=Je(ot.SIDEBAR_SEARCH,{defaultValue:""}),{openOverlay:r}=Yn(),{dbType:i}=tt();return Sd("/",s=>{s.preventDefault(),e.current&&e.current.focus()},{preventDefault:!0}),(0,h.jsx)("div",{className:"px-3 pb-3 pt-2 space-y-2",children:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,h.jsx)(Ki,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,h.jsx)(bt,{ref:e,variant:"outline",placeholder:"Search tables",value:t??"",onChange:s=>n(s.target.value.trim()),className:"rounded-sm h-8 pl-8 pr-8"}),(0,h.jsx)(Fn,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]}),i!=="mongodb"&&(0,h.jsx)(oe,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>r("table-builder.create-table"),"aria-label":"Add table",children:(0,h.jsx)(Xt,{className:"size-4"})})]})})},t1=()=>{const[e,t]=Je(ot.ACTIVE_SCHEMA,{defaultValue:"all"}),{dbType:n}=tt(),{tablesList:r=[]}=ql(),i=(0,E.useMemo)(()=>Array.from(new Set(r.reduce((s,a)=>(a.schemaName&&s.push(a.schemaName),s),[]))).sort(),[r]);return n==="pg"&&i.length>1?(0,h.jsx)("div",{className:"px-3 pt-3",children:(0,h.jsxs)(Qn,{value:e,onValueChange:t,children:[(0,h.jsx)(Vn,{variant:"outline",className:"h-8! w-full justify-between rounded-sm",children:(0,h.jsx)(Wn,{placeholder:"Select schema"})}),(0,h.jsxs)(Gn,{children:[(0,h.jsx)(ct,{value:"all",children:"All schemas"}),i.map(s=>(0,h.jsx)(ct,{value:s,children:s},s))]})]})}):null},Ol=()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(t1,{}),(0,h.jsx)(e1,{}),(0,h.jsx)($l,{className:"flex-1 overflow-y-auto pb-3 block h-full w-full",children:(0,h.jsx)(JA,{})})]});function n1(){const{databases:e,isLoadingDatabases:t,refetchDatabases:n,isRefetchingDatabases:r}=Ed(),{connectionInfo:i,isLoadingConnectionInfo:s}=Cd(),{selectedDatabase:a,setSelectedDatabase:l,dbType:o}=tt(),u=qn(),[m,d]=(0,E.useState)(!1),f=g=>{l(g),u({to:o==="redis"?"/browser":"/table",search:{}})},p=async()=>{await n(),Xe.success("Databases refreshed")};return(0,h.jsx)("div",{className:"mt-auto border-t bg-background",children:(0,h.jsxs)("div",{className:"p-4 space-y-2",children:[(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(dh,{className:"size-4 text-muted-foreground"}),(0,h.jsx)("span",{className:"text-sm font-medium",children:"Database"})]}),(0,h.jsxs)(Ln,{children:[(0,h.jsx)(In,{asChild:!0,children:(0,h.jsx)(oe,{variant:"ghost",size:"icon",className:"size-6 hover:bg-accent",onClick:p,disabled:t||r,children:(0,h.jsx)(Fl,{className:J("size-3.5",(t||r)&&"animate-spin")})})}),(0,h.jsx)(wn,{children:"Refresh databases"})]})]}),(0,h.jsxs)(Qn,{value:a||"",onValueChange:f,children:[(0,h.jsx)(Vn,{className:"h-9 text-xs font-mono w-full",disabled:t||r,children:(0,h.jsx)(Wn,{placeholder:"Select database..."})}),(0,h.jsx)(Gn,{children:e?.map(g=>(0,h.jsx)(ct,{value:g.name,className:"font-mono text-xs",children:g.name},g.name))})]})]}),(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsxs)(oe,{variant:"ghost",className:"w-full hover:bg-accent flex items-center justify-between",onClick:()=>d(!m),disabled:s||r,children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("div",{className:"flex items-center justify-center",children:(0,h.jsxs)("div",{className:"relative flex size-2",children:[(0,h.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),(0,h.jsx)("span",{className:"relative inline-flex rounded-full size-2 bg-green-500"})]})}),(0,h.jsx)("span",{className:"text-xs font-medium text-green-600",children:"Connected"})]}),(0,h.jsx)(Bl,{className:J("size-3 text-muted-foreground transition-transform",m&&"rotate-180")})]}),m&&i&&(0,h.jsxs)("div",{className:"space-y-1.5 p-2 rounded-md bg-muted/30",children:[(0,h.jsxs)("div",{className:"flex justify-between items-center",children:[(0,h.jsx)("span",{className:"text-xs text-muted-foreground",children:"Host"}),(0,h.jsxs)("span",{className:"text-xs font-mono text-foreground",children:[i.host,":",i.port]})]}),(0,h.jsxs)("div",{className:"flex justify-between items-center",children:[(0,h.jsx)("span",{className:"text-xs text-muted-foreground",children:"User"}),(0,h.jsx)("span",{className:"text-xs font-mono text-foreground",children:i.user})]}),(0,h.jsxs)("div",{className:"flex justify-between items-center",children:[(0,h.jsx)("span",{className:"text-xs text-muted-foreground",children:"Databases"}),(0,h.jsx)("span",{className:"text-xs font-mono font-medium text-foreground",children:e?.length||0})]})]})]})]})})}var r1=()=>{const{sidebar:{isPinned:e},toggleSidebarPinned:t}=Pr();return(0,h.jsx)("div",{className:"flex items-center justify-between h-9 border-b border-zinc-800",children:(0,h.jsx)(oe,{variant:"ghost",size:"lg",onClick:t,className:"size-9 flex items-center justify-center transition hover:bg-transparent! focus-visible:ring-0 focus-visible:ring-offset-0",title:e?"Unpin sidebar":"Pin sidebar",children:e?(0,h.jsx)(bh,{className:"size-4"}):(0,h.jsx)(Ch,{className:"size-4"})})})},i1=({children:e})=>{const{sidebar:{width:t,isOpen:n,isPinned:r},setSidebarWidth:i,setSidebarOpen:s}=Pr(),a=(0,E.useRef)(!1),l=(0,E.useRef)(0),o=(0,E.useRef)(0),u=(0,E.useRef)(null),m=(0,E.useRef)(null),d=(0,E.useRef)(B=>{}),f=(0,E.useRef)(()=>{}),p=(0,E.useRef)(B=>{}),g=(0,E.useRef)(()=>{}),N=(0,E.useRef)(()=>{}),C=(0,E.useCallback)(B=>{a.current&&requestAnimationFrame(()=>{const $=B.clientX-l.current,Y=o.current+$;i(Y)})},[i]),b=(0,E.useCallback)(()=>{a.current=!1,Object.assign(document.body.style,{cursor:"",userSelect:""});const B=document.getElementById("resize-overlay");B&&B.remove()},[]),A=(0,E.useCallback)(B=>{B.preventDefault(),a.current=!0,l.current=B.clientX,o.current=t,Object.assign(document.body.style,{cursor:"col-resize",userSelect:"none"});const $=document.createElement("div");$.id="resize-overlay",$.style.cssText="position:fixed;inset:0;z-index:9999;cursor:col-resize;",document.body.appendChild($)},[t]),v=(0,E.useCallback)(()=>{r||s(!0)},[r,s]),w=(0,E.useCallback)(()=>{r||s(!1)},[r,s]),O=(0,E.useCallback)(B=>{r||n||a.current||(B.clientX<=ot.HOVER_ZONE?(u.current&&clearTimeout(u.current),u.current=window.setTimeout(()=>{s(!0)},ot.HOVER_DELAY)):B.clientX>ot.HOVER_ZONE+50&&u.current&&clearTimeout(u.current))},[r,n,s]);d.current=C,f.current=b,p.current=O,g.current=v,N.current=w;const I=B=>{r||s(B)};return(0,E.useEffect)(()=>{const B=S=>d.current(S),$=()=>f.current(),Y=S=>p.current(S);return document.addEventListener("mousemove",B),document.addEventListener("mouseup",$),document.addEventListener("mousemove",Y),()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",Y),u.current&&clearTimeout(u.current)}},[]),(0,E.useEffect)(()=>{const B=m.current;if(!B)return;const $=()=>g.current(),Y=()=>N.current();return B.addEventListener("mouseenter",$),B.addEventListener("mouseleave",Y),()=>{B.removeEventListener("mouseenter",$),B.removeEventListener("mouseleave",Y)}},[]),(0,h.jsxs)(td,{open:n,onOpenChange:I,modal:!1,children:[(0,h.jsx)(Zh,{className:"sr-only",children:"Open Sidebar"}),(0,h.jsx)(ad,{ref:m,side:"left",showCloseButton:!1,isPinned:r,className:J("bg-black border-r border-zinc-800 p-0","transition-transform duration-300 ease-out"),style:{width:`${t}px`},onOpenAutoFocus:B=>B.preventDefault(),children:(0,h.jsxs)("div",{className:"relative h-full flex flex-col",children:[e,(0,h.jsx)("div",{role:"button",tabIndex:0,onMouseDown:A,className:J("absolute top-0 right-0 w-2 h-full cursor-col-resize z-50","hover:bg-blue-500/50 transition-colors group"),title:"Drag to resize",children:(0,h.jsx)("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-2 h-12 bg-blue-500 opacity-0 group-hover:opacity-100 transition-opacity rounded-full"})})]})})]})},s1=["string","hash","list","set","zset","stream"],It=wd(""),a1=()=>{const{closeOverlay:e,isOverlayOpen:t}=Yn(),[n,r]=(0,E.useState)(It),[i,s]=(0,E.useState)("string"),[a,l]=(0,E.useState)(It),[o,u]=(0,E.useState)(It),[m,d]=(0,E.useState)("0"),[f,p]=(0,E.useState)(""),{createKey:g,isPending:N}=Ld(),C=t("redis-browser.create-key"),b=i==="hash"||i==="stream",A=n===null||a===null||b&&o===null,v=async()=>{const w=b?o:It;if(n===null||a===null||w===null)return;let O;switch(i){case"string":O={kind:"string",value:a};break;case"hash":O={kind:"hash",entries:[{field:a,value:w}]};break;case"list":O={kind:"list",entries:[a]};break;case"set":O={kind:"set",members:[a]};break;case"zset":O={kind:"zset",entries:[{member:a,score:Number(m)}]};break;case"stream":O={kind:"stream",id:"*",fields:[{field:a,value:w}]}}await g({key:n,type:i,value:O,ttlMs:f?Number(f)*1e3:null}),r(It),s("string"),l(It),u(It),d("0"),p(""),e("redis-browser.create-key")};return(0,h.jsxs)(Ul,{title:"Create Redis key",description:"Creates the key atomically and never overwrites an existing key.",open:C,onOpenChange:w=>{w||e("redis-browser.create-key")},size:"sm:max-w-md!",headerClassName:"border-b border-border p-4",titleClassName:"text-sm font-medium",contentClassName:"space-y-4 px-4 py-4",children:[(0,h.jsxs)(Td,{className:"gap-4",children:[(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-name",children:"Key"}),(0,h.jsx)(Zr,{id:"redis-key-name",value:n,onChange:r,className:"h-8",placeholder:"cache:user:42"}),(0,h.jsx)(js,{children:"Text, hexadecimal, and Base64 keys are supported."})]}),(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-type",children:"Type"}),(0,h.jsxs)(Qn,{value:i,onValueChange:w=>s(w),children:[(0,h.jsx)(Vn,{id:"redis-key-type",className:"h-8!",children:(0,h.jsx)(Wn,{})}),(0,h.jsx)(Gn,{children:s1.map(w=>(0,h.jsx)(ct,{value:w,children:w},w))})]})]}),(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-first-value",children:i==="hash"||i==="stream"?"Initial field":i==="zset"?"Initial member":"Initial value"}),(0,h.jsx)(Zr,{id:"redis-key-first-value",value:a,onChange:l})]}),(i==="hash"||i==="stream")&&(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-second-value",children:"Initial value"}),(0,h.jsx)(Zr,{id:"redis-key-second-value",value:o,onChange:u})]}),i==="zset"&&(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-score",children:"Score"}),(0,h.jsx)(bt,{id:"redis-key-score",type:"number",value:m,onChange:w=>d(w.target.value),className:"font-mono"})]}),(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-ttl",children:"TTL in seconds"}),(0,h.jsx)(bt,{id:"redis-key-ttl",type:"number",min:1,value:f,onChange:w=>p(w.target.value),placeholder:"Persistent",className:"font-mono h-8"}),(0,h.jsx)(js,{children:"Leave empty to create a persistent key."})]})]}),(0,h.jsxs)("div",{className:"flex justify-end gap-2 border-t border-border pt-4",children:[(0,h.jsx)(oe,{variant:"outline",onClick:()=>e("redis-browser.create-key"),children:"Cancel"}),(0,h.jsx)(oe,{disabled:N||A,onClick:v,children:"Create key"})]})]})},l1=["string","hash","list","set","zset","stream"],o1={string:"STR",hash:"HASH",list:"LIST",set:"SET",zset:"ZSET",stream:"XSTR"},c1=e=>e===-1?"∞":e<0?"gone":e<1e3?`${e}ms`:e<6e4?`${Math.ceil(e/1e3)}s`:e<36e5?`${Math.ceil(e/6e4)}m`:`${Math.ceil(e/36e5)}h`,u1=e=>e===null?"—":e<1024?`${e} B`:`${(e/1024).toFixed(1)} KiB`,h1=(e,t)=>t!==void 0?t||"(empty key)":`0x${Array.from(Rd(e),n=>n.toString(16).padStart(2,"0")).join("")}`,d1=()=>{const{openOverlay:e}=Yn(),[t,n]=Je("key"),[r,i]=Je("search",{defaultValue:""}),[s,a]=(0,E.useState)(r),[l,o]=Je("type",{defaultValue:""}),[u,m]=Je("glob",{defaultValue:"false"}),d=u==="true",f=Od({search:s,type:l,exactPattern:d}),p=(0,E.useMemo)(()=>f.data?.pages.flatMap(b=>b.keys)??[],[f.data]),g=(0,E.useRef)(null),N=ah({count:p.length,getScrollElement:()=>g.current,estimateSize:()=>33,overscan:10}),C=N.getVirtualItems();return(0,E.useEffect)(()=>{const b=window.setTimeout(()=>a(r),250);return()=>window.clearTimeout(b)},[r]),(0,E.useEffect)(()=>{const b=C.at(-1);b&&b.index>=p.length-5&&f.hasNextPage&&!f.isFetchingNextPage&&f.fetchNextPage()},[C,p.length,f.hasNextPage,f.isFetchingNextPage,f.fetchNextPage]),(0,h.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col bg-background font-mono",children:[(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{className:"space-y-2 px-3 pb-3 pt-2",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,h.jsx)(Ki,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,h.jsx)(bt,{variant:"outline",value:r,onChange:b=>i(b.target.value),placeholder:d?"Redis glob pattern":"Find keys","aria-label":"Find Redis keys",className:"h-8 rounded-sm pl-8"})]}),(0,h.jsx)(oe,{variant:"outline",size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>Xe.promise(f.refetch({throwOnError:!0}),{loading:"Refreshing Redis keys...",success:"Redis keys refreshed",error:"Failed to refresh Redis keys"}),disabled:f.isFetching,"aria-label":"Refresh Redis keys",children:(0,h.jsx)(Fl,{className:J(f.isFetching&&"animate-spin")})}),(0,h.jsx)(oe,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>e("redis-browser.create-key"),"aria-label":"Create Redis key",children:(0,h.jsx)(Xt,{})})]}),(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsxs)(Qn,{value:l||"all",onValueChange:b=>o(b==="all"?"":b),children:[(0,h.jsx)(Vn,{variant:"outline","aria-label":"Filter Redis key type",className:"h-8! min-w-0 flex-1 justify-between rounded-sm",children:(0,h.jsx)(Wn,{})}),(0,h.jsxs)(Gn,{children:[(0,h.jsx)(ct,{value:"all",children:"All types"}),l1.map(b=>(0,h.jsx)(ct,{value:b,children:b},b))]})]}),(0,h.jsxs)(Id,{variant:"outline",size:"lg",pressed:d,onPressedChange:b=>m(b?"true":"false"),className:"shrink-0 rounded-sm px-2 text-xs/relaxed uppercase","aria-label":"Use Redis glob pattern",children:[(0,h.jsx)(yh,{className:"size-4"})," Glob"]})]})]}),(0,h.jsxs)("div",{className:"flex h-6 items-center justify-between px-4 text-[9px] uppercase tracking-wider text-muted-foreground",children:[(0,h.jsxs)("span",{children:[p.length," loaded"]}),(0,h.jsx)("span",{children:f.dataUpdatedAt>0?new Date(f.dataUpdatedAt).toLocaleTimeString():"not scanned"})]})]}),(0,h.jsxs)("div",{ref:g,className:"min-h-0 flex-1 overflow-auto",children:[f.isLoading?(0,h.jsx)("div",{className:"px-3 py-4 text-xs text-muted-foreground",children:"Scanning keyspace…"}):p.length===0?(0,h.jsxs)("div",{className:"flex min-h-32 flex-col items-center justify-center gap-2 px-4 text-center text-muted-foreground",children:[(0,h.jsx)(uh,{className:"size-4"}),(0,h.jsx)("span",{className:"text-xs",children:"No keys in this scan."}),(0,h.jsxs)(oe,{variant:"outline",size:"sm",onClick:()=>e("redis-browser.create-key"),children:[(0,h.jsx)(Xt,{})," Create key"]})]}):(0,h.jsx)("div",{className:"relative w-full",style:{height:`${N.getTotalSize()}px`},children:C.map(b=>{const A=p[b.index],v=A.key.base64||"-",w=h1(A.key.base64,A.key.utf8);return(0,h.jsxs)(oe,{variant:"ghost",onClick:()=>n(v),className:J("absolute left-0 top-0 h-auto w-full justify-start gap-2 rounded-none px-4 py-1.5 text-sm font-normal transition-colors",t===v?"bg-zinc-800/50 text-white hover:!bg-zinc-800/50 dark:hover:!bg-zinc-800/50 before:absolute before:inset-y-0 before:left-0 before:w-1 before:bg-accent":"text-zinc-400 hover:!bg-transparent hover:text-zinc-100 dark:hover:!bg-transparent"),style:{transform:`translateY(${b.start}px)`},title:w,children:[(0,h.jsx)("span",{className:"min-w-0 flex-1 truncate text-left text-current",children:w}),(0,h.jsx)(dd,{variant:"outline",className:"h-4 w-10 shrink-0 justify-center rounded-sm px-1 text-[8px] font-normal text-muted-foreground",children:o1[A.type]??"?"}),(0,h.jsxs)("span",{className:"shrink-0 text-[9px] text-muted-foreground",children:[u1(A.memoryBytes)," ·"," ",A.ttlMs===-1?(0,h.jsx)(hh,{className:"inline size-3 align-[-2px]","aria-label":"No expiry"}):c1(A.ttlMs)]})]},`${v}-${b.index}`)})}),f.isFetchingNextPage&&(0,h.jsx)("div",{className:"px-2 py-1 text-center text-[10px] text-muted-foreground",children:"Scanning more…"})]}),(0,h.jsx)(a1,{})]})},m1=()=>{const{pathname:e}=Dr(),t=e.split("/")[1],{dbType:n}=tt(),r=(0,E.useMemo)(()=>{if(n==="redis"&&t!=="runner")return(0,h.jsx)(d1,{});switch(t){case"":case"table":case"schema":return(0,h.jsx)(Ol,{});case"runner":return(0,h.jsx)(WA,{});default:return(0,h.jsx)(Ol,{})}},[n,t]);return(0,h.jsxs)(i1,{children:[(0,h.jsx)(r1,{}),r,(0,h.jsx)(n1,{})]})},U1=Gi({component:()=>f1});function f1(){const{dbType:e}=tt(),{pathname:t}=Dr(),n=t.split("/")[1],{sidebar:{isPinned:r,width:i}}=Pr();return e==="redis"&&n!=="browser"&&n!=="runner"?(0,h.jsx)(Ps,{to:"/browser"}):e!=="redis"&&n==="browser"?(0,h.jsx)(Ps,{to:"/"}):(0,h.jsxs)("div",{className:"bg-zinc-950 w-dvw flex h-dvh max-h-dvh overflow-hidden relative",children:[(0,h.jsx)(m1,{}),(0,h.jsxs)("div",{className:"flex-1 flex flex-col h-full overflow-hidden ",style:{marginLeft:r?`${i}px`:"0"},children:[(0,h.jsx)(qA,{}),(0,h.jsx)(ih,{})]})]})}export{K_ as a,f1 as component,je as i,OC as n,H1 as r,U1 as t};
131
+ `})}return n},$_=/([\\`*_~[\]|])/g,q_=e=>e.replace($_,"\\$1"),Y_=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(s,a,o,l)=>a+q_(o).replace(/\n\n/g,"&#10;&#10;")+l)}return n},zu=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(zu).join(""):"",V_=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));tt(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=zu(r);r.children=i?[{type:"text",value:i}]:[]}})},W_=()=>e=>{tt(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},Q_=/^[ \t]*<[\w!/?-]/,G_=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,K_=e=>typeof e!="string"||e.length===0||!Q_.test(e)?e:e.replace(G_,"$1"),_o,Ao,No,vo,kr={...wt,protocols:{...wt.protocols,href:[...(Ao=(_o=wt.protocols)==null?void 0:_o.href)!=null?Ao:[],"tel"]},attributes:{...wt.attributes,code:[...(vo=(No=wt.attributes)==null?void 0:No.code)!=null?vo:[],"metastring"]}},Gi={raw:Ri,sanitize:[Zl,kr],harden:[Wd,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},X_={gfm:[d0,{}],codeMeta:W_},So=Object.values(Gi),Z_=Object.values(X_),J_={block:" ▋",circle:" ●"},$u=["github-light","github-dark"],qu={enabled:!0},je=(0,E.createContext)({shikiTheme:$u,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:qu}),Yu=(0,E.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:s,animatePlugin:a,...o})=>{if(a){let m=a.getLastRenderCharCount();a.setPrevContentLength(m)}let l=typeof e=="string"&&n?K_(e):e,u=(0,h.jsx)(Uu,{...o,children:l});return(0,h.jsx)(lu.Provider,{value:i,children:s?(0,h.jsx)("div",{dir:s,style:{display:"contents"},children:u}):u})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Yu.displayName="Block";var Ds=(0,E.memo)(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:s,rehypePlugins:a=So,remarkPlugins:o=Z_,className:l,shikiTheme:u=$u,mermaid:m,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:g=Yu,parseMarkdownIntoBlocksFn:N=U_,caret:C,plugins:b,remend:A,linkSafety:v=qu,lineNumbers:w=!0,allowedTags:O,literalTagContent:I,translations:B,icons:$,prefix:Y,onAnimationStart:S,onAnimationEnd:H,...q})=>{let Z=(0,E.useId)(),[ie,G]=(0,E.useTransition)(),U=(0,E.useMemo)(()=>PC(Y),[Y]),P=(0,E.useRef)(null),V=(0,E.useRef)(S),X=(0,E.useRef)(H);V.current=S,X.current=H,(0,E.useEffect)(()=>{var se,de,we;if(t==="static")return;let Qe=P.current;if(P.current=f,Qe===null){f&&((se=V.current)==null||se.call(V));return}f&&!Qe?(de=V.current)==null||de.call(V):!f&&Qe&&((we=X.current)==null||we.call(X))},[f,t]);let y=(0,E.useMemo)(()=>O?Object.keys(O):[],[O]),ce=(0,E.useMemo)(()=>{if(typeof e!="string")return"";let se=t==="streaming"&&r?Cx(e,A):e;return I&&I.length>0&&(se=Y_(se,I)),y.length>0&&(se=z_(se,y)),se},[e,t,r,A,y,I]),Q=(0,E.useMemo)(()=>N(ce),[ce,N]),[_,De]=(0,E.useState)(Q);(0,E.useEffect)(()=>{t==="streaming"&&!He?G(()=>{De(Q)}):De(Q)},[Q,t]);let Te=t==="streaming"?_:Q,ge=(0,E.useMemo)(()=>n==="auto"?Te.map(po):void 0,[Te,n]),At=(0,E.useMemo)(()=>Te.map((se,de)=>`${Z}-${de}`),[Te.length,Z]),Pe=(0,E.useMemo)(()=>p===!0?"true":p?JSON.stringify(p):"",[p]),He=(0,E.useMemo)(()=>Pe?Pe==="true"?$i():$i(p):null,[Pe]),st=(0,E.useMemo)(()=>{var se,de;return{shikiTheme:(de=(se=b?.code)==null?void 0:se.getThemes())!=null?de:u,controls:d,isAnimating:f,lineNumbers:w,mode:t,mermaid:m,linkSafety:v}},[u,d,f,w,t,m,v,b?.code]),ir=(0,E.useMemo)(()=>B?JSON.stringify(B):"",[B]),sr=(0,E.useMemo)(()=>({...du,...B}),[ir]),ar=(0,E.useMemo)(()=>{let{inlineCode:se,...de}=s??{},we={...T_,...de};if(se){let Qe=we.code;we.code=Nt=>"data-block"in Nt?Qe?(0,E.createElement)(Qe,Nt):null:(0,E.createElement)(se,Nt)}return we},[s]),or=(0,E.useMemo)(()=>{let se=[];return b!=null&&b.cjk&&(se=[...se,...b.cjk.remarkPluginsBefore]),se=[...se,...o],b!=null&&b.cjk&&(se=[...se,...b.cjk.remarkPluginsAfter]),b!=null&&b.math&&(se=[...se,b.math.remarkPlugin]),se},[o,b?.math,b?.cjk]),hn=(0,E.useMemo)(()=>{var se;let de=a;if(O&&Object.keys(O).length>0&&a===So){let we={...kr,tagNames:[...(se=kr.tagNames)!=null?se:[],...Object.keys(O)],attributes:{...kr.attributes,...O}};de=[Gi.raw,[Zl,we],Gi.harden]}return I&&I.length>0&&(de=[...de,[V_,I]]),b!=null&&b.math&&(de=[...de,b.math.rehypePlugin]),He&&f&&(de=[...de,He.rehypePlugin]),de},[a,b?.math,He,f,O,I]),Ut=(0,E.useMemo)(()=>{if(!f||Te.length===0)return!1;let se=Te.at(-1);return go(se)||C_(se)},[f,Te]),lr=(0,E.useMemo)(()=>C&&f&&!Ut?{"--streamdown-caret":`"${J_[C]}"`}:void 0,[C,f,Ut]);return t==="static"?(0,h.jsx)(Yi.Provider,{value:sr,children:(0,h.jsx)(Vi.Provider,{value:b??null,children:(0,h.jsx)(je.Provider,{value:st,children:(0,h.jsx)(co,{icons:$,children:(0,h.jsx)(qi.Provider,{value:U,children:(0,h.jsx)("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",l),dir:n==="auto"?po(ce):n,children:(0,h.jsx)(Uu,{components:ar,rehypePlugins:hn,remarkPlugins:or,...q,children:ce})})})})})})}):(0,h.jsx)(Yi.Provider,{value:sr,children:(0,h.jsx)(Vi.Provider,{value:b??null,children:(0,h.jsx)(je.Provider,{value:st,children:(0,h.jsx)(co,{icons:$,children:(0,h.jsx)(qi.Provider,{value:U,children:(0,h.jsxs)("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&!Ut?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,l),style:lr,children:[Te.length===0&&C&&f&&(0,h.jsx)("span",{}),Te.map((se,de)=>{var we;let Qe=de===Te.length-1,Nt=f&&Qe&&go(se);return(0,h.jsx)(g,{animatePlugin:He,components:ar,content:se,dir:(we=ge?.[de])!=null?we:n!=="auto"?n:void 0,index:de,isIncomplete:Nt,rehypePlugins:hn,remarkPlugins:or,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...q},At[de])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Ds.displayName="Streamdown";var eA=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:o=!1})=>{let{RotateCcwIcon:l,ZoomInIcon:u,ZoomOutIcon:m}=We(),d=ne(),f=(0,E.useRef)(null),p=(0,E.useRef)(null),[g,N]=(0,E.useState)(a),[C,b]=(0,E.useState)({x:0,y:0}),[A,v]=(0,E.useState)(!1),[w,O]=(0,E.useState)({x:0,y:0}),[I,B]=(0,E.useState)({x:0,y:0}),$=(0,E.useCallback)(U=>{N(P=>Math.max(n,Math.min(r,P+U)))},[n,r]),Y=(0,E.useCallback)(()=>{$(i)},[$,i]),S=(0,E.useCallback)(()=>{$(-i)},[$,i]),H=(0,E.useCallback)(()=>{N(a),b({x:0,y:0})},[a]),q=(0,E.useCallback)(U=>{U.preventDefault();let P=U.deltaY>0?-i:i;$(P)},[$,i]),Z=(0,E.useCallback)(U=>{if(U.button!==0||U.isPrimary===!1)return;v(!0),O({x:U.clientX,y:U.clientY}),B(C);let P=U.currentTarget;P instanceof HTMLElement&&P.setPointerCapture(U.pointerId)},[C]),ie=(0,E.useCallback)(U=>{if(!A)return;U.preventDefault();let P=U.clientX-w.x,V=U.clientY-w.y;b({x:I.x+P,y:I.y+V})},[A,w,I]),G=(0,E.useCallback)(U=>{v(!1);let P=U.currentTarget;P instanceof HTMLElement&&P.releasePointerCapture(U.pointerId)},[]);return(0,E.useEffect)(()=>{let U=f.current;if(U)return U.addEventListener("wheel",q,{passive:!1}),()=>{U.removeEventListener("wheel",q)}},[q]),(0,E.useEffect)(()=>{let U=p.current;if(U&&A)return document.body.style.userSelect="none",U.addEventListener("pointermove",ie,{passive:!1}),U.addEventListener("pointerup",G),U.addEventListener("pointercancel",G),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",ie),U.removeEventListener("pointerup",G),U.removeEventListener("pointercancel",G)}},[A,ie,G]),(0,h.jsxs)("div",{className:d("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:A?"grabbing":"grab"},children:[s?(0,h.jsxs)("div",{className:d("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,h.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=r,onClick:Y,title:"Zoom in",type:"button",children:(0,h.jsx)(u,{size:16})}),(0,h.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=n,onClick:S,title:"Zoom out",type:"button",children:(0,h.jsx)(m,{size:16})}),(0,h.jsx)("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:H,title:"Reset zoom and pan",type:"button",children:(0,h.jsx)(l,{size:16})})]}):null,(0,h.jsx)("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Z,ref:p,role:"application",style:{transform:`translate(${C.x}px, ${C.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},tA=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let s=ne(),[a,o]=(0,E.useState)(null),[l,u]=(0,E.useState)(!1),[m,d]=(0,E.useState)(""),[f,p]=(0,E.useState)(""),[g,N]=(0,E.useState)(0),{mermaid:C}=(0,E.useContext)(je),b=Rs(),A=C?.errorComponent,{shouldRender:v,containerRef:w}=CC({immediate:r});if((0,E.useEffect)(()=>{if(v){if(!b){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),u(!0);let I=b.getMermaid(n),B=e.split("").reduce((S,H)=>(S<<5)-S+H.charCodeAt(0)|0,0),$=`mermaid-${Math.abs(B)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:Y}=await I.render($,e);d(Y),p(Y)}catch(I){if(!(f||m)){let B=I instanceof Error?I.message:"Failed to render Mermaid chart";o(B)}}finally{u(!1)}})()}},[e,n,g,v,b]),!(v||m||f))return(0,h.jsx)("div",{className:s("my-4 min-h-[200px]",t),ref:w});if(l&&!m&&!f)return(0,h.jsx)("div",{className:s("my-4 flex justify-center p-4",t),ref:w,children:(0,h.jsxs)("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[(0,h.jsx)("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,h.jsx)("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(a&&!m&&!f){let I=()=>N(B=>B+1);return A?(0,h.jsx)("div",{ref:w,children:(0,h.jsx)(A,{chart:e,error:a,retry:I})}):(0,h.jsxs)("div",{className:s("rounded-md bg-red-50 p-4",t),ref:w,children:[(0,h.jsxs)("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),(0,h.jsxs)("details",{className:s("mt-2"),children:[(0,h.jsx)("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,h.jsx)("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let O=m||f;return(0,h.jsx)("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:w,children:(0,h.jsx)(eA,{className:s(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,h.jsx)("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:O},role:"img"})})})},Vu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Io=E.createContext&&E.createContext(Vu),nA=["attr","size","title"];function rA(e,t){if(e==null)return{};var n,r,i=iA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function iA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wr.apply(null,arguments)}function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wo(Object(n),!0).forEach(function(r){sA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sA(e,t,n){return(t=aA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aA(e){var t=oA(e,"string");return typeof t=="symbol"?t:t+""}function oA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wu(e){return e&&e.map((t,n)=>E.createElement(t.tag,Lr({key:n},t.attr),Wu(t.child)))}function lA(e){return t=>E.createElement(cA,wr({attr:Lr({},e.attr)},t),Wu(e.child))}function cA(e){var t=n=>{var{attr:r,size:i,title:s}=e,a=rA(e,nA),o=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),E.createElement("svg",wr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Lr(Lr({color:e.color||n.color},n.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),s&&E.createElement("title",null,s),e.children)};return Io!==void 0?E.createElement(Io.Consumer,null,n=>t(n)):t(Vu)}function uA(e){return lA({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"},child:[]},{tag:"path",attr:{d:"M9 18c-4.51 2-5-2-7-2"},child:[]}]})(e)}var hA={damping:.7,stiffness:.05,mass:1.25},dA=70,mA=1e3/60,fA=350,Xr=!1;globalThis.document?.addEventListener("mousedown",()=>{Xr=!0});globalThis.document?.addEventListener("mouseup",()=>{Xr=!1});globalThis.document?.addEventListener("click",()=>{Xr=!1});var pA=(e={})=>{const[t,n]=(0,E.useState)(!1),[r,i]=(0,E.useState)(e.initial!==!1),[s,a]=(0,E.useState)(!1),o=(0,E.useRef)(null);o.current=e;const l=(0,E.useCallback)(()=>{if(!Xr)return!1;const A=window.getSelection();if(!A||!A.rangeCount)return!1;const v=A.getRangeAt(0);return v.commonAncestorContainer.contains(C.current)||C.current?.contains(v.commonAncestorContainer)},[]),u=(0,E.useCallback)(A=>{d.isAtBottom=A,i(A)},[]),m=(0,E.useCallback)(A=>{d.escapedFromLock=A,n(A)},[]),d=(0,E.useMemo)(()=>{let A;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return C.current?.scrollTop??0},set scrollTop(v){if(C.current){const{scrollBehavior:w}=getComputedStyle(C.current);w!=="auto"&&(C.current.style.scrollBehavior="auto"),C.current.scrollTop=v,d.ignoreScrollToTop=C.current.scrollTop,w!=="auto"&&(C.current.style.scrollBehavior=w)}},get targetScrollTop(){return!C.current||!b.current?0:C.current.scrollHeight-1-C.current.clientHeight},get calculatedTargetScrollTop(){if(!C.current||!b.current)return 0;const{targetScrollTop:v}=this;if(!e.targetScrollTop)return v;if(A?.targetScrollTop===v)return A.calculatedScrollTop;const w=Math.max(Math.min(e.targetScrollTop(v,{scrollElement:C.current,contentElement:b.current}),v),0);return A={targetScrollTop:v,calculatedScrollTop:w},requestAnimationFrame(()=>{A=void 0}),w},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=dA}}},[]),f=(0,E.useCallback)((A={})=>{typeof A=="string"&&(A={animation:A}),A.preserveScrollPosition||u(!0);const v=Date.now()+(Number(A.wait)||0),w=Ci(o.current,A.animation),{ignoreEscapes:O=!1}=A;let I,B=d.calculatedTargetScrollTop;A.duration instanceof Promise?A.duration.finally(()=>{I=Date.now()}):I=v+(A.duration??0);const $=async()=>{const Y=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:S}=d,H=performance.now(),q=(H-(d.lastTick??H))/mA;if(d.animation||(d.animation={behavior:w,promise:Y,ignoreEscapes:O}),d.animation.behavior===w&&(d.lastTick=H),l()||v>Date.now())return $();if(S<Math.min(B,d.calculatedTargetScrollTop)){if(d.animation?.behavior===w){if(w==="instant")return d.scrollTop=d.calculatedTargetScrollTop,$();d.velocity=(w.damping*d.velocity+w.stiffness*d.scrollDifference)/w.mass,d.accumulated+=d.velocity*q,d.scrollTop+=d.accumulated,d.scrollTop!==S&&(d.accumulated=0)}return $()}return I>Date.now()?(B=d.calculatedTargetScrollTop,$()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Ci(o.current,o.current.resize),ignoreEscapes:O,duration:Math.max(0,I-Date.now())||void 0}):d.isAtBottom)});return Y.then(S=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),S))};return A.wait!==!0&&(d.animation=void 0),d.animation?.behavior===w?d.animation.promise:$()},[u,l,d]),p=(0,E.useCallback)(()=>{m(!0),u(!1)},[m,u]),g=(0,E.useCallback)(({target:A})=>{if(A!==C.current)return;const{scrollTop:v,ignoreScrollToTop:w}=d;let{lastScrollTop:O=v}=d;d.lastScrollTop=v,d.ignoreScrollToTop=void 0,w&&w>v&&(O=w),a(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||v===w)return;if(l()){m(!0),u(!1);return}const I=v>O,B=v<O;if(d.animation?.ignoreEscapes){d.scrollTop=O;return}B&&(m(!0),u(!1)),I&&m(!1),!d.escapedFromLock&&d.isNearBottom&&u(!0)},1)},[m,u,l,d]),N=(0,E.useCallback)(({target:A,deltaY:v})=>{let w=A;for(;!["scroll","auto"].includes(getComputedStyle(w).overflow);){if(!w.parentElement)return;w=w.parentElement}w===C.current&&v<0&&C.current.scrollHeight>C.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),u(!1))},[m,u,d]),C=Lo(A=>{C.current?.removeEventListener("scroll",g),C.current?.removeEventListener("wheel",N),A?.addEventListener("scroll",g,{passive:!0}),A?.addEventListener("wheel",N,{passive:!0})},[]),b=Lo(A=>{if(d.resizeObserver?.disconnect(),!A)return;let v;d.resizeObserver=new ResizeObserver(([w])=>{const{height:O}=w.contentRect,I=O-(v??O);if(d.resizeDifference=I,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),a(d.isNearBottom),I>=0){const B=Ci(o.current,v?o.current.resize:o.current.initial);f({animation:B,wait:!0,preserveScrollPosition:!0,duration:B==="instant"?void 0:fA})}else d.isNearBottom&&(m(!1),u(!0));v=O,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===I&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(A)},[]);return{contentRef:b,scrollRef:C,scrollToBottom:f,stopScroll:p,isAtBottom:r||s,isNearBottom:s,escapedFromLock:t,state:d}};function Lo(e,t){const n=(0,E.useCallback)(r=>(n.current=r,e(r)),t);return n}var yi=new Map;function Ci(...e){const t={...hA};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return yi.has(r)||yi.set(r,Object.freeze(t)),n?"instant":yi.get(r)}var Qu=(0,E.createContext)(null),gA=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Rr({instance:e,children:t,resize:n,initial:r,mass:i,damping:s,stiffness:a,targetScrollTop:o,contextRef:l,...u}){const m=(0,E.useRef)(null),d=E.useCallback((O,I)=>(w?.targetScrollTop??o)?.(O,I)??O,[o]),f=pA({mass:i,damping:s,stiffness:a,resize:n,initial:r,targetScrollTop:d}),{scrollRef:p,contentRef:g,scrollToBottom:N,stopScroll:C,isAtBottom:b,escapedFromLock:A,state:v}=e??f,w=(0,E.useMemo)(()=>({scrollToBottom:N,stopScroll:C,scrollRef:p,isAtBottom:b,escapedFromLock:A,contentRef:g,state:v,get targetScrollTop(){return m.current},set targetScrollTop(O){m.current=O}}),[N,b,g,p,C,A,v]);return(0,E.useImperativeHandle)(l,()=>w,[w]),gA(()=>{p.current&&getComputedStyle(p.current).overflow==="visible"&&(p.current.style.overflow="auto")},[]),E.createElement(Qu.Provider,{value:w},E.createElement("div",{...u},typeof t=="function"?t(w):t))}(function(e){function t({children:n,scrollClassName:r,...i}){const s=Gu();return E.createElement("div",{ref:s.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},E.createElement("div",{...i,ref:s.contentRef},typeof n=="function"?n(s):n))}e.Content=t})(Rr||(Rr={}));function Gu(){const e=(0,E.useContext)(Qu);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}var EA=({className:e,...t})=>(0,h.jsx)(Rr,{className:J("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),TA=({className:e,...t})=>(0,h.jsx)(Rr.Content,{className:J("flex flex-col gap-8 p-4",e),...t}),bA=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:r}=Gu(),i=(0,E.useCallback)(()=>{r()},[r]);return!n&&(0,h.jsx)(le,{className:J("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:(0,h.jsx)(Nh,{className:"size-4"})})},Ro=[{variant:"shine",component:({children:e,className:t,...n})=>(0,h.jsx)("span",{...n,className:J("bg-[linear-gradient(110deg,#bfbfbf,35%,#000,50%,#bfbfbf,75%,#bfbfbf)] dark:bg-[linear-gradient(110deg,#404040,35%,#fff,50%,#404040,75%,#404040)]","bg-size-[200%_100%] bg-clip-text text-transparent","animate-shine",t),children:e})}];function xA({variant:e="shine",className:t,...n}){const r=Ro.find(i=>i.variant===e)?.component||Ro[0].component;return(0,h.jsx)(qh,{className:J("font-medium text-sm"),children:(0,h.jsx)(r,{...n,className:t})})}var Oo=({className:e,from:t,...n})=>(0,h.jsx)("div",{className:J("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),Do=({children:e,className:t,...n})=>(0,h.jsx)("div",{className:J("is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e}),Ku=(0,E.createContext)(null),kA=()=>{const e=(0,E.use)(Ku);if(!e)throw new Error("MessageBranch components must be used within MessageBranch");return e},Po=({defaultBranch:e=0,onBranchChange:t,className:n,...r})=>{const[i,s]=(0,E.useState)(e),[a,o]=(0,E.useState)([]),l=f=>{s(f),t?.(f)},u=()=>{const f=i>0?i-1:a.length-1;l(f)},m=()=>{const f=i<a.length-1?i+1:0;l(f)},d={currentBranch:i,totalBranches:a.length,goToPrevious:u,goToNext:m,branches:a,setBranches:o};return(0,h.jsx)(Ku.Provider,{value:d,children:(0,h.jsx)("div",{className:J("grid w-full gap-2 [&>div]:pb-0",n),...r})})},Mo=({children:e,...t})=>{const{currentBranch:n,setBranches:r,branches:i}=kA(),s=Array.isArray(e)?e:[e];return(0,E.useEffect)(()=>{i.length!==s.length&&r(s)},[s,i,r]),s.map((a,o)=>(0,h.jsx)("div",{className:J("grid gap-2 overflow-hidden [&>div]:pb-0",o===n?"block":"hidden"),...t,children:a},a.key))},Xu=(0,E.memo)(({className:e,...t})=>(0,h.jsx)(Ds,{className:J("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Xu.displayName="MessageResponse";var yA="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",CA=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=yA[n[e]&63];return t},_A=(0,E.createContext)(null),AA=(0,E.createContext)(null),Zu=()=>(0,E.useContext)(_A),NA=()=>(0,E.useContext)(AA),Ju=(0,E.createContext)(null),vA=()=>{const e=NA(),t=(0,E.use)(Ju),n=e??t;if(!n)throw new Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return n},SA=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:i,maxFiles:s,maxFileSize:a,onError:o,onSubmit:l,children:u,...m})=>{const d=Zu(),f=!!d,p=(0,E.useRef)(null),g=(0,E.useRef)(null),[N,C]=(0,E.useState)([]),b=f?d.attachments.files:N,A=(0,E.useRef)(b);A.current=b;const v=(0,E.useCallback)(()=>{p.current?.click()},[]),w=(0,E.useCallback)(P=>!t||t.trim()===""?!0:t.split(",").map(V=>V.trim()).filter(Boolean).some(V=>{if(V.endsWith("/*")){const X=V.slice(0,-1);return P.type.startsWith(X)}return P.type===V}),[t]),O=(0,E.useCallback)(P=>{const V=Array.from(P),X=V.filter(Q=>w(Q));if(V.length&&X.length===0){o?.({code:"accept",message:"No files match the accepted types."});return}const y=Q=>a?Q.size<=a:!0,ce=X.filter(y);if(X.length>0&&ce.length===0){o?.({code:"max_file_size",message:"All files exceed the maximum size."});return}C(Q=>{const _=typeof s=="number"?Math.max(0,s-Q.length):void 0,De=typeof _=="number"?ce.slice(0,_):ce;typeof _=="number"&&ce.length>_&&o?.({code:"max_files",message:"Too many files. Some were not added."});const Te=[];for(const ge of De)Te.push({id:CA(),type:"file",url:URL.createObjectURL(ge),mediaType:ge.type,filename:ge.name});return Q.concat(Te)})},[w,s,a,o]),I=(0,E.useCallback)(P=>C(V=>{const X=V.find(y=>y.id===P);return X?.url&&URL.revokeObjectURL(X.url),V.filter(y=>y.id!==P)}),[]),B=(0,E.useCallback)(()=>C(P=>{for(const V of P)V.url&&URL.revokeObjectURL(V.url);return[]}),[]),$=f?d.attachments.add:O,Y=f?d.attachments.remove:I,S=f?d.attachments.clear:B,H=f?d.attachments.openFileDialog:v;(0,E.useEffect)(()=>{f&&d.__registerFileInput(p,()=>p.current?.click())},[f,d]),(0,E.useEffect)(()=>{i&&p.current&&b.length===0&&(p.current.value="")},[b,i]),(0,E.useEffect)(()=>{const P=g.current;if(!P||r)return;const V=y=>{y.dataTransfer?.types?.includes("Files")&&y.preventDefault()},X=y=>{y.dataTransfer?.types?.includes("Files")&&y.preventDefault(),y.dataTransfer?.files&&y.dataTransfer.files.length>0&&$(y.dataTransfer.files)};return P.addEventListener("dragover",V),P.addEventListener("drop",X),()=>{P.removeEventListener("dragover",V),P.removeEventListener("drop",X)}},[$,r]),(0,E.useEffect)(()=>{if(!r)return;const P=X=>{X.dataTransfer?.types?.includes("Files")&&X.preventDefault()},V=X=>{X.dataTransfer?.types?.includes("Files")&&X.preventDefault(),X.dataTransfer?.files&&X.dataTransfer.files.length>0&&$(X.dataTransfer.files)};return document.addEventListener("dragover",P),document.addEventListener("drop",V),()=>{document.removeEventListener("dragover",P),document.removeEventListener("drop",V)}},[$,r]),(0,E.useEffect)(()=>()=>{if(!f)for(const P of A.current)P.url&&URL.revokeObjectURL(P.url)},[f]);const q=P=>{P.currentTarget.files&&$(P.currentTarget.files),P.currentTarget.value=""},Z=async P=>{try{const V=await(await fetch(P)).blob();return new Promise(X=>{const y=new FileReader;y.onloadend=()=>X(y.result),y.onerror=()=>X(null),y.readAsDataURL(V)})}catch{return null}},ie=(0,E.useMemo)(()=>({files:b.map(P=>({...P,id:P.id})),add:$,remove:Y,clear:S,openFileDialog:H,fileInputRef:p}),[b,$,Y,S,H]),G=P=>{P.preventDefault();const V=P.currentTarget,X=f?d.textInput.value:new FormData(V).get("message")||"";f||V.reset(),Promise.all(b.map(async({id:y,...ce})=>{if(ce.url?.startsWith("blob:")){const Q=await Z(ce.url);return{...ce,url:Q??ce.url}}return ce})).then(y=>{try{const ce=l({text:X,files:y},P);ce instanceof Promise?ce.then(()=>{S(),f&&d.textInput.clear()}).catch(()=>{}):(S(),f&&d.textInput.clear())}catch{}}).catch(()=>{})},U=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:q,ref:p,title:"Upload files",type:"file"}),(0,h.jsx)("form",{className:J("w-full",e),onSubmit:G,ref:g,...m,children:(0,h.jsx)(hd,{className:"overflow-hidden",children:u})})]});return f?U:(0,h.jsx)(Ju.Provider,{value:ie,children:U})},IA=({className:e,...t})=>(0,h.jsx)("div",{className:J("contents",e),...t}),wA=({onChange:e,className:t,placeholder:n="What would you like to know?",...r})=>{const i=Zu(),s=vA(),[a,o]=(0,E.useState)(!1),l=d=>{if(d.key==="Enter"){if(a||d.nativeEvent.isComposing||d.shiftKey)return;d.preventDefault();const f=d.currentTarget.form;if(f?.querySelector('button[type="submit"]')?.disabled)return;f?.requestSubmit()}if(d.key==="Backspace"&&d.currentTarget.value===""&&s.files.length>0){d.preventDefault();const f=s.files.at(-1);f&&s.remove(f.id)}},u=d=>{const f=d.clipboardData?.items;if(!f)return;const p=[];for(const g of f)if(g.kind==="file"){const N=g.getAsFile();N&&p.push(N)}p.length>0&&(d.preventDefault(),s.add(p))},m=i?{value:i.textInput.value,onChange:d=>{i.textInput.setInput(d.currentTarget.value),e?.(d)}}:{onChange:e};return(0,h.jsx)(dd,{className:J("field-sizing-content max-h-48 min-h-16",t),name:"message",onCompositionEnd:()=>o(!1),onCompositionStart:()=>o(!0),onKeyDown:l,onPaste:u,placeholder:n,...r,...m})},LA=({className:e,...t})=>(0,h.jsx)(pd,{align:"block-end",className:J("justify-between justify-end gap-1",e),...t}),RA=({className:e,variant:t="default",size:n="icon-sm",status:r,children:i,...s})=>{let a=(0,h.jsx)(gh,{className:"size-4"});return r==="submitted"?a=(0,h.jsx)(Bh,{className:"size-4 animate-spin"}):r==="streaming"?a=(0,h.jsx)(Ph,{className:"size-4"}):r==="error"&&(a=(0,h.jsx)(Oh,{className:"size-4"})),(0,h.jsx)(fd,{"aria-label":"Submit",className:J(e),size:n,type:"submit",variant:t,...s,children:i??a})};function OA({...e}){return(0,h.jsx)(zh,{"data-slot":"collapsible",...e})}function DA({...e}){return(0,h.jsx)($h,{"data-slot":"collapsible-trigger",...e})}function PA({...e}){return(0,h.jsx)(Xh,{"data-slot":"collapsible-content",...e})}var MA=({children:e,as:t="p",className:n,duration:r=2,spread:i=2})=>{const s=(0,E.useMemo)(()=>(e?.length??0)*i,[e,i]);return(0,h.jsx)(t,{className:J("relative inline-block bg-size-[250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",n),style:{"--spread":`${s}px`,"--duration":`${r}s`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},children:e})},BA=(0,E.memo)(MA),eh=(0,E.createContext)(null),FA=()=>{const e=(0,E.use)(eh);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},jA=1e3,HA=1e3,th=(0,E.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:s,children:a,...o})=>{const[l,u]=Us({prop:n,defaultProp:r,onChange:i}),[m,d]=Us({prop:s,defaultProp:void 0}),[f,p]=(0,E.useState)(!1),[g,N]=(0,E.useState)(null);(0,E.useEffect)(()=>{t?g===null&&N(Date.now()):g!==null&&(d(Math.ceil((Date.now()-g)/HA)),N(null))},[t,g,d]),(0,E.useEffect)(()=>{if(r&&!t&&l&&!f){const b=setTimeout(()=>{u(!1),p(!0)},jA);return()=>clearTimeout(b)}},[t,l,r,u,f]);const C=b=>{u(b)};return(0,h.jsx)(eh.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:u,duration:m},children:(0,h.jsx)(OA,{className:J("not-prose mb-4",e),onOpenChange:C,open:l,...o,children:a})})}),UA=(e,t)=>e||t===0?(0,h.jsx)(BA,{duration:1,children:"Thinking..."}):t===void 0?(0,h.jsx)("p",{children:"Thought for a few seconds"}):(0,h.jsxs)("p",{children:["Thought for ",t," seconds"]}),nh=(0,E.memo)(({className:e,children:t,getThinkingMessage:n=UA,...r})=>{const{isStreaming:i,isOpen:s,duration:a}=FA();return(0,h.jsx)(DA,{className:J("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Lh,{className:"size-4"}),n(i,a),(0,h.jsx)(zo,{className:J("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),rh=(0,E.memo)(({className:e,children:t,...n})=>(0,h.jsx)(PA,{className:J("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:(0,h.jsx)(Ds,{children:t})}));th.displayName="Reasoning";nh.displayName="ReasoningTrigger";rh.displayName="ReasoningContent";var zA=({className:e,children:t,...n})=>(0,h.jsxs)(Xo,{className:"w-full overflow-x-auto whitespace-nowrap",...n,children:[(0,h.jsx)("div",{className:J("flex w-max flex-nowrap items-center gap-2",e),children:t}),(0,h.jsx)(bd,{className:"hidden",orientation:"horizontal"})]}),$A=({suggestion:e,onClick:t,className:n,variant:r="outline",size:i="sm",children:s,...a})=>{const o=()=>{t?.(e)};return(0,h.jsx)(le,{className:J("cursor-pointer rounded-full px-4",n),onClick:o,size:i,type:"button",variant:r,...a,children:s||e})},Ps=()=>{const{data:e,isLoading:t,error:n,refetch:r}=ph({queryKey:Ed.rateLimit(),queryFn:async()=>{try{return(await ed()).data}catch{return{limit:0,used:0,remaining:0}}}});return{rateLimit:e,isLoadingRateLimit:t,errorRateLimit:n,refetchRateLimit:r}},qA=({db:e,onRateLimitRefetch:t,onControllerReady:n})=>{const[r,i]=(0,E.useState)(""),{rateLimit:s}=Ps(),{remaining:a}=s??{remaining:0,limit:0},{messages:o,sendMessage:l,isLoading:u,clear:m,stop:d}=fh({connection:dh(`${td()}${Jh.API_PREFIX}/chat`),body:{db:e},onError:C=>console.error("Error:",C.message),onFinish:()=>{t()}});(0,E.useEffect)(()=>{n({clear:()=>{m(),i("")},isLoading:u})},[m,u,n]);const f=C=>{const b=!!C.text,A=!!C.files?.length;!(b||A)||u||(l(C.text),i(""))},p=C=>{l(C),i("")},g=()=>{d(),i("")},N=u?"streaming":"ready";return(0,h.jsxs)("div",{className:"relative flex size-full flex-col divide-y overflow-hidden",children:[(0,h.jsxs)(EA,{children:[(0,h.jsx)(TA,{children:o.length===0?(0,h.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:(0,h.jsxs)("div",{className:"text-center space-y-2",children:[(0,h.jsx)("p",{className:"text-lg font-medium",children:"Start a new conversation"}),(0,h.jsx)("p",{className:"text-sm",children:"Ask me anything to get started"})]})}):(0,h.jsxs)(h.Fragment,{children:[o.map(C=>{const b=C.parts.filter(w=>w.type==="thinking"),A=C.parts.reduce((w,O)=>O.type==="text"?w+(O.content??""):w,""),v=b.length>0;return(0,h.jsx)(Po,{defaultBranch:0,children:(0,h.jsx)(Mo,{children:(0,h.jsx)(Oo,{from:C.role==="user"?"user":"assistant",children:(0,h.jsxs)("div",{children:[v&&C.role==="assistant"&&(0,h.jsxs)(th,{duration:0,children:[(0,h.jsx)(nh,{}),(0,h.jsx)(rh,{children:b.map(w=>w.content).join(`
132
+ `)})]}),(0,h.jsx)(Do,{children:(0,h.jsx)(Xu,{children:A})})]})})})},C.id)}),u&&(0,h.jsx)(Po,{defaultBranch:0,children:(0,h.jsx)(Mo,{children:(0,h.jsx)(Oo,{from:"assistant",children:(0,h.jsx)(Do,{children:(0,h.jsx)(xA,{children:"Thinking..."})})})})})]})}),(0,h.jsx)(bA,{})]}),(0,h.jsxs)("div",{className:"grid shrink-0 gap-4 pt-3",children:[o.length===0&&a>0&&(0,h.jsx)(zA,{className:"px-4",children:jd.map(C=>(0,h.jsx)($A,{onClick:()=>p(C),suggestion:C,size:"lg",children:C},C))}),(0,h.jsx)("div",{className:"w-full px-4 pb-4",children:(0,h.jsxs)(SA,{globalDrop:!0,multiple:!0,onSubmit:f,children:[(0,h.jsx)(IA,{children:(0,h.jsx)(wA,{onChange:C=>i(C.target.value),value:r,placeholder:"Type a message..."})}),(0,h.jsx)(LA,{children:(0,h.jsx)(RA,{className:"h-8!",status:N,onClick:u?g:void 0,disabled:s&&s.remaining===0})})]})})]})]})},YA=()=>{const{rateLimit:e,refetchRateLimit:t}=Ps(),{isOverlayOpen:n,closeOverlay:r}=Yn(),{selectedDatabase:i}=nt(),[s,a]=(0,E.useState)(null),o=(0,E.useRef)(l=>a(l));return(0,h.jsx)(Go,{title:"AI Assistant",cta:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[e&&(0,h.jsxs)(Xt,{children:[(0,h.jsx)(Gt,{asChild:!0,children:(0,h.jsxs)("span",{className:"text-xs px-2 py-1 cursor-default text-muted-foreground",children:[e.remaining,"/",e.limit]})}),(0,h.jsx)(Kt,{side:"bottom",children:(0,h.jsxs)("p",{children:[e.remaining," messages remaining"]})})]}),i&&s&&(0,h.jsxs)(le,{type:"button",variant:"outline",size:"lg",onClick:s.clear,disabled:s.isLoading,children:[(0,h.jsx)(en,{className:"size-4 mr-1"}),"New Chat"]})]}),closeButton:!1,open:n("chat.assistant"),size:"max-w-2xl!",contentClassName:"p-0 flex flex-col h-[calc(100vh-4rem)] flex-1",onOpenChange:l=>{l||r("chat.assistant")},children:i?(0,h.jsx)(qA,{db:i,onRateLimitRefetch:t,onControllerReady:o.current},i):(0,h.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground p-8",children:(0,h.jsxs)("div",{className:"text-center space-y-2",children:[(0,h.jsx)("p",{className:"text-lg font-medium",children:"No database selected"}),(0,h.jsx)("p",{className:"text-sm",children:"Select a database from the sidebar to start chatting."})]})})})},VA=()=>{const{openOverlay:e}=Yn(),{dbType:t}=nt(),{rateLimit:n,isLoadingRateLimit:r}=Ps(),{remaining:i=0,limit:s=0}=n??{remaining:0,limit:0},o=(l=>l===0?"bg-red-500":l<=5?"bg-yellow-500":"bg-emerald-500")(i);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(Xt,{children:[(0,h.jsx)(Gt,{asChild:!0,children:(0,h.jsxs)(le,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 relative text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",onClick:()=>{e("chat.assistant"),t&&Zh.capture("chat_opened",{db_type:t})},children:[(0,h.jsx)(vh,{className:"size-5"}),(0,h.jsx)("span",{className:J("absolute top-2 right-2 h-2 w-2 rounded-full ring-2 ring-background",o)})]})}),(0,h.jsx)(Kt,{side:"bottom",className:"text-xs",children:!r&&(i>0?(0,h.jsxs)("p",{children:[i,"/",s," messages remaining"]}):(0,h.jsx)("p",{children:"AI Assistant"}))})]}),(0,h.jsx)(YA,{})]})},WA=()=>{const{pathname:e}=Dr(),t=e.split("/")[1]||"table",{dbType:n}=nt();return(0,h.jsx)("div",{className:"flex h-full items-center",children:(n==="redis"?["browser","runner"]:rd).map(r=>(0,h.jsx)(jo,{to:`/${r}`,className:"h-full flex items-center",children:(0,h.jsx)(le,{variant:"ghost",className:J("flex-1 px-4 border-l-0 border-y-0 border-r border-border h-full rounded-none capitalize text-xs font-medium transition-colors",t===r?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:r})},r))})},QA=()=>{const{sidebar:{isOpen:e,isPinned:t},setSidebarOpen:n,setSidebarPinned:r}=Pr(),i=()=>{n(!e),r(!t)};return(0,h.jsx)(le,{variant:"ghost",onClick:i,className:"h-full aspect-square border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",children:(0,h.jsx)(Ah,{className:"size-5"})})},GA=()=>{const{theme:e,isDark:t,setTheme:n}=yd();return(0,h.jsxs)("div",{className:"border-b border-border w-full flex items-center justify-between bg-background text-foreground h-12",children:[(0,h.jsxs)("div",{className:"flex items-center h-full",children:[(0,h.jsx)(QA,{}),(0,h.jsx)(WA,{})]}),(0,h.jsxs)("div",{className:"flex items-center h-full",children:[(0,h.jsx)(VA,{}),(0,h.jsxs)(Wo,{children:[(0,h.jsxs)(Xt,{children:[(0,h.jsx)(Gt,{asChild:!0,children:(0,h.jsx)(Qo,{asChild:!0,children:(0,h.jsx)(le,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":`Theme: ${e}, switch theme`,children:e==="light"?(0,h.jsx)(Hs,{className:"size-5"}):e==="dark"?(0,h.jsx)(Fs,{className:"size-5"}):(0,h.jsx)(Bs,{className:"size-5"})})})}),(0,h.jsx)(Kt,{children:(0,h.jsx)("p",{children:t?"Switch to light mode":"Switch to dark mode"})})]}),(0,h.jsxs)(Vo,{align:"end",children:[(0,h.jsxs)(Xe,{onClick:()=>n("light"),children:[(0,h.jsx)(Hs,{}),"Light",e==="light"&&(0,h.jsx)(Zr,{className:"ml-auto"})]}),(0,h.jsxs)(Xe,{onClick:()=>n("dark"),children:[(0,h.jsx)(Fs,{}),"Dark",e==="dark"&&(0,h.jsx)(Zr,{className:"ml-auto"})]}),(0,h.jsxs)(Xe,{onClick:()=>n("system"),children:[(0,h.jsx)(Bs,{}),"System",e==="system"&&(0,h.jsx)(Zr,{className:"ml-auto"})]})]})]}),(0,h.jsxs)(Xt,{children:[(0,h.jsx)(Gt,{asChild:!0,children:(0,h.jsx)(le,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",asChild:!0,children:(0,h.jsx)("a",{href:qs.SITE_GITHUB_NEW_ISSUE_LINK,target:"_blank",rel:"noopener noreferrer","aria-label":"Create a new GitHub issue",children:(0,h.jsx)(Dh,{className:"size-5"})})})}),(0,h.jsx)(Kt,{children:(0,h.jsx)("p",{children:"Report a bug"})})]}),(0,h.jsxs)(Xt,{children:[(0,h.jsx)(Gt,{asChild:!0,children:(0,h.jsx)(le,{variant:"ghost",className:"border-r-0 border-y-0 border-l border-border rounded-none h-full w-12 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",asChild:!0,children:(0,h.jsx)("a",{href:qs.SITE_GITHUB_LINK,target:"_blank",rel:"noopener noreferrer","aria-label":"View the db-studio GitHub repository",children:(0,h.jsx)(uA,{className:"size-5"})})})}),(0,h.jsx)(Kt,{children:(0,h.jsx)("p",{children:"View on GitHub"})})]})]})]})};function ih({...e}){return(0,h.jsx)(Kh,{"data-slot":"context-menu",...e})}function sh({className:e,...t}){return(0,h.jsx)(Wh,{"data-slot":"context-menu-trigger",className:J("select-none",e),...t})}function ah({className:e,...t}){return(0,h.jsx)(Qh,{children:(0,h.jsx)(Yh,{"data-slot":"context-menu-content",className:J("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",e),...t})})}function Tt({className:e,inset:t,variant:n="default",...r}){return(0,h.jsx)(Hh,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:J("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r})}function Bo({className:e,...t}){return(0,h.jsx)(Uh,{"data-slot":"context-menu-separator",className:J("bg-border/50 -mx-1 my-1 h-px",e),...t})}var _i=({folderId:e,isExpanded:t,onToggle:n,count:r,name:i,showContextMenu:s=!1})=>{const a=qn(),{deleteFolder:o,getQueriesByFolder:l,addQuery:u,updateFolder:m}=Mr(),[d,f]=(0,E.useState)(!1),[p,g]=(0,E.useState)(""),[N,C]=(0,E.useState)(!1),b=(0,E.useCallback)(()=>{if(e){if(l(e).length>0){C(!0);return}o(e)}},[o,e,l]),A=(0,E.useCallback)(()=>{e&&(o(e),C(!1))},[o,e]),v=(0,E.useCallback)(()=>{const I=u(void 0,e);a({to:"/runner/$queryId",params:{queryId:I}})},[u,e,a]),w=(0,E.useCallback)(()=>{g(i),f(!0)},[i]),O=(0,E.useCallback)(()=>{e&&p.trim()&&(m(e,{name:p.trim()}),f(!1),g(""))},[e,p,m]);return(0,h.jsxs)(h.Fragment,{children:[s?(0,h.jsxs)(ih,{children:[(0,h.jsx)(sh,{asChild:!0,children:(0,h.jsxs)("button",{type:"button",onClick:n,className:J("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-sidebar-accent/50 hover:text-sidebar-foreground focus:outline-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground","text-sidebar-foreground/70 items-center"),children:[(0,h.jsx)(js,{className:J("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,h.jsx)("span",{className:"flex-1",children:i}),(0,h.jsx)(Fn,{children:r})]})}),(0,h.jsxs)(ah,{children:[(0,h.jsxs)(Tt,{onClick:v,children:[(0,h.jsx)(en,{className:"size-4"}),"Add a new query"]}),(0,h.jsxs)(Tt,{onClick:w,children:[(0,h.jsx)(Ji,{className:"size-4"}),"Rename folder"]}),(0,h.jsxs)(Tt,{onClick:b,children:[(0,h.jsx)(Xi,{className:"size-4"}),"Delete folder"]})]})]}):(0,h.jsxs)("button",{type:"button",onClick:n,className:J("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-sidebar-accent/50 hover:text-sidebar-foreground focus:outline-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground","text-sidebar-foreground/70 items-center"),children:[(0,h.jsx)(js,{className:J("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,h.jsx)("span",{className:"flex-1",children:i}),(0,h.jsx)(Fn,{children:r})]}),(0,h.jsx)(On,{open:d,onOpenChange:f,children:(0,h.jsxs)(Pn,{children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Rename Folder"}),(0,h.jsx)(Bn,{children:"Enter a new name for this folder."})]}),(0,h.jsx)(xt,{value:p,onChange:I=>g(I.target.value),placeholder:"Folder name",onKeyDown:I=>{I.key==="Enter"&&O()},autoFocus:!0}),(0,h.jsxs)(Dn,{children:[(0,h.jsx)(le,{variant:"outline",onClick:()=>{f(!1),g("")},children:"Cancel"}),(0,h.jsx)(le,{onClick:O,disabled:!p.trim(),children:"Rename"})]})]})}),(0,h.jsx)(_d,{open:N,onOpenChange:C,children:(0,h.jsxs)(wd,{children:[(0,h.jsxs)(xd,{children:[(0,h.jsx)(Rd,{children:"Delete Folder"}),(0,h.jsxs)(vd,{children:["This folder contains ",r," ",r===1?"query":"queries",". Deleting this folder will also delete all queries inside it. This action cannot be undone."]})]}),(0,h.jsxs)(Nd,{children:[(0,h.jsx)(Ld,{children:"Cancel"}),(0,h.jsx)(Ad,{onClick:A,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Folder"})]})]})})]})},Er=({id:e,tableName:t,isNested:n=!1,showContextMenu:r=!0})=>{const i=qn(),{deleteQuery:s,addQuery:a,getQuery:o,toggleFavorite:l,updateQuery:u,moveQuery:m,folders:d,addFolder:f}=Mr(),{queryId:p}=Ho({strict:!1}),g=p===e,N=o(e),C=N?.isFavorite??!1,[b,A]=(0,E.useState)(!1),[v,w]=(0,E.useState)(""),[O,I]=(0,E.useState)(!1),[B,$]=(0,E.useState)(void 0),[Y,S]=(0,E.useState)(!1),[H,q]=(0,E.useState)(""),Z=(0,E.useCallback)(()=>{i({to:"/runner/$queryId",params:{queryId:e}})},[i,e]),ie=(0,E.useCallback)(()=>{s(e),p===e&&i({to:"/runner"}),Ze.success("Query deleted successfully")},[s,e,i,p]),G=(0,E.useCallback)(()=>{const Q=o(e),_=a(`${Q?.name} (Copy)`);i({to:"/runner/$queryId",params:{queryId:_}}),Ze.success("Query duplicated successfully")},[a,o,i,e]),U=(0,E.useCallback)(()=>{l(e),Ze.success("Query favorited successfully")},[l,e]),P=(0,E.useCallback)(()=>{w(N?.name??""),A(!0)},[N?.name]),V=(0,E.useCallback)(()=>{v.trim()&&(u(e,{name:v.trim()}),A(!1),w(""),Ze.success("Query renamed successfully"))},[e,v,u]),X=(0,E.useCallback)(()=>{$(N?.folderId),S(!1),q(""),I(!0)},[N?.folderId]),y=(0,E.useCallback)(Q=>{Q==="__create_new__"?(S(!0),$(void 0)):(S(!1),$(Q==="__none__"?void 0:Q))},[]),ce=(0,E.useCallback)(()=>{if(Y&&H.trim()){const Q=Math.random().toString(36).substring(2,15);f({id:Q,name:H.trim(),isExpanded:!0,isFavorite:!1}),m(e,Q),Ze.success("Query moved to new folder successfully")}else Y||(m(e,B),Ze.success("Query moved to selected folder successfully"));I(!1),S(!1),q(""),$(void 0)},[Y,H,B,e,f,m]);return(0,h.jsxs)("li",{className:"relative",children:[r?(0,h.jsxs)(ih,{children:[(0,h.jsx)(sh,{asChild:!0,children:(0,h.jsxs)("button",{type:"button",onClick:Z,className:J("w-full flex gap-2 py-2 text-sm transition-colors text-left justify-start items-center focus:outline-none",g?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground",n?"px-4 pl-12":"px-4"),children:[g&&(0,h.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,h.jsx)("span",{className:"flex-1",children:t})]})}),(0,h.jsxs)(ah,{children:[(0,h.jsxs)(Tt,{onClick:P,children:[(0,h.jsx)(Ji,{className:"size-4"}),"Rename query"]}),(0,h.jsxs)(Tt,{onClick:G,children:[(0,h.jsx)(yh,{className:"size-4"}),"Duplicate query"]}),(0,h.jsxs)(Tt,{onClick:U,children:[(0,h.jsx)(Ih,{className:C?"size-4 fill-current":"size-4"}),C?"Remove from favorites":"Add to favorites"]}),(0,h.jsx)(Bo,{}),(0,h.jsxs)(Tt,{onClick:X,children:[(0,h.jsx)(xh,{className:"size-4"}),"Move to folder"]}),(0,h.jsx)(Bo,{}),(0,h.jsxs)(Tt,{onClick:ie,children:[(0,h.jsx)(Xi,{className:"size-4"}),"Delete query"]})]})]}):(0,h.jsxs)("button",{type:"button",onClick:Z,className:J("w-full flex gap-2 py-2 text-sm transition-colors text-left justify-start items-center focus:outline-none",g?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground",n?"px-4 pl-12":"px-4"),children:[g&&(0,h.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,h.jsx)("span",{className:"flex-1",children:t})]}),(0,h.jsx)(On,{open:b,onOpenChange:A,children:(0,h.jsxs)(Pn,{children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Rename Query"}),(0,h.jsx)(Bn,{children:"Enter a new name for this query."})]}),(0,h.jsx)(xt,{value:v,onChange:Q=>w(Q.target.value),placeholder:"Query name",onKeyDown:Q=>{Q.key==="Enter"&&V()},autoFocus:!0}),(0,h.jsxs)(Dn,{children:[(0,h.jsx)(le,{variant:"outline",onClick:()=>{A(!1),w("")},children:"Cancel"}),(0,h.jsx)(le,{onClick:V,disabled:!v.trim(),children:"Rename"})]})]})}),(0,h.jsx)(On,{open:O,onOpenChange:Q=>{I(Q),Q||(S(!1),q(""),$(void 0))},children:(0,h.jsxs)(Pn,{children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Move to Folder"}),(0,h.jsx)(Bn,{children:"Select a folder to move this query to."})]}),(0,h.jsx)("div",{className:"space-y-4",children:Y?(0,h.jsx)(xt,{value:H,onChange:Q=>q(Q.target.value),placeholder:"Folder name",onKeyDown:Q=>{Q.key==="Enter"&&H.trim()&&ce(),Q.key==="Escape"&&(S(!1),q(""))},autoFocus:!0}):(0,h.jsxs)(Qn,{value:B??"__none__",onValueChange:y,children:[(0,h.jsx)(Vn,{className:"w-full",children:(0,h.jsx)(Wn,{placeholder:"Select a folder"})}),(0,h.jsxs)(Gn,{children:[(0,h.jsx)(ut,{value:"__none__",children:"No folder"}),d.map(Q=>(0,h.jsx)(ut,{value:Q.id,children:Q.name},Q.id)),(0,h.jsx)(ut,{value:"__create_new__",children:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(Uo,{className:"size-4"}),"Create a new folder"]})})]})]})}),(0,h.jsxs)(Dn,{children:[(0,h.jsx)(le,{variant:"outline",onClick:()=>{I(!1),S(!1),q(""),$(void 0)},children:"Cancel"}),(0,h.jsx)(le,{onClick:ce,disabled:Y&&!H.trim(),children:Y?"Create & Move":"Move"})]})]})})]})},KA=()=>{const[e]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),{folders:t,queries:n,getFavoriteQueries:r,getQueriesByFolder:i,toggleFolder:s}=Mr(),[a,o]=(0,E.useState)(!0),[l,u]=(0,E.useState)(!0),m=n.filter(g=>!g.isFavorite).length,d=r(),f=d.length,p=n.filter(g=>!g.folderId&&!g.isFavorite);if(e){const g=n.filter(N=>N.name.toLowerCase().includes(e.toLowerCase()));return g.length===0?(0,h.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:"No queries found matching"}):(0,h.jsx)("div",{className:"flex-1 overflow-y-auto",children:g.map(N=>(0,h.jsx)(Er,{id:N.id,tableName:N.name},N.id))})}return(0,h.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,h.jsx)(_i,{name:"Favorites",isExpanded:a,onToggle:()=>o(!a),count:f}),a&&d.map(g=>(0,h.jsx)(Er,{id:g.id,tableName:g.name},g.id)),(0,h.jsx)(Hd,{className:"bg-sidebar-border"}),(0,h.jsx)(_i,{name:"Queries",isExpanded:l,onToggle:()=>u(!l),count:m}),l&&(0,h.jsxs)(h.Fragment,{children:[t.map(g=>{const N=i(g.id),C=N.length;return(0,h.jsxs)("div",{children:[(0,h.jsx)(_i,{folderId:g.id,name:g.name,isExpanded:g.isExpanded,onToggle:()=>s(g.id),count:C,showContextMenu:!0}),g.isExpanded&&N.map(b=>(0,h.jsx)(Er,{id:b.id,tableName:b.name,isNested:!0,showContextMenu:!0},b.id))]},g.id)}),p.map(g=>(0,h.jsx)(Er,{id:g.id,tableName:g.name,showContextMenu:!0},g.id))]})]})},XA=()=>{const{addQuery:e,addFolder:t}=Mr(),n=qn(),r=(0,E.useRef)(null),[i,s]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),a=u=>{s(u.target.value)},o=()=>{const u=e();n({to:"/runner/$queryId",params:{queryId:u}})},l=()=>{const u=Math.random().toString(36).substring(2,15);t({id:u,name:"New Folder",isExpanded:!0,isFavorite:!1})};return(0,h.jsxs)("div",{className:"p-3 space-y-2 border-b border-sidebar-border",children:[(0,h.jsxs)("div",{className:"flex gap-2",children:[(0,h.jsxs)(le,{className:"flex-1 justify-start h-8",onClick:o,children:[(0,h.jsx)(en,{className:"size-4"}),"Add Query"]}),(0,h.jsxs)(le,{className:"flex-1 justify-start h-8",onClick:l,children:[(0,h.jsx)(Uo,{className:"size-4"}),"Add Folder"]})]}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsx)(Zi,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,h.jsx)(xt,{ref:r,placeholder:"Search queries",value:i??"",onChange:a,className:"rounded-sm h-8 pl-8 pr-8"}),(0,h.jsx)(Fn,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]})]})},ZA=()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(XA,{}),(0,h.jsx)(KA,{})]}),JA=()=>{const{selectedDatabase:e}=nt(),{mutateAsync:t,isPending:n}=uh({mutationFn:async i=>{const s=(await id(i,e)).data.data.schema;return await navigator.clipboard.writeText(s),s}});return{copyTableSchema:async i=>Ze.promise(t(i),{loading:"Copying table schema...",success:"Table schema copied to clipboard",error:s=>s.message||"Failed to copy table schema"}),isCopyingSchema:n}},eN=({tableName:e})=>{const t=qn(),{copyTableSchema:n,isCopyingSchema:r}=JA(),{exportFile:i,isExportingFile:s}=Td(),{deleteTable:a,forceDeleteTable:o,isDeletingTable:l}=Id(),[u,m]=(0,E.useState)(!1),[d,f]=(0,E.useState)(!1),[p,g]=(0,E.useState)([]),N=()=>{navigator.clipboard.writeText(e),Ze.success("Table name copied to clipboard")},C=async()=>{const v=await a(e);v.fkViolation?(g(v.relatedRecords),m(!1),f(!0)):(m(!1),t({to:"/"}))},b=async()=>{await o(e),f(!1),t({to:"/"})},A=()=>{f(!1),g([])};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(Wo,{children:[(0,h.jsx)(Qo,{children:(0,h.jsx)(le,{variant:"ghost",size:"icon-sm",children:(0,h.jsx)(Th,{})})}),(0,h.jsx)(Vo,{className:"w-56",align:"start",children:(0,h.jsxs)(cd,{children:[(0,h.jsxs)(Xe,{onClick:N,children:[(0,h.jsx)(Ch,{className:"size-4"}),"Copy name"]}),(0,h.jsxs)(Xe,{onClick:()=>n(e),disabled:r,children:[(0,h.jsx)(kh,{className:"size-4"}),"Copy table schema"]}),(0,h.jsx)(zs,{}),(0,h.jsxs)(Xe,{onClick:()=>t({to:"/schema/$table",params:{table:e}}),children:[(0,h.jsx)(Ji,{className:"size-4"}),"Edit table"]}),(0,h.jsxs)(md,{children:[(0,h.jsxs)(ld,{children:[(0,h.jsx)(bh,{className:"size-4"}),"Export data"]}),(0,h.jsxs)(od,{children:[(0,h.jsx)(Xe,{onClick:()=>i({tableName:e,format:"csv"}),disabled:s,children:"Export as CSV"}),(0,h.jsx)(Xe,{onClick:()=>i({tableName:e,format:"json"}),disabled:s,children:"Export as JSON"}),(0,h.jsx)(Xe,{onClick:()=>i({tableName:e,format:"xlsx"}),disabled:s,children:"Export as Excel"})]})]}),(0,h.jsx)(zs,{}),(0,h.jsxs)(Xe,{variant:"destructive",onClick:()=>m(!0),children:[(0,h.jsx)(Xi,{className:"size-4"}),"Delete table"]})]})})]}),(0,h.jsx)(tN,{isOpen:u,onOpenChange:m,tableName:e,onDelete:C,isDeleting:l}),(0,h.jsx)(nN,{isOpen:d,onOpenChange:f,tableName:e,relatedRecords:p,onForceDelete:b,onCancel:A,isDeleting:l})]})},tN=({isOpen:e,onOpenChange:t,tableName:n,onDelete:r,isDeleting:i})=>(0,h.jsx)(On,{open:e,onOpenChange:t,children:(0,h.jsxs)(Pn,{className:"max-w-md",children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Delete Table"}),(0,h.jsxs)(Bn,{children:["Are you sure you want to delete the table"," ",(0,h.jsxs)("span",{className:"font-semibold text-foreground",children:['"',n,'"']}),"? This action cannot be undone and all data will be permanently lost."]})]}),(0,h.jsxs)(Dn,{className:"gap-2",children:[(0,h.jsx)(le,{variant:"outline",onClick:()=>t(!1),disabled:i,children:"Cancel"}),(0,h.jsx)(le,{variant:"destructive",onClick:r,disabled:i,children:i?"Deleting...":"Delete Table"})]})]})}),nN=({isOpen:e,onOpenChange:t,tableName:n,relatedRecords:r,onForceDelete:i,onCancel:s,isDeleting:a})=>(0,h.jsx)(On,{open:e,onOpenChange:t,children:(0,h.jsxs)(Pn,{className:"max-w-xl! max-h-[calc(100vh-1rem)]!",children:[(0,h.jsxs)(Mn,{children:[(0,h.jsx)(Rn,{children:"Cannot Delete - Foreign Key Constraint"}),(0,h.jsxs)(Bn,{children:["The table ",(0,h.jsxs)("span",{className:"font-semibold text-foreground",children:['"',n,'"']})," ","cannot be deleted because it is referenced by records in other tables. You can either cancel the operation or force delete, which will also delete all related records."]})]}),(0,h.jsx)("div",{className:"space-y-4 max-h-64 overflow-y-auto",children:r.map((o,l)=>(0,h.jsxs)("div",{className:"border border-border rounded-md p-3",children:[(0,h.jsxs)("div",{className:"font-medium text-sm mb-2",children:["Table: ",(0,h.jsx)("span",{className:"text-primary",children:o.tableName}),(0,h.jsxs)("span",{className:"text-muted-foreground ml-2",children:["(",o.records.length," record",o.records.length!==1?"s":"",")"]})]}),(0,h.jsxs)("div",{className:"text-xs text-muted-foreground mb-2",children:["References column: ",o.columnName]}),(0,h.jsx)("div",{className:"bg-muted rounded p-2 text-xs overflow-x-auto",children:(0,h.jsxs)("pre",{className:"whitespace-pre-wrap",children:[JSON.stringify(o.records.slice(0,5),null,2),o.records.length>5&&(0,h.jsxs)("div",{className:"text-muted-foreground mt-2",children:["... and ",o.records.length-5," more"]})]})})]},`${o.tableName}-${o.columnName}-${l}`))}),(0,h.jsxs)(Dn,{className:"gap-2",children:[(0,h.jsx)(le,{variant:"outline",onClick:s,disabled:a,children:"Cancel"}),(0,h.jsx)(le,{variant:"destructive",onClick:i,disabled:a,children:a?"Deleting...":"Force Delete All"})]})]})}),rN=({tableName:e,rowCount:t,schemaName:n})=>{const r=Ho({strict:!1}),{pathname:i}=Dr(),s=r.table===e,a=i.startsWith("/schema")?"/schema/$table":"/table/$table";return(0,h.jsx)("li",{className:"relative",children:(0,h.jsxs)(jo,{to:a,params:{table:e},className:J("w-full flex gap-0.5 px-4 py-1.5 text-sm transition-colors text-left justify-start items-center focus:outline-none",s?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground"),children:[s&&(0,h.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,h.jsxs)("span",{className:"flex-1 truncate",children:[n&&n!=="public"?`${n}.`:"",e]}),(0,h.jsxs)("div",{className:"flex items-center gap-1 h-5",children:[s&&(0,h.jsx)(eN,{tableName:e}),(0,h.jsx)(Fn,{children:t})]})]})})},iN=()=>{const[e]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),[t,n]=et(ct.ACTIVE_SCHEMA,{defaultValue:"all"}),{dbType:r}=nt(),{tablesList:i=[],isLoadingTablesList:s,errorTablesList:a}=Zo(),o=(0,E.useMemo)(()=>Array.from(new Set(i.reduce((m,d)=>(d.schemaName&&m.push(d.schemaName),m),[]))).sort(),[i]),l=r==="pg"&&o.length>1,u=i?.filter(m=>{const d=t==="all"||m.schemaName===t,f=m.tableName.toLowerCase().includes(e.toLowerCase());return d&&f});return(0,E.useEffect)(()=>{!l||t==="all"||o.includes(t)||n("all")},[o,t,n,l]),s?(0,h.jsx)("div",{className:"flex-1 h-full overflow-y-auto pb-3 flex items-center justify-center",children:(0,h.jsx)(nd,{size:"size-6"})}):a?(0,h.jsxs)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:["Error: ",a.message]}):(0,h.jsx)("div",{className:"flex-1 overflow-y-auto pb-3",children:u&&u.length>0?(0,h.jsx)("ul",{children:u?.map(m=>(0,h.jsx)(rN,{schemaName:m.schemaName,tableName:m.tableName,rowCount:m.rowCount},m.schemaName?`${m.schemaName}.${m.tableName}`:m.tableName))}):e?(0,h.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables found matching"}):(0,h.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables available"})})},sN=()=>{const e=(0,E.useRef)(null),[t,n]=et(ct.SIDEBAR_SEARCH,{defaultValue:""}),{openOverlay:r}=Yn(),{dbType:i}=nt();return Od("/",s=>{s.preventDefault(),e.current&&e.current.focus()},{preventDefault:!0}),(0,h.jsx)("div",{className:"px-3 pb-3 pt-2 space-y-2",children:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,h.jsx)(Zi,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,h.jsx)(xt,{ref:e,variant:"outline",placeholder:"Search tables",value:t??"",onChange:s=>n(s.target.value.trim()),className:"rounded-sm h-8 pl-8 pr-8"}),(0,h.jsx)(Fn,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]}),i!=="mongodb"&&(0,h.jsx)(le,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>r("table-builder.create-table"),"aria-label":"Add table",children:(0,h.jsx)(en,{className:"size-4"})})]})})},aN=()=>{const[e,t]=et(ct.ACTIVE_SCHEMA,{defaultValue:"all"}),{dbType:n}=nt(),{tablesList:r=[]}=Zo(),i=(0,E.useMemo)(()=>Array.from(new Set(r.reduce((s,a)=>(a.schemaName&&s.push(a.schemaName),s),[]))).sort(),[r]);return n==="pg"&&i.length>1?(0,h.jsx)("div",{className:"px-3 pt-3",children:(0,h.jsxs)(Qn,{value:e,onValueChange:t,children:[(0,h.jsx)(Vn,{variant:"outline",className:"h-8! w-full justify-between rounded-sm",children:(0,h.jsx)(Wn,{placeholder:"Select schema"})}),(0,h.jsxs)(Gn,{children:[(0,h.jsx)(ut,{value:"all",children:"All schemas"}),i.map(s=>(0,h.jsx)(ut,{value:s,children:s},s))]})]})}):null},Fo=()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(aN,{}),(0,h.jsx)(sN,{}),(0,h.jsx)(Xo,{className:"flex-1 overflow-y-auto pb-3 block h-full w-full",children:(0,h.jsx)(iN,{})})]});function oN(){const{databases:e,isLoadingDatabases:t,refetchDatabases:n,isRefetchingDatabases:r}=kd(),{connectionInfo:i,isLoadingConnectionInfo:s}=Sd(),{selectedDatabase:a,setSelectedDatabase:o,dbType:l}=nt(),u=qn(),[m,d]=(0,E.useState)(!1),f=g=>{o(g),u({to:l==="redis"?"/browser":"/table",search:{}})},p=async()=>{await n(),Ze.success("Databases refreshed")};return(0,h.jsx)("div",{className:"mt-auto border-t border-sidebar-border bg-sidebar text-sidebar-foreground",children:(0,h.jsxs)("div",{className:"p-4 space-y-2",children:[(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(Fh,{className:"size-4 text-muted-foreground"}),(0,h.jsx)("span",{className:"text-sm font-medium",children:"Database"})]}),(0,h.jsxs)(Xt,{children:[(0,h.jsx)(Gt,{asChild:!0,children:(0,h.jsx)(le,{variant:"ghost",size:"icon",className:"size-6 hover:bg-accent",onClick:p,disabled:t||r,children:(0,h.jsx)($o,{className:J("size-3.5",(t||r)&&"animate-spin")})})}),(0,h.jsx)(Kt,{children:"Refresh databases"})]})]}),(0,h.jsxs)(Qn,{value:a||"",onValueChange:f,children:[(0,h.jsx)(Vn,{className:"h-9 text-xs font-mono w-full",disabled:t||r,children:(0,h.jsx)(Wn,{placeholder:"Select database..."})}),(0,h.jsx)(Gn,{children:e?.map(g=>(0,h.jsx)(ut,{value:g.name,className:"font-mono text-xs",children:g.name},g.name))})]})]}),(0,h.jsxs)("div",{className:"space-y-2",children:[(0,h.jsxs)(le,{variant:"ghost",className:"w-full hover:bg-accent flex items-center justify-between",onClick:()=>d(!m),disabled:s||r,children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("div",{className:"flex items-center justify-center",children:(0,h.jsxs)("div",{className:"relative flex size-2",children:[(0,h.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),(0,h.jsx)("span",{className:"relative inline-flex rounded-full size-2 bg-green-500"})]})}),(0,h.jsx)("span",{className:"text-xs font-medium text-green-600",children:"Connected"})]}),(0,h.jsx)(zo,{className:J("size-3 text-muted-foreground transition-transform",m&&"rotate-180")})]}),m&&i&&(0,h.jsxs)("div",{className:"space-y-1.5 p-2 rounded-md bg-muted/30",children:[(0,h.jsxs)("div",{className:"flex justify-between items-center",children:[(0,h.jsx)("span",{className:"text-xs text-muted-foreground",children:"Host"}),(0,h.jsxs)("span",{className:"text-xs font-mono text-foreground",children:[i.host,":",i.port]})]}),(0,h.jsxs)("div",{className:"flex justify-between items-center",children:[(0,h.jsx)("span",{className:"text-xs text-muted-foreground",children:"User"}),(0,h.jsx)("span",{className:"text-xs font-mono text-foreground",children:i.user})]}),(0,h.jsxs)("div",{className:"flex justify-between items-center",children:[(0,h.jsx)("span",{className:"text-xs text-muted-foreground",children:"Databases"}),(0,h.jsx)("span",{className:"text-xs font-mono font-medium text-foreground",children:e?.length||0})]})]})]})]})})}var lN=()=>{const{sidebar:{isPinned:e},toggleSidebarPinned:t}=Pr();return(0,h.jsx)("div",{className:"flex items-center justify-between h-9 border-b border-sidebar-border",children:(0,h.jsx)(le,{variant:"ghost",size:"lg",onClick:t,className:"size-9 flex items-center justify-center transition hover:bg-transparent! focus-visible:ring-0 focus-visible:ring-offset-0",title:e?"Unpin sidebar":"Pin sidebar",children:e?(0,h.jsx)(Mh,{className:"size-4"}):(0,h.jsx)(_h,{className:"size-4"})})})},cN=({children:e})=>{const{sidebar:{width:t,isOpen:n,isPinned:r},setSidebarWidth:i,setSidebarOpen:s}=Pr(),a=(0,E.useRef)(!1),o=(0,E.useRef)(0),l=(0,E.useRef)(0),u=(0,E.useRef)(null),m=(0,E.useRef)(null),d=(0,E.useRef)(B=>{}),f=(0,E.useRef)(()=>{}),p=(0,E.useRef)(B=>{}),g=(0,E.useRef)(()=>{}),N=(0,E.useRef)(()=>{}),C=(0,E.useCallback)(B=>{a.current&&requestAnimationFrame(()=>{const $=B.clientX-o.current,Y=l.current+$;i(Y)})},[i]),b=(0,E.useCallback)(()=>{a.current=!1,Object.assign(document.body.style,{cursor:"",userSelect:""});const B=document.getElementById("resize-overlay");B&&B.remove()},[]),A=(0,E.useCallback)(B=>{B.preventDefault(),a.current=!0,o.current=B.clientX,l.current=t,Object.assign(document.body.style,{cursor:"col-resize",userSelect:"none"});const $=document.createElement("div");$.id="resize-overlay",$.style.cssText="position:fixed;inset:0;z-index:9999;cursor:col-resize;",document.body.appendChild($)},[t]),v=(0,E.useCallback)(()=>{r||s(!0)},[r,s]),w=(0,E.useCallback)(()=>{r||s(!1)},[r,s]),O=(0,E.useCallback)(B=>{r||n||a.current||(B.clientX<=ct.HOVER_ZONE?(u.current&&clearTimeout(u.current),u.current=window.setTimeout(()=>{s(!0)},ct.HOVER_DELAY)):B.clientX>ct.HOVER_ZONE+50&&u.current&&clearTimeout(u.current))},[r,n,s]);d.current=C,f.current=b,p.current=O,g.current=v,N.current=w;const I=B=>{r||s(B)};return(0,E.useEffect)(()=>{const B=S=>d.current(S),$=()=>f.current(),Y=S=>p.current(S);return document.addEventListener("mousemove",B),document.addEventListener("mouseup",$),document.addEventListener("mousemove",Y),()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",Y),u.current&&clearTimeout(u.current)}},[]),(0,E.useEffect)(()=>{const B=m.current;if(!B)return;const $=()=>g.current(),Y=()=>N.current();return B.addEventListener("mouseenter",$),B.addEventListener("mouseleave",Y),()=>{B.removeEventListener("mouseenter",$),B.removeEventListener("mouseleave",Y)}},[]),(0,h.jsxs)(ad,{open:n,onOpenChange:I,modal:!1,children:[(0,h.jsx)(sd,{className:"sr-only",children:"Open Sidebar"}),(0,h.jsx)(ud,{ref:m,side:"left",showCloseButton:!1,isPinned:r,className:J("bg-sidebar border-r border-sidebar-border text-sidebar-foreground p-0","transition-transform duration-300 ease-out"),style:{width:`${t}px`},onOpenAutoFocus:B=>B.preventDefault(),children:(0,h.jsxs)("div",{className:"relative h-full flex flex-col",children:[e,(0,h.jsx)("div",{role:"button",tabIndex:0,onMouseDown:A,className:J("absolute top-0 right-0 w-2 h-full cursor-col-resize z-50","hover:bg-blue-500/50 transition-colors group"),title:"Drag to resize",children:(0,h.jsx)("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-2 h-12 bg-blue-500 opacity-0 group-hover:opacity-100 transition-opacity rounded-full"})})]})})]})},uN=["string","hash","list","set","zset","stream"],It=Pd(""),hN=()=>{const{closeOverlay:e,isOverlayOpen:t}=Yn(),[n,r]=(0,E.useState)(It),[i,s]=(0,E.useState)("string"),[a,o]=(0,E.useState)(It),[l,u]=(0,E.useState)(It),[m,d]=(0,E.useState)("0"),[f,p]=(0,E.useState)(""),{createKey:g,isPending:N}=Md(),C=t("redis-browser.create-key"),b=i==="hash"||i==="stream",A=n===null||a===null||b&&l===null,v=async()=>{const w=b?l:It;if(n===null||a===null||w===null)return;let O;switch(i){case"string":O={kind:"string",value:a};break;case"hash":O={kind:"hash",entries:[{field:a,value:w}]};break;case"list":O={kind:"list",entries:[a]};break;case"set":O={kind:"set",members:[a]};break;case"zset":O={kind:"zset",entries:[{member:a,score:Number(m)}]};break;case"stream":O={kind:"stream",id:"*",fields:[{field:a,value:w}]}}await g({key:n,type:i,value:O,ttlMs:f?Number(f)*1e3:null}),r(It),s("string"),o(It),u(It),d("0"),p(""),e("redis-browser.create-key")};return(0,h.jsxs)(Go,{title:"Create Redis key",description:"Creates the key atomically and never overwrites an existing key.",open:C,onOpenChange:w=>{w||e("redis-browser.create-key")},size:"sm:max-w-md!",headerClassName:"border-b border-border p-4",titleClassName:"text-sm font-medium",contentClassName:"space-y-4 px-4 py-4",children:[(0,h.jsxs)(Cd,{className:"gap-4",children:[(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-name",children:"Key"}),(0,h.jsx)(Jr,{id:"redis-key-name",value:n,onChange:r,className:"h-8",placeholder:"cache:user:42"}),(0,h.jsx)($s,{children:"Text, hexadecimal, and Base64 keys are supported."})]}),(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-type",children:"Type"}),(0,h.jsxs)(Qn,{value:i,onValueChange:w=>s(w),children:[(0,h.jsx)(Vn,{id:"redis-key-type",className:"h-8!",children:(0,h.jsx)(Wn,{})}),(0,h.jsx)(Gn,{children:uN.map(w=>(0,h.jsx)(ut,{value:w,children:w},w))})]})]}),(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-first-value",children:i==="hash"||i==="stream"?"Initial field":i==="zset"?"Initial member":"Initial value"}),(0,h.jsx)(Jr,{id:"redis-key-first-value",value:a,onChange:o})]}),(i==="hash"||i==="stream")&&(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-second-value",children:"Initial value"}),(0,h.jsx)(Jr,{id:"redis-key-second-value",value:l,onChange:u})]}),i==="zset"&&(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-score",children:"Score"}),(0,h.jsx)(xt,{id:"redis-key-score",type:"number",value:m,onChange:w=>d(w.target.value),className:"font-mono"})]}),(0,h.jsxs)(Yt,{children:[(0,h.jsx)(qt,{htmlFor:"redis-key-ttl",children:"TTL in seconds"}),(0,h.jsx)(xt,{id:"redis-key-ttl",type:"number",min:1,value:f,onChange:w=>p(w.target.value),placeholder:"Persistent",className:"font-mono h-8"}),(0,h.jsx)($s,{children:"Leave empty to create a persistent key."})]})]}),(0,h.jsxs)("div",{className:"flex justify-end gap-2 border-t border-border pt-4",children:[(0,h.jsx)(le,{variant:"outline",onClick:()=>e("redis-browser.create-key"),children:"Cancel"}),(0,h.jsx)(le,{disabled:N||A,onClick:v,children:"Create key"})]})]})},dN=["string","hash","list","set","zset","stream"],mN={string:"STR",hash:"HASH",list:"LIST",set:"SET",zset:"ZSET",stream:"XSTR"},fN=e=>e===-1?"∞":e<0?"gone":e<1e3?`${e}ms`:e<6e4?`${Math.ceil(e/1e3)}s`:e<36e5?`${Math.ceil(e/6e4)}m`:`${Math.ceil(e/36e5)}h`,pN=e=>e===null?"—":e<1024?`${e} B`:`${(e/1024).toFixed(1)} KiB`,gN=(e,t)=>t!==void 0?t||"(empty key)":`0x${Array.from(Bd(e),n=>n.toString(16).padStart(2,"0")).join("")}`,EN=()=>{const{openOverlay:e}=Yn(),[t,n]=et("key"),[r,i]=et("search",{defaultValue:""}),[s,a]=(0,E.useState)(r),[o,l]=et("type",{defaultValue:""}),[u,m]=et("glob",{defaultValue:"false"}),d=u==="true",f=Fd({search:s,type:o,exactPattern:d}),p=(0,E.useMemo)(()=>f.data?.pages.flatMap(b=>b.keys)??[],[f.data]),g=(0,E.useRef)(null),N=mh({count:p.length,getScrollElement:()=>g.current,estimateSize:()=>33,overscan:10}),C=N.getVirtualItems();return(0,E.useEffect)(()=>{const b=window.setTimeout(()=>a(r),250);return()=>window.clearTimeout(b)},[r]),(0,E.useEffect)(()=>{const b=C.at(-1);b&&b.index>=p.length-5&&f.hasNextPage&&!f.isFetchingNextPage&&f.fetchNextPage()},[C,p.length,f.hasNextPage,f.isFetchingNextPage,f.fetchNextPage]),(0,h.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col bg-background font-mono",children:[(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{className:"space-y-2 px-3 pb-3 pt-2",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,h.jsx)(Zi,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,h.jsx)(xt,{variant:"outline",value:r,onChange:b=>i(b.target.value),placeholder:d?"Redis glob pattern":"Find keys","aria-label":"Find Redis keys",className:"h-8 rounded-sm pl-8"})]}),(0,h.jsx)(le,{variant:"outline",size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>Ze.promise(f.refetch({throwOnError:!0}),{loading:"Refreshing Redis keys...",success:"Redis keys refreshed",error:"Failed to refresh Redis keys"}),disabled:f.isFetching,"aria-label":"Refresh Redis keys",children:(0,h.jsx)($o,{className:J(f.isFetching&&"animate-spin")})}),(0,h.jsx)(le,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>e("redis-browser.create-key"),"aria-label":"Create Redis key",children:(0,h.jsx)(en,{})})]}),(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsxs)(Qn,{value:o||"all",onValueChange:b=>l(b==="all"?"":b),children:[(0,h.jsx)(Vn,{variant:"outline","aria-label":"Filter Redis key type",className:"h-8! min-w-0 flex-1 justify-between rounded-sm",children:(0,h.jsx)(Wn,{})}),(0,h.jsxs)(Gn,{children:[(0,h.jsx)(ut,{value:"all",children:"All types"}),dN.map(b=>(0,h.jsx)(ut,{value:b,children:b},b))]})]}),(0,h.jsxs)(Dd,{variant:"outline",size:"lg",pressed:d,onPressedChange:b=>m(b?"true":"false"),className:"shrink-0 rounded-sm px-2 text-xs/relaxed uppercase","aria-label":"Use Redis glob pattern",children:[(0,h.jsx)(Rh,{className:"size-4"})," Glob"]})]})]}),(0,h.jsxs)("div",{className:"flex h-6 items-center justify-between px-4 text-[9px] uppercase tracking-wider text-muted-foreground",children:[(0,h.jsxs)("span",{children:[p.length," loaded"]}),(0,h.jsx)("span",{children:f.dataUpdatedAt>0?new Date(f.dataUpdatedAt).toLocaleTimeString():"not scanned"})]})]}),(0,h.jsxs)("div",{ref:g,className:"min-h-0 flex-1 overflow-auto",children:[f.isLoading?(0,h.jsx)("div",{className:"px-3 py-4 text-xs text-muted-foreground",children:"Scanning keyspace…"}):p.length===0?(0,h.jsxs)("div",{className:"flex min-h-32 flex-col items-center justify-center gap-2 px-4 text-center text-muted-foreground",children:[(0,h.jsx)(Eh,{className:"size-4"}),(0,h.jsx)("span",{className:"text-xs",children:"No keys in this scan."}),(0,h.jsxs)(le,{variant:"outline",size:"sm",onClick:()=>e("redis-browser.create-key"),children:[(0,h.jsx)(en,{})," Create key"]})]}):(0,h.jsx)("div",{className:"relative w-full",style:{height:`${N.getTotalSize()}px`},children:C.map(b=>{const A=p[b.index],v=A.key.base64||"-",w=gN(A.key.base64,A.key.utf8);return(0,h.jsxs)(le,{variant:"ghost",onClick:()=>n(v),className:J("absolute left-0 top-0 h-auto w-full justify-start gap-2 rounded-none px-4 py-1.5 text-sm font-normal transition-colors",t===v?"bg-sidebar-accent text-sidebar-accent-foreground font-medium before:absolute before:inset-y-0 before:left-0 before:w-1 before:bg-primary":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),style:{transform:`translateY(${b.start}px)`},title:w,children:[(0,h.jsx)("span",{className:"min-w-0 flex-1 truncate text-left text-current",children:w}),(0,h.jsx)(gd,{variant:"outline",className:"h-4 w-10 shrink-0 justify-center rounded-sm px-1 text-[8px] font-normal text-muted-foreground",children:mN[A.type]??"?"}),(0,h.jsxs)("span",{className:"shrink-0 text-[9px] text-muted-foreground",children:[pN(A.memoryBytes)," ·"," ",A.ttlMs===-1?(0,h.jsx)(Sh,{className:"inline size-3 align-[-2px]","aria-label":"No expiry"}):fN(A.ttlMs)]})]},`${v}-${b.index}`)})}),f.isFetchingNextPage&&(0,h.jsx)("div",{className:"px-2 py-1 text-center text-[10px] text-muted-foreground",children:"Scanning more…"})]}),(0,h.jsx)(hN,{})]})},TN=()=>{const{pathname:e}=Dr(),t=e.split("/")[1],{dbType:n}=nt(),r=(0,E.useMemo)(()=>{if(n==="redis"&&t!=="runner")return(0,h.jsx)(EN,{});switch(t){case"":case"table":case"schema":return(0,h.jsx)(Fo,{});case"runner":return(0,h.jsx)(ZA,{});default:return(0,h.jsx)(Fo,{})}},[n,t]);return(0,h.jsxs)(cN,{children:[(0,h.jsx)(lN,{}),r,(0,h.jsx)(oN,{})]})},VN=Ki({component:()=>bN});function bN(){const{dbType:e}=nt(),{pathname:t}=Dr(),n=t.split("/")[1],{sidebar:{isPinned:r,width:i}}=Pr();return e==="redis"&&n!=="browser"&&n!=="runner"?(0,h.jsx)(Ms,{to:"/browser"}):e!=="redis"&&n==="browser"?(0,h.jsx)(Ms,{to:"/"}):(0,h.jsxs)("div",{className:"bg-background text-foreground w-dvw flex h-dvh max-h-dvh overflow-hidden relative",children:[(0,h.jsx)(TN,{}),(0,h.jsxs)("div",{className:"flex-1 flex flex-col h-full overflow-hidden ",style:{marginLeft:r?`${i}px`:"0"},children:[(0,h.jsx)(GA,{}),(0,h.jsx)(hh,{})]})]})}export{tA as a,bN as component,je as i,FC as n,YN as r,VN as t};