@novu/framework 2.11.0 → 2.11.2-alpha.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.
- package/README.md +114 -9
- package/ai-sdk/package.json +4 -0
- package/cards/package.json +4 -0
- package/dist/{esm/index-dylq0Kmx.d.ts → cjs/agent.types-DdgaVUb7.d.cts} +356 -192
- package/dist/cjs/ai-sdk/index.cjs +1 -0
- package/dist/cjs/ai-sdk/index.d.cts +39 -0
- package/dist/cjs/cards.cjs +57 -0
- package/dist/cjs/cards.d.cts +2 -0
- package/dist/cjs/{health-check.types-uaDLF5bo.d.cts → health-check.types-CkUmYLNG.d.cts} +34 -140
- package/dist/cjs/index-BCp3U0UG.d.cts +189 -0
- package/dist/cjs/index.cjs +138 -135
- package/dist/cjs/index.d.cts +5 -3
- package/dist/cjs/internal/index.cjs +1 -1
- package/dist/cjs/internal/index.d.cts +96 -4
- package/dist/cjs/jsx-dev-runtime.cjs +1 -1
- package/dist/cjs/jsx-runtime.cjs +1 -1
- package/dist/cjs/langchain/index.cjs +1 -0
- package/dist/cjs/langchain/index.d.cts +105 -0
- package/dist/cjs/servers/express.cjs +137 -134
- package/dist/cjs/servers/express.d.cts +6 -4
- package/dist/cjs/servers/h3.cjs +136 -133
- package/dist/cjs/servers/h3.d.cts +6 -4
- package/dist/cjs/servers/lambda.cjs +138 -135
- package/dist/cjs/servers/lambda.d.cts +6 -5
- package/dist/cjs/servers/nest.cjs +136 -133
- package/dist/cjs/servers/nest.d.cts +21 -7
- package/dist/cjs/servers/next.cjs +138 -135
- package/dist/cjs/servers/next.d.cts +6 -4
- package/dist/cjs/servers/nuxt.cjs +136 -133
- package/dist/cjs/servers/nuxt.d.cts +6 -4
- package/dist/cjs/servers/remix.cjs +138 -135
- package/dist/cjs/servers/remix.d.cts +6 -4
- package/dist/cjs/servers/sveltekit.cjs +136 -133
- package/dist/cjs/servers/sveltekit.d.cts +6 -4
- package/dist/cjs/step-resolver.d.cts +3 -2
- package/dist/cjs/{subscriber.types-PRaHFLJu.d.cts → subscriber.types-DxMMRBIi.d.cts} +2 -78
- package/dist/cjs/util.types-DaFfsxgy.d.cts +78 -0
- package/dist/{cjs/index-D-SLxj--.d.cts → esm/agent.types-Bu3DhlVb.d.ts} +356 -192
- package/dist/esm/ai-sdk/index.d.ts +39 -0
- package/dist/esm/ai-sdk/index.js +1 -0
- package/dist/esm/cards.d.ts +2 -0
- package/dist/esm/cards.js +1 -0
- package/dist/esm/{chunk-K7PM3FEJ.js → chunk-3XT6S7TZ.js} +14 -14
- package/dist/esm/chunk-3ZWME5KT.js +0 -0
- package/dist/esm/chunk-C3P3ZH2I.js +36 -0
- package/dist/esm/chunk-FHYMHX3T.js +1 -0
- package/dist/esm/chunk-KLIOXJR3.js +1 -0
- package/dist/esm/chunk-W6DIBD4Z.js +1 -0
- package/dist/esm/chunk-YF62BBGH.js +98 -0
- package/dist/esm/{health-check.types-XZwesagD.d.ts → health-check.types-nDCnGlmX.d.ts} +34 -140
- package/dist/esm/index-DEehllqa.d.ts +189 -0
- package/dist/esm/index.d.ts +5 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +96 -4
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/jsx-dev-runtime.js +1 -1
- package/dist/esm/jsx-runtime-7EPQR56T.js +1 -0
- package/dist/esm/jsx-runtime.js +1 -1
- package/dist/esm/langchain/index.d.ts +105 -0
- package/dist/esm/langchain/index.js +1 -0
- package/dist/esm/servers/express.d.ts +6 -4
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +6 -4
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +6 -5
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +21 -7
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +6 -4
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +6 -4
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +6 -4
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +6 -4
- package/dist/esm/servers/sveltekit.js +1 -1
- package/dist/esm/step-resolver.d.ts +3 -2
- package/dist/esm/step-resolver.js +1 -1
- package/dist/esm/{subscriber.types-CC7F0JO_.d.ts → subscriber.types-BbyO_Cz6.d.ts} +2 -78
- package/dist/esm/util.types-DaFfsxgy.d.ts +78 -0
- package/dist/esm/validators.js +1 -1
- package/package.json +55 -7
- package/dist/esm/chunk-52LSX2V5.js +0 -1
- package/dist/esm/chunk-LJUUDK2J.js +0 -130
- package/dist/esm/chunk-N4PZBM53.js +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";var ho=Object.create;var ee=Object.defineProperty;var fo=Object.getOwnPropertyDescriptor;var po=Object.getOwnPropertyNames;var mo=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty;var bo=(t,r,e)=>r in t?ee(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var ko=(t,r)=>()=>{try{return r||t((r={exports:{}}).exports,r),r.exports}catch(e){throw r=0,e}},Hn=(t,r)=>{for(var e in r)ee(t,e,{get:r[e],enumerable:!0})},$n=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of po(r))!go.call(t,i)&&i!==e&&ee(t,i,{get:()=>r[i],enumerable:!(n=fo(r,i))||n.enumerable});return t};var Ye=(t,r,e)=>(e=t!=null?ho(mo(t)):{},$n(r||!t||!t.__esModule?ee(e,"default",{value:t,enumerable:!0}):e,t)),yo=t=>$n(ee({},"__esModule",{value:!0}),t);var L=(t,r,e)=>bo(t,typeof r!="symbol"?r+"":r,e);var fa=ko((mk,ha)=>{"use strict";var Oe=Object.prototype.hasOwnProperty,ca=Object.prototype.toString,ia=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,oa=function(r){return typeof Array.isArray=="function"?Array.isArray(r):ca.call(r)==="[object Array]"},sa=function(r){if(!r||ca.call(r)!=="[object Object]")return!1;var e=Oe.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&Oe.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!e&&!n)return!1;var i;for(i in r);return typeof i=="undefined"||Oe.call(r,i)},la=function(r,e){ia&&e.name==="__proto__"?ia(r,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):r[e.name]=e.newValue},ua=function(r,e){if(e==="__proto__")if(Oe.call(r,e)){if(aa)return aa(r,e).value}else return;return r[e]};ha.exports=function t(){var r,e,n,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(r=arguments[l],r!=null)for(e in r)n=ua(s,e),i=ua(r,e),s!==i&&(c&&i&&(sa(i)||(o=oa(i)))?(o?(o=!1,a=n&&oa(n)?n:[]):a=n&&sa(n)?n:{},la(s,{name:e,newValue:t(c,a,i)})):typeof i!="undefined"&&la(s,{name:e,newValue:i}));return s}});var yh={};Hn(yh,{Actions:()=>Qa,Button:()=>Ka,Card:()=>Xa,CardLink:()=>Ya,CardText:()=>Za,Divider:()=>to,Select:()=>eo,SelectOption:()=>ro,TextInput:()=>no});module.exports=yo(yh);var xo={};function kt(t,r){let e=r||xo,n=typeof e.includeImageAlt=="boolean"?e.includeImageAlt:!0,i=typeof e.includeHtml=="boolean"?e.includeHtml:!0;return Vn(t,n,i)}function Vn(t,r,e){if(wo(t)){if("value"in t)return t.type==="html"&&!e?"":t.value;if(r&&"alt"in t&&t.alt)return t.alt;if("children"in t)return jn(t.children,r,e)}return Array.isArray(t)?jn(t,r,e):""}function jn(t,r,e){let n=[],i=-1;for(;++i<t.length;)n[i]=Vn(t[i],r,e);return n.join("")}function wo(t){return!!(t&&typeof t=="object")}function Ze(t,r){let e=String(t);if(typeof r!="string")throw new TypeError("Expected character");let n=0,i=e.indexOf(r);for(;i!==-1;)n++,i=e.indexOf(r,i+r.length);return n}var W=Et(/[A-Za-z]/),G=Et(/[\dA-Za-z]/),Wn=Et(/[#-'*+\--9=?A-Z^-~]/);function vt(t){return t!==null&&(t<32||t===127)}var re=Et(/\d/),Gn=Et(/[\dA-Fa-f]/),Jn=Et(/[!-/:-@[-`{-~]/);function T(t){return t!==null&&t<-2}function O(t){return t!==null&&(t<0||t===32)}function M(t){return t===-2||t===-1||t===32}var Rt=Et(/\p{P}|\p{S}/u),ut=Et(/\s/);function Et(t){return r;function r(e){return e!==null&&e>-1&&t.test(String.fromCharCode(e))}}function tr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var It=(function(t){if(t==null)return To;if(typeof t=="function")return me(t);if(typeof t=="object")return Array.isArray(t)?So(t):Eo(t);if(typeof t=="string")return Io(t);throw new Error("Expected function, string, or object as test")});function So(t){let r=[],e=-1;for(;++e<t.length;)r[e]=It(t[e]);return me(n);function n(...i){let o=-1;for(;++o<r.length;)if(r[o].apply(this,i))return!0;return!1}}function Eo(t){let r=t;return me(e);function e(n){let i=n,o;for(o in t)if(i[o]!==r[o])return!1;return!0}}function Io(t){return me(r);function r(e){return e&&e.type===t}}function me(t){return r;function r(e,n,i){return!!(_o(e)&&t.call(this,e,typeof n=="number"?n:void 0,i||void 0))}}function To(){return!0}function _o(t){return t!==null&&typeof t=="object"&&"type"in t}function Qn(t){return"\x1B[33m"+t+"\x1B[39m"}var Kn=[],ge=!0,Ot=!1,be="skip";function ne(t,r,e,n){let i;typeof r=="function"&&typeof e!="function"?(n=e,e=r):i=r;let o=It(i),a=n?-1:1;s(t,void 0,[])();function s(l,u,c){let h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){let f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(d,"name",{value:"node ("+Qn(l.type+(f?"<"+f+">":""))+")"})}return d;function d(){let f=Kn,g,S,E;if((!r||o(l,u,c[c.length-1]||void 0))&&(f=Co(e(l,c)),f[0]===Ot))return f;if("children"in l&&l.children){let y=l;if(y.children&&f[0]!==be)for(S=(n?y.children.length:-1)+a,E=c.concat(y);S>-1&&S<y.children.length;){let _=y.children[S];if(g=s(_,S,E)(),g[0]===Ot)return g;S=typeof g[1]=="number"?g[1]:S+a}}return f}}}function Co(t){return Array.isArray(t)?t:typeof t=="number"?[ge,t]:t==null?Kn:[t]}function er(t,r,e){let i=It((e||{}).ignore||[]),o=Ao(r),a=-1;for(;++a<o.length;)ne(t,"text",s);function s(u,c){let h=-1,d;for(;++h<c.length;){let f=c[h],g=d?d.children:void 0;if(i(f,g?g.indexOf(f):void 0,d))return;d=f}if(d)return l(u,c)}function l(u,c){let h=c[c.length-1],d=o[a][0],f=o[a][1],g=0,E=h.children.indexOf(u),y=!1,_=[];d.lastIndex=0;let w=d.exec(u.value);for(;w;){let D=w.index,P={index:w.index,input:w.input,stack:[...c,u]},x=f(...w,P);if(typeof x=="string"&&(x=x.length>0?{type:"text",value:x}:void 0),x===!1?d.lastIndex=D+1:(g!==D&&_.push({type:"text",value:u.value.slice(g,D)}),Array.isArray(x)?_.push(...x):x&&_.push(x),g=D+w[0].length,y=!0),!d.global)break;w=d.exec(u.value)}return y?(g<u.value.length&&_.push({type:"text",value:u.value.slice(g)}),h.children.splice(E,1,..._)):_=[u],E+_.length}}function Ao(t){let r=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let e=!t[0]||Array.isArray(t[0])?t:[t],n=-1;for(;++n<e.length;){let i=e[n];r.push([Mo(i[0]),Lo(i[1])])}return r}function Mo(t){return typeof t=="string"?new RegExp(tr(t),"g"):t}function Lo(t){return typeof t=="function"?t:function(){return t}}var rr="phrasing",nr=["autolink","link","image","label"];function ar(){return{transforms:[No],enter:{literalAutolink:Fo,literalAutolinkEmail:ir,literalAutolinkHttp:ir,literalAutolinkWww:ir},exit:{literalAutolink:Oo,literalAutolinkEmail:Ro,literalAutolinkHttp:Do,literalAutolinkWww:vo}}}function or(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rr,notInConstruct:nr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rr,notInConstruct:nr},{character:":",before:"[ps]",after:"\\/",inConstruct:rr,notInConstruct:nr}]}}function Fo(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function ir(t){this.config.enter.autolinkProtocol.call(this,t)}function Do(t){this.config.exit.autolinkProtocol.call(this,t)}function vo(t){this.config.exit.data.call(this,t);let r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(t)}function Ro(t){this.config.exit.autolinkEmail.call(this,t)}function Oo(t){this.exit(t)}function No(t){er(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Po],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,zo]],{ignore:["link","linkReference"]})}function Po(t,r,e,n,i){let o="";if(!Xn(i)||(/^w/i.test(r)&&(e=r+e,r="",o="http://"),!qo(e)))return!1;let a=Bo(e+n);if(!a[0])return!1;let s={type:"link",title:null,url:o+r+a[0],children:[{type:"text",value:r+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function zo(t,r,e,n){return!Xn(n,!0)||/[-\d_]$/.test(e)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+e,children:[{type:"text",value:r+"@"+e}]}}function qo(t){let r=t.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function Bo(t){let r=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!r)return[t,void 0];t=t.slice(0,r.index);let e=r[0],n=e.indexOf(")"),i=Ze(t,"("),o=Ze(t,")");for(;n!==-1&&i>o;)t+=e.slice(0,n+1),e=e.slice(n+1),n=e.indexOf(")"),o++;return[t,e]}function Xn(t,r){let e=t.input.charCodeAt(t.index-1);return(t.index===0||ut(e)||Rt(e))&&(!r||e!==47)}function X(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Yn.peek=Qo;function sr(){return{enter:{gfmFootnoteDefinition:Uo,gfmFootnoteDefinitionLabelString:Ho,gfmFootnoteCall:Vo,gfmFootnoteCallString:Wo},exit:{gfmFootnoteDefinition:jo,gfmFootnoteDefinitionLabelString:$o,gfmFootnoteCall:Jo,gfmFootnoteCallString:Go}}}function lr(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Ko,footnoteReference:Yn}}}function Uo(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Ho(){this.buffer()}function $o(t){let r=this.resume(),e=this.stack[this.stack.length-1];e.type,e.label=r,e.identifier=X(this.sliceSerialize(t)).toLowerCase()}function jo(t){this.exit(t)}function Vo(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Wo(){this.buffer()}function Go(t){let r=this.resume(),e=this.stack[this.stack.length-1];e.type,e.label=r,e.identifier=X(this.sliceSerialize(t)).toLowerCase()}function Jo(t){this.exit(t)}function Yn(t,r,e,n){let i=e.createTracker(n),o=i.move("[^"),a=e.enter("footnoteReference"),s=e.enter("reference");return o+=i.move(e.safe(e.associationId(t),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Qo(){return"["}function Ko(t,r,e,n){let i=e.createTracker(n),o=i.move("[^"),a=e.enter("footnoteDefinition"),s=e.enter("label");return o+=i.move(e.safe(e.associationId(t),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(t.children&&t.children.length>0?" ":"")),i.shift(4),o+=i.move(e.indentLines(e.containerFlow(t,i.current()),Xo)),a(),o}function Xo(t,r,e){return r===0?t:(e?"":" ")+t}var Yo=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zn.peek=es;function ur(){return{canContainEols:["delete"],enter:{strikethrough:Zo},exit:{strikethrough:ts}}}function cr(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yo}],handlers:{delete:Zn}}}function Zo(t){this.enter({type:"delete",children:[]},t)}function ts(t){this.exit(t)}function Zn(t,r,e,n){let i=e.createTracker(n),o=e.enter("strikethrough"),a=i.move("~~");return a+=e.containerPhrasing(t,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function es(){return"~"}function ei(t,r={}){let e=(r.align||[]).concat(),n=r.stringLength||ns,i=[],o=[],a=[],s=[],l=0,u=-1;for(;++u<t.length;){let g=[],S=[],E=-1;for(t[u].length>l&&(l=t[u].length);++E<t[u].length;){let y=rs(t[u][E]);if(r.alignDelimiters!==!1){let _=n(y);S[E]=_,(s[E]===void 0||_>s[E])&&(s[E]=_)}g.push(y)}o[u]=g,a[u]=S}let c=-1;if(typeof e=="object"&&"length"in e)for(;++c<l;)i[c]=ti(e[c]);else{let g=ti(e);for(;++c<l;)i[c]=g}c=-1;let h=[],d=[];for(;++c<l;){let g=i[c],S="",E="";g===99?(S=":",E=":"):g===108?S=":":g===114&&(E=":");let y=r.alignDelimiters===!1?1:Math.max(1,s[c]-S.length-E.length),_=S+"-".repeat(y)+E;r.alignDelimiters!==!1&&(y=S.length+y+E.length,y>s[c]&&(s[c]=y),d[c]=y),h[c]=_}o.splice(1,0,h),a.splice(1,0,d),u=-1;let f=[];for(;++u<o.length;){let g=o[u],S=a[u];c=-1;let E=[];for(;++c<l;){let y=g[c]||"",_="",w="";if(r.alignDelimiters!==!1){let D=s[c]-(S[c]||0),P=i[c];P===114?_=" ".repeat(D):P===99?D%2?(_=" ".repeat(D/2+.5),w=" ".repeat(D/2-.5)):(_=" ".repeat(D/2),w=_):w=" ".repeat(D)}r.delimiterStart!==!1&&!c&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&y==="")&&(r.delimiterStart!==!1||c)&&E.push(" "),r.alignDelimiters!==!1&&E.push(_),E.push(y),r.alignDelimiters!==!1&&E.push(w),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||c!==l-1)&&E.push("|")}f.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return f.join(`
|
|
2
|
+
`)}function rs(t){return t==null?"":String(t)}function ns(t){return t.length}function ti(t){let r=typeof t=="string"?t.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function ri(t,r,e,n){let i=e.enter("blockquote"),o=e.createTracker(n);o.move("> "),o.shift(2);let a=e.indentLines(e.containerFlow(t,o.current()),is);return i(),a}function is(t,r,e){return">"+(e?"":" ")+t}function ii(t,r){return ni(t,r.inConstruct,!0)&&!ni(t,r.notInConstruct,!1)}function ni(t,r,e){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return e;let n=-1;for(;++n<r.length;)if(t.includes(r[n]))return!0;return!1}function hr(t,r,e,n){let i=-1;for(;++i<e.unsafe.length;)if(e.unsafe[i].character===`
|
|
3
|
+
`&&ii(e.stack,e.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
4
|
+
`}function ai(t,r){let e=String(t),n=e.indexOf(r),i=n,o=0,a=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>a&&(a=o):o=1,i=n+r.length,n=e.indexOf(r,i);return a}function oi(t,r){return!!(r.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function si(t){let r=t.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function li(t,r,e,n){let i=si(e),o=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(oi(t,e)){let h=e.enter("codeIndented"),d=e.indentLines(o,as);return h(),d}let s=e.createTracker(n),l=i.repeat(Math.max(ai(o,i)+1,3)),u=e.enter("codeFenced"),c=s.move(l);if(t.lang){let h=e.enter(`codeFencedLang${a}`);c+=s.move(e.safe(t.lang,{before:c,after:" ",encode:["`"],...s.current()})),h()}if(t.lang&&t.meta){let h=e.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(e.safe(t.meta,{before:c,after:`
|
|
5
|
+
`,encode:["`"],...s.current()})),h()}return c+=s.move(`
|
|
6
|
+
`),o&&(c+=s.move(o+`
|
|
7
|
+
`)),c+=s.move(l),u(),c}function as(t,r,e){return(e?"":" ")+t}function jt(t){let r=t.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function ui(t,r,e,n){let i=jt(e),o=i==='"'?"Quote":"Apostrophe",a=e.enter("definition"),s=e.enter("label"),l=e.createTracker(n),u=l.move("[");return u+=l.move(e.safe(e.associationId(t),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!t.url||/[\0- \u007F]/.test(t.url)?(s=e.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(e.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=e.enter("destinationRaw"),u+=l.move(e.safe(t.url,{before:u,after:t.title?" ":`
|
|
8
|
+
`,...l.current()}))),s(),t.title&&(s=e.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(e.safe(t.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function ci(t){let r=t.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}fr.peek=os;function fr(t,r,e,n){let i=ci(e),o=e.enter("emphasis"),a=e.createTracker(n),s=a.move(i);return s+=a.move(e.containerPhrasing(t,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function os(t,r,e){return e.options.emphasis||"*"}function dr(t,r,e,n){let i,o,a;typeof r=="function"&&typeof e!="function"?(o=void 0,a=r,i=e):(o=r,a=e,i=n),ne(t,o,s,i);function s(l,u){let c=u[u.length-1],h=c?c.children.indexOf(l):void 0;return a(l,h,c)}}function hi(t,r){let e=!1;return dr(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return e=!0,Ot}),!!((!t.depth||t.depth<3)&&kt(t)&&(r.options.setext||e))}function fi(t,r,e,n){let i=Math.max(Math.min(6,t.depth||1),1),o=e.createTracker(n);if(hi(t,e)){let c=e.enter("headingSetext"),h=e.enter("phrasing"),d=e.containerPhrasing(t,{...o.current(),before:`
|
|
9
|
+
`,after:`
|
|
10
|
+
`});return h(),c(),d+`
|
|
11
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
12
|
+
`))+1))}let a="#".repeat(i),s=e.enter("headingAtx"),l=e.enter("phrasing");o.move(a+" ");let u=e.containerPhrasing(t,{before:"# ",after:`
|
|
13
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,e.options.closeAtx&&(u+=" "+a),l(),s(),u}pr.peek=ss;function pr(t){return t.value||""}function ss(){return"<"}mr.peek=ls;function mr(t,r,e,n){let i=jt(e),o=i==='"'?"Quote":"Apostrophe",a=e.enter("image"),s=e.enter("label"),l=e.createTracker(n),u=l.move("![");return u+=l.move(e.safe(t.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(s=e.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(e.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=e.enter("destinationRaw"),u+=l.move(e.safe(t.url,{before:u,after:t.title?" ":")",...l.current()}))),s(),t.title&&(s=e.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(e.safe(t.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function ls(){return"!"}gr.peek=us;function gr(t,r,e,n){let i=t.referenceType,o=e.enter("imageReference"),a=e.enter("label"),s=e.createTracker(n),l=s.move("!["),u=e.safe(t.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();let c=e.stack;e.stack=[],a=e.enter("reference");let h=e.safe(e.associationId(t),{before:l,after:"]",...s.current()});return a(),e.stack=c,o(),i==="full"||!u||u!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function us(){return"!"}br.peek=cs;function br(t,r,e){let n=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<e.unsafe.length;){let a=e.unsafe[o],s=e.compilePattern(a),l;if(a.atBreak)for(;l=s.exec(n);){let u=l.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(l.index+1)}}return i+n+i}function cs(){return"`"}function kr(t,r){let e=kt(t);return!!(!r.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(e===t.url||"mailto:"+e===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}yr.peek=hs;function yr(t,r,e,n){let i=jt(e),o=i==='"'?"Quote":"Apostrophe",a=e.createTracker(n),s,l;if(kr(t,e)){let c=e.stack;e.stack=[],s=e.enter("autolink");let h=a.move("<");return h+=a.move(e.containerPhrasing(t,{before:h,after:">",...a.current()})),h+=a.move(">"),s(),e.stack=c,h}s=e.enter("link"),l=e.enter("label");let u=a.move("[");return u+=a.move(e.containerPhrasing(t,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=e.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(e.safe(t.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=e.enter("destinationRaw"),u+=a.move(e.safe(t.url,{before:u,after:t.title?" ":")",...a.current()}))),l(),t.title&&(l=e.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(e.safe(t.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function hs(t,r,e){return kr(t,e)?"<":"["}xr.peek=fs;function xr(t,r,e,n){let i=t.referenceType,o=e.enter("linkReference"),a=e.enter("label"),s=e.createTracker(n),l=s.move("["),u=e.containerPhrasing(t,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();let c=e.stack;e.stack=[],a=e.enter("reference");let h=e.safe(e.associationId(t),{before:l,after:"]",...s.current()});return a(),e.stack=c,o(),i==="full"||!u||u!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function fs(){return"["}function Vt(t){let r=t.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function di(t){let r=Vt(t),e=t.options.bulletOther;if(!e)return r==="*"?"-":"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(e===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+e+"`) to be different");return e}function pi(t){let r=t.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function ke(t){let r=t.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function mi(t,r,e,n){let i=e.enter("list"),o=e.bulletCurrent,a=t.ordered?pi(e):Vt(e),s=t.ordered?a==="."?")":".":di(e),l=r&&e.bulletLastUsed?a===e.bulletLastUsed:!1;if(!t.ordered){let c=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&e.stack[e.stack.length-1]==="list"&&e.stack[e.stack.length-2]==="listItem"&&e.stack[e.stack.length-3]==="list"&&e.stack[e.stack.length-4]==="listItem"&&e.indexStack[e.indexStack.length-1]===0&&e.indexStack[e.indexStack.length-2]===0&&e.indexStack[e.indexStack.length-3]===0&&(l=!0),ke(e)===a&&c){let h=-1;for(;++h<t.children.length;){let d=t.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),e.bulletCurrent=a;let u=e.containerFlow(t,n);return e.bulletLastUsed=a,e.bulletCurrent=o,i(),u}function gi(t){let r=t.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function bi(t,r,e,n){let i=gi(e),o=e.bulletCurrent||Vt(e);r&&r.type==="list"&&r.ordered&&(o=(typeof r.start=="number"&&r.start>-1?r.start:1)+(e.options.incrementListMarker===!1?0:r.children.indexOf(t))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(r&&r.type==="list"&&r.spread||t.spread))&&(a=Math.ceil(a/4)*4);let s=e.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);let l=e.enter("listItem"),u=e.indentLines(e.containerFlow(t,s.current()),c);return l(),u;function c(h,d,f){return d?(f?"":" ".repeat(a))+h:(f?o:o+" ".repeat(a-o.length))+h}}function ki(t,r,e,n){let i=e.enter("paragraph"),o=e.enter("phrasing"),a=e.containerPhrasing(t,n);return o(),i(),a}var wr=It(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yi(t,r,e,n){return(t.children.some(function(a){return wr(a)})?e.containerPhrasing:e.containerFlow).call(e,t,n)}function xi(t){let r=t.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}Sr.peek=ds;function Sr(t,r,e,n){let i=xi(e),o=e.enter("strong"),a=e.createTracker(n),s=a.move(i+i);return s+=a.move(e.containerPhrasing(t,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function ds(t,r,e){return e.options.strong||"*"}function wi(t,r,e,n){return e.safe(t.value,n)}function Si(t){let r=t.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function Ei(t,r,e){let n=(ke(e)+(e.options.ruleSpaces?" ":"")).repeat(Si(e));return e.options.ruleSpaces?n.slice(0,-1):n}var ie={blockquote:ri,break:hr,code:li,definition:ui,emphasis:fr,hardBreak:hr,heading:fi,html:pr,image:mr,imageReference:gr,inlineCode:br,link:yr,linkReference:xr,list:mi,listItem:bi,paragraph:ki,root:yi,strong:Sr,text:wi,thematicBreak:Ei};var Er={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
14
|
+
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"};var ps={}.hasOwnProperty;function Wt(t){return ps.call(Er,t)?Er[t]:!1}function ye(t,r){let e=Number.parseInt(t,r);return e<9||e===11||e>13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"\uFFFD":String.fromCodePoint(e)}var ms=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ii(t){return t.replace(ms,gs)}function gs(t,r,e){if(r)return r;if(e.charCodeAt(0)===35){let i=e.charCodeAt(1),o=i===120||i===88;return ye(e.slice(o?2:1),o?16:10)}return Wt(e)||t}function Tr(){return{enter:{table:bs,tableData:Ti,tableHeader:Ti,tableRow:ys},exit:{codeText:xs,table:ks,tableData:Ir,tableHeader:Ir,tableRow:Ir}}}function bs(t){let r=t._align;this.enter({type:"table",align:r.map(function(e){return e==="none"?null:e}),children:[]},t),this.data.inTable=!0}function ks(t){this.exit(t),this.data.inTable=void 0}function ys(t){this.enter({type:"tableRow",children:[]},t)}function Ir(t){this.exit(t)}function Ti(t){this.enter({type:"tableCell",children:[]},t)}function xs(t){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,ws));let e=this.stack[this.stack.length-1];e.type,e.value=r,this.exit(t)}function ws(t,r){return r==="|"?r:t}function _r(t){let r=t||{},e=r.tableCellPadding,n=r.tablePipeAlign,i=r.stringLength,o=e?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
15
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:a,tableCell:l,tableRow:s}};function a(f,g,S,E){return u(c(f,S,E),f.align)}function s(f,g,S,E){let y=h(f,S,E),_=u([y]);return _.slice(0,_.indexOf(`
|
|
16
|
+
`))}function l(f,g,S,E){let y=S.enter("tableCell"),_=S.enter("phrasing"),w=S.containerPhrasing(f,{...E,before:o,after:o});return _(),y(),w}function u(f,g){return ei(f,{align:g,alignDelimiters:n,padding:e,stringLength:i})}function c(f,g,S){let E=f.children,y=-1,_=[],w=g.enter("table");for(;++y<E.length;)_[y]=h(E[y],g,S);return w(),_}function h(f,g,S){let E=f.children,y=-1,_=[],w=g.enter("tableRow");for(;++y<E.length;)_[y]=l(E[y],f,g,S);return w(),_}function d(f,g,S){let E=ie.inlineCode(f,g,S);return S.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function Cr(){return{exit:{taskListCheckValueChecked:_i,taskListCheckValueUnchecked:_i,paragraph:Ss}}}function Ar(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Es}}}function _i(t){let r=this.stack[this.stack.length-2];r.type,r.checked=t.type==="taskListCheckValueChecked"}function Ss(t){let r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type==="text"){let i=r.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(t)}function Es(t,r,e,n){let i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",s=e.createTracker(n);o&&s.move(a);let l=ie.listItem(t,r,e,{...n,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function Mr(){return[ar(),sr(),ur(),Tr(),Cr()]}function Lr(t){return{extensions:[or(),lr(),cr(),_r(t),Ar()]}}function j(t,r,e,n){let i=t.length,o=0,a;if(r<0?r=-r>i?0:i+r:r=r>i?i:r,e=e>0?e:0,n.length<1e4)a=Array.from(n),a.unshift(r,e),t.splice(...a);else for(e&&t.splice(r,e);o<n.length;)a=n.slice(o,o+1e4),a.unshift(r,0),t.splice(...a),o+=1e4,r+=1e4}function Z(t,r){return t.length>0?(j(t,t.length,0,r),t):r}var Ci={}.hasOwnProperty;function xe(t){let r={},e=-1;for(;++e<t.length;)Is(r,t[e]);return r}function Is(t,r){let e;for(e in r){let i=(Ci.call(t,e)?t[e]:void 0)||(t[e]={}),o=r[e],a;if(o)for(a in o){Ci.call(i,a)||(i[a]=[]);let s=o[a];Ts(i[a],Array.isArray(s)?s:s?[s]:[])}}}function Ts(t,r){let e=-1,n=[];for(;++e<r.length;)(r[e].add==="after"?t:n).push(r[e]);j(t,0,0,n)}var _s={tokenize:Fs,partial:!0},Ai={tokenize:Ds,partial:!0},Mi={tokenize:vs,partial:!0},Li={tokenize:Rs,partial:!0},Cs={tokenize:Os,partial:!0},Fi={name:"wwwAutolink",tokenize:Ms,previous:vi},Di={name:"protocolAutolink",tokenize:Ls,previous:Ri},yt={name:"emailAutolink",tokenize:As,previous:Oi},ct={};function Dr(){return{text:ct}}var Nt=48;for(;Nt<123;)ct[Nt]=yt,Nt++,Nt===58?Nt=65:Nt===91&&(Nt=97);ct[43]=yt;ct[45]=yt;ct[46]=yt;ct[95]=yt;ct[72]=[yt,Di];ct[104]=[yt,Di];ct[87]=[yt,Fi];ct[119]=[yt,Fi];function As(t,r,e){let n=this,i,o;return a;function a(h){return!Fr(h)||!Oi.call(n,n.previous)||vr(n.events)?e(h):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),s(h))}function s(h){return Fr(h)?(t.consume(h),s):h===64?(t.consume(h),l):e(h)}function l(h){return h===46?t.check(Cs,c,u)(h):h===45||h===95||G(h)?(o=!0,t.consume(h),l):c(h)}function u(h){return t.consume(h),i=!0,l}function c(h){return o&&i&&W(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),r(h)):e(h)}}function Ms(t,r,e){let n=this;return i;function i(a){return a!==87&&a!==119||!vi.call(n,n.previous)||vr(n.events)?e(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(_s,t.attempt(Ai,t.attempt(Mi,o),e),e)(a))}function o(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),r(a)}}function Ls(t,r,e){let n=this,i="",o=!1;return a;function a(h){return(h===72||h===104)&&Ri.call(n,n.previous)&&!vr(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),t.consume(h),s):e(h)}function s(h){if(W(h)&&i.length<5)return i+=String.fromCodePoint(h),t.consume(h),s;if(h===58){let d=i.toLowerCase();if(d==="http"||d==="https")return t.consume(h),l}return e(h)}function l(h){return h===47?(t.consume(h),o?u:(o=!0,l)):e(h)}function u(h){return h===null||vt(h)||O(h)||ut(h)||Rt(h)?e(h):t.attempt(Ai,t.attempt(Mi,c),e)(h)}function c(h){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),r(h)}}function Fs(t,r,e){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,t.consume(a),i):a===46&&n===3?(t.consume(a),o):e(a)}function o(a){return a===null?e(a):r(a)}}function Ds(t,r,e){let n,i,o;return a;function a(u){return u===46||u===95?t.check(Li,l,s)(u):u===null||O(u)||ut(u)||u!==45&&Rt(u)?l(u):(o=!0,t.consume(u),a)}function s(u){return u===95?n=!0:(i=n,n=void 0),t.consume(u),a}function l(u){return i||n||!o?e(u):r(u)}}function vs(t,r){let e=0,n=0;return i;function i(a){return a===40?(e++,t.consume(a),i):a===41&&n<e?o(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?t.check(Li,r,o)(a):a===null||O(a)||ut(a)?r(a):(t.consume(a),i)}function o(a){return a===41&&n++,t.consume(a),i}}function Rs(t,r,e){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(t.consume(s),n):s===38?(t.consume(s),o):s===93?(t.consume(s),i):s===60||s===null||O(s)||ut(s)?r(s):e(s)}function i(s){return s===null||s===40||s===91||O(s)||ut(s)?r(s):n(s)}function o(s){return W(s)?a(s):e(s)}function a(s){return s===59?(t.consume(s),n):W(s)?(t.consume(s),a):e(s)}}function Os(t,r,e){return n;function n(o){return t.consume(o),i}function i(o){return G(o)?e(o):r(o)}}function vi(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||O(t)}function Ri(t){return!W(t)}function Oi(t){return!(t===47||Fr(t))}function Fr(t){return t===43||t===45||t===46||t===95||G(t)}function vr(t){let r=t.length,e=!1;for(;r--;){let n=t[r][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){e=!0;break}if(n._gfmAutolinkLiteralWalkedInto){e=!1;break}}return t.length>0&&!e&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}function Gt(t){if(t===null||O(t)||ut(t))return 1;if(Rt(t))return 2}function Tt(t,r,e){let n=[],i=-1;for(;++i<t.length;){let o=t[i].resolveAll;o&&!n.includes(o)&&(r=o(r,e),n.push(o))}return r}var ae={name:"attention",tokenize:Ps,resolveAll:Ns};function Ns(t,r){let e=-1,n,i,o,a,s,l,u,c;for(;++e<t.length;)if(t[e][0]==="enter"&&t[e][1].type==="attentionSequence"&&t[e][1]._close){for(n=e;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&r.sliceSerialize(t[n][1]).charCodeAt(0)===r.sliceSerialize(t[e][1]).charCodeAt(0)){if((t[n][1]._close||t[e][1]._open)&&(t[e][1].end.offset-t[e][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[e][1].end.offset-t[e][1].start.offset)%3))continue;l=t[n][1].end.offset-t[n][1].start.offset>1&&t[e][1].end.offset-t[e][1].start.offset>1?2:1;let h=Object.assign({},t[n][1].end),d=Object.assign({},t[e][1].start);Ni(h,-l),Ni(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},t[n][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[e][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[n][1].end),end:Object.assign({},t[e][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},t[n][1].end=Object.assign({},a.start),t[e][1].start=Object.assign({},s.end),u=[],t[n][1].end.offset-t[n][1].start.offset&&(u=Z(u,[["enter",t[n][1],r],["exit",t[n][1],r]])),u=Z(u,[["enter",i,r],["enter",a,r],["exit",a,r],["enter",o,r]]),u=Z(u,Tt(r.parser.constructs.insideSpan.null,t.slice(n+1,e),r)),u=Z(u,[["exit",o,r],["enter",s,r],["exit",s,r],["exit",i,r]]),t[e][1].end.offset-t[e][1].start.offset?(c=2,u=Z(u,[["enter",t[e][1],r],["exit",t[e][1],r]])):c=0,j(t,n-1,e-n+3,u),e=n+u.length-c-2;break}}for(e=-1;++e<t.length;)t[e][1].type==="attentionSequence"&&(t[e][1].type="data");return t}function Ps(t,r){let e=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Gt(n),o;return a;function a(l){return o=l,t.enter("attentionSequence"),s(l)}function s(l){if(l===o)return t.consume(l),s;let u=t.exit("attentionSequence"),c=Gt(l),h=!c||c===2&&i||e.includes(l),d=!i||i===2&&c||e.includes(n);return u._open=!!(o===42?h:h&&(i||!d)),u._close=!!(o===42?d:d&&(c||!h)),r(l)}}function Ni(t,r){t.column+=r,t.offset+=r,t._bufferIndex+=r}var Rr={name:"autolink",tokenize:zs};function zs(t,r,e){let n=0;return i;function i(f){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(f){return W(f)?(t.consume(f),a):f===64?e(f):u(f)}function a(f){return f===43||f===45||f===46||G(f)?(n=1,s(f)):u(f)}function s(f){return f===58?(t.consume(f),n=0,l):(f===43||f===45||f===46||G(f))&&n++<32?(t.consume(f),s):(n=0,u(f))}function l(f){return f===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),r):f===null||f===32||f===60||vt(f)?e(f):(t.consume(f),l)}function u(f){return f===64?(t.consume(f),c):Wn(f)?(t.consume(f),u):e(f)}function c(f){return G(f)?h(f):e(f)}function h(f){return f===46?(t.consume(f),n=0,c):f===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),r):d(f)}function d(f){if((f===45||G(f))&&n++<63){let g=f===45?d:h;return t.consume(f),g}return e(f)}}function A(t,r,e,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return a;function a(l){return M(l)?(t.enter(e),s(l)):r(l)}function s(l){return M(l)&&o++<i?(t.consume(l),s):(t.exit(e),r(l))}}var ht={tokenize:qs,partial:!0};function qs(t,r,e){return n;function n(o){return M(o)?A(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||T(o)?r(o):e(o)}}var we={name:"blockQuote",tokenize:Bs,continuation:{tokenize:Us},exit:Hs};function Bs(t,r,e){let n=this;return i;function i(a){if(a===62){let s=n.containerState;return s.open||(t.enter("blockQuote",{_container:!0}),s.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),o}return e(a)}function o(a){return M(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),r):(t.exit("blockQuotePrefix"),r(a))}}function Us(t,r,e){let n=this;return i;function i(a){return M(a)?A(t,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return t.attempt(we,r,e)(a)}}function Hs(t){t.exit("blockQuote")}var Se={name:"characterEscape",tokenize:$s};function $s(t,r,e){return n;function n(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return Jn(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),r):e(o)}}var Ee={name:"characterReference",tokenize:js};function js(t,r,e){let n=this,i=0,o,a;return s;function s(h){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),l}function l(h){return h===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(h),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),o=31,a=G,c(h))}function u(h){return h===88||h===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(h),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,a=Gn,c):(t.enter("characterReferenceValue"),o=7,a=re,c(h))}function c(h){if(h===59&&i){let d=t.exit("characterReferenceValue");return a===G&&!Wt(n.sliceSerialize(d))?e(h):(t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),t.exit("characterReference"),r)}return a(h)&&i++<o?(t.consume(h),c):e(h)}}var Pi={tokenize:Ws,partial:!0},Ie={name:"codeFenced",tokenize:Vs,concrete:!0};function Vs(t,r,e){let n=this,i={tokenize:P,partial:!0},o=0,a=0,s;return l;function l(x){return u(x)}function u(x){let z=n.events[n.events.length-1];return o=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,s=x,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(x)}function c(x){return x===s?(a++,t.consume(x),c):a<3?e(x):(t.exit("codeFencedFenceSequence"),M(x)?A(t,h,"whitespace")(x):h(x))}function h(x){return x===null||T(x)?(t.exit("codeFencedFence"),n.interrupt?r(x):t.check(Pi,S,D)(x)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===null||T(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),h(x)):M(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),A(t,f,"whitespace")(x)):x===96&&x===s?e(x):(t.consume(x),d)}function f(x){return x===null||T(x)?h(x):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||T(x)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),h(x)):x===96&&x===s?e(x):(t.consume(x),g)}function S(x){return t.attempt(i,D,E)(x)}function E(x){return t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),y}function y(x){return o>0&&M(x)?A(t,_,"linePrefix",o+1)(x):_(x)}function _(x){return x===null||T(x)?t.check(Pi,S,D)(x):(t.enter("codeFlowValue"),w(x))}function w(x){return x===null||T(x)?(t.exit("codeFlowValue"),_(x)):(t.consume(x),w)}function D(x){return t.exit("codeFenced"),r(x)}function P(x,z,H){let q=0;return b;function b(R){return x.enter("lineEnding"),x.consume(R),x.exit("lineEnding"),J}function J(R){return x.enter("codeFencedFence"),M(R)?A(x,B,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):B(R)}function B(R){return R===s?(x.enter("codeFencedFenceSequence"),C(R)):H(R)}function C(R){return R===s?(q++,x.consume(R),C):q>=a?(x.exit("codeFencedFenceSequence"),M(R)?A(x,v,"whitespace")(R):v(R)):H(R)}function v(R){return R===null||T(R)?(x.exit("codeFencedFence"),z(R)):H(R)}}}function Ws(t,r,e){let n=this;return i;function i(a){return a===null?e(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?e(a):r(a)}}var oe={name:"codeIndented",tokenize:Js},Gs={tokenize:Qs,partial:!0};function Js(t,r,e){let n=this;return i;function i(u){return t.enter("codeIndented"),A(t,o,"linePrefix",5)(u)}function o(u){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):e(u)}function a(u){return u===null?l(u):T(u)?t.attempt(Gs,a,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||T(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),r(u)}}function Qs(t,r,e){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?e(a):T(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):A(t,o,"linePrefix",5)(a)}function o(a){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?r(a):T(a)?i(a):e(a)}}var Or={name:"codeText",tokenize:Ys,resolve:Ks,previous:Xs};function Ks(t){let r=t.length-4,e=3,n,i;if((t[e][1].type==="lineEnding"||t[e][1].type==="space")&&(t[r][1].type==="lineEnding"||t[r][1].type==="space")){for(n=e;++n<r;)if(t[n][1].type==="codeTextData"){t[e][1].type="codeTextPadding",t[r][1].type="codeTextPadding",e+=2,r-=2;break}}for(n=e-1,r++;++n<=r;)i===void 0?n!==r&&t[n][1].type!=="lineEnding"&&(i=n):(n===r||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),r-=n-i-2,n=i+2),i=void 0);return t}function Xs(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ys(t,r,e){let n=this,i=0,o,a;return s;function s(d){return t.enter("codeText"),t.enter("codeTextSequence"),l(d)}function l(d){return d===96?(t.consume(d),i++,l):(t.exit("codeTextSequence"),u(d))}function u(d){return d===null?e(d):d===32?(t.enter("space"),t.consume(d),t.exit("space"),u):d===96?(a=t.enter("codeTextSequence"),o=0,h(d)):T(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),u):(t.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||T(d)?(t.exit("codeTextData"),u(d)):(t.consume(d),c)}function h(d){return d===96?(t.consume(d),o++,h):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),r(d)):(a.type="codeTextData",c(d))}}var Te=class{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,e){let n=e==null?Number.POSITIVE_INFINITY:e;return n<this.left.length?this.left.slice(r,n):r>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(r,e,n){let i=e||0;this.setCursor(Math.trunc(r));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&se(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),se(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),se(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){let e=this.left.splice(r,Number.POSITIVE_INFINITY);se(this.right,e.reverse())}else{let e=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);se(this.left,e.reverse())}}};function se(t,r){let e=0;if(r.length<1e4)t.push(...r);else for(;e<r.length;)t.push(...r.slice(e,e+1e4)),e+=1e4}function _e(t){let r={},e=-1,n,i,o,a,s,l,u,c=new Te(t);for(;++e<c.length;){for(;e in r;)e=r[e];if(n=c.get(e),e&&n[1].type==="chunkFlow"&&c.get(e-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(r,Zs(c,e)),e=r[e],u=!0);else if(n[1]._container){for(o=e,i=void 0;o--&&(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(n[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,e),s.unshift(n),c.splice(i,e-i+1,s))}}return j(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function Zs(t,r){let e=t.get(r)[1],n=t.get(r)[2],i=r-1,o=[],a=e._tokenizer||n.parser[e.contentType](e.start),s=a.events,l=[],u={},c,h,d=-1,f=e,g=0,S=0,E=[S];for(;f;){for(;t.get(++i)[1]!==f;);o.push(i),f._tokenizer||(c=n.sliceStream(f),f.next||c.push(null),h&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=e;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(S=d+1,E.push(S),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):E.pop(),d=E.length;d--;){let y=s.slice(E[d],E[d+1]),_=o.pop();l.push([_,_+y.length-1]),t.splice(_,2,y)}for(l.reverse(),d=-1;++d<l.length;)u[g+l[d][0]]=g+l[d][1],g+=l[d][1]-l[d][0]-1;return u}var Nr={tokenize:rl,resolve:el},tl={tokenize:nl,partial:!0};function el(t){return _e(t),t}function rl(t,r){let e;return n;function n(s){return t.enter("content"),e=t.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):T(s)?t.check(tl,a,o)(s):(t.consume(s),i)}function o(s){return t.exit("chunkContent"),t.exit("content"),r(s)}function a(s){return t.consume(s),t.exit("chunkContent"),e.next=t.enter("chunkContent",{contentType:"content",previous:e}),e=e.next,i}}function nl(t,r,e){let n=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),A(t,o,"linePrefix")}function o(a){if(a===null||T(a))return e(a);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?r(a):t.interrupt(n.parser.constructs.flow,e,r)(a)}}function Ce(t,r,e,n,i,o,a,s,l){let u=l||Number.POSITIVE_INFINITY,c=0;return h;function h(y){return y===60?(t.enter(n),t.enter(i),t.enter(o),t.consume(y),t.exit(o),d):y===null||y===32||y===41||vt(y)?e(y):(t.enter(n),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),S(y))}function d(y){return y===62?(t.enter(o),t.consume(y),t.exit(o),t.exit(i),t.exit(n),r):(t.enter(s),t.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(t.exit("chunkString"),t.exit(s),d(y)):y===null||y===60||T(y)?e(y):(t.consume(y),y===92?g:f)}function g(y){return y===60||y===62||y===92?(t.consume(y),f):f(y)}function S(y){return!c&&(y===null||y===41||O(y))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(n),r(y)):c<u&&y===40?(t.consume(y),c++,S):y===41?(t.consume(y),c--,S):y===null||y===32||y===40||vt(y)?e(y):(t.consume(y),y===92?E:S)}function E(y){return y===40||y===41||y===92?(t.consume(y),S):S(y)}}function Ae(t,r,e,n,i,o){let a=this,s=0,l;return u;function u(f){return t.enter(n),t.enter(i),t.consume(f),t.exit(i),t.enter(o),c}function c(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?e(f):f===93?(t.exit(o),t.enter(i),t.consume(f),t.exit(i),t.exit(n),r):T(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||T(f)||s++>999?(t.exit("chunkString"),c(f)):(t.consume(f),l||(l=!M(f)),f===92?d:h)}function d(f){return f===91||f===92||f===93?(t.consume(f),s++,h):h(f)}}function Me(t,r,e,n,i,o){let a;return s;function s(d){return d===34||d===39||d===40?(t.enter(n),t.enter(i),t.consume(d),t.exit(i),a=d===40?41:d,l):e(d)}function l(d){return d===a?(t.enter(i),t.consume(d),t.exit(i),t.exit(n),r):(t.enter(o),u(d))}function u(d){return d===a?(t.exit(o),l(a)):d===null?e(d):T(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),A(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===a||d===null||T(d)?(t.exit("chunkString"),u(d)):(t.consume(d),d===92?h:c)}function h(d){return d===a||d===92?(t.consume(d),c):c(d)}}function Pt(t,r){let e;return n;function n(i){return T(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e=!0,n):M(i)?A(t,n,e?"linePrefix":"lineSuffix")(i):r(i)}}var Pr={name:"definition",tokenize:al},il={tokenize:ol,partial:!0};function al(t,r,e){let n=this,i;return o;function o(f){return t.enter("definition"),a(f)}function a(f){return Ae.call(n,t,s,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=X(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):e(f)}function l(f){return O(f)?Pt(t,u)(f):u(f)}function u(f){return Ce(t,c,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return t.attempt(il,h,h)(f)}function h(f){return M(f)?A(t,d,"whitespace")(f):d(f)}function d(f){return f===null||T(f)?(t.exit("definition"),n.parser.defined.push(i),r(f)):e(f)}}function ol(t,r,e){return n;function n(s){return O(s)?Pt(t,i)(s):e(s)}function i(s){return Me(t,o,e,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return M(s)?A(t,a,"whitespace")(s):a(s)}function a(s){return s===null||T(s)?r(s):e(s)}}var zr={name:"hardBreakEscape",tokenize:sl};function sl(t,r,e){return n;function n(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return T(o)?(t.exit("hardBreakEscape"),r(o)):e(o)}}var qr={name:"headingAtx",tokenize:ul,resolve:ll};function ll(t,r){let e=t.length-2,n=3,i,o;return t[n][1].type==="whitespace"&&(n+=2),e-2>n&&t[e][1].type==="whitespace"&&(e-=2),t[e][1].type==="atxHeadingSequence"&&(n===e-1||e-4>n&&t[e-2][1].type==="whitespace")&&(e-=n+1===e?2:4),e>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[e][1].end},o={type:"chunkText",start:t[n][1].start,end:t[e][1].end,contentType:"text"},j(t,n,e-n+1,[["enter",i,r],["enter",o,r],["exit",o,r],["exit",i,r]])),t}function ul(t,r,e){let n=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&n++<6?(t.consume(c),a):c===null||O(c)?(t.exit("atxHeadingSequence"),s(c)):e(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||T(c)?(t.exit("atxHeading"),r(c)):M(c)?A(t,s,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||O(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}var zi=["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"],Br=["pre","script","style","textarea"];var Ur={name:"htmlFlow",tokenize:dl,resolveTo:fl,concrete:!0},cl={tokenize:ml,partial:!0},hl={tokenize:pl,partial:!0};function fl(t){let r=t.length;for(;r--&&!(t[r][0]==="enter"&&t[r][1].type==="htmlFlow"););return r>1&&t[r-2][1].type==="linePrefix"&&(t[r][1].start=t[r-2][1].start,t[r+1][1].start=t[r-2][1].start,t.splice(r-2,2)),t}function dl(t,r,e){let n=this,i,o,a,s,l;return u;function u(m){return c(m)}function c(m){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(m),h}function h(m){return m===33?(t.consume(m),d):m===47?(t.consume(m),o=!0,S):m===63?(t.consume(m),i=3,n.interrupt?r:p):W(m)?(t.consume(m),a=String.fromCharCode(m),E):e(m)}function d(m){return m===45?(t.consume(m),i=2,f):m===91?(t.consume(m),i=5,s=0,g):W(m)?(t.consume(m),i=4,n.interrupt?r:p):e(m)}function f(m){return m===45?(t.consume(m),n.interrupt?r:p):e(m)}function g(m){let rt="CDATA[";return m===rt.charCodeAt(s++)?(t.consume(m),s===rt.length?n.interrupt?r:B:g):e(m)}function S(m){return W(m)?(t.consume(m),a=String.fromCharCode(m),E):e(m)}function E(m){if(m===null||m===47||m===62||O(m)){let rt=m===47,Lt=a.toLowerCase();return!rt&&!o&&Br.includes(Lt)?(i=1,n.interrupt?r(m):B(m)):zi.includes(a.toLowerCase())?(i=6,rt?(t.consume(m),y):n.interrupt?r(m):B(m)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?e(m):o?_(m):w(m))}return m===45||G(m)?(t.consume(m),a+=String.fromCharCode(m),E):e(m)}function y(m){return m===62?(t.consume(m),n.interrupt?r:B):e(m)}function _(m){return M(m)?(t.consume(m),_):b(m)}function w(m){return m===47?(t.consume(m),b):m===58||m===95||W(m)?(t.consume(m),D):M(m)?(t.consume(m),w):b(m)}function D(m){return m===45||m===46||m===58||m===95||G(m)?(t.consume(m),D):P(m)}function P(m){return m===61?(t.consume(m),x):M(m)?(t.consume(m),P):w(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?e(m):m===34||m===39?(t.consume(m),l=m,z):M(m)?(t.consume(m),x):H(m)}function z(m){return m===l?(t.consume(m),l=null,q):m===null||T(m)?e(m):(t.consume(m),z)}function H(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||O(m)?P(m):(t.consume(m),H)}function q(m){return m===47||m===62||M(m)?w(m):e(m)}function b(m){return m===62?(t.consume(m),J):e(m)}function J(m){return m===null||T(m)?B(m):M(m)?(t.consume(m),J):e(m)}function B(m){return m===45&&i===2?(t.consume(m),$):m===60&&i===1?(t.consume(m),V):m===62&&i===4?(t.consume(m),it):m===63&&i===3?(t.consume(m),p):m===93&&i===5?(t.consume(m),lt):T(m)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(cl,pt,C)(m)):m===null||T(m)?(t.exit("htmlFlowData"),C(m)):(t.consume(m),B)}function C(m){return t.check(hl,v,pt)(m)}function v(m){return t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),R}function R(m){return m===null||T(m)?C(m):(t.enter("htmlFlowData"),B(m))}function $(m){return m===45?(t.consume(m),p):B(m)}function V(m){return m===47?(t.consume(m),a="",ot):B(m)}function ot(m){if(m===62){let rt=a.toLowerCase();return Br.includes(rt)?(t.consume(m),it):B(m)}return W(m)&&a.length<8?(t.consume(m),a+=String.fromCharCode(m),ot):B(m)}function lt(m){return m===93?(t.consume(m),p):B(m)}function p(m){return m===62?(t.consume(m),it):m===45&&i===2?(t.consume(m),p):B(m)}function it(m){return m===null||T(m)?(t.exit("htmlFlowData"),pt(m)):(t.consume(m),it)}function pt(m){return t.exit("htmlFlow"),r(m)}}function pl(t,r,e){let n=this;return i;function i(a){return T(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o):e(a)}function o(a){return n.parser.lazy[n.now().line]?e(a):r(a)}}function ml(t,r,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(ht,r,e)}}var Hr={name:"htmlText",tokenize:gl};function gl(t,r,e){let n=this,i,o,a;return s;function s(p){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(p),l}function l(p){return p===33?(t.consume(p),u):p===47?(t.consume(p),P):p===63?(t.consume(p),w):W(p)?(t.consume(p),H):e(p)}function u(p){return p===45?(t.consume(p),c):p===91?(t.consume(p),o=0,g):W(p)?(t.consume(p),_):e(p)}function c(p){return p===45?(t.consume(p),f):e(p)}function h(p){return p===null?e(p):p===45?(t.consume(p),d):T(p)?(a=h,V(p)):(t.consume(p),h)}function d(p){return p===45?(t.consume(p),f):h(p)}function f(p){return p===62?$(p):p===45?d(p):h(p)}function g(p){let it="CDATA[";return p===it.charCodeAt(o++)?(t.consume(p),o===it.length?S:g):e(p)}function S(p){return p===null?e(p):p===93?(t.consume(p),E):T(p)?(a=S,V(p)):(t.consume(p),S)}function E(p){return p===93?(t.consume(p),y):S(p)}function y(p){return p===62?$(p):p===93?(t.consume(p),y):S(p)}function _(p){return p===null||p===62?$(p):T(p)?(a=_,V(p)):(t.consume(p),_)}function w(p){return p===null?e(p):p===63?(t.consume(p),D):T(p)?(a=w,V(p)):(t.consume(p),w)}function D(p){return p===62?$(p):w(p)}function P(p){return W(p)?(t.consume(p),x):e(p)}function x(p){return p===45||G(p)?(t.consume(p),x):z(p)}function z(p){return T(p)?(a=z,V(p)):M(p)?(t.consume(p),z):$(p)}function H(p){return p===45||G(p)?(t.consume(p),H):p===47||p===62||O(p)?q(p):e(p)}function q(p){return p===47?(t.consume(p),$):p===58||p===95||W(p)?(t.consume(p),b):T(p)?(a=q,V(p)):M(p)?(t.consume(p),q):$(p)}function b(p){return p===45||p===46||p===58||p===95||G(p)?(t.consume(p),b):J(p)}function J(p){return p===61?(t.consume(p),B):T(p)?(a=J,V(p)):M(p)?(t.consume(p),J):q(p)}function B(p){return p===null||p===60||p===61||p===62||p===96?e(p):p===34||p===39?(t.consume(p),i=p,C):T(p)?(a=B,V(p)):M(p)?(t.consume(p),B):(t.consume(p),v)}function C(p){return p===i?(t.consume(p),i=void 0,R):p===null?e(p):T(p)?(a=C,V(p)):(t.consume(p),C)}function v(p){return p===null||p===34||p===39||p===60||p===61||p===96?e(p):p===47||p===62||O(p)?q(p):(t.consume(p),v)}function R(p){return p===47||p===62||O(p)?q(p):e(p)}function $(p){return p===62?(t.consume(p),t.exit("htmlTextData"),t.exit("htmlText"),r):e(p)}function V(p){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),ot}function ot(p){return M(p)?A(t,lt,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):lt(p)}function lt(p){return t.enter("htmlTextData"),a(p)}}var zt={name:"labelEnd",tokenize:Sl,resolveTo:wl,resolveAll:xl},bl={tokenize:El},kl={tokenize:Il},yl={tokenize:Tl};function xl(t){let r=-1;for(;++r<t.length;){let e=t[r][1];(e.type==="labelImage"||e.type==="labelLink"||e.type==="labelEnd")&&(t.splice(r+1,e.type==="labelImage"?4:2),e.type="data",r++)}return t}function wl(t,r){let e=t.length,n=0,i,o,a,s;for(;e--;)if(i=t[e][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[e][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[e][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=e,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=e);let l={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},u={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[a][1].end)},c={type:"labelText",start:Object.assign({},t[o+n+2][1].end),end:Object.assign({},t[a-2][1].start)};return s=[["enter",l,r],["enter",u,r]],s=Z(s,t.slice(o+1,o+n+3)),s=Z(s,[["enter",c,r]]),s=Z(s,Tt(r.parser.constructs.insideSpan.null,t.slice(o+n+4,a-3),r)),s=Z(s,[["exit",c,r],t[a-2],t[a-1],["exit",u,r]]),s=Z(s,t.slice(a+1)),s=Z(s,[["exit",l,r]]),j(t,o,t.length,s),t}function Sl(t,r,e){let n=this,i=n.events.length,o,a;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){o=n.events[i][1];break}return s;function s(d){return o?o._inactive?h(d):(a=n.parser.defined.includes(X(n.sliceSerialize({start:o.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelEnd"),l):e(d)}function l(d){return d===40?t.attempt(bl,c,a?c:h)(d):d===91?t.attempt(kl,c,a?u:h)(d):a?c(d):h(d)}function u(d){return t.attempt(yl,c,h)(d)}function c(d){return r(d)}function h(d){return o._balanced=!0,e(d)}}function El(t,r,e){return n;function n(h){return t.enter("resource"),t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),i}function i(h){return O(h)?Pt(t,o)(h):o(h)}function o(h){return h===41?c(h):Ce(t,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return O(h)?Pt(t,l)(h):c(h)}function s(h){return e(h)}function l(h){return h===34||h===39||h===40?Me(t,u,e,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):c(h)}function u(h){return O(h)?Pt(t,c)(h):c(h)}function c(h){return h===41?(t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),t.exit("resource"),r):e(h)}}function Il(t,r,e){let n=this;return i;function i(s){return Ae.call(n,t,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return n.parser.defined.includes(X(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?r(s):e(s)}function a(s){return e(s)}}function Tl(t,r,e){return n;function n(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),r):e(o)}}var $r={name:"labelStartImage",tokenize:_l,resolveAll:zt.resolveAll};function _l(t,r,e){let n=this;return i;function i(s){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(s),t.exit("labelImageMarker"),o}function o(s){return s===91?(t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelImage"),a):e(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?e(s):r(s)}}var jr={name:"labelStartLink",tokenize:Cl,resolveAll:zt.resolveAll};function Cl(t,r,e){let n=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?e(a):r(a)}}var le={name:"lineEnding",tokenize:Al};function Al(t,r){return e;function e(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),A(t,r,"linePrefix")}}var qt={name:"thematicBreak",tokenize:Ml};function Ml(t,r,e){let n=0,i;return o;function o(u){return t.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(t.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||T(u))?(t.exit("thematicBreak"),r(u)):e(u)}function l(u){return u===i?(t.consume(u),n++,l):(t.exit("thematicBreakSequence"),M(u)?A(t,s,"whitespace")(u):s(u))}}var Y={name:"list",tokenize:Dl,continuation:{tokenize:vl},exit:Ol},Ll={tokenize:Nl,partial:!0},Fl={tokenize:Rl,partial:!0};function Dl(t,r,e){let n=this,i=n.events[n.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(f){let g=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:re(f)){if(n.containerState.type||(n.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(qt,e,u)(f):u(f);if(!n.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return e(f)}function l(f){return re(f)&&++a<10?(t.consume(f),l):(!n.interrupt||a<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),u(f)):e(f)}function u(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,t.check(ht,n.interrupt?e:c,t.attempt(Ll,d,h))}function c(f){return n.containerState.initialBlankLine=!0,o++,d(f)}function h(f){return M(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),d):e(f)}function d(f){return n.containerState.size=o+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,r(f)}}function vl(t,r,e){let n=this;return n.containerState._closeFlow=void 0,t.check(ht,i,o);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,A(t,r,"listItemIndent",n.containerState.size+1)(s)}function o(s){return n.containerState.furtherBlankLines||!M(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(Fl,r,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,A(t,t.attempt(Y,r,e),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Rl(t,r,e){let n=this;return A(t,i,"listItemIndent",n.containerState.size+1);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?r(o):e(o)}}function Ol(t){t.exit(this.containerState.type)}function Nl(t,r,e){let n=this;return A(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=n.events[n.events.length-1];return!M(o)&&a&&a[1].type==="listItemPrefixWhitespace"?r(o):e(o)}}var Le={name:"setextUnderline",tokenize:zl,resolveTo:Pl};function Pl(t,r){let e=t.length,n,i,o;for(;e--;)if(t[e][0]==="enter"){if(t[e][1].type==="content"){n=e;break}t[e][1].type==="paragraph"&&(i=e)}else t[e][1].type==="content"&&t.splice(e,1),!o&&t[e][1].type==="definition"&&(o=e);let a={type:"setextHeading",start:Object.assign({},t[i][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,r]),t.splice(o+1,0,["exit",t[n][1],r]),t[n][1].end=Object.assign({},t[o][1].end)):t[n][1]=a,t.push(["exit",a,r]),t}function zl(t,r,e){let n=this,i;return o;function o(u){let c=n.events.length,h;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){h=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(t.enter("setextHeadingLine"),i=u,a(u)):e(u)}function a(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),M(u)?A(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||T(u)?(t.exit("setextHeadingLine"),r(u)):e(u)}}var ql={tokenize:Wl,partial:!0};function Vr(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$l,continuation:{tokenize:jl},exit:Vl}},text:{91:{name:"gfmFootnoteCall",tokenize:Hl},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Bl,resolveTo:Ul}}}}function Bl(t,r,e){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let l=n.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 s;function s(l){if(!a||!a._balanced)return e(l);let u=X(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?e(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),r(l))}}function Ul(t,r){let e=t.length,n;for(;e--;)if(t[e][1].type==="labelImage"&&t[e][0]==="enter"){n=t[e][1];break}t[e+1][1].type="data",t[e+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[e+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[e+3][1].end),end:Object.assign({},t[e+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[t[e+1],t[e+2],["enter",i,r],t[e+3],t[e+4],["enter",o,r],["exit",o,r],["enter",a,r],["enter",s,r],["exit",s,r],["exit",a,r],t[t.length-2],t[t.length-1],["exit",i,r]];return t.splice(e,t.length-e+1,...l),t}function Hl(t,r,e){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,a;return s;function s(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?e(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(h){if(o>999||h===93&&!a||h===null||h===91||O(h))return e(h);if(h===93){t.exit("chunkString");let d=t.exit("gfmFootnoteCallString");return i.includes(X(n.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),r):e(h)}return O(h)||(a=!0),o++,t.consume(h),h===92?c:u}function c(h){return h===91||h===92||h===93?(t.consume(h),o++,u):u(h)}}function $l(t,r,e){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,a=0,s;return l;function l(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):e(g)}function c(g){if(a>999||g===93&&!s||g===null||g===91||O(g))return e(g);if(g===93){t.exit("chunkString");let S=t.exit("gfmFootnoteDefinitionLabelString");return o=X(n.sliceSerialize(S)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return O(g)||(s=!0),a++,t.consume(g),g===92?h:c}function h(g){return g===91||g===92||g===93?(t.consume(g),a++,c):c(g)}function d(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(o)||i.push(o),A(t,f,"gfmFootnoteDefinitionWhitespace")):e(g)}function f(g){return r(g)}}function jl(t,r,e){return t.check(ht,r,t.attempt(ql,r,e))}function Vl(t){t.exit("gfmFootnoteDefinition")}function Wl(t,r,e){let n=this;return A(t,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?r(o):e(o)}}function Wr(t){let e=(t||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return e==null&&(e=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},h={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},d=[["enter",c,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",h,s]],f=s.parser.constructs.insideSpan.null;f&&j(d,d.length,0,Tt(f,a.slice(u+1,l),s)),j(d,d.length,0,[["exit",h,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",c,s]]),j(a,u-1,l-u+3,d),l=u+d.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){let u=this.previous,c=this.events,h=0;return d;function d(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(g):(a.enter("strikethroughSequenceTemporary"),f(g))}function f(g){let S=Gt(u);if(g===126)return h>1?l(g):(a.consume(g),h++,f);if(h<2&&!e)return l(g);let E=a.exit("strikethroughSequenceTemporary"),y=Gt(g);return E._open=!y||y===2&&!!S,E._close=!S||S===2&&!!y,s(g)}}}var Fe=class{constructor(){this.map=[]}add(r,e,n){Gl(this,r,e,n)}consume(r){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let e=this.map.length,n=[];for(;e>0;)e-=1,n.push(r.slice(this.map[e][0]+this.map[e][1]),this.map[e][2]),r.length=this.map[e][0];n.push([...r]),r.length=0;let i=n.pop();for(;i;)r.push(...i),i=n.pop();this.map.length=0}};function Gl(t,r,e,n){let i=0;if(!(e===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===r){t.map[i][1]+=e,t.map[i][2].push(...n);return}i+=1}t.map.push([r,e,n])}}function qi(t,r){let e=!1,n=[];for(;r<t.length;){let i=t[r];if(e){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[r-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(e=!0);r+=1}return n}function Gr(){return{flow:{null:{name:"table",tokenize:Jl,resolveAll:Ql}}}}function Jl(t,r,e){let n=this,i=0,o=0,a;return s;function s(b){let J=n.events.length-1;for(;J>-1;){let v=n.events[J][1].type;if(v==="lineEnding"||v==="linePrefix")J--;else break}let B=J>-1?n.events[J][1].type:null,C=B==="tableHead"||B==="tableRow"?x:l;return C===x&&n.parser.lazy[n.now().line]?e(b):C(b)}function l(b){return t.enter("tableHead"),t.enter("tableRow"),u(b)}function u(b){return b===124||(a=!0,o+=1),c(b)}function c(b){return b===null?e(b):T(b)?o>1?(o=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),f):e(b):M(b)?A(t,c,"whitespace")(b):(o+=1,a&&(a=!1,i+=1),b===124?(t.enter("tableCellDivider"),t.consume(b),t.exit("tableCellDivider"),a=!0,c):(t.enter("data"),h(b)))}function h(b){return b===null||b===124||O(b)?(t.exit("data"),c(b)):(t.consume(b),b===92?d:h)}function d(b){return b===92||b===124?(t.consume(b),h):h(b)}function f(b){return n.interrupt=!1,n.parser.lazy[n.now().line]?e(b):(t.enter("tableDelimiterRow"),a=!1,M(b)?A(t,g,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):g(b))}function g(b){return b===45||b===58?E(b):b===124?(a=!0,t.enter("tableCellDivider"),t.consume(b),t.exit("tableCellDivider"),S):P(b)}function S(b){return M(b)?A(t,E,"whitespace")(b):E(b)}function E(b){return b===58?(o+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(b),t.exit("tableDelimiterMarker"),y):b===45?(o+=1,y(b)):b===null||T(b)?D(b):P(b)}function y(b){return b===45?(t.enter("tableDelimiterFiller"),_(b)):P(b)}function _(b){return b===45?(t.consume(b),_):b===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(b),t.exit("tableDelimiterMarker"),w):(t.exit("tableDelimiterFiller"),w(b))}function w(b){return M(b)?A(t,D,"whitespace")(b):D(b)}function D(b){return b===124?g(b):b===null||T(b)?!a||i!==o?P(b):(t.exit("tableDelimiterRow"),t.exit("tableHead"),r(b)):P(b)}function P(b){return e(b)}function x(b){return t.enter("tableRow"),z(b)}function z(b){return b===124?(t.enter("tableCellDivider"),t.consume(b),t.exit("tableCellDivider"),z):b===null||T(b)?(t.exit("tableRow"),r(b)):M(b)?A(t,z,"whitespace")(b):(t.enter("data"),H(b))}function H(b){return b===null||b===124||O(b)?(t.exit("data"),z(b)):(t.consume(b),b===92?q:H)}function q(b){return b===92||b===124?(t.consume(b),H):H(b)}}function Ql(t,r){let e=-1,n=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,c,h,d=new Fe;for(;++e<t.length;){let f=t[e],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(Bi(d,r,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(e,0,[["enter",u,r]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(n=!0,h=void 0,o=[0,0,0,0],a=[0,e+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(e,0,[["enter",c,r]])),i=g.type==="tableDelimiterRow"?2:c?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],h=De(d,r,o,i,void 0,h),o=[0,0,0,0]),a[2]=e)):g.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(a[0]=a[1],h=De(d,r,o,i,void 0,h)),o=a,a=[o[1],e,0,0])):g.type==="tableHead"?(s=!0,l=e):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=e,o[1]!==0?(a[0]=a[1],h=De(d,r,o,i,e,h)):a[1]!==0&&(h=De(d,r,a,i,e,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=e)}for(l!==0&&Bi(d,r,l,u,c),d.consume(r.events),e=-1;++e<r.events.length;){let f=r.events[e];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=qi(r.events,e))}return t}function De(t,r,e,n,i,o){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";e[0]!==0&&(o.end=Object.assign({},Jt(r.events,e[0])),t.add(e[0],0,[["exit",o,r]]));let l=Jt(r.events,e[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},t.add(e[1],0,[["enter",o,r]]),e[2]!==0){let u=Jt(r.events,e[2]),c=Jt(r.events,e[3]),h={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(t.add(e[2],0,[["enter",h,r]]),n!==2){let d=r.events[e[2]],f=r.events[e[3]];if(d[1].end=Object.assign({},f[1].end),d[1].type="chunkText",d[1].contentType="text",e[3]>e[2]+1){let g=e[2]+1,S=e[3]-e[2]-1;t.add(g,S,[])}}t.add(e[3]+1,0,[["exit",h,r]])}return i!==void 0&&(o.end=Object.assign({},Jt(r.events,i)),t.add(i,0,[["exit",o,r]]),o=void 0),o}function Bi(t,r,e,n,i){let o=[],a=Jt(r.events,e);i&&(i.end=Object.assign({},a),o.push(["exit",i,r])),n.end=Object.assign({},a),o.push(["exit",n,r]),t.add(e+1,0,o)}function Jt(t,r){let e=t[r],n=e[0]==="enter"?"start":"end";return e[1][n]}var Kl={name:"tasklistCheck",tokenize:Xl};function Jr(){return{text:{91:Kl}}}function Xl(t,r,e){let n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?e(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return O(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),a):e(l)}function a(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),s):e(l)}function s(l){return T(l)?r(l):M(l)?t.check({tokenize:Yl},r,e)(l):e(l)}}function Yl(t,r,e){return A(t,n,"whitespace");function n(i){return i===null?e(i):r(i)}}function Ui(t){return xe([Dr(),Vr(),Wr(t),Gr(),Jr()])}var Zl={};function ve(t){let r=this,e=t||Zl,n=r.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Ui(e)),o.push(Mr()),a.push(Lr(e))}var Hi={tokenize:tu};function tu(t){let r=t.attempt(this.parser.constructs.contentInitial,n,i),e;return r;function n(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),A(t,r,"linePrefix")}function i(s){return t.enter("paragraph"),o(s)}function o(s){let l=t.enter("chunkText",{contentType:"text",previous:e});return e&&(e.next=l),e=l,a(s)}function a(s){if(s===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(s);return}return T(s)?(t.consume(s),t.exit("chunkText"),o):(t.consume(s),a)}}var ji={tokenize:eu},$i={tokenize:ru};function eu(t){let r=this,e=[],n=0,i,o,a;return s;function s(w){if(n<e.length){let D=e[n];return r.containerState=D[1],t.attempt(D[0].continuation,l,u)(w)}return u(w)}function l(w){if(n++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,i&&_();let D=r.events.length,P=D,x;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){x=r.events[P][1].end;break}y(n);let z=D;for(;z<r.events.length;)r.events[z][1].end=Object.assign({},x),z++;return j(r.events,P+1,0,r.events.slice(D)),r.events.length=z,u(w)}return s(w)}function u(w){if(n===e.length){if(!i)return d(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);r.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return r.containerState={},t.check($i,c,h)(w)}function c(w){return i&&_(),y(n),d(w)}function h(w){return r.parser.lazy[r.now().line]=n!==e.length,a=r.now().offset,g(w)}function d(w){return r.containerState={},t.attempt($i,f,g)(w)}function f(w){return n++,e.push([r.currentConstruct,r.containerState]),d(w)}function g(w){if(w===null){i&&_(),y(0),t.consume(w);return}return i=i||r.parser.flow(r.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),S(w)}function S(w){if(w===null){E(t.exit("chunkFlow"),!0),y(0),t.consume(w);return}return T(w)?(t.consume(w),E(t.exit("chunkFlow")),n=0,r.interrupt=void 0,s):(t.consume(w),S)}function E(w,D){let P=r.sliceStream(w);if(D&&P.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(P),r.parser.lazy[w.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<a&&(!i.events[x][1].end||i.events[x][1].end.offset>a))return;let z=r.events.length,H=z,q,b;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(q){b=r.events[H][1].end;break}q=!0}for(y(n),x=z;x<r.events.length;)r.events[x][1].end=Object.assign({},b),x++;j(r.events,H+1,0,r.events.slice(z)),r.events.length=x}}function y(w){let D=e.length;for(;D-- >w;){let P=e[D];r.containerState=P[1],P[0].exit.call(r,t)}e.length=w}function _(){i.write([null]),o=void 0,i=void 0,r.containerState._closeFlow=void 0}}function ru(t,r,e){return A(t,t.attempt(this.parser.constructs.document,r,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Vi={tokenize:nu};function nu(t){let r=this,e=t.attempt(ht,n,t.attempt(this.parser.constructs.flowInitial,i,A(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Nr,i)),"linePrefix")));return e;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),r.currentConstruct=void 0,e}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r.currentConstruct=void 0,e}}var Wi={resolveAll:Ki()},Gi=Qi("string"),Ji=Qi("text");function Qi(t){return{tokenize:r,resolveAll:Ki(t==="text"?iu:void 0)};function r(e){let n=this,i=this.parser.constructs[t],o=e.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){e.consume(c);return}return e.enter("data"),e.consume(c),l}function l(c){return u(c)?(e.exit("data"),o(c)):(e.consume(c),l)}function u(c){if(c===null)return!0;let h=i[c],d=-1;if(h)for(;++d<h.length;){let f=h[d];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function Ki(t){return r;function r(e,n){let i=-1,o;for(;++i<=e.length;)o===void 0?e[i]&&e[i][1].type==="data"&&(o=i,i++):(!e[i]||e[i][1].type!=="data")&&(i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(e,n):e}}function iu(t,r){let e=0;for(;++e<=t.length;)if((e===t.length||t[e][1].type==="lineEnding")&&t[e-1][1].type==="data"){let n=t[e-1][1],i=r.sliceStream(n),o=i.length,a=-1,s=0,l;for(;o--;){let u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(s){let u={type:e===t.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-s,offset:n.end.offset-s,_index:n.start._index+o,_bufferIndex:o?a:n.start._bufferIndex+a},end:Object.assign({},n.end)};n.end=Object.assign({},u.start),n.start.offset===n.end.offset?Object.assign(n,u):(t.splice(e,0,["enter",u,r],["exit",u,r]),e+=2)}e++}return t}function Xi(t,r,e){let n=Object.assign(e?Object.assign({},e):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],l=!0,u={consume:D,enter:P,exit:x,attempt:q(z),check:q(H),interrupt:q(H,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:S,sliceSerialize:g,now:E,defineSkip:y,write:f},h=r.tokenize.call(c,u),d;return r.resolveAll&&o.push(r),c;function f(C){return a=Z(a,C),_(),a[a.length-1]!==null?[]:(b(r,0),c.events=Tt(o,c.events,c),c.events)}function g(C,v){return ou(S(C),v)}function S(C){return au(a,C)}function E(){let{line:C,column:v,offset:R,_index:$,_bufferIndex:V}=n;return{line:C,column:v,offset:R,_index:$,_bufferIndex:V}}function y(C){i[C.line]=C.column,B()}function _(){let C;for(;n._index<a.length;){let v=a[n._index];if(typeof v=="string")for(C=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===C&&n._bufferIndex<v.length;)w(v.charCodeAt(n._bufferIndex));else w(v)}}function w(C){l=void 0,d=C,h=h(C)}function D(C){T(C)?(n.line++,n.column=1,n.offset+=C===-3?2:1,B()):C!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=C,l=!0}function P(C,v){let R=v||{};return R.type=C,R.start=E(),c.events.push(["enter",R,c]),s.push(R),R}function x(C){let v=s.pop();return v.end=E(),c.events.push(["exit",v,c]),v}function z(C,v){b(C,v.from)}function H(C,v){v.restore()}function q(C,v){return R;function R($,V,ot){let lt,p,it,pt;return Array.isArray($)?rt($):"tokenize"in $?rt([$]):m($);function m(K){return Yt;function Yt(mt){let Ft=mt!==null&&K[mt],Ht=mt!==null&&K.null,Xe=[...Array.isArray(Ft)?Ft:Ft?[Ft]:[],...Array.isArray(Ht)?Ht:Ht?[Ht]:[]];return rt(Xe)(mt)}}function rt(K){return lt=K,p=0,K.length===0?ot:Lt(K[p])}function Lt(K){return Yt;function Yt(mt){return pt=J(),it=K,K.partial||(c.currentConstruct=K),K.name&&c.parser.constructs.disable.null.includes(K.name)?pe(mt):K.tokenize.call(v?Object.assign(Object.create(c),v):c,u,Ke,pe)(mt)}}function Ke(K){return l=!0,C(it,pt),V}function pe(K){return l=!0,pt.restore(),++p<lt.length?Lt(lt[p]):ot}}}function b(C,v){C.resolveAll&&!o.includes(C)&&o.push(C),C.resolve&&j(c.events,v,c.events.length-v,C.resolve(c.events.slice(v),c)),C.resolveTo&&(c.events=C.resolveTo(c.events,c))}function J(){let C=E(),v=c.previous,R=c.currentConstruct,$=c.events.length,V=Array.from(s);return{restore:ot,from:$};function ot(){n=C,c.previous=v,c.currentConstruct=R,c.events.length=$,s=V,B()}}function B(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function au(t,r){let e=r.start._index,n=r.start._bufferIndex,i=r.end._index,o=r.end._bufferIndex,a;if(e===i)a=[t[e].slice(n,o)];else{if(a=t.slice(e,i),n>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}o>0&&a.push(t[i].slice(0,o))}return a}function ou(t,r){let e=-1,n=[],i;for(;++e<t.length;){let o=t[e],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
17
|
+
`;break}case-3:{a=`\r
|
|
18
|
+
`;break}case-2:{a=r?" ":" ";break}case-1:{if(!r&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,n.push(a)}return n.join("")}var Qr={};Hn(Qr,{attentionMarkers:()=>pu,contentInitial:()=>lu,disable:()=>mu,document:()=>su,flow:()=>cu,flowInitial:()=>uu,insideSpan:()=>du,string:()=>hu,text:()=>fu});var su={42:Y,43:Y,45:Y,48:Y,49:Y,50:Y,51:Y,52:Y,53:Y,54:Y,55:Y,56:Y,57:Y,62:we},lu={91:Pr},uu={[-2]:oe,[-1]:oe,32:oe},cu={35:qr,42:qt,45:[Le,qt],60:Ur,61:Le,95:qt,96:Ie,126:Ie},hu={38:Ee,92:Se},fu={[-5]:le,[-4]:le,[-3]:le,33:$r,38:Ee,42:ae,60:[Rr,Hr],91:jr,92:[zr,Se],93:zt,95:ae,96:Or},du={null:[ae,Wi]},pu={null:[42,95]},mu={null:[]};function Kr(t){let e=xe([Qr,...(t||{}).extensions||[]]),n={defined:[],lazy:{},constructs:e,content:i(Hi),document:i(ji),flow:i(Vi),string:i(Gi),text:i(Ji)};return n;function i(o){return a;function a(s){return Xi(n,o,s)}}}function Xr(t){for(;!_e(t););return t}var Yi=/[\0\t\n\r]/g;function Yr(){let t=1,r="",e=!0,n;return i;function i(o,a,s){let l=[],u,c,h,d,f;for(o=r+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,r="",e&&(o.charCodeAt(0)===65279&&h++,e=void 0);h<o.length;){if(Yi.lastIndex=h,u=Yi.exec(o),d=u&&u.index!==void 0?u.index:o.length,f=o.charCodeAt(d),!u){r=o.slice(h);break}if(f===10&&h===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),h<d&&(l.push(o.slice(h,d)),t+=d-h),f){case 0:{l.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,l.push(-2);t++<c;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:n=!0,t=1}h=d+1}return s&&(n&&l.push(-5),r&&l.push(r),l.push(null)),l}}function _t(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Zi(t.position):"start"in t||"end"in t?Zi(t):"line"in t||"column"in t?Zr(t):""}function Zr(t){return ta(t&&t.line)+":"+ta(t&&t.column)}function Zi(t){return Zr(t&&t.start)+"-"+Zr(t&&t.end)}function ta(t){return t&&typeof t=="number"?t:1}var ra={}.hasOwnProperty;function tn(t,r,e){return typeof r!="string"&&(e=r,r=void 0),gu(e)(Xr(Kr(e).document().write(Yr()(t,r,!0))))}function gu(t){let r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Bn),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(Pn),blockQuote:o(mt),characterEscape:q,characterReference:q,codeFenced:o(Ft),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Ft,a),codeText:o(Ht,a),codeTextData:q,data:q,codeFlowValue:q,definition:o(Xe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(io),hardBreakEscape:o(zn),hardBreakTrailing:o(zn),htmlFlow:o(qn,a),htmlFlowData:q,htmlText:o(qn,a),htmlTextData:q,image:o(ao),label:a,link:o(Bn),listItem:o(oo),listItemValue:d,listOrdered:o(Un,h),listUnordered:o(Un),paragraph:o(so),reference:m,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Pn),strong:o(lo),thematicBreak:o(co)},exit:{atxHeading:l(),atxHeadingSequence:P,autolink:l(),autolinkEmail:Yt,autolinkProtocol:K,blockQuote:l(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:Lt,characterReferenceMarkerNumeric:Lt,characterReferenceValue:Ke,characterReference:pe,codeFenced:l(E),codeFencedFence:S,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:b,codeIndented:l(y),codeText:l(R),codeTextData:b,data:b,definition:l(),definitionDestinationString:D,definitionLabelString:_,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(C),htmlFlowData:b,htmlText:l(v),htmlTextData:b,image:l(V),label:lt,labelText:ot,lineEnding:J,link:l($),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:rt,resourceDestinationString:p,resourceTitleString:it,resource:pt,setextHeading:l(H),setextHeadingLineSequence:z,setextHeadingText:x,strong:l(),thematicBreak:l()}};na(r,(t||{}).mdastExtensions||[]);let e={};return n;function n(k){let I={type:"root",children:[]},F={stack:[I],tokenStack:[],config:r,enter:s,exit:u,buffer:a,resume:c,data:e},N=[],U=-1;for(;++U<k.length;)if(k[U][1].type==="listOrdered"||k[U][1].type==="listUnordered")if(k[U][0]==="enter")N.push(U);else{let st=N.pop();U=i(k,st,U)}for(U=-1;++U<k.length;){let st=r[k[U][0]];ra.call(st,k[U][1].type)&&st[k[U][1].type].call(Object.assign({sliceSerialize:k[U][2].sliceSerialize},F),k[U][1])}if(F.tokenStack.length>0){let st=F.tokenStack[F.tokenStack.length-1];(st[1]||ea).call(F,void 0,st[0])}for(I.position={start:Ct(k.length>0?k[0][1].start:{line:1,column:1,offset:0}),end:Ct(k.length>0?k[k.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<r.transforms.length;)I=r.transforms[U](I)||I;return I}function i(k,I,F){let N=I-1,U=-1,st=!1,Dt,gt,Zt,te;for(;++N<=F;){let nt=k[N];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?U++:U--,te=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(Dt&&!te&&!U&&!Zt&&(Zt=N),te=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:te=void 0}if(!U&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||U===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(Dt){let $t=N;for(gt=void 0;$t--;){let bt=k[$t];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;gt&&(k[gt][1].type="lineEndingBlank",st=!0),bt[1].type="lineEnding",gt=$t}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}Zt&&(!gt||Zt<gt)&&(Dt._spread=!0),Dt.end=Object.assign({},gt?k[gt][1].start:nt[1].end),k.splice(gt||N,0,["exit",Dt,nt[2]]),N++,F++}if(nt[1].type==="listItemPrefix"){let $t={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};Dt=$t,k.splice(N,0,["enter",$t,nt[2]]),N++,F++,Zt=void 0,te=!0}}}return k[I][1]._spread=st,F}function o(k,I){return F;function F(N){s.call(this,k(N),N),I&&I.call(this,N)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(k,I,F){this.stack[this.stack.length-1].children.push(k),this.stack.push(k),this.tokenStack.push([I,F]),k.position={start:Ct(I.start),end:void 0}}function l(k){return I;function I(F){k&&k.call(this,F),u.call(this,F)}}function u(k,I){let F=this.stack.pop(),N=this.tokenStack.pop();if(N)N[0].type!==k.type&&(I?I.call(this,k,N[0]):(N[1]||ea).call(this,k,N[0]));else throw new Error("Cannot close `"+k.type+"` ("+_t({start:k.start,end:k.end})+"): it\u2019s not open");F.position.end=Ct(k.end)}function c(){return kt(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(k){if(this.data.expectingFirstListItemValue){let I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(k),10),this.data.expectingFirstListItemValue=void 0}}function f(){let k=this.resume(),I=this.stack[this.stack.length-1];I.lang=k}function g(){let k=this.resume(),I=this.stack[this.stack.length-1];I.meta=k}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){let k=this.resume(),I=this.stack[this.stack.length-1];I.value=k.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let k=this.resume(),I=this.stack[this.stack.length-1];I.value=k.replace(/(\r?\n|\r)$/g,"")}function _(k){let I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=X(this.sliceSerialize(k)).toLowerCase()}function w(){let k=this.resume(),I=this.stack[this.stack.length-1];I.title=k}function D(){let k=this.resume(),I=this.stack[this.stack.length-1];I.url=k}function P(k){let I=this.stack[this.stack.length-1];if(!I.depth){let F=this.sliceSerialize(k).length;I.depth=F}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function z(k){let I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(k).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function q(k){let F=this.stack[this.stack.length-1].children,N=F[F.length-1];(!N||N.type!=="text")&&(N=uo(),N.position={start:Ct(k.start),end:void 0},F.push(N)),this.stack.push(N)}function b(k){let I=this.stack.pop();I.value+=this.sliceSerialize(k),I.position.end=Ct(k.end)}function J(k){let I=this.stack[this.stack.length-1];if(this.data.atHardBreak){let F=I.children[I.children.length-1];F.position.end=Ct(k.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(I.type)&&(q.call(this,k),b.call(this,k))}function B(){this.data.atHardBreak=!0}function C(){let k=this.resume(),I=this.stack[this.stack.length-1];I.value=k}function v(){let k=this.resume(),I=this.stack[this.stack.length-1];I.value=k}function R(){let k=this.resume(),I=this.stack[this.stack.length-1];I.value=k}function $(){let k=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";k.type+="Reference",k.referenceType=I,delete k.url,delete k.title}else delete k.identifier,delete k.label;this.data.referenceType=void 0}function V(){let k=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";k.type+="Reference",k.referenceType=I,delete k.url,delete k.title}else delete k.identifier,delete k.label;this.data.referenceType=void 0}function ot(k){let I=this.sliceSerialize(k),F=this.stack[this.stack.length-2];F.label=Ii(I),F.identifier=X(I).toLowerCase()}function lt(){let k=this.stack[this.stack.length-1],I=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){let N=k.children;F.children=N}else F.alt=I}function p(){let k=this.resume(),I=this.stack[this.stack.length-1];I.url=k}function it(){let k=this.resume(),I=this.stack[this.stack.length-1];I.title=k}function pt(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function rt(k){let I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=X(this.sliceSerialize(k)).toLowerCase(),this.data.referenceType="full"}function Lt(k){this.data.characterReferenceType=k.type}function Ke(k){let I=this.sliceSerialize(k),F=this.data.characterReferenceType,N;F?(N=ye(I,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):N=Wt(I);let U=this.stack[this.stack.length-1];U.value+=N}function pe(k){let I=this.stack.pop();I.position.end=Ct(k.end)}function K(k){b.call(this,k);let I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(k)}function Yt(k){b.call(this,k);let I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(k)}function mt(){return{type:"blockquote",children:[]}}function Ft(){return{type:"code",lang:null,meta:null,value:""}}function Ht(){return{type:"inlineCode",value:""}}function Xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function io(){return{type:"emphasis",children:[]}}function Pn(){return{type:"heading",depth:0,children:[]}}function zn(){return{type:"break"}}function qn(){return{type:"html",value:""}}function ao(){return{type:"image",title:null,url:"",alt:null}}function Bn(){return{type:"link",title:null,url:"",children:[]}}function Un(k){return{type:"list",ordered:k.type==="listOrdered",start:null,spread:k._spread,children:[]}}function oo(k){return{type:"listItem",spread:k._spread,checked:null,children:[]}}function so(){return{type:"paragraph",children:[]}}function lo(){return{type:"strong",children:[]}}function uo(){return{type:"text",value:""}}function co(){return{type:"thematicBreak"}}}function Ct(t){return{line:t.line,column:t.column,offset:t.offset}}function na(t,r){let e=-1;for(;++e<r.length;){let n=r[e];Array.isArray(n)?na(t,n):bu(t,n)}}function bu(t,r){let e;for(e in r)if(ra.call(r,e))switch(e){case"canContainEols":{let n=r[e];n&&t[e].push(...n);break}case"transforms":{let n=r[e];n&&t[e].push(...n);break}case"enter":case"exit":{let n=r[e];n&&Object.assign(t[e],n);break}}}function ea(t,r){throw t?new Error("Cannot close `"+t.type+"` ("+_t({start:t.start,end:t.end})+"): a different token (`"+r.type+"`, "+_t({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+_t({start:r.start,end:r.end})+") is still open")}function Re(t){let r=this;r.parser=e;function e(n){return tn(n,{...r.data("settings"),...t,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function en(t){if(t)throw t}var ze=Ye(fa(),1);function ue(t){if(typeof t!="object"||t===null)return!1;let r=Object.getPrototypeOf(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function rn(){let t=[],r={run:e,use:n};return r;function e(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){let c=t[++o],h=-1;if(l){a(l);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,c?da(c,s)(...u):a(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),r}}function da(t,r){let e;return n;function n(...a){let s=t.length>a.length,l;s&&a.push(i);try{l=t.apply(this,a)}catch(u){let c=u;if(s&&e)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){e||(e=!0,r(a,...s))}function o(a){i(null,a)}}var Q=class extends Error{constructor(r,e,n){super(),typeof e=="string"&&(n=e,e=void 0);let i="",o={},a=!1;if(e&&("line"in e&&"column"in e?o={place:e}:"start"in e&&"end"in e?o={place:e}:"type"in e?o={ancestors:[e],place:e.position}:o={...e}),typeof r=="string"?i=r:!o.cause&&r&&(a=!0,i=r.message,o.cause=r),!o.ruleId&&!o.source&&typeof n=="string"){let l=n.indexOf(":");l===-1?o.ruleId=n:(o.source=n.slice(0,l),o.ruleId=n.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=_t(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;var at=Ye(require("path"),1);var nn=Ye(require("process"),1);var an=require("url");function Ne(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}var on=["history","path","basename","stem","extname","dirname"],ce=class{constructor(r){let e;r?Ne(r)?e={path:r}:typeof r=="string"||ku(r)?e={value:r}:e=r:e={},this.cwd="cwd"in e?"":nn.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<on.length;){let o=on[n];o in e&&e[o]!==void 0&&e[o]!==null&&(this[o]=o==="history"?[...e[o]]:e[o])}let i;for(i in e)on.includes(i)||(this[i]=e[i])}get basename(){return typeof this.path=="string"?at.default.basename(this.path):void 0}set basename(r){ln(r,"basename"),sn(r,"basename"),this.path=at.default.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?at.default.dirname(this.path):void 0}set dirname(r){pa(this.basename,"dirname"),this.path=at.default.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?at.default.extname(this.path):void 0}set extname(r){if(sn(r,"extname"),pa(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=at.default.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Ne(r)&&(r=(0,an.fileURLToPath)(r)),ln(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?at.default.basename(this.path,this.extname):void 0}set stem(r){ln(r,"stem"),sn(r,"stem"),this.path=at.default.join(this.dirname||"",r+(this.extname||""))}fail(r,e,n){let i=this.message(r,e,n);throw i.fatal=!0,i}info(r,e,n){let i=this.message(r,e,n);return i.fatal=void 0,i}message(r,e,n){let i=new Q(r,e,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}};function sn(t,r){if(t&&t.includes(at.default.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+at.default.sep+"`")}function ln(t,r){if(!t)throw new Error("`"+r+"` cannot be empty")}function pa(t,r){if(!t)throw new Error("Setting `"+r+"` requires `path` to be set too")}function ku(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var ma=(function(t){let n=this.constructor.prototype,i=n[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o});var yu={}.hasOwnProperty,fn=class t extends ma{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=rn()}copy(){let r=new t,e=-1;for(;++e<this.attachers.length;){let n=this.attachers[e];r.use(...n)}return r.data((0,ze.default)(!0,{},this.namespace)),r}data(r,e){return typeof r=="string"?arguments.length===2?(hn("data",this.frozen),this.namespace[r]=e,this):yu.call(this.namespace,r)&&this.namespace[r]||void 0:r?(hn("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;let r=this;for(;++this.freezeIndex<this.attachers.length;){let[e,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let i=e.call(r,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();let e=Pe(r),n=this.parser||this.Parser;return un("parse",n),n(String(e),e)}process(r,e){let n=this;return this.freeze(),un("process",this.parser||this.Parser),cn("process",this.compiler||this.Compiler),e?i(void 0,e):new Promise(i);function i(o,a){let s=Pe(r),l=n.parse(s);n.run(l,s,function(c,h,d){if(c||!h||!d)return u(c);let f=h,g=n.stringify(f,d);wu(g)?d.value=g:d.result=g,u(c,d)});function u(c,h){c||!h?a(c):o?o(h):e(void 0,h)}}}processSync(r){let e=!1,n;return this.freeze(),un("processSync",this.parser||this.Parser),cn("processSync",this.compiler||this.Compiler),this.process(r,i),ba("processSync","process",e),n;function i(o,a){e=!0,en(o),n=a}}run(r,e,n){ga(r),this.freeze();let i=this.transformers;return!n&&typeof e=="function"&&(n=e,e=void 0),n?o(void 0,n):new Promise(o);function o(a,s){let l=Pe(e);i.run(r,l,u);function u(c,h,d){let f=h||r;c?s(c):a?a(f):n(void 0,f,d)}}}runSync(r,e){let n=!1,i;return this.run(r,e,o),ba("runSync","run",n),i;function o(a,s){en(a),i=s,n=!0}}stringify(r,e){this.freeze();let n=Pe(e),i=this.compiler||this.Compiler;return cn("stringify",i),ga(r),i(r,n)}use(r,...e){let n=this.attachers,i=this.namespace;if(hn("use",this.frozen),r!=null)if(typeof r=="function")l(r,e);else if(typeof r=="object")Array.isArray(r)?s(r):a(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...h]=u;l(c,h)}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");s(u.plugins),u.settings&&(i.settings=(0,ze.default)(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let h=u[c];o(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let h=-1,d=-1;for(;++h<n.length;)if(n[h][0]===u){d=h;break}if(d===-1)n.push([u,...c]);else if(c.length>0){let[f,...g]=c,S=n[d][1];ue(S)&&ue(f)&&(f=(0,ze.default)(!0,S,f)),n[d]=[u,f,...g]}}}},dn=new fn().freeze();function un(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function cn(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function hn(t,r){if(r)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ga(t){if(!ue(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ba(t,r,e){if(!e)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function Pe(t){return xu(t)?t:new ce(t)}function xu(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function wu(t){return typeof t=="string"||Su(t)}function Su(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}function ya(t,r){let e=[t,...r],n=Math.max(...e.map(s=>s.length));if(n===0)return"";let i=Array.from({length:n},()=>0);for(let s of e)for(let l=0;l<n;l++){let u=(s[l]||"").length;u>i[l]&&(i[l]=u)}let o=s=>Array.from({length:n},(l,u)=>(s[u]||"").padEnd(i[u])).join(" | ").trimEnd(),a=[];a.push(o(t)),a.push(i.map(s=>"-".repeat(s)).join("-|-"));for(let s of r)a.push(o(s));return a.join(`
|
|
19
|
+
`)}function In(t){return dn().use(Re).use(ve).parse(t)}function he(t){return kt(t)}function xt(t){return{type:"text",value:t}}function wt(t){return{type:"paragraph",children:t}}function St(t){return{type:"root",children:t}}function Tn(t={}){var r;return{type:"card",title:t.title,subtitle:t.subtitle,imageUrl:t.imageUrl,children:(r=t.children)!=null?r:[]}}function pn(t,r={}){return{type:"text",content:t,style:r.style}}var xa=pn;function mn(t){return{type:"image",url:t.url,alt:t.alt}}function qe(){return{type:"divider"}}function gn(t){return{type:"section",children:t}}function Be(t){return{type:"actions",children:t}}function Ue(t){return{type:"button",id:t.id,label:t.label,style:t.style,value:t.value,disabled:t.disabled,actionType:t.actionType,callbackUrl:t.callbackUrl}}function bn(t){return{type:"link-button",id:t.id,url:t.url,label:t.label,style:t.style}}function kn(t){return{type:"field",label:t.label,value:t.value}}function yn(t){return{type:"fields",children:t}}function xn(t){return{type:"table",headers:t.headers,rows:t.rows,align:t.align}}function He(t){return{type:"link",url:t.url,label:t.label}}function fe(t){let r=[];t.title&&r.push(`**${t.title}**`),t.subtitle&&r.push(t.subtitle);for(let e of t.children){let n=_n(e);n&&r.push(n)}return r.join(`
|
|
20
|
+
`)}function _n(t){switch(t.type){case"text":return t.content;case"link":return`${t.label} (${t.url})`;case"fields":return t.children.map(r=>`${r.label}: ${r.value}`).join(`
|
|
21
|
+
`);case"actions":return null;case"table":return ya(t.headers,t.rows);case"section":return t.children.map(r=>_n(r)).filter(Boolean).join(`
|
|
22
|
+
`);default:return null}}var Eu=["text_input","select","external_select","radio_select","text","fields"];function Iu(t){let r=t.filter(e=>typeof e=="object"&&e!==null&&"type"in e&&Eu.includes(e.type));return r.length<t.length&&console.warn("[chat] Modal contains unsupported child elements that were ignored"),r}function wn(t){var r;return{type:"modal",callbackId:t.callbackId,callbackUrl:t.callbackUrl,title:t.title,submitLabel:t.submitLabel,closeLabel:t.closeLabel,notifyOnClose:t.notifyOnClose,privateMetadata:t.privateMetadata,children:(r=t.children)!=null?r:[]}}function $e(t){return{type:"text_input",id:t.id,label:t.label,placeholder:t.placeholder,initialValue:t.initialValue,multiline:t.multiline,optional:t.optional,maxLength:t.maxLength}}function je(t){if(!t.options||t.options.length===0)throw new Error("Select requires at least one option");return{type:"select",id:t.id,label:t.label,placeholder:t.placeholder,options:t.options,initialOption:t.initialOption,optional:t.optional}}function Sn(t){return{type:"external_select",id:t.id,initialOption:t.initialOption,label:t.label,placeholder:t.placeholder,minQueryLength:t.minQueryLength,optional:t.optional}}function Ve(t){return{label:t.label,value:t.value,description:t.description}}function En(t){if(!t.options||t.options.length===0)throw new Error("RadioSelect requires at least one option");return{type:"radio_select",id:t.id,label:t.label,options:t.options,initialOption:t.initialOption,optional:t.optional}}var Tu=Symbol.for("chat.jsx.element");function Cn(t){return typeof t=="object"&&t!==null&&t.$$typeof===Tu}function wa(t){if(t==null)return[];if(Array.isArray(t))return t.flatMap(wa);if(Cn(t)){let r=Sa(t);return r?[r]:[]}return typeof t=="object"&&"type"in t?[t]:typeof t=="string"||typeof t=="number"?[String(t)]:[]}function _u(t){return!("id"in t||"url"in t||"label"in t)}function Cu(t){return"id"in t&&typeof t.id=="string"&&!("url"in t)}function Au(t){return"url"in t&&typeof t.url=="string"&&!("id"in t)}function Mu(t){return"url"in t&&typeof t.url=="string"&&!("id"in t)&&!("alt"in t)&&!("style"in t)}function Lu(t){return"url"in t&&typeof t.url=="string"}function Fu(t){return"label"in t&&"value"in t&&typeof t.label=="string"&&typeof t.value=="string"}function Du(t){return!("id"in t||"url"in t||"callbackId"in t)&&("title"in t||"subtitle"in t||"imageUrl"in t)}function vu(t){return"callbackId"in t&&"title"in t}function Ru(t){return"id"in t&&"label"in t&&!("options"in t)&&!("value"in t)}function ka(t){return"id"in t&&"label"in t&&!("value"in t)}function Ou(t){return"id"in t&&"label"in t&&!("value"in t)&&!("children"in t)}function Nu(t){return"label"in t&&"value"in t&&!("id"in t)}function Sa(t){var a,s,l,u;let{type:r,props:e,children:n}=t,i=wa(n);if(r===pn){let c=_u(e)?e:{style:void 0},h=i.length>0?i.map(String).join(""):String((a=c.children)!=null?a:"");return pn(h,{style:c.style})}if(r===gn)return gn(i);if(r===Be)return Be(i);if(r===yn)return yn(i);if(r===Ue){if(!Cu(e))throw new Error("Button requires an 'id' prop");let c=i.length>0?i.map(String).join(""):(s=e.label)!=null?s:"";return Ue({id:e.id,label:c,style:e.style,value:e.value,actionType:e.actionType,callbackUrl:e.callbackUrl,disabled:e.disabled})}if(r===bn){if(!Au(e))throw new Error("LinkButton requires a 'url' prop");let c=i.length>0?i.map(String).join(""):(l=e.label)!=null?l:"";return bn({id:e.id,url:e.url,label:c,style:e.style})}if(r===He){if(!Mu(e))throw new Error("CardLink requires a 'url' prop");let c=i.length>0?i.map(String).join(""):(u=e.label)!=null?u:"";return He({url:e.url,label:c})}if(r===mn){if(!Lu(e))throw new Error("Image requires a 'url' prop");return mn({url:e.url,alt:e.alt})}if(r===kn){if(!Fu(e))throw new Error("Field requires 'label' and 'value' props");return kn({label:e.label,value:e.value})}if(r===qe)return qe();if(r===wn){if(!vu(e))throw new Error("Modal requires 'callbackId' and 'title' props");return wn({callbackId:e.callbackId,callbackUrl:e.callbackUrl,title:e.title,submitLabel:e.submitLabel,closeLabel:e.closeLabel,notifyOnClose:e.notifyOnClose,privateMetadata:e.privateMetadata,children:Iu(i)})}if(r===$e){if(!Ru(e))throw new Error("TextInput requires 'id' and 'label' props");return $e({id:e.id,label:e.label,placeholder:e.placeholder,initialValue:e.initialValue,multiline:e.multiline,optional:e.optional,maxLength:e.maxLength})}if(r===je){if(!ka(e))throw new Error("Select requires 'id' and 'label' props");return je({id:e.id,label:e.label,placeholder:e.placeholder,initialOption:e.initialOption,optional:e.optional,options:i})}if(r===Sn){if(!Ou(e))throw new Error("ExternalSelect requires 'id' and 'label' props");return Sn({id:e.id,initialOption:e.initialOption,label:e.label,placeholder:e.placeholder,minQueryLength:e.minQueryLength,optional:e.optional})}if(r===En){if(!ka(e))throw new Error("RadioSelect requires 'id' and 'label' props");return En({id:e.id,label:e.label,initialOption:e.initialOption,optional:e.optional,options:i})}if(r===Ve){if(!Nu(e))throw new Error("SelectOption requires 'label' and 'value' props");return Ve({label:e.label,value:e.value,description:e.description})}if(r===xn){let c=e;return xn({headers:c.headers,rows:c.rows})}let o=Du(e)?e:{};return Tn({title:o.title,subtitle:o.subtitle,imageUrl:o.imageUrl,children:i})}function ft(t){if(Cn(t)){let r=Sa(t);if(r&&typeof r=="object"&&"type"in r&&r.type==="card")return r}return typeof t=="object"&&t!==null&&"type"in t&&t.type==="card"?t:null}function dt(t){if(Cn(t))return!0;if(typeof t=="object"&&t!==null&&"$$typeof"in t&&typeof t.$$typeof=="symbol"){let r=t.$$typeof.toString();return r.includes("react.element")||r.includes("react.transitional.element")}return!1}var Qt=Symbol.for("workflow-serialize"),Kt=Symbol.for("workflow-deserialize");var Pu=Object.defineProperty,zu=Object.defineProperties,qu=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertySymbols,Bu=Object.prototype.hasOwnProperty,Uu=Object.prototype.propertyIsEnumerable,Ia=(t,r,e)=>r in t?Pu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,Aa=(t,r)=>{for(var e in r||(r={}))Bu.call(r,e)&&Ia(t,e,r[e]);if(Ea)for(var e of Ea(r))Uu.call(r,e)&&Ia(t,e,r[e]);return t},Ma=(t,r)=>zu(t,qu(r)),et=(t,r)=>{let e=!1,n=!1;for(let i=0;i<r;i+=1){if(t[i]==="\\"&&i+1<t.length&&t[i+1]==="`"){i+=1;continue}if(t.substring(i,i+3)==="```"){n=!n,i+=2;continue}!n&&t[i]==="`"&&(e=!e)}return e||n},Hu=(t,r)=>{let e=t.substring(r,r+3)==="```",n=r>0&&t.substring(r-1,r+2)==="```",i=r>1&&t.substring(r-2,r+1)==="```";return e||n||i},$u=t=>{let r=0;for(let e=0;e<t.length;e+=1){if(t[e]==="\\"&&e+1<t.length&&t[e+1]==="`"){e+=1;continue}t[e]==="`"&&!Hu(t,e)&&(r+=1)}return r},At=(t,r)=>{let e=!1,n=!1,i=-1;for(let o=0;o<t.length;o+=1){if(t[o]==="\\"&&o+1<t.length&&t[o+1]==="`"){o+=1;continue}if(t.substring(o,o+3)==="```"){n=!n,o+=2;continue}if(!n&&t[o]==="`")if(e){if(i<r&&r<o)return!0;e=!1,i=-1}else e=!0,i=o}return!1},ju=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Vu=t=>!t||typeof t!="string"||!t.includes(">")?t:t.replace(ju,(r,e,n,i)=>et(t,i)?r:`${e}\\>${n}`),Wu=/(\*\*)([^*]*\*?)$/,Gu=/(__)([^_]*?)$/,Ju=/(\*\*\*)([^*]*?)$/,Qu=/(\*)([^*]*?)$/,Ku=/(_)([^_]*?)$/,Xu=/(`)([^`]*?)$/,Yu=/(~~)([^~]*?)$/,Bt=/^[\s_~*`]*$/,La=/^[\s]*[-*+][\s]+$/,Zu=/[\p{L}\p{N}_]/u,tc=/^```[^`\n]*```?$/,ec=/^\*{4,}$/,rc=/(__)([^_]+)_$/,nc=/(~~)([^~]+)~$/,Ta=/~~/g,Mt=t=>{if(!t)return!1;let r=t.charCodeAt(0);return r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r===95?!0:Zu.test(t)};var ic=(t,r)=>{let e=1;for(let n=r-1;n>=0;n-=1)if(t[n]==="]")e+=1;else if(t[n]==="["&&(e-=1,e===0))return n;return-1},Fa=(t,r)=>{let e=1;for(let n=r+1;n<t.length;n+=1)if(t[n]==="[")e+=1;else if(t[n]==="]"&&(e-=1,e===0))return n;return-1},We=(t,r)=>{let e=!1,n=!1;for(let i=0;i<t.length&&i<r;i+=1){if(t[i]==="\\"&&t[i+1]==="$"){i+=1;continue}t[i]==="$"&&(t[i+1]==="$"?(n=!n,i+=1,e=!1):n||(e=!e))}return e||n},ac=(t,r)=>{for(let e=r;e<t.length;e+=1){if(t[e]===")")return!0;if(t[e]===`
|
|
23
|
+
`)return!1}return!1},Da=(t,r)=>{for(let e=r-1;e>=0;e-=1){if(t[e]===")")return!1;if(t[e]==="(")return e>0&&t[e-1]==="]"?ac(t,r):!1;if(t[e]===`
|
|
24
|
+
`)return!1}return!1},oc=(t,r)=>{for(let e=r-1;e>=0;e-=1){if(t[e]===">")return!1;if(t[e]==="<"){let n=e+1<t.length?t[e+1]:"";return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(t[e]===`
|
|
25
|
+
`)return!1}return!1},Mn=(t,r,e)=>{let n=0;for(let l=r-1;l>=0;l-=1)if(t[l]===`
|
|
26
|
+
`){n=l+1;break}let i=t.length;for(let l=r;l<t.length;l+=1)if(t[l]===`
|
|
27
|
+
`){i=l;break}let o=t.substring(n,i),a=0,s=!1;for(let l of o)if(l===e)a+=1;else if(l!==" "&&l!==" "){s=!0;break}return a>=3&&!s},sc=(t,r,e,n)=>e==="\\"||t.includes("$")&&We(t,r)?!0:e!=="*"&&n==="*"?(r<t.length-2?t[r+2]:"")!=="*":!!(e==="*"||e&&n&&Mt(e)&&Mt(n)||(!e||e===" "||e===" "||e===`
|
|
28
|
+
`)&&(!n||n===" "||n===" "||n===`
|
|
29
|
+
`)),va=t=>{let r=0,e=!1,n=t.length;for(let i=0;i<n;i+=1){if(t[i]==="`"&&i+2<n&&t[i+1]==="`"&&t[i+2]==="`"){e=!e,i+=2;continue}if(e||t[i]!=="*")continue;let o=i>0?t[i-1]:"",a=i<n-1?t[i+1]:"";sc(t,i,o,a)||(r+=1)}return r},lc=(t,r,e,n)=>!!(e==="\\"||t.includes("$")&&We(t,r)||Da(t,r)||oc(t,r)||e==="_"||n==="_"||e&&n&&Mt(e)&&Mt(n)),uc=t=>{let r=0,e=!1,n=t.length;for(let i=0;i<n;i+=1){if(t[i]==="`"&&i+2<n&&t[i+1]==="`"&&t[i+2]==="`"){e=!e,i+=2;continue}if(e||t[i]!=="_")continue;let o=i>0?t[i-1]:"",a=i<n-1?t[i+1]:"";lc(t,i,o,a)||(r+=1)}return r},cc=t=>{let r=0,e=0,n=!1;for(let i=0;i<t.length;i+=1){if(t[i]==="`"&&i+2<t.length&&t[i+1]==="`"&&t[i+2]==="`"){e>=3&&(r+=Math.floor(e/3)),e=0,n=!n,i+=2;continue}n||(t[i]==="*"?e+=1:(e>=3&&(r+=Math.floor(e/3)),e=0))}return e>=3&&(r+=Math.floor(e/3)),r},Ln=t=>{let r=0,e=!1;for(let n=0;n<t.length;n+=1){if(t[n]==="`"&&n+2<t.length&&t[n+1]==="`"&&t[n+2]==="`"){e=!e,n+=2;continue}e||t[n]==="*"&&n+1<t.length&&t[n+1]==="*"&&(r+=1,n+=1)}return r},_a=t=>{let r=0,e=!1;for(let n=0;n<t.length;n+=1){if(t[n]==="`"&&n+2<t.length&&t[n+1]==="`"&&t[n+2]==="`"){e=!e,n+=2;continue}e||t[n]==="_"&&n+1<t.length&&t[n+1]==="_"&&(r+=1,n+=1)}return r},hc=(t,r,e)=>{if(!r||Bt.test(r))return!0;let n=t.substring(0,e).lastIndexOf(`
|
|
30
|
+
`),i=n===-1?0:n+1,o=t.substring(i,e);return La.test(o)&&r.includes(`
|
|
31
|
+
`)?!0:Mn(t,e,"*")},fc=t=>{let r=t.match(Wu);if(!r)return t;let e=r[2],n=t.lastIndexOf(r[1]);return et(t,n)||At(t,n)||hc(t,e,n)?t:Ln(t)%2===1?e.endsWith("*")?`${t}*`:`${t}**`:t},dc=(t,r,e)=>{if(!r||Bt.test(r))return!0;let n=t.substring(0,e).lastIndexOf(`
|
|
32
|
+
`),i=n===-1?0:n+1,o=t.substring(i,e);return La.test(o)&&r.includes(`
|
|
33
|
+
`)?!0:Mn(t,e,"_")},pc=t=>{let r=t.match(Gu);if(!r){let i=t.match(rc);if(i){let o=t.lastIndexOf(i[1]);if(!(et(t,o)||At(t,o))&&_a(t)%2===1)return`${t}_`}return t}let e=r[2],n=t.lastIndexOf(r[1]);return et(t,n)||At(t,n)||dc(t,e,n)?t:_a(t)%2===1?`${t}__`:t},mc=t=>{let r=!1;for(let e=0;e<t.length;e+=1){if(t[e]==="`"&&e+2<t.length&&t[e+1]==="`"&&t[e+2]==="`"){r=!r,e+=2;continue}if(!r&&t[e]==="*"&&t[e-1]!=="*"&&t[e+1]!=="*"&&t[e-1]!=="\\"&&!We(t,e)){let n=e>0?t[e-1]:"",i=e<t.length-1?t[e+1]:"";if((!n||n===" "||n===" "||n===`
|
|
34
|
+
`)&&(!i||i===" "||i===" "||i===`
|
|
35
|
+
`)||n&&i&&Mt(n)&&Mt(i))continue;return e}}return-1},gc=t=>{if(!t.match(Qu))return t;let r=mc(t);if(r===-1||et(t,r)||At(t,r))return t;let e=t.substring(r+1);return!e||Bt.test(e)?t:va(t)%2===1?`${t}*`:t},Ra=t=>{let r=!1;for(let e=0;e<t.length;e+=1){if(t[e]==="`"&&e+2<t.length&&t[e+1]==="`"&&t[e+2]==="`"){r=!r,e+=2;continue}if(!r&&t[e]==="_"&&t[e-1]!=="_"&&t[e+1]!=="_"&&t[e-1]!=="\\"&&!We(t,e)&&!Da(t,e)){let n=e>0?t[e-1]:"",i=e<t.length-1?t[e+1]:"";if(n&&i&&Mt(n)&&Mt(i))continue;return e}}return-1},bc=t=>{let r=t.length;for(;r>0&&t[r-1]===`
|
|
36
|
+
`;)r-=1;if(r<t.length){let e=t.slice(0,r),n=t.slice(r);return`${e}_${n}`}return`${t}_`},kc=t=>{if(!t.endsWith("**"))return null;let r=t.slice(0,-2);if(Ln(r)%2!==1)return null;let e=r.indexOf("**"),n=Ra(r);return e!==-1&&n!==-1&&e<n?`${r}_**`:null},yc=t=>{if(!t.match(Ku))return t;let r=Ra(t);if(r===-1)return t;let e=t.substring(r+1);if(!e||Bt.test(e)||et(t,r)||At(t,r))return t;if(uc(t)%2===1){let n=kc(t);return n!==null?n:bc(t)}return t},xc=t=>{let r=Ln(t),e=va(t);return r%2===0&&e%2===0},wc=(t,r,e)=>!r||Bt.test(r)||et(t,e)||At(t,e)?!0:Mn(t,e,"*"),Sc=t=>{if(ec.test(t))return t;let r=t.match(Ju);if(!r)return t;let e=r[2],n=t.lastIndexOf(r[1]);return wc(t,e,n)?t:cc(t)%2===1?xc(t)?t:`${t}***`:t},Ec=/<[a-zA-Z/][^>]*$/,Ic=t=>{let r=t.match(Ec);return!r||r.index===void 0||et(t,r.index)?t:t.substring(0,r.index).trimEnd()},Tc=t=>!t.match(tc)||t.includes(`
|
|
37
|
+
`)?null:t.endsWith("``")&&!t.endsWith("```")?`${t}\``:t,_c=t=>(t.match(/```/g)||[]).length%2===1,Cc=t=>{let r=Tc(t);if(r!==null)return r;let e=t.match(Xu);if(e&&!_c(t)){let n=e[2];if(!n||Bt.test(n))return t;if($u(t)%2===1)return`${t}\``}return t},Oa=(t,r)=>r>=2&&t.substring(r-2,r+1)==="```"||r>=1&&t.substring(r-1,r+2)==="```"||r<=t.length-3&&t.substring(r,r+3)==="```",Ac=t=>{let r=0,e=!1;for(let n=0;n<t.length-1;n+=1)t[n]==="`"&&!Oa(t,n)&&(e=!e),!e&&t[n]==="$"&&t[n+1]==="$"&&(r+=1,n+=1);return r},Mc=t=>{let r=0,e=!1;for(let n=0;n<t.length;n+=1){if(t[n]==="\\"){n+=1;continue}if(t[n]==="`"&&!Oa(t,n)){e=!e;continue}!e&&t[n]==="$"&&(n+1<t.length&&t[n+1]==="$"?n+=1:r+=1)}return r},Lc=t=>{if(t.endsWith("$")&&!t.endsWith("$$"))return`${t}$`;let r=t.indexOf("$$");return r!==-1&&t.indexOf(`
|
|
38
|
+
`,r)!==-1&&!t.endsWith(`
|
|
39
|
+
`)?`${t}
|
|
40
|
+
$$`:`${t}$$`},Fc=t=>Ac(t)%2===0?t:Lc(t),Dc=t=>Mc(t)%2===1?`${t}$`:t,vc=(t,r,e)=>{if(t.substring(r+2).includes(")"))return null;let n=ic(t,r);if(n===-1||et(t,n))return null;let i=n>0&&t[n-1]==="!",o=i?n-1:n,a=t.substring(0,o);if(i)return a;let s=t.substring(n+1,r);return e==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},Ca=(t,r)=>{for(let e=0;e<r;e++)if(t[e]==="["&&!et(t,e)){if(e>0&&t[e-1]==="!")continue;let n=Fa(t,e);if(n===-1)return e;if(n+1<t.length&&t[n+1]==="("){let i=t.indexOf(")",n+2);i!==-1&&(e=i)}}return r},Rc=(t,r,e)=>{let n=r>0&&t[r-1]==="!",i=n?r-1:r;if(!t.substring(r+1).includes("]")){let o=t.substring(0,i);if(n)return o;if(e==="text-only"){let a=Ca(t,r);return t.substring(0,a)+t.substring(a+1)}return`${t}](streamdown:incomplete-link)`}if(Fa(t,r)===-1){let o=t.substring(0,i);if(n)return o;if(e==="text-only"){let a=Ca(t,r);return t.substring(0,a)+t.substring(a+1)}return`${t}](streamdown:incomplete-link)`}return null},Na=(t,r="protocol")=>{let e=t.lastIndexOf("](");if(e!==-1&&!et(t,e)){let n=vc(t,e,r);if(n!==null)return n}for(let n=t.length-1;n>=0;n-=1)if(t[n]==="["&&!et(t,n)){let i=Rc(t,n,r);if(i!==null)return i}return t},Oc=/^-{1,2}$/,Nc=/^[\s]*-{1,2}[\s]+$/,Pc=/^={1,2}$/,zc=/^[\s]*={1,2}[\s]+$/,qc=t=>{if(!t||typeof t!="string")return t;let r=t.lastIndexOf(`
|
|
41
|
+
`);if(r===-1)return t;let e=t.substring(r+1),n=t.substring(0,r),i=e.trim();if(Oc.test(i)&&!e.match(Nc)){let o=n.split(`
|
|
42
|
+
`).at(-1);if(o&&o.trim().length>0)return`${t}\u200B`}if(Pc.test(i)&&!e.match(zc)){let o=n.split(`
|
|
43
|
+
`).at(-1);if(o&&o.trim().length>0)return`${t}\u200B`}return t},Bc=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Uc=t=>!t||typeof t!="string"||!t.includes("~")?t:t.replace(Bc,(r,e)=>et(t,e)?r:"\\~"),Hc=t=>{var r,e;let n=t.match(Yu);if(n){let i=n[2];if(!i||Bt.test(i))return t;let o=t.lastIndexOf(n[1]);if(et(t,o)||At(t,o))return t;if(((r=t.match(Ta))==null?void 0:r.length)%2===1)return`${t}~~`}else{let i=t.match(nc);if(i){let o=t.lastIndexOf(i[0].slice(0,2));if(et(t,o)||At(t,o))return t;if(((e=t.match(Ta))==null?void 0:e.length)%2===1)return`${t}~`}}return t},An=t=>t!==!1,$c=t=>t===!0,tt={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},jc=[{handler:{name:"singleTilde",handle:Uc,priority:tt.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Vu,priority:tt.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:Ic,priority:tt.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:qc,priority:tt.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Na,priority:tt.LINKS},optionKey:"links",earlyReturn:t=>t.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Sc,priority:tt.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:fc,priority:tt.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:pc,priority:tt.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:gc,priority:tt.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:yc,priority:tt.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Cc,priority:tt.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Hc,priority:tt.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Fc,priority:tt.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Dc,priority:tt.INLINE_KATEX},optionKey:"inlineKatex"}],Vc=t=>{var r;let e=(r=t==null?void 0:t.linkMode)!=null?r:"protocol";return jc.filter(({handler:n,optionKey:i})=>n.name==="links"?An(t==null?void 0:t.links)||An(t==null?void 0:t.images):n.name==="inlineKatex"?$c(t==null?void 0:t.inlineKatex):An(t==null?void 0:t[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:Ma(Aa({},n),{handle:o=>Na(o,e)}),earlyReturn:e==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},Wc=(t,r)=>{var e;if(!t||typeof t!="string")return t;let n=t.endsWith(" ")&&!t.endsWith(" ")?t.slice(0,-1):t,i=Vc(r),o=((e=r==null?void 0:r.handlers)!=null?e:[]).map(s=>{var l;return{handler:Ma(Aa({},s),{priority:(l=s.priority)!=null?l:tt.DEFAULT}),earlyReturn:void 0}}),a=[...i,...o].sort((s,l)=>{var u,c;return((u=s.handler.priority)!=null?u:0)-((c=l.handler.priority)!=null?c:0)});for(let{handler:s,earlyReturn:l}of a)if(n=s.handle(n),l!=null&&l(n))return n;return n},de=Wc;var Gc="__cb:",Jc="chat:callback:",Qc=720*60*60*1e3;function Kc(t){return`${Gc}${t}`}function Xc(){return crypto.randomUUID().replace(/-/g,"").slice(0,16)}async function Yc(t,r){return{type:"actions",children:await Promise.all(t.children.map(async e=>{if(e.type!=="button"||!e.callbackUrl)return e;let n=Xc(),i={url:e.callbackUrl,originalValue:e.value};return await r.set(`${Jc}${n}`,i,Qc),{type:"button",id:e.id,label:e.label,style:e.style,disabled:e.disabled,value:Kc(n),actionType:e.actionType}}))}}function $a(t){for(let r of t){if(r.type==="actions"){for(let e of r.children)if(e.type==="button"&&e.callbackUrl)return!0}if(r.type==="section"&&"children"in r&&$a(r.children))return!0}return!1}async function ja(t,r){let e=[];for(let n of t)n.type==="actions"?e.push(await Yc(n,r)):n.type==="section"&&"children"in n?e.push({...n,children:await ja(n.children,r)}):e.push(n);return e}async function Ge(t,r){return $a(t.children)?{...t,children:await ja(t.children,r)}:t}var Pa=null;function Je(){if(!Pa)throw new Error("No Chat singleton registered. Call chat.registerSingleton() first.");return Pa}var Zc=new Set(["markdown_text","task_update","plan_update"]);async function*Va(t){var n,i;let r=!1,e=!1;for await(let o of t){if(typeof o=="string"){yield o;continue}if(o===null||typeof o!="object"||!("type"in o))continue;let a=o;if(Zc.has(a.type)){yield o;continue}let s=(i=(n=a.text)!=null?n:a.delta)!=null?i:a.textDelta;a.type==="text-delta"&&typeof s=="string"?(r&&e&&(yield`
|
|
44
|
+
|
|
45
|
+
`),r=!1,e=!0,yield s):a.type==="finish-step"&&(r=!0)}}var th=new WeakMap;var Ut=class Dn{constructor(r){L(this,"id");L(this,"threadId");L(this,"text");L(this,"formatted");L(this,"raw");L(this,"author");L(this,"metadata");L(this,"attachments");L(this,"isMention");L(this,"userKey");L(this,"links");L(this,"_subjectPromise");var e;this.id=r.id,this.threadId=r.threadId,this.text=r.text,this.formatted=r.formatted,this.raw=r.raw,this.author=r.author,this.metadata=r.metadata,this.attachments=r.attachments,this.isMention=r.isMention,this.links=(e=r.links)!=null?e:[]}get subject(){if(this._subjectPromise)return this._subjectPromise;let r=th.get(this);return r!=null&&r.fetchSubject?(this._subjectPromise=r.fetchSubject(this.raw).catch(()=>null),this._subjectPromise):(this._subjectPromise=Promise.resolve(null),this._subjectPromise)}toJSON(){var r;return{_type:"chat:Message",id:this.id,threadId:this.threadId,text:this.text,formatted:this.formatted,raw:this.raw,author:{userId:this.author.userId,userName:this.author.userName,fullName:this.author.fullName,isBot:this.author.isBot,isMe:this.author.isMe},metadata:{dateSent:this.metadata.dateSent.toISOString(),edited:this.metadata.edited,editedAt:(r=this.metadata.editedAt)==null?void 0:r.toISOString()},attachments:this.attachments.map(e=>({type:e.type,url:e.url,name:e.name,mimeType:e.mimeType,size:e.size,width:e.width,height:e.height,fetchMetadata:e.fetchMetadata})),isMention:this.isMention,links:this.links.length>0?this.links.map(e=>({url:e.url,title:e.title,description:e.description,imageUrl:e.imageUrl,siteName:e.siteName})):void 0}}static fromJSON(r){return new Dn({id:r.id,threadId:r.threadId,text:r.text,formatted:r.formatted,raw:r.raw,author:r.author,metadata:{dateSent:new Date(r.metadata.dateSent),edited:r.metadata.edited,editedAt:r.metadata.editedAt?new Date(r.metadata.editedAt):void 0},attachments:r.attachments,isMention:r.isMention,links:r.links})}static[Qt](r){return r.toJSON()}static[Kt](r){return Dn.fromJSON(r)}},eh=Symbol.for("chat.postable");function Wa(t){return typeof t=="object"&&t!==null&&t.$$typeof===eh}async function Ga(t,r,e,n,i){let o=a=>{var s;return{adapter:r,logger:i,messageId:a.id,threadId:(s=a.threadId)!=null?s:e}};if(t.isSupported(r)&&r.postObject){let a=await r.postObject(e,t.kind,t.getPostData());t.onPosted(o(a))}else{let a=await n(e,t.getFallbackText());t.onPosted(o(a))}}var rh=class extends Error{constructor(r,e,n){super(r);L(this,"code");L(this,"cause");this.name="ChatError",this.code=e,this.cause=n}};var Ja=class extends rh{constructor(r,e,n){super(r,"NOT_IMPLEMENTED",n);L(this,"feature");this.name="NotImplementedError",this.feature=e}};var Qe=720*60*60*1e3,za="channel-state:";function nh(t){return"adapterName"in t&&!("adapter"in t)}function ih(t){return t!==null&&typeof t=="object"&&Symbol.asyncIterator in t}var ah=class vn{constructor(r){L(this,"id");L(this,"isDM");L(this,"channelVisibility");L(this,"_adapter");L(this,"_adapterName");L(this,"_stateAdapterInstance");L(this,"_name",null);L(this,"_threadHistory");var e,n;this.id=r.id,this.isDM=(e=r.isDM)!=null?e:!1,this.channelVisibility=(n=r.channelVisibility)!=null?n:"unknown",nh(r)?this._adapterName=r.adapterName:(this._adapter=r.adapter,this._stateAdapterInstance=r.stateAdapter,this._threadHistory=r.threadHistory)}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Channel has no adapter configured");let e=Je().getAdapter(this._adapterName);if(!e)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=e,e}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let r=Je();return this._stateAdapterInstance=r.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${za}${this.id}`)}async setState(r,e){let n=`${za}${this.id}`;if(e!=null&&e.replace)await this._stateAdapter.set(n,r,Qe);else{let o={...await this._stateAdapter.get(n),...r};await this._stateAdapter.set(n,o,Qe)}}get messages(){let r=this.adapter,e=this.id,n=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a={cursor:i,direction:"backward"},s=r.fetchChannelMessages?await r.fetchChannelMessages(e,a):await r.fetchMessages(e,a),l=[...s.messages].reverse();for(let u of l)o=!0,yield u;if(!s.nextCursor||s.messages.length===0)break;i=s.nextCursor}if(!o&&n){let a=await n.getMessages(e);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}threads(){let r=this.adapter,e=this.id;return{async*[Symbol.asyncIterator](){if(!r.listThreads)return;let n;for(;;){let i=await r.listThreads(e,{cursor:n});for(let o of i.threads)yield o;if(!i.nextCursor||i.threads.length===0)break;n=i.nextCursor}}}}async fetchMetadata(){var r;if(this.adapter.fetchChannelInfo){let e=await this.adapter.fetchChannelInfo(this.id);return this._name=(r=e.name)!=null?r:null,e}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(r){if(Wa(r))return await this.handlePostableObject(r),r;if(ih(r)){let n="";for await(let i of Va(r))typeof i=="string"?n+=i:i.type==="markdown_text"&&(n+=i.text);return this.postSingleMessage({markdown:n})}let e=r;if(dt(r)){let n=ft(r);if(!n)throw new Error("Invalid JSX element: must be a Card element");e=n}return e=await this.processCallbackUrls(e),this.postSingleMessage(e)}async handlePostableObject(r){await Ga(r,this.adapter,this.id,(e,n)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(e,n):this.adapter.postMessage(e,n))}async postSingleMessage(r){let e=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,r):await this.adapter.postMessage(this.id,r),n=this.createSentMessage(e.id,r,e.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Ut(n)),n}async postEphemeral(r,e,n){let{fallbackToDM:i}=n,o=typeof r=="string"?r:r.userId,a;if(dt(e)){let s=ft(e);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=e;if(a=await this.processCallbackUrls(a),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),l=await this.adapter.postMessage(s,a);return{id:l.id,threadId:s,usedFallback:!0,raw:l.raw}}return null}async schedule(r,e){let n;if(dt(r)){let i=ft(r);if(!i)throw new Error("Invalid JSX element: must be a Card element");n=i}else n=r;if(n=await this.processCallbackUrls(n),!this.adapter.scheduleMessage)throw new Ja("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,n,e)}async processCallbackUrls(r){var e;if(typeof r=="string")return r;if("type"in r&&r.type==="card")return Ge(r,this._stateAdapter);if("card"in r&&((e=r.card)==null?void 0:e.type)==="card"){let n=await Ge(r.card,this._stateAdapter);if(n!==r.card)return{...r,card:n}}return r}async startTyping(r){await this.adapter.startTyping(this.id,r)}mentionUser(r){return`<@${r}>`}toJSON(){var r;return{_type:"chat:Channel",id:this.id,adapterName:(r=this._adapterName)!=null?r:this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(r,e){let n=new vn({id:r.id,adapterName:r.adapterName,channelVisibility:r.channelVisibility,isDM:r.isDM});return e&&(n._adapter=e),n}static[Qt](r){return r.toJSON()}static[Kt](r){return vn.fromJSON(r)}createSentMessage(r,e,n){let i=this.adapter,o=n||this.id,a=this,{plainText:s,formatted:l,attachments:u}=sh(e);return{id:r,threadId:o,text:s,formatted:l,raw:null,author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:u,links:[],toJSON(){return new Ut(this).toJSON()},async edit(h){let d=h;if(dt(h)){let f=ft(h);if(!f)throw new Error("Invalid JSX element: must be a Card element");d=f}return d=await a.processCallbackUrls(d),await i.editMessage(o,r,d),a.createSentMessage(r,d)},async delete(){await i.deleteMessage(o,r)},async addReaction(h){await i.addReaction(o,r,h)},async removeReaction(h){await i.removeReaction(o,r,h)}}}};function oh(t,r){return t.channelIdFromThreadId(r)}function sh(t){if(typeof t=="string")return{plainText:t,formatted:St([wt([xt(t)])]),attachments:[]};if("raw"in t)return{plainText:t.raw,formatted:St([wt([xt(t.raw)])]),attachments:t.attachments||[]};if("markdown"in t){let r=In(t.markdown);return{plainText:he(r),formatted:r,attachments:t.attachments||[]}}if("ast"in t)return{plainText:he(t.ast),formatted:t.ast,attachments:t.attachments||[]};if("card"in t){let r=t.fallbackText||fe(t.card);return{plainText:r,formatted:St([wt([xt(r)])]),attachments:[]}}if("type"in t&&t.type==="card"){let r=fe(t);return{plainText:r,formatted:St([wt([xt(r)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var lh=class{constructor(t={}){L(this,"accumulated","");L(this,"dirty",!0);L(this,"cachedRender","");L(this,"finished",!1);L(this,"fenceToggles",0);L(this,"incompleteLine","");L(this,"options");var r;this.options={wrapTablesForAppend:(r=t.wrapTablesForAppend)!=null?r:!0}}push(t){var e;this.accumulated+=t,this.dirty=!0,this.incompleteLine+=t;let r=this.incompleteLine.split(`
|
|
46
|
+
`);this.incompleteLine=(e=r.pop())!=null?e:"";for(let n of r){let i=n.trimStart();(i.startsWith("```")||i.startsWith("~~~"))&&this.fenceToggles++}}isAccumulatedInsideFence(){let t=this.fenceToggles%2===1,r=this.incompleteLine.trimStart();return(r.startsWith("```")||r.startsWith("~~~"))&&(t=!t),t}render(){if(!this.dirty)return this.cachedRender;if(this.dirty=!1,this.finished)return this.cachedRender=de(this.accumulated),this.cachedRender;if(this.isAccumulatedInsideFence())return this.cachedRender=de(this.accumulated),this.cachedRender;let t=Ba(this.accumulated);return this.cachedRender=de(t),this.cachedRender}getCommittableText(){if(this.finished)return this.formatAppendOnlyText(this.accumulated,!0);let t=this.accumulated;if(t.length>0&&!t.endsWith(`
|
|
47
|
+
`)){let n=t.lastIndexOf(`
|
|
48
|
+
`),i=n>=0?t.slice(0,n+1):"";if(Fn(i))return this.formatAppendOnlyText(t);t=i}if(Fn(t))return this.formatAppendOnlyText(t);let r=Ba(t),e=this.formatAppendOnlyText(r);return Fn(e)?e:ch(e)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText(t,r=!1){return this.options.wrapTablesForAppend?hh(t,r):t}},uh=new Set(["*","~","`","["]);function qa(t){return de(t).length<=t.length}function ch(t){if(t.length===0||qa(t))return t;for(let r=t.length-1;r>=0;r--)if(uh.has(t[r])){for(;r>0&&t[r-1]===t[r];)r--;let e=t.slice(0,r);if(qa(e))return e}return""}var Rn=/^\|.*\|$/,On=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;function Fn(t){let r=!1;for(let e of t.split(`
|
|
49
|
+
`)){let n=e.trimStart();(n.startsWith("```")||n.startsWith("~~~"))&&(r=!r)}return r}function Ba(t){let r=t.endsWith(`
|
|
50
|
+
`),e=t.split(`
|
|
51
|
+
`);!r&&e.length>0&&e.pop(),r&&e.length>0&&e.at(-1)===""&&e.pop();let n=0,i=!1;for(let l=e.length-1;l>=0;l--){let u=e[l].trim();if(u==="")break;if(On.test(u)){i=!0;break}if(Rn.test(u))n++;else break}if(i||n===0)return t;let o=e.length-n,a=e.slice(0,o),s=a.join(`
|
|
52
|
+
`);return a.length>0&&(s+=`
|
|
53
|
+
`),s}function hh(t,r=!1){let e=t.endsWith(`
|
|
54
|
+
`),n=t.split(`
|
|
55
|
+
`);e&&n.length>0&&n.at(-1)===""&&n.pop();let i=[],o=!1,a=!1;for(let l=0;l<n.length;l++){let u=n[l].trim();if(!o&&(u.startsWith("```")||u.startsWith("~~~"))){a=!a,i.push(n[l]);continue}if(a){i.push(n[l]);continue}let c=u!==""&&(Rn.test(u)||On.test(u));if(c&&!o){let h=!1;for(let d=l;d<n.length;d++){let f=n[d].trim();if(On.test(f)){h=!0;break}if(f===""||!Rn.test(f))break}h&&(i.push("```"),o=!0)}else!c&&o&&(i.push("```"),o=!1);i.push(n[l])}o&&r&&i.push("```");let s=i.join(`
|
|
56
|
+
`);return e&&(s+=`
|
|
57
|
+
`),s}function fh(t){return"adapterName"in t&&!("adapter"in t)}var Ua="thread-state:";function dh(t){return t!==null&&typeof t=="object"&&Symbol.asyncIterator in t}var qy=class Nn{constructor(r){L(this,"id");L(this,"channelId");L(this,"isDM");L(this,"channelVisibility");L(this,"_adapter");L(this,"_adapterName");L(this,"_stateAdapterInstance");L(this,"_recentMessages",[]);L(this,"_isSubscribedContext");L(this,"_currentMessage");L(this,"_streamingUpdateIntervalMs");L(this,"_fallbackStreamingPlaceholderText");L(this,"_channel");L(this,"_threadHistory");L(this,"_logger");var e,n,i,o;this.id=r.id,this.channelId=r.channelId,this.isDM=(e=r.isDM)!=null?e:!1,this.channelVisibility=(n=r.channelVisibility)!=null?n:"unknown",this._isSubscribedContext=(i=r.isSubscribedContext)!=null?i:!1,this._currentMessage=r.currentMessage,this._logger=r.logger,this._streamingUpdateIntervalMs=(o=r.streamingUpdateIntervalMs)!=null?o:500,this._fallbackStreamingPlaceholderText=r.fallbackStreamingPlaceholderText!==void 0?r.fallbackStreamingPlaceholderText:"...",fh(r)?this._adapterName=r.adapterName:(this._adapter=r.adapter,this._stateAdapterInstance=r.stateAdapter,this._threadHistory=r.threadHistory),r.initialMessage&&(this._recentMessages=[r.initialMessage])}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw new Error("Thread has no adapter configured");let e=Je().getAdapter(this._adapterName);if(!e)throw new Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=e,e}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let r=Je();return this._stateAdapterInstance=r.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(r){this._recentMessages=r}get state(){return this._stateAdapter.get(`${Ua}${this.id}`)}async setState(r,e){let n=`${Ua}${this.id}`;if(e!=null&&e.replace)await this._stateAdapter.set(n,r,Qe);else{let o={...await this._stateAdapter.get(n),...r};await this._stateAdapter.set(n,o,Qe)}}get channel(){if(!this._channel){let r=oh(this.adapter,this.id);this._channel=new ah({id:r,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,threadHistory:this._threadHistory})}return this._channel}get messages(){let r=this.adapter,e=this.id,n=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await r.fetchMessages(e,{cursor:i,direction:"backward"}),s=[...a.messages].reverse();for(let l of s)o=!0,yield l;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&n){let a=await n.getMessages(e);for(let s=a.length-1;s>=0;s--)yield a[s]}}}}get allMessages(){let r=this.adapter,e=this.id,n=this._threadHistory;return{async*[Symbol.asyncIterator](){let i,o=!1;for(;;){let a=await r.fetchMessages(e,{limit:100,cursor:i,direction:"forward"});for(let s of a.messages)o=!0,yield s;if(!a.nextCursor||a.messages.length===0)break;i=a.nextCursor}if(!o&&n){let a=await n.getMessages(e);for(let s of a)yield s}}}}async getParticipants(){let r=new Map;this._currentMessage&&!this._currentMessage.author.isMe&&!this._currentMessage.author.isBot&&r.set(this._currentMessage.author.userId,this._currentMessage.author);for await(let e of this.allMessages)e.author.isMe||e.author.isBot||r.has(e.author.userId)||r.set(e.author.userId,e.author);return[...r.values()]}async isSubscribed(){return this._isSubscribedContext?!0:this._stateAdapter.isSubscribed(this.id)}async subscribe(){await this._stateAdapter.subscribe(this.id),this.adapter.onThreadSubscribe&&await this.adapter.onThreadSubscribe(this.id)}async unsubscribe(){await this._stateAdapter.unsubscribe(this.id)}async post(r){if(Wa(r)){if(r.kind==="stream"){let o=r.getPostData(),a={...o.options.updateIntervalMs?{updateIntervalMs:o.options.updateIntervalMs}:{},...o.options.groupTasks?{taskDisplayMode:o.options.groupTasks}:{},...o.options.endWith?{stopBlocks:o.options.endWith}:{}};return await this.handleStream(o.stream,a),r}return await this.handlePostableObject(r),r}if(dh(r))return this.handleStream(r);let e=r;if(dt(r)){let o=ft(r);if(!o)throw new Error("Invalid JSX element: must be a Card element");e=o}e=await this.processCallbackUrls(e);let n=await this.adapter.postMessage(this.id,e),i=this.createSentMessage(n.id,e,n.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Ut(i)),i}async handlePostableObject(r){await Ga(r,this.adapter,this.id,(e,n)=>this.adapter.postMessage(e,n),this._logger)}async postEphemeral(r,e,n){let{fallbackToDM:i}=n,o=typeof r=="string"?r:r.userId,a;if(dt(e)){let s=ft(e);if(!s)throw new Error("Invalid JSX element: must be a Card element");a=s}else a=e;if(a=await this.processCallbackUrls(a),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,o,a);if(!i)return null;if(this.adapter.openDM){let s=await this.adapter.openDM(o),l=await this.adapter.postMessage(s,a);return{id:l.id,threadId:s,usedFallback:!0,raw:l.raw}}return null}async processCallbackUrls(r){var e;if(typeof r=="string")return r;if("type"in r&&r.type==="card")return Ge(r,this._stateAdapter);if("card"in r&&((e=r.card)==null?void 0:e.type)==="card"){let n=await Ge(r.card,this._stateAdapter);if(n!==r.card)return{...r,card:n}}return r}async schedule(r,e){let n;if(dt(r)){let i=ft(r);if(!i)throw new Error("Invalid JSX element: must be a Card element");n=i}else n=r;if(n=await this.processCallbackUrls(n),!this.adapter.scheduleMessage)throw new Ja("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,n,e)}async handleStream(r,e){let n=Va(r),i={updateIntervalMs:this._streamingUpdateIntervalMs,...e};if(this._currentMessage&&(i.recipientUserId=this._currentMessage.author.userId,i.recipientTeamId=this.extractSlackRecipientTeamId(this._currentMessage.raw)),this.adapter.stream){let a="",s={[Symbol.asyncIterator]:()=>{let u=n[Symbol.asyncIterator]();return{async next(){let c=await u.next();if(!c.done){let h=c.value;typeof h=="string"?a+=h:h.type==="markdown_text"&&(a+=h.text)}return c}}}},l=await this.adapter.stream(this.id,s,i);if(l){let u=this.createSentMessage(l.id,{markdown:a},l.threadId);return this._threadHistory&&await this._threadHistory.append(this.id,new Ut(u)),u}}let o={[Symbol.asyncIterator]:()=>{let a=n[Symbol.asyncIterator]();return{async next(){for(;;){let s=await a.next();if(s.done)return{value:void 0,done:!0};let l=s.value;if(typeof l=="string")return{value:l,done:!1};if(l.type==="markdown_text")return{value:l.text,done:!1}}}}}};return this.fallbackStream(o,i)}extractSlackRecipientTeamId(r){var n;if(!r||typeof r!="object")return;let e=r;if(typeof e.team_id=="string"&&e.team_id)return e.team_id;if(typeof e.team=="string"&&e.team)return e.team;if(e.team&&typeof e.team=="object"&&typeof e.team.id=="string"&&e.team.id)return e.team.id;if(typeof((n=e.user)==null?void 0:n.team_id)=="string"&&e.user.team_id)return e.user.team_id}async startTyping(r){await this.adapter.startTyping(this.id,r)}async fallbackStream(r,e){var y;let n=(y=e==null?void 0:e.updateIntervalMs)!=null?y:this._streamingUpdateIntervalMs,i=this._fallbackStreamingPlaceholderText,o=i===null?null:await this.adapter.postMessage(this.id,i),a=this.id,s=new lh,l="",u=!1,c=null,h=null;o&&(a=o.threadId||this.id,l=i!=null?i:"");let d=()=>{h=setTimeout(()=>{c=f()},n)},f=async()=>{var w;if(u||!o)return;let _=s.render();if(_.trim()&&_!==l)try{await this.adapter.editMessage(a,o.id,{markdown:_}),l=_}catch(D){(w=this._logger)==null||w.warn("fallbackStream edit failed",D)}u||d()};o&&d();try{for await(let _ of r)if(s.push(_),!o){let w=s.render();w.trim()&&(o=await this.adapter.postMessage(this.id,{markdown:w}),a=o.threadId||this.id,l=w,d())}}finally{u=!0,h&&(clearTimeout(h),h=null)}c&&await c;let g=s.getText(),S=s.finish();o||(o=await this.adapter.postMessage(this.id,{markdown:g.trim()?g:" "}),a=o.threadId||this.id,l=g),S.trim()&&S!==l&&await this.adapter.editMessage(a,o.id,{markdown:g});let E=this.createSentMessage(o.id,{markdown:g},a);return this._threadHistory&&await this._threadHistory.append(this.id,new Ut(E)),E}async refresh(){let r=await this.adapter.fetchMessages(this.id,{limit:50});r.messages.length>0?this._recentMessages=r.messages:this._threadHistory?this._recentMessages=await this._threadHistory.getMessages(this.id,50):this._recentMessages=[]}mentionUser(r){return`<@${r}>`}toJSON(){var r,e;return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:(r=this._currentMessage)==null?void 0:r.toJSON(),isDM:this.isDM,adapterName:(e=this._adapterName)!=null?e:this.adapter.name}}static fromJSON(r,e){let n=new Nn({id:r.id,adapterName:r.adapterName,channelId:r.channelId,channelVisibility:r.channelVisibility,currentMessage:r.currentMessage?Ut.fromJSON(r.currentMessage):void 0,isDM:r.isDM});return e&&(n._adapter=e),n}static[Qt](r){return r.toJSON()}static[Kt](r){return Nn.fromJSON(r)}createSentMessage(r,e,n){let i=this.adapter,o=n||this.id,a=this,{plainText:s,formatted:l,attachments:u}=ph(e);return{id:r,threadId:o,text:s,formatted:l,raw:null,links:[],author:{userId:"self",userName:i.userName,fullName:i.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:u,toJSON(){return new Ut(this).toJSON()},async edit(h){let d=h;if(dt(h)){let f=ft(h);if(!f)throw new Error("Invalid JSX element: must be a Card element");d=f}return d=await a.processCallbackUrls(d),await i.editMessage(o,r,d),a.createSentMessage(r,d)},async delete(){await i.deleteMessage(o,r)},async addReaction(h){await i.addReaction(o,r,h)},async removeReaction(h){await i.removeReaction(o,r,h)}}}createSentMessageFromMessage(r){let e=this.adapter,n=this.id,i=r.id,o=this;return{id:r.id,threadId:r.threadId,text:r.text,formatted:r.formatted,raw:r.raw,author:r.author,metadata:r.metadata,attachments:r.attachments,links:r.links,isMention:r.isMention,toJSON(){return r.toJSON()},async edit(a){let s=a;if(dt(a)){let l=ft(a);if(!l)throw new Error("Invalid JSX element: must be a Card element");s=l}return s=await o.processCallbackUrls(s),await e.editMessage(n,i,s),o.createSentMessage(i,s,n)},async delete(){await e.deleteMessage(n,i)},async addReaction(a){await e.addReaction(n,i,a)},async removeReaction(a){await e.removeReaction(n,i,a)}}}};function ph(t){if(typeof t=="string")return{plainText:t,formatted:St([wt([xt(t)])]),attachments:[]};if("raw"in t)return{plainText:t.raw,formatted:St([wt([xt(t.raw)])]),attachments:t.attachments||[]};if("markdown"in t){let r=In(t.markdown);return{plainText:he(r),formatted:r,attachments:t.attachments||[]}}if("ast"in t)return{plainText:he(t.ast),formatted:t.ast,attachments:t.attachments||[]};if("card"in t){let r=t.fallbackText||fe(t.card);return{plainText:r,formatted:St([wt([xt(r)])]),attachments:[]}}if("type"in t&&t.type==="card"){let r=fe(t);return{plainText:r,formatted:St([wt([xt(r)])]),attachments:[]}}throw new Error("Invalid PostableMessage format")}var By=10080*60*1e3;var Uy=300*1e3,Hy=1440*60*1e3;var Ha=new Map;function Xt(t){let r=Ha.get(t);return r||(r=Object.freeze({name:t,toString:()=>`{{emoji:${t}}}`,toJSON:()=>`{{emoji:${t}}}`}),Ha.set(t,r)),r}var mh={thumbs_up:{slack:["+1","thumbsup"],gchat:"\u{1F44D}"},thumbs_down:{slack:["-1","thumbsdown"],gchat:"\u{1F44E}"},clap:{slack:"clap",gchat:"\u{1F44F}"},wave:{slack:"wave",gchat:"\u{1F44B}"},pray:{slack:"pray",gchat:"\u{1F64F}"},muscle:{slack:"muscle",gchat:"\u{1F4AA}"},ok_hand:{slack:"ok_hand",gchat:"\u{1F44C}"},point_up:{slack:"point_up",gchat:"\u{1F446}"},point_down:{slack:"point_down",gchat:"\u{1F447}"},point_left:{slack:"point_left",gchat:"\u{1F448}"},point_right:{slack:"point_right",gchat:"\u{1F449}"},raised_hands:{slack:"raised_hands",gchat:"\u{1F64C}"},shrug:{slack:"shrug",gchat:"\u{1F937}"},facepalm:{slack:"facepalm",gchat:"\u{1F926}"},heart:{slack:"heart",gchat:["\u2764\uFE0F","\u2764"]},smile:{slack:["smile","slightly_smiling_face"],gchat:"\u{1F60A}"},laugh:{slack:["laughing","satisfied","joy"],gchat:["\u{1F602}","\u{1F606}"]},thinking:{slack:"thinking_face",gchat:"\u{1F914}"},sad:{slack:["cry","sad","white_frowning_face"],gchat:"\u{1F622}"},cry:{slack:"sob",gchat:"\u{1F62D}"},angry:{slack:"angry",gchat:"\u{1F620}"},love_eyes:{slack:"heart_eyes",gchat:"\u{1F60D}"},cool:{slack:"sunglasses",gchat:"\u{1F60E}"},wink:{slack:"wink",gchat:"\u{1F609}"},surprised:{slack:"open_mouth",gchat:"\u{1F62E}"},worried:{slack:"worried",gchat:"\u{1F61F}"},confused:{slack:"confused",gchat:"\u{1F615}"},neutral:{slack:"neutral_face",gchat:"\u{1F610}"},sleeping:{slack:"sleeping",gchat:"\u{1F634}"},sick:{slack:"nauseated_face",gchat:"\u{1F922}"},mind_blown:{slack:"exploding_head",gchat:"\u{1F92F}"},relieved:{slack:"relieved",gchat:"\u{1F60C}"},grimace:{slack:"grimacing",gchat:"\u{1F62C}"},rolling_eyes:{slack:"rolling_eyes",gchat:"\u{1F644}"},hug:{slack:"hugging_face",gchat:"\u{1F917}"},zany:{slack:"zany_face",gchat:"\u{1F92A}"},check:{slack:["white_check_mark","heavy_check_mark"],gchat:["\u2705","\u2714\uFE0F"]},x:{slack:["x","heavy_multiplication_x"],gchat:["\u274C","\u2716\uFE0F"]},question:{slack:"question",gchat:["\u2753","?"]},exclamation:{slack:"exclamation",gchat:"\u2757"},warning:{slack:"warning",gchat:"\u26A0\uFE0F"},stop:{slack:"octagonal_sign",gchat:"\u{1F6D1}"},info:{slack:"information_source",gchat:"\u2139\uFE0F"},100:{slack:"100",gchat:"\u{1F4AF}"},fire:{slack:"fire",gchat:"\u{1F525}"},star:{slack:"star",gchat:"\u2B50"},sparkles:{slack:"sparkles",gchat:"\u2728"},lightning:{slack:"zap",gchat:"\u26A1"},boom:{slack:"boom",gchat:"\u{1F4A5}"},eyes:{slack:"eyes",gchat:"\u{1F440}"},green_circle:{slack:"large_green_circle",gchat:"\u{1F7E2}"},yellow_circle:{slack:"large_yellow_circle",gchat:"\u{1F7E1}"},red_circle:{slack:"red_circle",gchat:"\u{1F534}"},blue_circle:{slack:"large_blue_circle",gchat:"\u{1F535}"},white_circle:{slack:"white_circle",gchat:"\u26AA"},black_circle:{slack:"black_circle",gchat:"\u26AB"},rocket:{slack:"rocket",gchat:"\u{1F680}"},party:{slack:["tada","partying_face"],gchat:["\u{1F389}","\u{1F973}"]},confetti:{slack:"confetti_ball",gchat:"\u{1F38A}"},balloon:{slack:"balloon",gchat:"\u{1F388}"},gift:{slack:"gift",gchat:"\u{1F381}"},trophy:{slack:"trophy",gchat:"\u{1F3C6}"},medal:{slack:"first_place_medal",gchat:"\u{1F947}"},lightbulb:{slack:"bulb",gchat:"\u{1F4A1}"},gear:{slack:"gear",gchat:"\u2699\uFE0F"},wrench:{slack:"wrench",gchat:"\u{1F527}"},hammer:{slack:"hammer",gchat:"\u{1F528}"},bug:{slack:"bug",gchat:"\u{1F41B}"},link:{slack:"link",gchat:"\u{1F517}"},lock:{slack:"lock",gchat:"\u{1F512}"},unlock:{slack:"unlock",gchat:"\u{1F513}"},key:{slack:"key",gchat:"\u{1F511}"},pin:{slack:"pushpin",gchat:"\u{1F4CC}"},memo:{slack:"memo",gchat:"\u{1F4DD}"},clipboard:{slack:"clipboard",gchat:"\u{1F4CB}"},calendar:{slack:"calendar",gchat:"\u{1F4C5}"},clock:{slack:"clock1",gchat:"\u{1F550}"},hourglass:{slack:"hourglass",gchat:"\u23F3"},bell:{slack:"bell",gchat:"\u{1F514}"},megaphone:{slack:"mega",gchat:"\u{1F4E2}"},speech_bubble:{slack:"speech_balloon",gchat:"\u{1F4AC}"},email:{slack:"email",gchat:"\u{1F4E7}"},inbox:{slack:"inbox_tray",gchat:"\u{1F4E5}"},outbox:{slack:"outbox_tray",gchat:"\u{1F4E4}"},package:{slack:"package",gchat:"\u{1F4E6}"},folder:{slack:"file_folder",gchat:"\u{1F4C1}"},file:{slack:"page_facing_up",gchat:"\u{1F4C4}"},chart_up:{slack:"chart_with_upwards_trend",gchat:"\u{1F4C8}"},chart_down:{slack:"chart_with_downwards_trend",gchat:"\u{1F4C9}"},coffee:{slack:"coffee",gchat:"\u2615"},pizza:{slack:"pizza",gchat:"\u{1F355}"},beer:{slack:"beer",gchat:"\u{1F37A}"},arrow_up:{slack:"arrow_up",gchat:"\u2B06\uFE0F"},arrow_down:{slack:"arrow_down",gchat:"\u2B07\uFE0F"},arrow_left:{slack:"arrow_left",gchat:"\u2B05\uFE0F"},arrow_right:{slack:"arrow_right",gchat:"\u27A1\uFE0F"},refresh:{slack:"arrows_counterclockwise",gchat:"\u{1F504}"},sun:{slack:"sunny",gchat:"\u2600\uFE0F"},cloud:{slack:"cloud",gchat:"\u2601\uFE0F"},rain:{slack:"rain_cloud",gchat:"\u{1F327}\uFE0F"},snow:{slack:"snowflake",gchat:"\u2744\uFE0F"},rainbow:{slack:"rainbow",gchat:"\u{1F308}"}},gh=class{constructor(t){L(this,"emojiMap");L(this,"slackToNormalized");L(this,"gchatToNormalized");this.emojiMap={...mh,...t},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[t,r]of Object.entries(this.emojiMap)){let e=Array.isArray(r.slack)?r.slack:[r.slack];for(let i of e)this.slackToNormalized.set(i.toLowerCase(),t);let n=Array.isArray(r.gchat)?r.gchat:[r.gchat];for(let i of n)this.gchatToNormalized.set(i,t)}}fromSlack(t){var n;let r=t.replace(/^:|:$/g,"").toLowerCase(),e=(n=this.slackToNormalized.get(r))!=null?n:t;return Xt(e)}fromGChat(t){var e;let r=(e=this.gchatToNormalized.get(t))!=null?e:t;return Xt(r)}fromTeams(t){var n;let e=(n={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[t])!=null?n:t;return Xt(e)}toSlack(t){let r=typeof t=="string"?t:t.name,e=this.emojiMap[r];return e?Array.isArray(e.slack)?e.slack[0]:e.slack:r}toGChat(t){let r=typeof t=="string"?t:t.name,e=this.emojiMap[r];return e?Array.isArray(e.gchat)?e.gchat[0]:e.gchat:r}toDiscord(t){return this.toGChat(t)}matches(t,r){let e=typeof r=="string"?r:r.name,n=this.emojiMap[e];if(!n)return t===e;let i=Array.isArray(n.slack)?n.slack:[n.slack],o=Array.isArray(n.gchat)?n.gchat:[n.gchat],a=t.replace(/^:|:$/g,"").toLowerCase();return i.some(s=>s.toLowerCase()===a)||o.includes(t)}extend(t){Object.assign(this.emojiMap,t),this.buildReverseMaps()}},bh=new gh;function kh(t){let r=["thumbs_up","thumbs_down","clap","wave","pray","muscle","ok_hand","point_up","point_down","point_left","point_right","raised_hands","shrug","facepalm","heart","smile","laugh","thinking","sad","cry","angry","love_eyes","cool","wink","surprised","worried","confused","neutral","sleeping","sick","mind_blown","relieved","grimace","rolling_eyes","hug","zany","check","x","question","exclamation","warning","stop","info","100","fire","star","sparkles","lightning","boom","eyes","green_circle","yellow_circle","red_circle","blue_circle","white_circle","black_circle","rocket","party","confetti","balloon","gift","trophy","medal","lightbulb","gear","wrench","hammer","bug","link","lock","unlock","key","pin","memo","clipboard","calendar","clock","hourglass","bell","megaphone","speech_bubble","email","inbox","outbox","package","folder","file","chart_up","chart_down","coffee","pizza","beer","arrow_up","arrow_down","arrow_left","arrow_right","refresh","sun","cloud","rain","snow","rainbow"],e={custom:n=>Xt(n)};for(let n of r)e[n]=Xt(n);if(t){for(let n of Object.keys(t))e[n]=Xt(n);bh.extend(t)}return e}var $y=kh(),Qa=Be,Ka=Ue,Xa=Tn;var Ya=He,Za=xa,to=qe;var eo=je,ro=Ve,no=$e;0&&(module.exports={Actions,Button,Card,CardLink,CardText,Divider,Select,SelectOption,TextInput});
|