@rayvision/ai-chat 0.0.3-beta → 0.0.3-rc
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/dist/index.js +14 -14
- package/dist/index.mjs +1416 -1416
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),O=require("react"),pi=require("react-dom"),Pa=require("react-dom/client"),Ua=require("zustand"),Ba={zh:{ATTACHMENT_INVALID:"附件格式、编码或参数无效",ATTACHMENT_NOT_FOUND:"找不到该附件",ATTACHMENT_UPLOAD_FAILED:"附件上传失败",ATTACHMENT_TOO_LARGE:"附件大小超过限制",ATTACHMENT_UNSUPPORTED:"不支持该附件格式",NETWORK_ERROR:"网络异常,附件上传失败"},en:{ATTACHMENT_INVALID:"The attachment format, encoding, or parameters are invalid",ATTACHMENT_NOT_FOUND:"The attachment could not be found",ATTACHMENT_UPLOAD_FAILED:"Attachment upload failed",ATTACHMENT_TOO_LARGE:"The attachment exceeds the size limit",ATTACHMENT_UNSUPPORTED:"This attachment format is not supported",NETWORK_ERROR:"A network error prevented the attachment from uploading"}};function fi(e,t){var n;return(n=Ba[e][t])!=null?n:e==="zh"?"附件上传失败,请重试":"Attachment upload failed. Please try again"}const Qa={title:"AI Assistant",openAssistant:"Open AI assistant",welcome:`Hi, I am Renderbus AI Assistant XiaoRui
|
|
2
2
|
Feel free to ask me anything`,welcomeDescription:"Ask me about render tasks, assets, and account questions.",placeholder:"Type a message, Enter to send, Shift + Enter for a new line",send:"Send",stop:"Stop",newChat:"New chat",collapse:"Collapse",citations:e=>`References (${e})`,expandCitations:"Expand references",collapseCitations:"Collapse references",share:"Share",sharing:"Creating share link…",shareCopied:"Share link copied",shareFailed:"Unable to share this conversation",attach:"Add attachment",removeAttachment:"Remove attachment",emptyInput:"Enter a message or add an attachment",dropFiles:"Drop images or .txt files here",copied:"Copied",copyFailed:"Unable to copy. Please retry or copy manually",copy:"Copy",humanSupport:"Human support",like:"Like",dislike:"Dislike",feedbackTitle:"Tell us what went wrong",feedbackSubmit:"Submit feedback",feedbackThanks:"Thanks for your feedback",feedbackFailed:"Unable to submit feedback. Please try again later",closeFeedback:"Close feedback",feedbackOtherPlaceholder:"Tell us more",feedbackUnprofessional:"Unprofessional answer",feedbackUnresolved:"Did not solve the problem",feedbackMisunderstood:"Misunderstood the problem",feedbackSlow:"Response was too slow",feedbackOther:"Other",attachment:"Attachment",fileLimitExceeded:e=>`You can add up to ${e} attachments`,fileTooLarge:e=>`File ${e} exceeds the size limit`,unsupportedFile:e=>`File ${e} is not supported`,attachmentError:e=>fi("en",e),processing:"Processing…",syncing:"Syncing conversation…",loading:"Restoring conversation…",retry:"Retry",knowledgeBusy:"We are currently handling many inquiries. Please try again later.",requestFailed:"Request failed",darkMode:"Dark mode",lightMode:"Light mode",previewImage:"Preview image",closeImagePreview:"Close image preview",closeCitation:"Close citation document",assistantName:"XiaoRui",citationCategoryPath:"Category path",citationPublishedAt:"Published at",citationUpdatedAt:"Updated at",citationContentVersion:"Content version",attachmentUploaded:"Attachment uploaded",disclaimer:"AI-generated recommendations and answers are for reference only"},Fa={title:"智能助手",openAssistant:"打开智能助手",welcome:`Hi, 我是 Renderbus 智能助手 小瑞
|
|
3
|
-
欢迎随时提问`,welcomeDescription:"渲染任务、素材和账户问题,都可以交给我。",placeholder:"输入消息,Enter 发送,Shift + Enter 换行",send:"发送",stop:"停止生成",newChat:"新对话",collapse:"收起",citations:e=>`参考资料(${e})`,expandCitations:"展开参考资料",collapseCitations:"收起参考资料",share:"分享",sharing:"正在生成分享链接…",shareCopied:"分享链接已复制",shareFailed:"分享失败,请稍后重试",attach:"添加附件",removeAttachment:"移除附件",emptyInput:"请输入消息或添加附件",dropFiles:"拖拽图片或 .txt 文件到这里",copied:"已复制",copyFailed:"复制失败,请重试或手动复制",copy:"复制",humanSupport:"转人工助手",like:"点赞",dislike:"点踩",feedbackTitle:"请选择不满意的原因",feedbackSubmit:"提交反馈",feedbackThanks:"感谢您的反馈",feedbackFailed:"反馈提交失败,请稍后重试",closeFeedback:"关闭反馈",feedbackOtherPlaceholder:"请填写其他原因",feedbackUnprofessional:"回答不专业",feedbackUnresolved:"没有解决问题",feedbackMisunderstood:"误解问题",feedbackSlow:"响应太慢",feedbackOther:"其他原因",attachment:"附件",fileLimitExceeded:e=>`最多添加 ${e} 个附件`,fileTooLarge:e=>`文件 ${e} 超过大小限制`,unsupportedFile:e=>`不支持文件 ${e}`,attachmentError:e=>fi("zh",e),processing:"正在处理…",syncing:"正在同步会话…",loading:"正在恢复会话…",retry:"重试",knowledgeBusy:"当前咨询较多,请稍后重试。",requestFailed:"请求失败",darkMode:"深色模式",lightMode:"浅色模式",previewImage:"放大预览",closeImagePreview:"关闭图片预览",closeCitation:"关闭引用文档",assistantName:"小瑞",citationCategoryPath:"分类路径",citationPublishedAt:"发布时间",citationUpdatedAt:"更新时间",citationContentVersion:"正文版本",attachmentUploaded:"附件上传成功",disclaimer:"推荐和回答由 AI 生成,仅供参考"},tt={PROCESSING:"processing",SEARCHING:"searching",READING:"reading",RESPONDING:"responding",FINALIZING:"finalizing"},ar={[tt.PROCESSING]:{zh:"正在处理…",en:"Processing…"},[tt.SEARCHING]:{zh:"正在查找相关说明…",en:"Searching for relevant information…"},[tt.READING]:{zh:"正在阅读相关说明…",en:"Reading relevant information…"},[tt.RESPONDING]:{zh:"正在回答…",en:"Answering…"},[tt.FINALIZING]:{zh:"正在整理回答…",en:"Finalizing the answer…"}};function Ya(e,t){var r,i;const n=t.trim().toLowerCase().replace(/[\s-]+/g,"_");return n===tt.RESPONDING?null:(i=(r=ar[n])==null?void 0:r[e])!=null?i:ar.processing[e]}const Ha={zh:Fa,en:Qa};function Ln(e){return Ha[e]}const gi=O.createContext(null);function Ga({labels:e,language:t,theme:n,toggleTheme:r,children:i}){return y.jsx(gi.Provider,{value:{labels:e,language:t,theme:n,toggleTheme:r},children:i})}function mi(){const e=O.useContext(gi);if(!e)throw new Error("useAIChatUI must be used within AIChatUIProvider");return e}function Fe(){const{labels:e,language:t}=mi();return{labels:e,language:t}}function at(){const{theme:e,toggleTheme:t}=mi();return{theme:e,toggleTheme:t}}function Va(e){if(typeof Element!="undefined"&&e instanceof Element){const n=e.closest(".rb-ai-chat-root");if(n)return n}const t=e==null?void 0:e.getRootNode();return t instanceof DocumentFragment?t:typeof document!="undefined"?document.body:null}function Cn({anchor:e,container:t,children:n}){const r=t!=null?t:Va(e);return r?pi.createPortal(n,r):null}function qa({open:e,children:t,anchor:n,container:r,className:i="rb-chat-tooltip",style:a}){const{theme:o}=at();return e?y.jsx(Cn,{anchor:n,container:r,children:y.jsx("span",{className:i,"data-theme":o,role:"tooltip",style:a,children:t})}):null}function bi({open:e,children:t,anchor:n,container:r,className:i="rb-chat-modal",onClose:a}){if(O.useEffect(()=>{if(!e||!a)return;const l=s=>{s.key==="Escape"&&(s.stopPropagation(),a())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a,e]),!e)return null;const o=l=>{l.target===l.currentTarget&&(a==null||a())};return y.jsx(Cn,{anchor:n,container:r,children:y.jsx("div",{className:i,role:"dialog","aria-modal":"true",onMouseDown:o,children:t})})}function xi({open:e,imageUrl:t,anchor:n,onClose:r}){const{labels:i}=Fe();return y.jsx(bi,{open:e&&!!t,anchor:n,onClose:r,className:"rb-chat-image-modal-backdrop",children:y.jsxs("div",{className:"rb-chat-image-modal",children:[y.jsx("button",{type:"button",className:"rb-chat-image-modal-close","aria-label":i.closeImagePreview,title:i.closeImagePreview,onClick:r,children:"×"}),y.jsx("img",{src:t!=null?t:"",alt:i.previewImage})]})})}const Te={USER:"user",ASSISTANT:"assistant"},se={COMPLETE:"complete",STREAMING:"streaming",ERROR:"error",CANCELLED:"cancelled",NO_EVIDENCE:"no_evidence",AWAITING_RECOVERY:"awaiting-recovery"},Qe={PENDING:"pending",UPLOADING:"uploading",UPLOADED:"uploaded",ERROR:"error"},it={ATTACHMENT_INVALID:"ATTACHMENT_INVALID",ATTACHMENT_NOT_FOUND:"ATTACHMENT_NOT_FOUND",ATTACHMENT_UPLOAD_FAILED:"ATTACHMENT_UPLOAD_FAILED",ATTACHMENT_TOO_LARGE:"ATTACHMENT_TOO_LARGE",ATTACHMENT_UNSUPPORTED:"ATTACHMENT_UNSUPPORTED",CONVERSATION_NOT_FOUND:"CONVERSATION_NOT_FOUND",INVALID_STREAM_CONTENT_TYPE:"INVALID_STREAM_CONTENT_TYPE",KNOWLEDGE_BUSY:"KNOWLEDGE_BUSY",KNOWLEDGE_RUN_IN_PROGRESS:"KNOWLEDGE_RUN_IN_PROGRESS",NETWORK_ERROR:"NETWORK_ERROR",REQUEST_START_FAILED:"REQUEST_START_FAILED",STREAM_ENDED_BEFORE_TERMINAL:"STREAM_ENDED_BEFORE_TERMINAL"},Za="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJhdHRhY2giPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNMTEuNjI1IDUuNjI1TDYuNiAxMC42NUM2LjM0MjExIDEwLjg0MzQgNi4xMjg3OSAxMS4wOSA1Ljk3NDQ5IDExLjM3M0M1LjgyMDE5IDExLjY1NjEgNS43Mjg1MSAxMS45Njg5IDUuNzA1NjYgMTIuMjkwNUM1LjY4MjgxIDEyLjYxMjEgNS43MjkzMiAxMi45MzQ4IDUuODQyMDQgMTMuMjM2OEM1Ljk1NDc2IDEzLjUzODggNi4xMzEwNyAxMy44MTMgNi4zNTkwMSAxNC4w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NMy43NSAzLjc1TDYuMjUgNi4yNSIgc3Ryb2tlLXdpZHRoPSIwLjU4MzMzMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2U9IndoaXRlIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMF80Ij4KPHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",Ja="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiB2aWV3Qm94PSIwIDAgMTUgMTUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJzZW5kIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTIuODEyNSA3LjVMMTIuMTg3NSAzLjQzNzVMOS41NjI1IDEyLjgxMjVMNy41IDguMjVMMi44MTI1IDcuNVoiIHN0cm9rZT0iIzhFOTg5RiIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L2c+Cjwvc3ZnPgo=";function Xa({attachment:e,label:t,imageUrl:n,onImageClick:r}){var l,s,c;const{labels:i}=Fe();if(e.file.type.startsWith("image/")||((l=e.attachment)==null?void 0:l.kind)==="image")return y.jsx("button",{type:"button",className:"rb-chat-image-preview-button","aria-label":`${i.previewImage} ${t}`,onClick:r,children:y.jsx("img",{src:n!=null?n:"",alt:t})});const o=((c=(s=t.split(".").pop())==null?void 0:s.toLowerCase())!=null?c:"").toUpperCase()||"FILE";return y.jsxs("span",{className:"rb-chat-file-preview","aria-hidden":"true",children:[y.jsx("span",{className:"rb-chat-file-extension",children:o}),y.jsx("span",{className:"rb-chat-file-name",children:t})]})}function Ka({attachment:e,onRemove:t}){var b,M,x,N,w,j;const{labels:n}=Fe(),r=O.useRef(null),[i,a]=O.useState(null),o=(M=(b=e.attachment)==null?void 0:b.filename)!=null?M:e.file.name,l=e.file.type.startsWith("image/")||((x=e.attachment)==null?void 0:x.kind)==="image",[s,c]=O.useState(null);O.useEffect(()=>{var A;if(!l||(A=e.attachment)!=null&&A.content_url){c(null);return}const E=URL.createObjectURL(e.file);return c(E),()=>URL.revokeObjectURL(E)},[(N=e.attachment)==null?void 0:N.content_url,e.file,l]);const h=(j=(w=e.attachment)==null?void 0:w.content_url)!=null?j:s,[u,p]=O.useState(!1),d=e.error?n.attachmentError(e.error.error_code):null,g=()=>{if(!d||!r.current)return;const E=r.current.getBoundingClientRect();a({left:E.left+E.width/2,top:E.top-8})};return y.jsxs("span",{ref:r,className:`rb-chat-attachment${e.error?" has-error":""}`,"aria-label":o,title:l?void 0:o,onMouseEnter:g,onMouseMove:g,onMouseLeave:()=>a(null),onFocus:g,onBlur:()=>a(null),children:[y.jsx(Xa,{attachment:e,label:o,imageUrl:h,onImageClick:()=>p(!0)}),e.status===Qe.UPLOADING?y.jsx("span",{className:"rb-chat-attachment-status","aria-hidden":"true",children:y.jsxs("span",{className:"rb-chat-loading-dots",children:[y.jsx("span",{}),y.jsx("span",{}),y.jsx("span",{})]})}):null,e.status===Qe.ERROR?y.jsx("span",{className:"rb-chat-attachment-status is-error",children:"!"}):null,d&&i?y.jsx(qa,{open:!0,anchor:r.current,className:"rb-chat-attachment-error-tooltip",style:{left:i.left,top:i.top},children:d}):null,y.jsx("button",{type:"button",className:"rb-chat-attachment-remove","aria-label":n.removeAttachment,onClick:t,children:y.jsx("img",{src:Wa,alt:""})}),y.jsx(xi,{open:u,imageUrl:h,anchor:r.current,onClose:()=>p(!1)})]})}function $a({attachments:e,draft:t,busy:n,accept:r,attachmentsAvailable:i,onDraftChange:a,onPaste:o,onFiles:l,onRemoveAttachment:s,onSubmit:c,onCancel:h}){const{labels:u}=Fe(),{theme:p}=at(),d=O.useRef(null),g=O.useRef(null),b=O.useRef(null);return O.useLayoutEffect(()=>{const M=g.current,x=b.current;if(!M||!x)return;const N=()=>{const E=Number.parseFloat(window.getComputedStyle(M).lineHeight);M.style.height="auto";const A=E*5;M.style.height=`${Math.min(M.scrollHeight,A)}px`,M.style.overflowY=M.scrollHeight>A?"auto":"hidden"};N();let w=x.clientWidth;const j=new ResizeObserver(()=>{x.clientWidth!==w&&(w=x.clientWidth,N())});return j.observe(x),()=>j.disconnect()},[t]),y.jsxs("form",{className:"rb-chat-composer",onSubmit:M=>{M.preventDefault(),n?h():c()},children:[e.length>0?y.jsx("div",{className:"rb-chat-attachments",children:e.map(M=>y.jsx(Ka,{attachment:M,onRemove:()=>s(M.id)},M.id))}):null,y.jsxs("div",{ref:b,className:"rb-chat-input-container",children:[y.jsx("textarea",{ref:g,className:"rb-chat-input",value:t,placeholder:u.placeholder,rows:1,onPaste:o,onChange:M=>a(M.target.value),onKeyDown:M=>{if(M.key==="Enter"&&!M.shiftKey&&!M.nativeEvent.isComposing&&M.nativeEvent.keyCode!==229){if(n)return;M.preventDefault(),c()}}}),y.jsxs("div",{className:"rb-chat-composer-footer",children:[y.jsx("button",{type:"button",className:"rb-chat-icon-button rb-chat-attach-button","aria-label":u.attach,disabled:!i,onClick:()=>{var M;return(M=d.current)==null?void 0:M.click()},children:y.jsx("img",{src:p==="dark"?_a:Za,alt:""})}),y.jsx("input",{ref:d,hidden:!0,type:"file",multiple:!0,disabled:!i,accept:r,onChange:M=>{var x;l(Array.from((x=M.target.files)!=null?x:[])),M.target.value=""}}),y.jsx("button",{className:"rb-chat-send","aria-label":n?u.stop:u.send,title:n?u.stop:u.send,type:"submit",children:n?y.jsx("span",{className:"rb-chat-stop-icon",children:"■"}):y.jsx("img",{src:Ja,alt:""})})]})]})]})}const On="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQC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Y3QzkuNzkxMjQgMTIuMzY2NyA5LjIxNjY3IDExLjc5MjEgOS4yMTY2NyAxMS4wODMzQzkuMjE2NjcgMTAuMzc0NiA5Ljc5MTI0IDkuOCAxMC41IDkuOEMxMS4yMDg4IDkuOCAxMS43ODMzIDEwLjM3NDYgMTEuNzgzMyAxMS4wODMzWiIgc3Ryb2tlLXdpZHRoPSIwLjkzMzMzMyIgc3Ryb2tlPSIjNjE3MDdBIi8+CjxwYXRoIGQ9Ik00Ljc4MzMzIDYuM0w5LjIxNjY2IDMuNjc1TTQuNzgzMzMgNy43TDkuMjE2NjYgMTAuMzI1IiBzdHJva2Utd2lkdGg9IjAuOTMzMzMzIiBzdHJva2U9IiM2MTcwN0EiLz4KPC9zdmc+Cg==";function ro({isWelcome:e,onNewChat:t,onShare:n,shareDisabled:r=!1,onCollapse:i}){const{labels:a}=Fe(),{theme:o,toggleTheme:l}=at();return y.jsxs("header",{className:`rb-chat-header${e?" is-welcome":""}`,children:[y.jsxs("div",{className:"rb-chat-brand",children:[y.jsx("img",{className:"rb-chat-brand-mark",src:On,alt:""}),y.jsxs("span",{className:"rb-chat-title",children:["Renderbus ",a.title]})]}),y.jsxs("div",{className:"rb-chat-actions",children:[y.jsxs("button",{type:"button",className:"rb-chat-share-button","aria-label":a.share,title:a.share,disabled:r,onClick:n,children:[y.jsx("img",{src:no,alt:""}),y.jsx("span",{children:a.share})]}),y.jsx("button",{className:"rb-chat-icon-button","aria-label":a.newChat,title:a.newChat,onClick:t,children:y.jsx("img",{src:eo,alt:""})}),y.jsx("button",{className:"rb-chat-icon-button","aria-label":o==="light"?a.darkMode:a.lightMode,title:o==="light"?a.darkMode:a.lightMode,onClick:l,children:y.jsx("img",{src:to,alt:""})}),y.jsx("button",{type:"button",className:"rb-chat-icon-button","aria-label":a.collapse,title:a.collapse,onClick:i,children:y.jsx("img",{src:yi,alt:""})})]})]})}function io(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ao=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lo={};function or(e,t){return((t||lo).jsx?oo:ao).test(e)}const so=/[ \t\n\f\r]/g;function co(e){return typeof e=="object"?e.type==="text"?lr(e.value):!1:lr(e)}function lr(e){return e.replace(so,"")===""}class kt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}kt.prototype.normal={};kt.prototype.property={};kt.prototype.space=void 0;function Mi(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new kt(n,r,t)}function bn(e){return e.toLowerCase()}class Ae{constructor(t,n){this.attribute=n,this.property=t}}Ae.prototype.attribute="";Ae.prototype.booleanish=!1;Ae.prototype.boolean=!1;Ae.prototype.commaOrSpaceSeparated=!1;Ae.prototype.commaSeparated=!1;Ae.prototype.defined=!1;Ae.prototype.mustUseProperty=!1;Ae.prototype.number=!1;Ae.prototype.overloadedBoolean=!1;Ae.prototype.property="";Ae.prototype.spaceSeparated=!1;Ae.prototype.space=void 0;let uo=0;const Z=$e(),de=$e(),xn=$e(),T=$e(),ae=$e(),Je=$e(),Se=$e();function $e(){return 2**++uo}const yn=Object.freeze(Object.defineProperty({__proto__:null,boolean:Z,booleanish:de,commaOrSpaceSeparated:Se,commaSeparated:Je,number:T,overloadedBoolean:xn,spaceSeparated:ae},Symbol.toStringTag,{value:"Module"})),Xt=Object.keys(yn);class Rn extends Ae{constructor(t,n,r,i){let a=-1;if(super(t,n),sr(this,"space",i),typeof r=="number")for(;++a<Xt.length;){const o=Xt[a];sr(this,Xt[a],(r&yn[o])===yn[o])}}}Rn.prototype.defined=!0;function sr(e,t,n){n&&(e[t]=n)}function ot(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bn(r)]=r,n[bn(a.attribute)]=r}return new kt(t,n,e.space)}const ki=ot({properties:{ariaActiveDescendant:null,ariaAtomic:de,ariaAutoComplete:null,ariaBusy:de,ariaChecked:de,ariaColCount:T,ariaColIndex:T,ariaColSpan:T,ariaControls:ae,ariaCurrent:null,ariaDescribedBy:ae,ariaDetails:null,ariaDisabled:de,ariaDropEffect:ae,ariaErrorMessage:null,ariaExpanded:de,ariaFlowTo:ae,ariaGrabbed:de,ariaHasPopup:null,ariaHidden:de,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ae,ariaLevel:T,ariaLive:null,ariaModal:de,ariaMultiLine:de,ariaMultiSelectable:de,ariaOrientation:null,ariaOwns:ae,ariaPlaceholder:null,ariaPosInSet:T,ariaPressed:de,ariaReadOnly:de,ariaRelevant:null,ariaRequired:de,ariaRoleDescription:ae,ariaRowCount:T,ariaRowIndex:T,ariaRowSpan:T,ariaSelected:de,ariaSetSize:T,ariaSort:null,ariaValueMax:T,ariaValueMin:T,ariaValueNow:T,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wi(e,t){return t in e?e[t]:t}function Ii(e,t){return wi(e,t.toLowerCase())}const ho=ot({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Je,acceptCharset:ae,accessKey:ae,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:ae,autoFocus:Z,autoPlay:Z,blocking:ae,capture:null,charSet:null,checked:Z,cite:null,className:ae,closedBy:null,colorSpace:null,cols:T,colSpan:T,command:null,commandFor:null,content:null,contentEditable:de,controls:Z,controlsList:ae,coords:T|Je,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:xn,draggable:de,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:ae,height:T,hidden:xn,high:T,href:null,hrefLang:null,htmlFor:ae,httpEquiv:ae,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:ae,itemRef:ae,itemScope:Z,itemType:ae,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:T,manifest:null,max:null,maxLength:T,media:null,method:null,min:null,minLength:T,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:T,pattern:null,ping:ae,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:ae,required:Z,reversed:Z,rows:T,rowSpan:T,sandbox:ae,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:T,sizes:null,slot:null,span:T,spellCheck:de,src:null,srcDoc:null,srcLang:null,srcSet:null,start:T,step:null,style:null,tabIndex:T,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:de,width:T,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ae,axis:null,background:null,bgColor:null,border:T,borderColor:null,bottomMargin:T,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:T,leftMargin:T,link:null,longDesc:null,lowSrc:null,marginHeight:T,marginWidth:T,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:T,rules:null,scheme:null,scrolling:de,standby:null,summary:null,text:null,topMargin:T,valueType:null,version:null,vAlign:null,vLink:null,vSpace:T,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:Je,part:ae,prefix:null,property:null,results:T,security:null,unselectable:null},space:"html",transform:Ii}),po=ot({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Se,accentHeight:T,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:T,amplitude:T,arabicForm:null,ascent:T,attributeName:null,attributeType:null,azimuth:T,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:T,by:null,calcMode:null,capHeight:T,className:ae,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:T,diffuseConstant:T,direction:null,display:null,dur:null,divisor:T,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:T,enableBackground:null,end:null,event:null,exponent:T,externalResourcesRequired:null,fill:null,fillOpacity:T,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Je,g2:Je,glyphName:Je,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:T,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:T,horizOriginX:T,horizOriginY:T,id:null,ideographic:T,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:T,k:T,k1:T,k2:T,k3:T,k4:T,kernelMatrix:Se,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:T,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:T,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:T,overlineThickness:T,paintOrder:null,panose1:null,path:null,pathLength:T,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ae,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:T,pointsAtY:T,pointsAtZ:T,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Se,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Se,rev:Se,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Se,requiredFeatures:Se,requiredFonts:Se,requiredFormats:Se,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:T,specularExponent:T,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:T,strikethroughThickness:T,string:null,stroke:null,strokeDashArray:Se,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:T,strokeOpacity:T,strokeWidth:null,style:null,surfaceScale:T,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Se,tabIndex:T,tableValues:null,target:null,targetX:T,targetY:T,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Se,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:T,underlineThickness:T,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:T,values:null,vAlphabetic:T,vMathematical:T,vectorEffect:null,vHanging:T,vIdeographic:T,version:null,vertAdvY:T,vertOriginX:T,vertOriginY:T,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:T,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wi}),Ni=ot({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ai=ot({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ii}),Di=ot({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fo={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},go=/[A-Z]/g,cr=/-[a-z]/g,mo=/^data[-\w.:]+$/i;function bo(e,t){const n=bn(t);let r=t,i=Ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&mo.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(cr,yo);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!cr.test(a)){let o=a.replace(go,xo);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Rn}return new i(r,t)}function xo(e){return"-"+e.toLowerCase()}function yo(e){return e.charAt(1).toUpperCase()}const Mo=Mi([ki,ho,Ni,Ai,Di],"html"),Pn=Mi([ki,po,Ni,Ai,Di],"svg");function ko(e){return e.join(" ").trim()}var Pt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Un={},ur=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wo=/\n/g,Io=/^\s*/,No=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ao=/^:\s*/,Do=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Eo=/^[;\s]*/,So=/^\s+|\s+$/g,To=`
|
|
4
|
-
`,hr="/",dr="*",We="",jo="comment",zo="declaration";function vo(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var b=g.match(wo);b&&(n+=b.length);var M=g.lastIndexOf(To);r=~M?g.length-M:r+g.length}function a(){var g={line:n,column:r};return function(b){return b.position=new o(g),c(),b}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function l(g){var b=new Error(t.source+":"+n+":"+r+": "+g);if(b.reason=g,b.filename=t.source,b.line=n,b.column=r,b.source=e,!t.silent)throw b}function s(g){var b=g.exec(e);if(b){var M=b[0];return i(M),e=e.slice(M.length),b}}function c(){s(Io)}function h(g){var b;for(g=g||[];b=u();)b!==!1&&g.push(b);return g}function u(){var g=a();if(!(hr!=e.charAt(0)||dr!=e.charAt(1))){for(var b=2;We!=e.charAt(b)&&(dr!=e.charAt(b)||hr!=e.charAt(b+1));)++b;if(b+=2,We===e.charAt(b-1))return l("End of comment missing");var M=e.slice(2,b-2);return r+=2,i(M),e=e.slice(b),r+=2,g({type:jo,comment:M})}}function p(){var g=a(),b=s(No);if(b){if(u(),!s(Ao))return l("property missing ':'");var M=s(Do),x=g({type:zo,property:pr(b[0].replace(ur,We)),value:M?pr(M[0].replace(ur,We)):We});return s(Eo),x}}function d(){var g=[];h(g);for(var b;b=p();)b!==!1&&(g.push(b),h(g));return g}return c(),d()}function pr(e){return e?e.replace(So,We):We}var Lo=vo,Co=Pt&&Pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Un,"__esModule",{value:!0});Un.default=Ro;const Oo=Co(Lo);function Ro(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Oo.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:l}=a;i?t(o,l,a):l&&(n=n||{},n[o]=l)}),n}var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.camelCase=void 0;var Po=/^--[a-zA-Z0-9_-]+$/,Uo=/-([a-z])/g,Bo=/^[^-]+$/,Qo=/^-(webkit|moz|ms|o|khtml)-/,Fo=/^-(ms)-/,Yo=function(e){return!e||Bo.test(e)||Po.test(e)},Ho=function(e,t){return t.toUpperCase()},fr=function(e,t){return"".concat(t,"-")},Go=function(e,t){return t===void 0&&(t={}),Yo(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Fo,fr):e=e.replace(Qo,fr),e.replace(Uo,Ho))};Gt.camelCase=Go;var Vo=Pt&&Pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qo=Vo(Un),Zo=Gt;function Mn(e,t){var n={};return!e||typeof e!="string"||(0,qo.default)(e,function(r,i){r&&i&&(n[(0,Zo.camelCase)(r,t)]=i)}),n}Mn.default=Mn;var _o=Mn;const Wo=Ei(_o),Si=Ti("end"),Bn=Ti("start");function Ti(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Jo(e){const t=Bn(e),n=Si(e);if(t&&n)return{start:t,end:n}}function mt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gr(e.position):"start"in e||"end"in e?gr(e):"line"in e||"column"in e?kn(e):""}function kn(e){return mr(e&&e.line)+":"+mr(e&&e.column)}function gr(e){return kn(e&&e.start)+"-"+kn(e&&e.end)}function mr(e){return e&&typeof e=="number"?e:1}class ye extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?a.ruleId=r:(a.source=r.slice(0,s),a.ruleId=r.slice(s+1))}if(!a.place&&a.ancestors&&a.ancestors){const s=a.ancestors[a.ancestors.length-1];s&&(a.place=s.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=mt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ye.prototype.file="";ye.prototype.name="";ye.prototype.reason="";ye.prototype.message="";ye.prototype.stack="";ye.prototype.column=void 0;ye.prototype.line=void 0;ye.prototype.ancestors=void 0;ye.prototype.cause=void 0;ye.prototype.fatal=void 0;ye.prototype.place=void 0;ye.prototype.ruleId=void 0;ye.prototype.source=void 0;const Qn={}.hasOwnProperty,Xo=new Map,Ko=/[A-Z]/g,$o=new Set(["table","tbody","thead","tfoot","tr"]),el=new Set(["td","th"]),ji="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=cl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=sl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Pn:Mo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=zi(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function zi(e,t,n){if(t.type==="element")return nl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return al(e,t,n);if(t.type==="mdxjsEsm")return il(e,t);if(t.type==="root")return ol(e,t,n);if(t.type==="text")return ll(e,t)}function nl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Pn,e.schema=i),e.ancestors.push(t);const a=Li(e,t.tagName,!1),o=ul(e,t);let l=Yn(e,t);return $o.has(t.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!co(s):!0})),vi(e,o,a,t),Fn(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function rl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Mt(e,t.position)}function il(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mt(e,t.position)}function al(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Pn,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Li(e,t.name,!0),o=hl(e,t),l=Yn(e,t);return vi(e,o,a,t),Fn(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ol(e,t,n){const r={};return Fn(r,Yn(e,t)),e.create(t,e.Fragment,r,n)}function ll(e,t){return t.value}function vi(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sl(e,t,n){return r;function r(i,a,o,l){const c=Array.isArray(o.children)?n:t;return l?c(a,o,l):c(a,o)}}function cl(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),s=Bn(r);return t(i,a,o,l,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ul(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Qn.call(t.properties,i)){const a=dl(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&el.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function hl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Mt(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Mt(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Yn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Xo;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const s=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(s){const c=i.get(s)||0;o=s+"-"+c,i.set(s,c+1)}}const l=zi(e,a,o);l!==void 0&&n.push(l)}return n}function dl(e,t,n){const r=bo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?io(n):ko(n)),r.property==="style"){let i=typeof n=="object"?n:pl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?fo[r.property]||r.property:r.attribute,n]}}function pl(e,t){try{return Wo(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ye("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ji+"#cannot-parse-style-attribute",i}}function Li(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=or(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=or(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Qn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mt(e)}function Mt(e,t){const n=new ye("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ji+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fl(e){const t={};let n;for(n in e)Qn.call(e,n)&&(t[gl(n)]=e[n]);return t}function gl(e){let t=e.replace(Ko,ml);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ml(e){return"-"+e.toLowerCase()}const Kt={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},bl={};function Hn(e,t){const n=t||bl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ci(e,r,i)}function Ci(e,t,n){if(xl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return br(e.children,t,n)}return Array.isArray(e)?br(e,t,n):""}function br(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ci(e[i],t,n);return r.join("")}function xl(e){return!!(e&&typeof e=="object")}const xr={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
5
|
-
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},yl={}.hasOwnProperty;function Gn(e){return yl.call(xr,e)?xr[e]:!1}function ve(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function je(e,t){return e.length>0?(ve(e,e.length,0,t),e):t}const yr={}.hasOwnProperty;function Oi(e){const t={};let n=-1;for(;++n<e.length;)Ml(t,e[n]);return t}function Ml(e,t){let n;for(n in t){const i=(yr.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){yr.call(i,o)||(i[o]=[]);const l=a[o];kl(i[o],Array.isArray(l)?l:l?[l]:[])}}}function kl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ve(e,0,0,r)}function Ri(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Le(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const we=Ve(/[A-Za-z]/),xe=Ve(/[\dA-Za-z]/),wl=Ve(/[#-'*+\--9=?A-Z^-~]/);function Ut(e){return e!==null&&(e<32||e===127)}const wn=Ve(/\d/),Il=Ve(/[\dA-Fa-f]/),Nl=Ve(/[!-/:-@[-`{-~]/);function H(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const Vt=Ve(/\p{P}|\p{S}/u),Xe=Ve(/\s/);function Ve(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function lt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&xe(e.charCodeAt(n+1))&&xe(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ee(e,t,n,r){const i=r?r-1:1/0;let a=0;return o;function o(s){return J(s)?(e.enter(n),l(s)):t(s)}function l(s){return J(s)&&a++<i?(e.consume(s),l):(e.exit(n),t(s))}}function Pi(e,t,n,r,i,a){let o=0;return l;function l(h){return a>0&&J(h)?(e.enter(r),s(h)):c(h)}function s(h){return J(h)&&o<a?(e.consume(h),o++,s):(e.exit(r),c(h))}function c(h){return o>=i?t(h):n(h)}}const Al={tokenize:Dl};function Dl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ee(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return H(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}let Bt=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Mr(this,t,n,r,!1)}addBefore(t,n,r){Mr(this,t,n,r,!0)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0,this.index.clear()}};function Mr(e,t,n,r,i){if(n===0&&r.length===0)return;const a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}const El={tokenize:Sl},kr={tokenize:Tl};function Sl(e){const t=this,n=[];let r=0,i,a,o;return l;function l(w){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,s,c)(w)}return c(w)}function s(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();const j=t.events.length;let E=j,A;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){A=t.events[E][1].end;break}x(r);let B=j;for(;B<t.events.length;)t.events[B][1].end={...A},B++;const G=new Bt;return G.add(E+1,0,t.events.slice(j)),G.add(j,B-j,[]),G.consume(t.events),c(w)}return l(w)}function c(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kr,h,u)(w)}function h(w){return i&&N(),x(r),p(w)}function u(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(kr,d,g)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){i&&N(),x(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),b(w)}function b(w){if(w===null){M(e.exit("chunkFlow"),!0),x(0),e.consume(w);return}return H(w)?(e.consume(w),M(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),b)}function M(w,j){const E=t.sliceStream(w);if(j&&E.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(E),t.parser.lazy[w.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;const B=t.events.length;let G=B,_,k;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(_){k=t.events[G][1].end;break}_=!0}for(x(r),A=B;A<t.events.length;)t.events[A][1].end={...k},A++;const L=new Bt;L.add(G+1,0,t.events.slice(B)),L.add(B,A-B,[]),L.consume(t.events)}}function x(w){let j=n.length;for(;j-- >w;){const E=n[j];t.containerState=E[1],E[0].exit.call(t,e)}n.length=w}function N(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Tl(e,t,n){return ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qt(e){if(e===null||oe(e)||Xe(e))return 1;if(Vt(e))return 2}function qt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const In={name:"attention",resolveAll:jl,tokenize:zl};function jl(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},l={...e[n][1].start};wr(o,-a),wr(l,a);const s={type:a>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},c={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:l},h={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},u={type:a>1?"strong":"emphasis",start:{...s.start},end:{...c.end}};e[i][1].end={...s.start},e[n][1].start={...c.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=je(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=je(r,[["enter",u,t],["enter",s,t],["exit",s,t],["enter",h,t]]),r=je(r,qt(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=je(r,[["exit",h,t],["enter",c,t],["exit",c,t],["exit",u,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=je(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),ve(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function zl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Qt(r);let a;return o;function o(s){return a=s,e.enter("attentionSequence"),l(s)}function l(s){if(s===a)return e.consume(s),l;const c=e.exit("attentionSequence"),h=Qt(s),u=!h||h===2&&i||n.includes(s)&&s!==42&&s!==95,p=!i||i===2&&h||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!p)),c._close=!!(a===42?p:p&&(h||!u)),t(s)}}function wr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vl={name:"autolink",tokenize:Ll};function Ll(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return we(d)?(e.consume(d),o):d===64?n(d):c(d)}function o(d){return d===43||d===45||d===46||xe(d)?(r=1,l(d)):c(d)}function l(d){return d===58?(e.consume(d),r=0,s):(d===43||d===45||d===46||xe(d))&&r++<32?(e.consume(d),l):(r=0,c(d))}function s(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Ut(d)?n(d):(e.consume(d),s)}function c(d){return d===64?(e.consume(d),h):wl(d)?(e.consume(d),c):n(d)}function h(d){return xe(d)?u(d):n(d)}function u(d){return d===46?(e.consume(d),r=0,h):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||xe(d))&&r++<63){const g=d===45?p:u;return e.consume(d),g}return n(d)}}const wt={partial:!0,tokenize:Cl};function Cl(e,t,n){return r;function r(a){return J(a)?ee(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||H(a)?t(a):n(a)}}const Ui={continuation:{tokenize:Rl},exit:Pl,name:"blockQuote",tokenize:Ol};function Ol(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return J(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Rl(e,t,n){const r=this;return i;function i(o){return J(o)?ee(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Ui,t,n)(o)}}function Pl(e){e.exit("blockQuote")}const Bi={name:"characterEscape",tokenize:Ul};function Ul(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Nl(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Qi={name:"characterReference",tokenize:Bl};function Bl(e,t,n){const r=this;let i=0,a,o;return l;function l(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),s}function s(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=xe,h(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Il,h):(e.enter("characterReferenceValue"),a=7,o=wn,h(u))}function h(u){if(u===59&&i){const p=e.exit("characterReferenceValue");return o===xe&&!Gn(r.sliceSerialize(p))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(u)&&i++<a?(e.consume(u),h):n(u)}}const Nn={partial:!0,tokenize:Ql};function Ql(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ir={concrete:!0,name:"codeFenced",tokenize:Fl};function Fl(e,t,n){const r=this,i={partial:!0,tokenize:E};let a=0,o=0,l;return s;function s(A){return c(A)}function c(A){const B=r.events[r.events.length-1];return a=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,l=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===l?(o++,e.consume(A),h):o<3?n(A):(e.exit("codeFencedFenceSequence"),J(A)?ee(e,u,"whitespace")(A):u(A))}function u(A){return A===null||H(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Nn,b,j)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||H(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(A)):J(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ee(e,d,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),p)}function d(A){return A===null||H(A)?u(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(A))}function g(A){return A===null||H(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(A)):A===96&&A===l?n(A):(e.consume(A),g)}function b(A){return e.attempt(i,j,M)(A)}function M(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),x}function x(A){return a>0&&J(A)?ee(e,N,"linePrefix",a+1)(A):N(A)}function N(A){return A===null||H(A)?e.check(Nn,b,j)(A):(e.enter("codeFlowValue"),w(A))}function w(A){return A===null||H(A)?(e.exit("codeFlowValue"),N(A)):(e.consume(A),w)}function j(A){return e.exit("codeFenced"),t(A)}function E(A,B,G){let _=0;return k;function k(F){return A.enter("lineEnding"),A.consume(F),A.exit("lineEnding"),L}function L(F){return A.enter("codeFencedFence"),J(F)?ee(A,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):U(F)}function U(F){return F===l?(A.enter("codeFencedFenceSequence"),q(F)):G(F)}function q(F){return F===l?(_++,A.consume(F),q):_>=o?(A.exit("codeFencedFenceSequence"),J(F)?ee(A,S,"whitespace")(F):S(F)):G(F)}function S(F){return F===null||H(F)?(A.exit("codeFencedFence"),B(F)):G(F)}}}const $t={name:"codeIndented",tokenize:Hl},Yl={partial:!0,tokenize:Gl};function Hl(e,t,n){return r;function r(l){return e.enter("codeIndented"),Pi(e,i,n,"linePrefix",4,4)(l)}function i(l){return l===null?o(l):H(l)?e.attempt(Yl,i,o)(l):(e.enter("codeFlowValue"),a(l))}function a(l){return l===null||H(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),a)}function o(l){return e.exit("codeIndented"),t(l)}}function Gl(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):H(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Pi(e,t,a,"linePrefix",4,4)(o)}function a(o){return H(o)?i(o):n(o)}}const Vl={name:"codeText",previous:Zl,resolve:ql,tokenize:_l};function ql(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Zl(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _l(e,t,n){let r=0,i,a;return o;function o(u){return e.enter("codeText"),e.enter("codeTextSequence"),l(u)}function l(u){return u===96?(e.consume(u),r++,l):(e.exit("codeTextSequence"),s(u))}function s(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),s):u===96?(a=e.enter("codeTextSequence"),i=0,h(u)):H(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||H(u)?(e.exit("codeTextData"),s(u)):(e.consume(u),c)}function h(u){return u===96?(e.consume(u),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(a.type="codeTextData",c(u))}}class Wl{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&pt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),pt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);pt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pt(this.left,n.reverse())}}}function pt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Fi(e){const t={};let n=-1,r,i,a,o,l,s,c;const h=new Wl(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,a=0,a<s.length&&s[a][1].type==="lineEndingBlank"&&(a+=2),a<s.length&&s[a][1].type==="content"))for(;++a<s.length&&s[a][1].type!=="content";)s[a][1].type==="chunkText"&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Jl(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=h.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return ve(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function Jl(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,s=[],c={};let h,u,p=-1,d=n,g=0,b=0;const M=[b];for(;d;){for(;e.get(++i)[1]!==d;);a.push(i),d._tokenizer||(h=r.sliceStream(d),d.next||h.push(null),u&&o.defineSkip(d.start),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(h),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(b=p+1,M.push(b),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(o.events=[],d?(d._tokenizer=void 0,d.previous=void 0):M.pop(),p=M.length;p--;){const x=l.slice(M[p],M[p+1]),N=a.pop();s.push([N,N+x.length-1]),e.splice(N,2,x)}for(s.reverse(),p=-1;++p<s.length;)c[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return c}const Xl={resolve:$l,tokenize:es},Kl={partial:!0,tokenize:ts};function $l(e){return Fi(e),e}function es(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):H(l)?e.check(Kl,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ts(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ee(e,a,"linePrefix")}function a(o){if(o===null||H(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Yi(e,t,n,r,i,a,o,l,s){const c=s||Number.POSITIVE_INFINITY;let h=0;return u;function u(x){return x===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(x),e.exit(a),p):x===null||x===32||x===41||Ut(x)?n(x):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),b(x))}function p(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===62?(e.exit("chunkString"),e.exit(l),p(x)):x===null||x===60||H(x)?n(x):(e.consume(x),x===92?g:d)}function g(x){return x===60||x===62||x===92?(e.consume(x),d):d(x)}function b(x){return!h&&(x===null||x===41||oe(x))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(x)):h<c&&x===40?(e.consume(x),h++,b):x===41?(e.consume(x),h--,b):x===null||x===32||x===40||Ut(x)?n(x):(e.consume(x),x===92?M:b)}function M(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Hi(e,t,n,r,i,a){const o=this;let l=0,s;return c;function c(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(a),h}function h(d){return l>999||d===null||d===91||d===93&&!s||d===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):d===93?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):H(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||H(d)||l++>999?(e.exit("chunkString"),h(d)):(e.consume(d),s||(s=!J(d)),d===92?p:u)}function p(d){return d===91||d===92||d===93?(e.consume(d),l++,u):u(d)}}function Gi(e,t,n,r,i,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,s):n(p)}function s(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),s(o)):p===null?n(p):H(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ee(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||H(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?u:h)}function u(p){return p===o||p===92?(e.consume(p),h):h(p)}}function bt(e,t){let n;return r;function r(i){return H(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ns={name:"definition",tokenize:is},rs={partial:!0,tokenize:as};function is(e,t,n){const r=this;let i;return a;function a(d){return e.enter("definition"),o(d)}function o(d){return Hi.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),s):n(d)}function s(d){return oe(d)?bt(e,c)(d):c(d)}function c(d){return Yi(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function h(d){return e.attempt(rs,u,u)(d)}function u(d){return J(d)?ee(e,p,"whitespace")(d):p(d)}function p(d){return d===null||H(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function as(e,t,n){return r;function r(l){return oe(l)?bt(e,i)(l):n(l)}function i(l){return Gi(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return J(l)?ee(e,o,"whitespace")(l):o(l)}function o(l){return l===null||H(l)?t(l):n(l)}}const os={name:"hardBreakEscape",tokenize:ls};function ls(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return H(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const ss={name:"headingAtx",resolve:cs,tokenize:us};function cs(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};ve(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])}return e}function us(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&r++<6?(e.consume(h),o):h===null||oe(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),s(h)):h===null||H(h)?(e.exit("atxHeading"),t(h)):J(h)?ee(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function s(h){return h===35?(e.consume(h),s):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||oe(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const hs=["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"],Nr=["pre","script","style","textarea"],ds={concrete:!0,name:"htmlFlow",resolveTo:fs,tokenize:gs},ps={partial:!0,tokenize:ms};function fs(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function gs(e,t,n){const r=this;let i,a,o,l,s;return c;function c(f){return h(f)}function h(f){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(f),u}function u(f){return f===33?(e.consume(f),p):f===47?(e.consume(f),a=!0,b):f===63?(e.consume(f),i=3,r.interrupt?t:m):we(f)?(e.consume(f),o=String.fromCharCode(f),M):n(f)}function p(f){return f===45?(e.consume(f),i=2,d):f===91?(e.consume(f),i=5,l=0,g):we(f)?(e.consume(f),i=4,r.interrupt?t:m):n(f)}function d(f){return f===45?(e.consume(f),r.interrupt?t:m):n(f)}function g(f){const V="CDATA[";return f===V.charCodeAt(l++)?(e.consume(f),l===V.length?r.interrupt?t:U:g):n(f)}function b(f){return we(f)?(e.consume(f),o=String.fromCharCode(f),M):n(f)}function M(f){if(f===null||f===47||f===62||oe(f)){const V=f===47,Y=o.toLowerCase();return!V&&!a&&Nr.includes(Y)?(i=1,r.interrupt?t(f):U(f)):hs.includes(o.toLowerCase())?(i=6,V?(e.consume(f),x):r.interrupt?t(f):U(f)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(f):a?N(f):w(f))}return f===45||xe(f)?(e.consume(f),o+=String.fromCharCode(f),M):n(f)}function x(f){return f===62?(e.consume(f),r.interrupt?t:U):n(f)}function N(f){return J(f)?(e.consume(f),N):k(f)}function w(f){return f===47?(e.consume(f),k):f===58||f===95||we(f)?(e.consume(f),j):J(f)?(e.consume(f),w):k(f)}function j(f){return f===45||f===46||f===58||f===95||xe(f)?(e.consume(f),j):E(f)}function E(f){return f===61?(e.consume(f),A):J(f)?(e.consume(f),E):w(f)}function A(f){return f===null||f===60||f===61||f===62||f===96?n(f):f===34||f===39?(e.consume(f),s=f,B):J(f)?(e.consume(f),A):G(f)}function B(f){return f===s?(e.consume(f),s=null,_):f===null||H(f)?n(f):(e.consume(f),B)}function G(f){return f===null||f===34||f===39||f===47||f===60||f===61||f===62||f===96||oe(f)?E(f):(e.consume(f),G)}function _(f){return f===47||f===62||J(f)?w(f):n(f)}function k(f){return f===62?(e.consume(f),L):n(f)}function L(f){return f===null||H(f)?U(f):J(f)?(e.consume(f),L):n(f)}function U(f){return f===45&&i===2?(e.consume(f),K):f===60&&i===1?(e.consume(f),X):f===62&&i===4?(e.consume(f),D):f===63&&i===3?(e.consume(f),m):f===93&&i===5?(e.consume(f),ie):H(f)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ps,z,q)(f)):f===null||H(f)?(e.exit("htmlFlowData"),q(f)):(e.consume(f),U)}function q(f){return e.check(Nn,S,z)(f)}function S(f){return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),F}function F(f){return f===null||H(f)?q(f):(e.enter("htmlFlowData"),U(f))}function K(f){return f===45?(e.consume(f),m):U(f)}function X(f){return f===47?(e.consume(f),o="",ne):U(f)}function ne(f){if(f===62){const V=o.toLowerCase();return Nr.includes(V)?(e.consume(f),D):U(f)}return we(f)&&o.length<8?(e.consume(f),o+=String.fromCharCode(f),ne):U(f)}function ie(f){return f===93?(e.consume(f),m):U(f)}function m(f){return f===62?(e.consume(f),D):f===45&&i===2?(e.consume(f),m):U(f)}function D(f){return f===null||H(f)?(e.exit("htmlFlowData"),z(f)):(e.consume(f),D)}function z(f){return e.exit("htmlFlow"),t(f)}}function ms(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(wt,t,n)}}const bs={name:"htmlText",tokenize:xs};function xs(e,t,n){const r=this;let i,a,o;return l;function l(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),s}function s(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),E):m===63?(e.consume(m),w):we(m)?(e.consume(m),G):n(m)}function c(m){return m===45?(e.consume(m),h):m===91?(e.consume(m),a=0,g):we(m)?(e.consume(m),N):n(m)}function h(m){return m===45?(e.consume(m),d):n(m)}function u(m){return m===null?n(m):m===45?(e.consume(m),p):H(m)?(o=u,X(m)):(e.consume(m),u)}function p(m){return m===45?(e.consume(m),d):u(m)}function d(m){return m===62?K(m):m===45?p(m):u(m)}function g(m){const D="CDATA[";return m===D.charCodeAt(a++)?(e.consume(m),a===D.length?b:g):n(m)}function b(m){return m===null?n(m):m===93?(e.consume(m),M):H(m)?(o=b,X(m)):(e.consume(m),b)}function M(m){return m===93?(e.consume(m),x):b(m)}function x(m){return m===62?K(m):m===93?(e.consume(m),x):b(m)}function N(m){return m===null||m===62?K(m):H(m)?(o=N,X(m)):(e.consume(m),N)}function w(m){return m===null?n(m):m===63?(e.consume(m),j):H(m)?(o=w,X(m)):(e.consume(m),w)}function j(m){return m===62?K(m):w(m)}function E(m){return we(m)?(e.consume(m),A):n(m)}function A(m){return m===45||xe(m)?(e.consume(m),A):B(m)}function B(m){return H(m)?(o=B,X(m)):J(m)?(e.consume(m),B):K(m)}function G(m){return m===45||xe(m)?(e.consume(m),G):m===47||m===62||oe(m)?_(m):n(m)}function _(m){return m===47?(e.consume(m),K):m===58||m===95||we(m)?(e.consume(m),k):H(m)?(o=_,X(m)):J(m)?(e.consume(m),_):K(m)}function k(m){return m===45||m===46||m===58||m===95||xe(m)?(e.consume(m),k):L(m)}function L(m){return m===61?(e.consume(m),U):H(m)?(o=L,X(m)):J(m)?(e.consume(m),L):_(m)}function U(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,q):H(m)?(o=U,X(m)):J(m)?(e.consume(m),U):(e.consume(m),S)}function q(m){return m===i?(e.consume(m),i=void 0,F):m===null?n(m):H(m)?(o=q,X(m)):(e.consume(m),q)}function S(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||oe(m)?_(m):(e.consume(m),S)}function F(m){return m===47||m===62||oe(m)?_(m):n(m)}function K(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function X(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ne}function ne(m){return J(m)?ee(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ie(m)}function ie(m){return e.enter("htmlTextData"),o(m)}}const Vn={name:"labelEnd",resolveAll:ws,resolveTo:Is,tokenize:Ns},ys={tokenize:As},Ms={tokenize:Ds},ks={tokenize:Es};function ws(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ve(e,0,e.length,n),e}function Is(e,t){let n=e.length,r=0,i,a,o;for(;n--;){const h=e[n][1];if(i){if(h.type==="link"||h.type==="labelLink"&&h._inactive)break;e[n][0]==="enter"&&h.type==="labelLink"&&(h._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(h.type==="labelImage"||h.type==="labelLink")&&!h._balanced&&(i=n,h.type!=="labelLink")){r=2;break}}else h.type==="labelEnd"&&(a=n)}const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",s,t]],o=je(o,e.slice(i+1,i+r+3)),o=je(o,[["enter",c,t]]),o=je(o,qt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=je(o,[["exit",c,t],e[a-2],e[a-1],["exit",s,t]]),o=je(o,e.slice(a+1)),o=je(o,[["exit",l,t]]),ve(e,i,e.length,o),e}function Ns(e,t,n){const r=this,i=r._labelStarts;let a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return l;function l(p){return a?a._inactive?u(p):(o=r.parser.defined.includes(Le(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(ys,h,o?h:u)(p):p===91?e.attempt(Ms,h,o?c:u)(p):o?h(p):u(p)}function c(p){return e.attempt(ks,h,u)(p)}function h(p){return i.pop(),t(p)}function u(p){return a._balanced=!0,n(p)}}function As(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return oe(u)?bt(e,a)(u):a(u)}function a(u){return u===41?h(u):Yi(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function o(u){return oe(u)?bt(e,s)(u):h(u)}function l(u){return n(u)}function s(u){return u===34||u===39||u===40?Gi(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):h(u)}function c(u){return oe(u)?bt(e,h)(u):h(u)}function h(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function Ds(e,t,n){const r=this;return i;function i(l){return Hi.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function Es(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Ss={name:"labelStartImage",resolveAll:Vn.resolveAll,tokenize:Ts};function Ts(e,t,n){const r=this;let i;return a;function a(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),i=e.exit("labelImage"),l):n(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(s))}}const js={name:"labelStartLink",resolveAll:Vn.resolveAll,tokenize:zs};function zs(e,t,n){const r=this;let i;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const en={name:"lineEnding",tokenize:vs};function vs(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ee(e,t,"linePrefix")}}const Ot={name:"thematicBreak",tokenize:Ls};function Ls(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),s(c)):r>=3&&(c===null||H(c))?(e.exit("thematicBreak"),t(c)):n(c)}function s(c){return c===i?(e.consume(c),r++,s):(e.exit("thematicBreakSequence"),J(c)?ee(e,l,"whitespace")(c):l(c))}}const Ne={continuation:{tokenize:Ps},exit:Bs,name:"list",tokenize:Rs},Cs={partial:!0,tokenize:Qs},Os={partial:!0,tokenize:Us};function Rs(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(d){const g=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:wn(d)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ot,n,c)(d):c(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(d)}return n(d)}function s(d){return wn(d)&&++o<10?(e.consume(d),s):(!r.interrupt||o<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(wt,r.interrupt?n:h,e.attempt(Cs,p,u))}function h(d){return r.containerState.initialBlankLine=!0,a++,p(d)}function u(d){return J(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function Ps(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(wt,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ee(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!J(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Os,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ee(e,e.attempt(Ne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Us(e,t,n){const r=this;return ee(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function Bs(e){e.exit(this.containerState.type)}function Qs(e,t,n){const r=this;return ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(a){const o=r.events[r.events.length-1];return!J(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ar={name:"setextUnderline",resolveTo:Fs,tokenize:Ys};function Fs(e,t){const n=new Bt;let r=e.length,i,a,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!o&&e[r][1].type==="definition"&&(o=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(n.add(a,0,[["enter",l,t]]),n.add(o+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=l,n.add(e.length,0,[["exit",l,t]]),n.consume(e),e}function Ys(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,u;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){u=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),J(c)?ee(e,s,"lineSuffix")(c):s(c))}function s(c){return c===null||H(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Hs={tokenize:Gs};function Gs(e){const t=this,n=e.attempt(wt,r,e.attempt(this.parser.constructs.flowInitial,i,ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xl,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Vs={resolveAll:qi()},qs=Vi("string"),Zs=Vi("text");function Vi(e){return{resolveAll:qi(e==="text"?_s:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),s}function s(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),s)}function c(h){if(h===null)return!0;const u=i[h];let p=-1;if(u)for(;++p<u.length;){const d=u[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function qi(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function _s(e,t){const n=new Bt;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],a=t.sliceStream(i);let o=a.length,l=-1,s=0,c;for(;o--;){const h=a[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(h===-2)c=!0,s++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){const h={type:r===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:i.start._bufferIndex+l,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):n.add(r,0,[["enter",h,t],["exit",h,t]])}r++}return n.consume(e),e}const Ws={42:Ne,43:Ne,45:Ne,48:Ne,49:Ne,50:Ne,51:Ne,52:Ne,53:Ne,54:Ne,55:Ne,56:Ne,57:Ne,62:Ui},Js={91:ns},Xs={[-2]:$t,[-1]:$t,32:$t},Ks={35:ss,42:Ot,45:[Ar,Ot],60:ds,61:Ar,95:Ot,96:Ir,126:Ir},$s={38:Qi,92:Bi},ec={[-5]:en,[-4]:en,[-3]:en,33:Ss,38:Qi,42:In,60:[vl,bs],91:js,92:[os,Bi],93:Vn,95:In,96:Vl},tc={null:[In,Vs]},nc={null:[42,95]},rc={null:[]},ic=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nc,contentInitial:Js,disable:rc,document:Ws,flow:Ks,flowInitial:Xs,insideSpan:tc,string:$s,text:ec},Symbol.toStringTag,{value:"Module"}));function ac(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const s={attempt:B(E),check:B(A),consume:N,enter:w,exit:j,interrupt:B(A,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:u};let h=t.tokenize.call(c,s);return t.resolveAll&&a.push(t),c;function u(L){return o=je(o,L),M(),o[o.length-1]!==null?[]:(G(t,0),c.events=qt(a,c.events,c),c.events)}function p(L,U){return lc(d(L),U)}function d(L){return oc(o,L)}function g(){const{_bufferIndex:L,_index:U,line:q,column:S,offset:F}=r;return{_bufferIndex:L,_index:U,line:q,column:S,offset:F}}function b(L){i[L.line]=L.column,k()}function M(){for(;r._index<o.length;){const L=o[r._index];if(typeof L=="string"){const U=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<L.length;)x(L.charCodeAt(r._bufferIndex))}else x(L)}}function x(L){h=h(L)}function N(L){H(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,k()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=L}function w(L,U){const q=U||{};return q.type=L,q.start=g(),c.events.push(["enter",q,c]),l.push(q),q}function j(L){const U=l.pop();return U.end=g(),c.events.push(["exit",U,c]),U}function E(L,U){G(L,U.from)}function A(L,U){U.restore()}function B(L,U){return q;function q(S,F,K){let X,ne,ie,m;return Array.isArray(S)?z(S):"tokenize"in S?z([S]):D(S);function D(P){return $;function $(te){const me=te!==null&&P[te],pe=te!==null&&P.null,Me=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return z(Me)(te)}}function z(P){return X=P,ne=0,P.length===0?K:f(P[ne])}function f(P){return $;function $(te){return m=_(),ie=P,P.partial||(c.currentConstruct=P),P.name&&c.parser.constructs.disable.null.includes(P.name)?Y():P.tokenize.call(U?Object.assign(Object.create(c),U):c,s,V,Y)(te)}}function V(P){return L(ie,m),F}function Y(P){return m.restore(),++ne<X.length?f(X[ne]):K}}}function G(L,U){L.resolveAll&&!a.includes(L)&&a.push(L),L.resolve&&ve(c.events,U,c.events.length-U,L.resolve(c.events.slice(U),c)),L.resolveTo&&(c.events=L.resolveTo(c.events,c))}function _(){const L=g(),U=c.previous,q=c.currentConstruct,S=c.events.length,F=Array.from(l);return{from:S,restore:K};function K(){r=L,c.previous=U,c.currentConstruct=q,c.events.length=S,l=F,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function oc(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function lc(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
3
|
+
欢迎随时提问`,welcomeDescription:"渲染任务、素材和账户问题,都可以交给我。",placeholder:"输入消息,Enter 发送,Shift + Enter 换行",send:"发送",stop:"停止生成",newChat:"新对话",collapse:"收起",citations:e=>`参考资料(${e})`,expandCitations:"展开参考资料",collapseCitations:"收起参考资料",share:"分享",sharing:"正在生成分享链接…",shareCopied:"分享链接已复制",shareFailed:"分享失败,请稍后重试",attach:"添加附件",removeAttachment:"移除附件",emptyInput:"请输入消息或添加附件",dropFiles:"拖拽图片或 .txt 文件到这里",copied:"已复制",copyFailed:"复制失败,请重试或手动复制",copy:"复制",humanSupport:"转人工助手",like:"点赞",dislike:"点踩",feedbackTitle:"请选择不满意的原因",feedbackSubmit:"提交反馈",feedbackThanks:"感谢您的反馈",feedbackFailed:"反馈提交失败,请稍后重试",closeFeedback:"关闭反馈",feedbackOtherPlaceholder:"请填写其他原因",feedbackUnprofessional:"回答不专业",feedbackUnresolved:"没有解决问题",feedbackMisunderstood:"误解问题",feedbackSlow:"响应太慢",feedbackOther:"其他原因",attachment:"附件",fileLimitExceeded:e=>`最多添加 ${e} 个附件`,fileTooLarge:e=>`文件 ${e} 超过大小限制`,unsupportedFile:e=>`不支持文件 ${e}`,attachmentError:e=>fi("zh",e),processing:"正在处理…",syncing:"正在同步会话…",loading:"正在恢复会话…",retry:"重试",knowledgeBusy:"当前咨询较多,请稍后重试。",requestFailed:"请求失败",darkMode:"深色模式",lightMode:"浅色模式",previewImage:"放大预览",closeImagePreview:"关闭图片预览",closeCitation:"关闭引用文档",assistantName:"小瑞",citationCategoryPath:"分类路径",citationPublishedAt:"发布时间",citationUpdatedAt:"更新时间",citationContentVersion:"正文版本",attachmentUploaded:"附件上传成功",disclaimer:"推荐和回答由 AI 生成,仅供参考"},tt={PROCESSING:"processing",SEARCHING:"searching",READING:"reading",RESPONDING:"responding",FINALIZING:"finalizing"},ar={[tt.PROCESSING]:{zh:"正在处理…",en:"Processing…"},[tt.SEARCHING]:{zh:"正在查找相关说明…",en:"Searching for relevant information…"},[tt.READING]:{zh:"正在阅读相关说明…",en:"Reading relevant information…"},[tt.RESPONDING]:{zh:"正在回答…",en:"Answering…"},[tt.FINALIZING]:{zh:"正在整理回答…",en:"Finalizing the answer…"}};function Ya(e,t){var r,i;const n=t.trim().toLowerCase().replace(/[\s-]+/g,"_");return n===tt.RESPONDING?null:(i=(r=ar[n])==null?void 0:r[e])!=null?i:ar.processing[e]}const Ha={zh:Fa,en:Qa};function Ln(e){return Ha[e]}const gi=O.createContext(null);function Ga({labels:e,language:t,theme:n,toggleTheme:r,children:i}){return y.jsx(gi.Provider,{value:{labels:e,language:t,theme:n,toggleTheme:r},children:i})}function mi(){const e=O.useContext(gi);if(!e)throw new Error("useAIChatUI must be used within AIChatUIProvider");return e}function Fe(){const{labels:e,language:t}=mi();return{labels:e,language:t}}function at(){const{theme:e,toggleTheme:t}=mi();return{theme:e,toggleTheme:t}}function Va(e){if(typeof Element!="undefined"&&e instanceof Element){const n=e.closest(".rb-ai-chat-root");if(n)return n}const t=e==null?void 0:e.getRootNode();return t instanceof DocumentFragment?t:typeof document!="undefined"?document.body:null}function Cn({anchor:e,container:t,children:n}){const r=t!=null?t:Va(e);return r?pi.createPortal(n,r):null}function qa({open:e,children:t,anchor:n,container:r,className:i="rb-chat-tooltip",style:a}){const{theme:o}=at();return e?y.jsx(Cn,{anchor:n,container:r,children:y.jsx("span",{className:i,"data-theme":o,role:"tooltip",style:a,children:t})}):null}function bi({open:e,children:t,anchor:n,container:r,className:i="rb-chat-modal",onClose:a}){if(O.useEffect(()=>{if(!e||!a)return;const l=s=>{s.key==="Escape"&&(s.stopPropagation(),a())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a,e]),!e)return null;const o=l=>{l.target===l.currentTarget&&(a==null||a())};return y.jsx(Cn,{anchor:n,container:r,children:y.jsx("div",{className:i,role:"dialog","aria-modal":"true",onMouseDown:o,children:t})})}function xi({open:e,imageUrl:t,anchor:n,onClose:r}){const{labels:i}=Fe();return y.jsx(bi,{open:e&&!!t,anchor:n,onClose:r,className:"rb-chat-image-modal-backdrop",children:y.jsxs("div",{className:"rb-chat-image-modal",children:[y.jsx("button",{type:"button",className:"rb-chat-image-modal-close","aria-label":i.closeImagePreview,title:i.closeImagePreview,onClick:r,children:"×"}),y.jsx("img",{src:t!=null?t:"",alt:i.previewImage})]})})}const Te={USER:"user",ASSISTANT:"assistant"},se={COMPLETE:"complete",STREAMING:"streaming",ERROR:"error",CANCELLED:"cancelled",NO_EVIDENCE:"no_evidence",AWAITING_RECOVERY:"awaiting-recovery"},Qe={PENDING:"pending",UPLOADING:"uploading",UPLOADED:"uploaded",ERROR:"error"},it={ATTACHMENT_INVALID:"ATTACHMENT_INVALID",ATTACHMENT_NOT_FOUND:"ATTACHMENT_NOT_FOUND",ATTACHMENT_UPLOAD_FAILED:"ATTACHMENT_UPLOAD_FAILED",ATTACHMENT_TOO_LARGE:"ATTACHMENT_TOO_LARGE",ATTACHMENT_UNSUPPORTED:"ATTACHMENT_UNSUPPORTED",CONVERSATION_NOT_FOUND:"CONVERSATION_NOT_FOUND",INVALID_STREAM_CONTENT_TYPE:"INVALID_STREAM_CONTENT_TYPE",KNOWLEDGE_BUSY:"KNOWLEDGE_BUSY",KNOWLEDGE_RUN_IN_PROGRESS:"KNOWLEDGE_RUN_IN_PROGRESS",NETWORK_ERROR:"NETWORK_ERROR",REQUEST_START_FAILED:"REQUEST_START_FAILED",STREAM_ENDED_BEFORE_TERMINAL:"STREAM_ENDED_BEFORE_TERMINAL"},Za="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJhdHRhY2giPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNMTEuNjI1IDUuNjI1TDYuNiAxMC42NUM2LjM0MjExIDEwLjg0MzQgNi4xMjg3OSAxMS4wOSA1Ljk3NDQ5IDExLjM3M0M1LjgyMDE5IDExLjY1NjEgNS43Mjg1MSAxMS45Njg5IDUuNzA1NjYgMTIuMjkwNUM1LjY4MjgxIDEyLjYxMjEgNS43MjkzMiAxMi45MzQ4IDUuODQyMDQgMTMuMjM2OEM1Ljk1NDc2IDEzLjUzODggNi4xMzEwNyAxMy44MTMgNi4zNTkwMSAxNC4wNDFDNi41ODY5NSAxNC4yNjg5IDYuODYxMjIgMTQuNDQ1MiA3LjE2MzIzIDE0LjU1OEM3LjQ2NTI0IDE0LjY3M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dW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2U9IndoaXRlIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMF80Ij4KPHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",Ja="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiB2aWV3Qm94PSIwIDAgMTUgMTUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJzZW5kIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTIuODEyNSA3LjVMMTIuMTg3NSAzLjQzNzVMOS41NjI1IDEyLjgxMjVMNy41IDguMjVMMi44MTI1IDcuNVoiIHN0cm9rZT0iIzhFOTg5RiIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L2c+Cjwvc3ZnPgo=";function Xa({attachment:e,label:t,imageUrl:n,onImageClick:r}){var l,s,c;const{labels:i}=Fe();if(e.file.type.startsWith("image/")||((l=e.attachment)==null?void 0:l.kind)==="image")return y.jsx("button",{type:"button",className:"rb-chat-image-preview-button","aria-label":`${i.previewImage} ${t}`,onClick:r,children:y.jsx("img",{src:n!=null?n:"",alt:t})});const o=((c=(s=t.split(".").pop())==null?void 0:s.toLowerCase())!=null?c:"").toUpperCase()||"FILE";return y.jsxs("span",{className:"rb-chat-file-preview","aria-hidden":"true",children:[y.jsx("span",{className:"rb-chat-file-extension",children:o}),y.jsx("span",{className:"rb-chat-file-name",children:t})]})}function Ka({attachment:e,onRemove:t}){var M,x,b,A,I,j;const{labels:n}=Fe(),r=O.useRef(null),[i,a]=O.useState(null),o=(x=(M=e.attachment)==null?void 0:M.filename)!=null?x:e.file.name,l=e.file.type.startsWith("image/")||((b=e.attachment)==null?void 0:b.kind)==="image",[s,c]=O.useState(null);O.useEffect(()=>{var N;if(!l||(N=e.attachment)!=null&&N.content_url){c(null);return}const D=URL.createObjectURL(e.file);return c(D),()=>URL.revokeObjectURL(D)},[(A=e.attachment)==null?void 0:A.content_url,e.file,l]);const h=(j=(I=e.attachment)==null?void 0:I.content_url)!=null?j:s,[u,p]=O.useState(!1),d=e.error?n.attachmentError(e.error.error_code):null,g=()=>{if(!d||!r.current)return;const D=r.current.getBoundingClientRect();a({left:D.left+D.width/2,top:D.top-8})};return y.jsxs("span",{ref:r,className:`rb-chat-attachment${e.error?" has-error":""}`,"aria-label":o,title:l?void 0:o,onMouseEnter:g,onMouseMove:g,onMouseLeave:()=>a(null),onFocus:g,onBlur:()=>a(null),children:[y.jsx(Xa,{attachment:e,label:o,imageUrl:h,onImageClick:()=>p(!0)}),e.status===Qe.UPLOADING?y.jsx("span",{className:"rb-chat-attachment-status","aria-hidden":"true",children:y.jsxs("span",{className:"rb-chat-loading-dots",children:[y.jsx("span",{}),y.jsx("span",{}),y.jsx("span",{})]})}):null,e.status===Qe.ERROR?y.jsx("span",{className:"rb-chat-attachment-status is-error",children:"!"}):null,d&&i?y.jsx(qa,{open:!0,anchor:r.current,className:"rb-chat-attachment-error-tooltip",style:{left:i.left,top:i.top},children:d}):null,y.jsx("button",{type:"button",className:"rb-chat-attachment-remove","aria-label":n.removeAttachment,onClick:t,children:y.jsx("img",{src:Wa,alt:""})}),y.jsx(xi,{open:u,imageUrl:h,anchor:r.current,onClose:()=>p(!1)})]})}function $a({attachments:e,draft:t,busy:n,accept:r,attachmentsAvailable:i,onDraftChange:a,onPaste:o,onFiles:l,onRemoveAttachment:s,onSubmit:c,onCancel:h}){const{labels:u}=Fe(),{theme:p}=at(),d=O.useRef(null),g=O.useRef(null),M=O.useRef(null);return O.useLayoutEffect(()=>{const x=g.current,b=M.current;if(!x||!b)return;const A=()=>{const D=Number.parseFloat(window.getComputedStyle(x).lineHeight);x.style.height="auto";const N=D*5;x.style.height=`${Math.min(x.scrollHeight,N)}px`,x.style.overflowY=x.scrollHeight>N?"auto":"hidden"};A();let I=b.clientWidth;const j=new ResizeObserver(()=>{b.clientWidth!==I&&(I=b.clientWidth,A())});return j.observe(b),()=>j.disconnect()},[t]),y.jsxs("form",{className:"rb-chat-composer",onSubmit:x=>{x.preventDefault(),n?h():c()},children:[e.length>0?y.jsx("div",{className:"rb-chat-attachments",children:e.map(x=>y.jsx(Ka,{attachment:x,onRemove:()=>s(x.id)},x.id))}):null,y.jsxs("div",{ref:M,className:"rb-chat-input-container",children:[y.jsx("textarea",{ref:g,className:"rb-chat-input",value:t,placeholder:u.placeholder,rows:1,onPaste:o,onChange:x=>a(x.target.value),onKeyDown:x=>{if(x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing&&x.nativeEvent.keyCode!==229){if(n)return;x.preventDefault(),c()}}}),y.jsxs("div",{className:"rb-chat-composer-footer",children:[y.jsx("button",{type:"button",className:"rb-chat-icon-button rb-chat-attach-button","aria-label":u.attach,disabled:!i,onClick:()=>{var x;return(x=d.current)==null?void 0:x.click()},children:y.jsx("img",{src:p==="dark"?_a:Za,alt:""})}),y.jsx("input",{ref:d,hidden:!0,type:"file",multiple:!0,disabled:!i,accept:r,onChange:x=>{var b;l(Array.from((b=x.target.files)!=null?b:[])),x.target.value=""}}),y.jsx("button",{className:"rb-chat-send","aria-label":n?u.stop:u.send,title:n?u.stop:u.send,type:"submit",children:n?y.jsx("span",{className:"rb-chat-stop-icon",children:"■"}):y.jsx("img",{src:Ja,alt:""})})]})]})]})}const On="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8A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iA5Ljc5MTI0IDkuOCAxMC41IDkuOEMxMS4yMDg4IDkuOCAxMS43ODMzIDEwLjM3NDYgMTEuNzgzMyAxMS4wODMzWiIgc3Ryb2tlLXdpZHRoPSIwLjkzMzMzMyIgc3Ryb2tlPSIjNjE3MDdBIi8+CjxwYXRoIGQ9Ik00Ljc4MzMzIDYuM0w5LjIxNjY2IDMuNjc1TTQuNzgzMzMgNy43TDkuMjE2NjYgMTAuMzI1IiBzdHJva2Utd2lkdGg9IjAuOTMzMzMzIiBzdHJva2U9IiM2MTcwN0EiLz4KPC9zdmc+Cg==";function ro({isWelcome:e,onNewChat:t,onShare:n,shareDisabled:r=!1,onCollapse:i}){const{labels:a}=Fe(),{theme:o,toggleTheme:l}=at();return y.jsxs("header",{className:`rb-chat-header${e?" is-welcome":""}`,children:[y.jsxs("div",{className:"rb-chat-brand",children:[y.jsx("img",{className:"rb-chat-brand-mark",src:On,alt:""}),y.jsxs("span",{className:"rb-chat-title",children:["Renderbus ",a.title]})]}),y.jsxs("div",{className:"rb-chat-actions",children:[y.jsxs("button",{type:"button",className:"rb-chat-share-button","aria-label":a.share,title:a.share,disabled:r,onClick:n,children:[y.jsx("img",{src:no,alt:""}),y.jsx("span",{children:a.share})]}),y.jsx("button",{className:"rb-chat-icon-button","aria-label":a.newChat,title:a.newChat,onClick:t,children:y.jsx("img",{src:eo,alt:""})}),y.jsx("button",{className:"rb-chat-icon-button","aria-label":o==="light"?a.darkMode:a.lightMode,title:o==="light"?a.darkMode:a.lightMode,onClick:l,children:y.jsx("img",{src:to,alt:""})}),y.jsx("button",{type:"button",className:"rb-chat-icon-button","aria-label":a.collapse,title:a.collapse,onClick:i,children:y.jsx("img",{src:yi,alt:""})})]})]})}function io(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ao=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lo={};function or(e,t){return((t||lo).jsx?oo:ao).test(e)}const so=/[ \t\n\f\r]/g;function co(e){return typeof e=="object"?e.type==="text"?lr(e.value):!1:lr(e)}function lr(e){return e.replace(so,"")===""}class kt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}kt.prototype.normal={};kt.prototype.property={};kt.prototype.space=void 0;function Mi(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new kt(n,r,t)}function bn(e){return e.toLowerCase()}class Ae{constructor(t,n){this.attribute=n,this.property=t}}Ae.prototype.attribute="";Ae.prototype.booleanish=!1;Ae.prototype.boolean=!1;Ae.prototype.commaOrSpaceSeparated=!1;Ae.prototype.commaSeparated=!1;Ae.prototype.defined=!1;Ae.prototype.mustUseProperty=!1;Ae.prototype.number=!1;Ae.prototype.overloadedBoolean=!1;Ae.prototype.property="";Ae.prototype.spaceSeparated=!1;Ae.prototype.space=void 0;let uo=0;const Z=$e(),de=$e(),xn=$e(),T=$e(),ae=$e(),Je=$e(),Se=$e();function $e(){return 2**++uo}const yn=Object.freeze(Object.defineProperty({__proto__:null,boolean:Z,booleanish:de,commaOrSpaceSeparated:Se,commaSeparated:Je,number:T,overloadedBoolean:xn,spaceSeparated:ae},Symbol.toStringTag,{value:"Module"})),Xt=Object.keys(yn);class Rn extends Ae{constructor(t,n,r,i){let a=-1;if(super(t,n),sr(this,"space",i),typeof r=="number")for(;++a<Xt.length;){const o=Xt[a];sr(this,Xt[a],(r&yn[o])===yn[o])}}}Rn.prototype.defined=!0;function sr(e,t,n){n&&(e[t]=n)}function ot(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bn(r)]=r,n[bn(a.attribute)]=r}return new kt(t,n,e.space)}const ki=ot({properties:{ariaActiveDescendant:null,ariaAtomic:de,ariaAutoComplete:null,ariaBusy:de,ariaChecked:de,ariaColCount:T,ariaColIndex:T,ariaColSpan:T,ariaControls:ae,ariaCurrent:null,ariaDescribedBy:ae,ariaDetails:null,ariaDisabled:de,ariaDropEffect:ae,ariaErrorMessage:null,ariaExpanded:de,ariaFlowTo:ae,ariaGrabbed:de,ariaHasPopup:null,ariaHidden:de,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ae,ariaLevel:T,ariaLive:null,ariaModal:de,ariaMultiLine:de,ariaMultiSelectable:de,ariaOrientation:null,ariaOwns:ae,ariaPlaceholder:null,ariaPosInSet:T,ariaPressed:de,ariaReadOnly:de,ariaRelevant:null,ariaRequired:de,ariaRoleDescription:ae,ariaRowCount:T,ariaRowIndex:T,ariaRowSpan:T,ariaSelected:de,ariaSetSize:T,ariaSort:null,ariaValueMax:T,ariaValueMin:T,ariaValueNow:T,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wi(e,t){return t in e?e[t]:t}function Ii(e,t){return wi(e,t.toLowerCase())}const ho=ot({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Je,acceptCharset:ae,accessKey:ae,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:ae,autoFocus:Z,autoPlay:Z,blocking:ae,capture:null,charSet:null,checked:Z,cite:null,className:ae,closedBy:null,colorSpace:null,cols:T,colSpan:T,command:null,commandFor:null,content:null,contentEditable:de,controls:Z,controlsList:ae,coords:T|Je,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:xn,draggable:de,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:ae,height:T,hidden:xn,high:T,href:null,hrefLang:null,htmlFor:ae,httpEquiv:ae,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:ae,itemRef:ae,itemScope:Z,itemType:ae,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:T,manifest:null,max:null,maxLength:T,media:null,method:null,min:null,minLength:T,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:T,pattern:null,ping:ae,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:ae,required:Z,reversed:Z,rows:T,rowSpan:T,sandbox:ae,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:T,sizes:null,slot:null,span:T,spellCheck:de,src:null,srcDoc:null,srcLang:null,srcSet:null,start:T,step:null,style:null,tabIndex:T,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:de,width:T,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ae,axis:null,background:null,bgColor:null,border:T,borderColor:null,bottomMargin:T,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:T,leftMargin:T,link:null,longDesc:null,lowSrc:null,marginHeight:T,marginWidth:T,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:T,rules:null,scheme:null,scrolling:de,standby:null,summary:null,text:null,topMargin:T,valueType:null,version:null,vAlign:null,vLink:null,vSpace:T,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:Je,part:ae,prefix:null,property:null,results:T,security:null,unselectable:null},space:"html",transform:Ii}),po=ot({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Se,accentHeight:T,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:T,amplitude:T,arabicForm:null,ascent:T,attributeName:null,attributeType:null,azimuth:T,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:T,by:null,calcMode:null,capHeight:T,className:ae,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:T,diffuseConstant:T,direction:null,display:null,dur:null,divisor:T,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:T,enableBackground:null,end:null,event:null,exponent:T,externalResourcesRequired:null,fill:null,fillOpacity:T,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Je,g2:Je,glyphName:Je,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:T,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:T,horizOriginX:T,horizOriginY:T,id:null,ideographic:T,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:T,k:T,k1:T,k2:T,k3:T,k4:T,kernelMatrix:Se,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:T,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:T,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:T,overlineThickness:T,paintOrder:null,panose1:null,path:null,pathLength:T,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ae,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:T,pointsAtY:T,pointsAtZ:T,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Se,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Se,rev:Se,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Se,requiredFeatures:Se,requiredFonts:Se,requiredFormats:Se,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:T,specularExponent:T,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:T,strikethroughThickness:T,string:null,stroke:null,strokeDashArray:Se,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:T,strokeOpacity:T,strokeWidth:null,style:null,surfaceScale:T,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Se,tabIndex:T,tableValues:null,target:null,targetX:T,targetY:T,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Se,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:T,underlineThickness:T,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:T,values:null,vAlphabetic:T,vMathematical:T,vectorEffect:null,vHanging:T,vIdeographic:T,version:null,vertAdvY:T,vertOriginX:T,vertOriginY:T,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:T,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wi}),Ni=ot({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ai=ot({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ii}),Di=ot({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fo={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},go=/[A-Z]/g,cr=/-[a-z]/g,mo=/^data[-\w.:]+$/i;function bo(e,t){const n=bn(t);let r=t,i=Ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&mo.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(cr,yo);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!cr.test(a)){let o=a.replace(go,xo);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Rn}return new i(r,t)}function xo(e){return"-"+e.toLowerCase()}function yo(e){return e.charAt(1).toUpperCase()}const Mo=Mi([ki,ho,Ni,Ai,Di],"html"),Pn=Mi([ki,po,Ni,Ai,Di],"svg");function ko(e){return e.join(" ").trim()}var Pt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Un={},ur=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wo=/\n/g,Io=/^\s*/,No=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ao=/^:\s*/,Do=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Eo=/^[;\s]*/,So=/^\s+|\s+$/g,To=`
|
|
4
|
+
`,hr="/",dr="*",We="",jo="comment",zo="declaration";function vo(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var M=g.match(wo);M&&(n+=M.length);var x=g.lastIndexOf(To);r=~x?g.length-x:r+g.length}function a(){var g={line:n,column:r};return function(M){return M.position=new o(g),c(),M}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function l(g){var M=new Error(t.source+":"+n+":"+r+": "+g);if(M.reason=g,M.filename=t.source,M.line=n,M.column=r,M.source=e,!t.silent)throw M}function s(g){var M=g.exec(e);if(M){var x=M[0];return i(x),e=e.slice(x.length),M}}function c(){s(Io)}function h(g){var M;for(g=g||[];M=u();)M!==!1&&g.push(M);return g}function u(){var g=a();if(!(hr!=e.charAt(0)||dr!=e.charAt(1))){for(var M=2;We!=e.charAt(M)&&(dr!=e.charAt(M)||hr!=e.charAt(M+1));)++M;if(M+=2,We===e.charAt(M-1))return l("End of comment missing");var x=e.slice(2,M-2);return r+=2,i(x),e=e.slice(M),r+=2,g({type:jo,comment:x})}}function p(){var g=a(),M=s(No);if(M){if(u(),!s(Ao))return l("property missing ':'");var x=s(Do),b=g({type:zo,property:pr(M[0].replace(ur,We)),value:x?pr(x[0].replace(ur,We)):We});return s(Eo),b}}function d(){var g=[];h(g);for(var M;M=p();)M!==!1&&(g.push(M),h(g));return g}return c(),d()}function pr(e){return e?e.replace(So,We):We}var Lo=vo,Co=Pt&&Pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Un,"__esModule",{value:!0});Un.default=Ro;const Oo=Co(Lo);function Ro(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Oo.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:l}=a;i?t(o,l,a):l&&(n=n||{},n[o]=l)}),n}var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.camelCase=void 0;var Po=/^--[a-zA-Z0-9_-]+$/,Uo=/-([a-z])/g,Bo=/^[^-]+$/,Qo=/^-(webkit|moz|ms|o|khtml)-/,Fo=/^-(ms)-/,Yo=function(e){return!e||Bo.test(e)||Po.test(e)},Ho=function(e,t){return t.toUpperCase()},fr=function(e,t){return"".concat(t,"-")},Go=function(e,t){return t===void 0&&(t={}),Yo(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Fo,fr):e=e.replace(Qo,fr),e.replace(Uo,Ho))};Gt.camelCase=Go;var Vo=Pt&&Pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qo=Vo(Un),Zo=Gt;function Mn(e,t){var n={};return!e||typeof e!="string"||(0,qo.default)(e,function(r,i){r&&i&&(n[(0,Zo.camelCase)(r,t)]=i)}),n}Mn.default=Mn;var _o=Mn;const Wo=Ei(_o),Si=Ti("end"),Bn=Ti("start");function Ti(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Jo(e){const t=Bn(e),n=Si(e);if(t&&n)return{start:t,end:n}}function mt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gr(e.position):"start"in e||"end"in e?gr(e):"line"in e||"column"in e?kn(e):""}function kn(e){return mr(e&&e.line)+":"+mr(e&&e.column)}function gr(e){return kn(e&&e.start)+"-"+kn(e&&e.end)}function mr(e){return e&&typeof e=="number"?e:1}class ye extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?a.ruleId=r:(a.source=r.slice(0,s),a.ruleId=r.slice(s+1))}if(!a.place&&a.ancestors&&a.ancestors){const s=a.ancestors[a.ancestors.length-1];s&&(a.place=s.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=mt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ye.prototype.file="";ye.prototype.name="";ye.prototype.reason="";ye.prototype.message="";ye.prototype.stack="";ye.prototype.column=void 0;ye.prototype.line=void 0;ye.prototype.ancestors=void 0;ye.prototype.cause=void 0;ye.prototype.fatal=void 0;ye.prototype.place=void 0;ye.prototype.ruleId=void 0;ye.prototype.source=void 0;const Qn={}.hasOwnProperty,Xo=new Map,Ko=/[A-Z]/g,$o=new Set(["table","tbody","thead","tfoot","tr"]),el=new Set(["td","th"]),ji="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=cl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=sl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Pn:Mo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=zi(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function zi(e,t,n){if(t.type==="element")return nl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return al(e,t,n);if(t.type==="mdxjsEsm")return il(e,t);if(t.type==="root")return ol(e,t,n);if(t.type==="text")return ll(e,t)}function nl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Pn,e.schema=i),e.ancestors.push(t);const a=Li(e,t.tagName,!1),o=ul(e,t);let l=Yn(e,t);return $o.has(t.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!co(s):!0})),vi(e,o,a,t),Fn(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function rl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Mt(e,t.position)}function il(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mt(e,t.position)}function al(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Pn,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Li(e,t.name,!0),o=hl(e,t),l=Yn(e,t);return vi(e,o,a,t),Fn(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ol(e,t,n){const r={};return Fn(r,Yn(e,t)),e.create(t,e.Fragment,r,n)}function ll(e,t){return t.value}function vi(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sl(e,t,n){return r;function r(i,a,o,l){const c=Array.isArray(o.children)?n:t;return l?c(a,o,l):c(a,o)}}function cl(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),s=Bn(r);return t(i,a,o,l,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ul(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Qn.call(t.properties,i)){const a=dl(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&el.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function hl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Mt(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Mt(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Yn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Xo;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const s=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(s){const c=i.get(s)||0;o=s+"-"+c,i.set(s,c+1)}}const l=zi(e,a,o);l!==void 0&&n.push(l)}return n}function dl(e,t,n){const r=bo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?io(n):ko(n)),r.property==="style"){let i=typeof n=="object"?n:pl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?fo[r.property]||r.property:r.attribute,n]}}function pl(e,t){try{return Wo(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ye("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ji+"#cannot-parse-style-attribute",i}}function Li(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=or(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=or(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Qn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mt(e)}function Mt(e,t){const n=new ye("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ji+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fl(e){const t={};let n;for(n in e)Qn.call(e,n)&&(t[gl(n)]=e[n]);return t}function gl(e){let t=e.replace(Ko,ml);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ml(e){return"-"+e.toLowerCase()}const Kt={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},bl={};function Hn(e,t){const n=t||bl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ci(e,r,i)}function Ci(e,t,n){if(xl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return br(e.children,t,n)}return Array.isArray(e)?br(e,t,n):""}function br(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ci(e[i],t,n);return r.join("")}function xl(e){return!!(e&&typeof e=="object")}const xr={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
5
|
+
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},yl={}.hasOwnProperty;function Gn(e){return yl.call(xr,e)?xr[e]:!1}function ve(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function je(e,t){return e.length>0?(ve(e,e.length,0,t),e):t}const yr={}.hasOwnProperty;function Oi(e){const t={};let n=-1;for(;++n<e.length;)Ml(t,e[n]);return t}function Ml(e,t){let n;for(n in t){const i=(yr.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){yr.call(i,o)||(i[o]=[]);const l=a[o];kl(i[o],Array.isArray(l)?l:l?[l]:[])}}}function kl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ve(e,0,0,r)}function Ri(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Le(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const we=Ve(/[A-Za-z]/),xe=Ve(/[\dA-Za-z]/),wl=Ve(/[#-'*+\--9=?A-Z^-~]/);function Ut(e){return e!==null&&(e<32||e===127)}const wn=Ve(/\d/),Il=Ve(/[\dA-Fa-f]/),Nl=Ve(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const Vt=Ve(/\p{P}|\p{S}/u),Xe=Ve(/\s/);function Ve(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function lt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&xe(e.charCodeAt(n+1))&&xe(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function te(e,t,n,r){const i=r?r-1:1/0;let a=0;return o;function o(s){return J(s)?(e.enter(n),l(s)):t(s)}function l(s){return J(s)&&a++<i?(e.consume(s),l):(e.exit(n),t(s))}}function Pi(e,t,n,r,i,a){let o=0;return l;function l(h){return a>0&&J(h)?(e.enter(r),s(h)):c(h)}function s(h){return J(h)&&o<a?(e.consume(h),o++,s):(e.exit(r),c(h))}function c(h){return o>=i?t(h):n(h)}}const Al={tokenize:Dl};function Dl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),te(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return q(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}let Bt=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Mr(this,t,n,r,!1)}addBefore(t,n,r){Mr(this,t,n,r,!0)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0,this.index.clear()}};function Mr(e,t,n,r,i){if(n===0&&r.length===0)return;const a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}const El={tokenize:Sl},kr={tokenize:Tl};function Sl(e){const t=this,n=[];let r=0,i,a,o;return l;function l(I){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,s,c)(I)}return c(I)}function s(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const j=t.events.length;let D=j,N;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){N=t.events[D][1].end;break}b(r);let B=j;for(;B<t.events.length;)t.events[B][1].end={...N},B++;const F=new Bt;return F.add(D+1,0,t.events.slice(j)),F.add(j,B-j,[]),F.consume(t.events),c(I)}return l(I)}function c(I){if(r===n.length){if(!i)return p(I);if(i.currentConstruct&&i.currentConstruct.concrete)return g(I);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kr,h,u)(I)}function h(I){return i&&A(),b(r),p(I)}function u(I){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(I)}function p(I){return t.containerState={},e.attempt(kr,d,g)(I)}function d(I){return r++,n.push([t.currentConstruct,t.containerState]),p(I)}function g(I){if(I===null){i&&A(),b(0),e.consume(I);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),M(I)}function M(I){if(I===null){x(e.exit("chunkFlow"),!0),b(0),e.consume(I);return}return q(I)?(e.consume(I),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),M)}function x(I,j){const D=t.sliceStream(I);if(j&&D.push(null),I.previous=a,a&&(a.next=I),a=I,i.defineSkip(I.start),i.write(D),t.parser.lazy[I.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<o&&(!i.events[N][1].end||i.events[N][1].end.offset>o))return;const B=t.events.length;let F=B,W,k;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(W){k=t.events[F][1].end;break}W=!0}for(b(r),N=B;N<t.events.length;)t.events[N][1].end={...k},N++;const v=new Bt;v.add(F+1,0,t.events.slice(B)),v.add(B,N-B,[]),v.consume(t.events)}}function b(I){let j=n.length;for(;j-- >I;){const D=n[j];t.containerState=D[1],D[0].exit.call(t,e)}n.length=I}function A(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Tl(e,t,n){return te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qt(e){if(e===null||oe(e)||Xe(e))return 1;if(Vt(e))return 2}function qt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const In={name:"attention",resolveAll:jl,tokenize:zl};function jl(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},l={...e[n][1].start};wr(o,-a),wr(l,a);const s={type:a>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},c={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:l},h={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},u={type:a>1?"strong":"emphasis",start:{...s.start},end:{...c.end}};e[i][1].end={...s.start},e[n][1].start={...c.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=je(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=je(r,[["enter",u,t],["enter",s,t],["exit",s,t],["enter",h,t]]),r=je(r,qt(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=je(r,[["exit",h,t],["enter",c,t],["exit",c,t],["exit",u,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=je(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),ve(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function zl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Qt(r);let a;return o;function o(s){return a=s,e.enter("attentionSequence"),l(s)}function l(s){if(s===a)return e.consume(s),l;const c=e.exit("attentionSequence"),h=Qt(s),u=!h||h===2&&i||n.includes(s)&&s!==42&&s!==95,p=!i||i===2&&h||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!p)),c._close=!!(a===42?p:p&&(h||!u)),t(s)}}function wr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vl={name:"autolink",tokenize:Ll};function Ll(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return we(d)?(e.consume(d),o):d===64?n(d):c(d)}function o(d){return d===43||d===45||d===46||xe(d)?(r=1,l(d)):c(d)}function l(d){return d===58?(e.consume(d),r=0,s):(d===43||d===45||d===46||xe(d))&&r++<32?(e.consume(d),l):(r=0,c(d))}function s(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Ut(d)?n(d):(e.consume(d),s)}function c(d){return d===64?(e.consume(d),h):wl(d)?(e.consume(d),c):n(d)}function h(d){return xe(d)?u(d):n(d)}function u(d){return d===46?(e.consume(d),r=0,h):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||xe(d))&&r++<63){const g=d===45?p:u;return e.consume(d),g}return n(d)}}const wt={partial:!0,tokenize:Cl};function Cl(e,t,n){return r;function r(a){return J(a)?te(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||q(a)?t(a):n(a)}}const Ui={continuation:{tokenize:Rl},exit:Pl,name:"blockQuote",tokenize:Ol};function Ol(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return J(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Rl(e,t,n){const r=this;return i;function i(o){return J(o)?te(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Ui,t,n)(o)}}function Pl(e){e.exit("blockQuote")}const Bi={name:"characterEscape",tokenize:Ul};function Ul(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Nl(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Qi={name:"characterReference",tokenize:Bl};function Bl(e,t,n){const r=this;let i=0,a,o;return l;function l(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),s}function s(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=xe,h(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Il,h):(e.enter("characterReferenceValue"),a=7,o=wn,h(u))}function h(u){if(u===59&&i){const p=e.exit("characterReferenceValue");return o===xe&&!Gn(r.sliceSerialize(p))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(u)&&i++<a?(e.consume(u),h):n(u)}}const Nn={partial:!0,tokenize:Ql};function Ql(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ir={concrete:!0,name:"codeFenced",tokenize:Fl};function Fl(e,t,n){const r=this,i={partial:!0,tokenize:D};let a=0,o=0,l;return s;function s(N){return c(N)}function c(N){const B=r.events[r.events.length-1];return a=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,l=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(N)}function h(N){return N===l?(o++,e.consume(N),h):o<3?n(N):(e.exit("codeFencedFenceSequence"),J(N)?te(e,u,"whitespace")(N):u(N))}function u(N){return N===null||q(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Nn,M,j)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(N)):J(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),te(e,d,"whitespace")(N)):N===96&&N===l?n(N):(e.consume(N),p)}function d(N){return N===null||q(N)?u(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(N)):N===96&&N===l?n(N):(e.consume(N),g)}function M(N){return e.attempt(i,j,x)(N)}function x(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),b}function b(N){return a>0&&J(N)?te(e,A,"linePrefix",a+1)(N):A(N)}function A(N){return N===null||q(N)?e.check(Nn,M,j)(N):(e.enter("codeFlowValue"),I(N))}function I(N){return N===null||q(N)?(e.exit("codeFlowValue"),A(N)):(e.consume(N),I)}function j(N){return e.exit("codeFenced"),t(N)}function D(N,B,F){let W=0;return k;function k(V){return N.enter("lineEnding"),N.consume(V),N.exit("lineEnding"),v}function v(V){return N.enter("codeFencedFence"),J(V)?te(N,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):U(V)}function U(V){return V===l?(N.enter("codeFencedFenceSequence"),Y(V)):F(V)}function Y(V){return V===l?(W++,N.consume(V),Y):W>=o?(N.exit("codeFencedFenceSequence"),J(V)?te(N,S,"whitespace")(V):S(V)):F(V)}function S(V){return V===null||q(V)?(N.exit("codeFencedFence"),B(V)):F(V)}}}const $t={name:"codeIndented",tokenize:Hl},Yl={partial:!0,tokenize:Gl};function Hl(e,t,n){return r;function r(l){return e.enter("codeIndented"),Pi(e,i,n,"linePrefix",4,4)(l)}function i(l){return l===null?o(l):q(l)?e.attempt(Yl,i,o)(l):(e.enter("codeFlowValue"),a(l))}function a(l){return l===null||q(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),a)}function o(l){return e.exit("codeIndented"),t(l)}}function Gl(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):q(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Pi(e,t,a,"linePrefix",4,4)(o)}function a(o){return q(o)?i(o):n(o)}}const Vl={name:"codeText",previous:Zl,resolve:ql,tokenize:_l};function ql(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Zl(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _l(e,t,n){let r=0,i,a;return o;function o(u){return e.enter("codeText"),e.enter("codeTextSequence"),l(u)}function l(u){return u===96?(e.consume(u),r++,l):(e.exit("codeTextSequence"),s(u))}function s(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),s):u===96?(a=e.enter("codeTextSequence"),i=0,h(u)):q(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||q(u)?(e.exit("codeTextData"),s(u)):(e.consume(u),c)}function h(u){return u===96?(e.consume(u),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(a.type="codeTextData",c(u))}}class Wl{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&pt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),pt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);pt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pt(this.left,n.reverse())}}}function pt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Fi(e){const t={};let n=-1,r,i,a,o,l,s,c;const h=new Wl(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,a=0,a<s.length&&s[a][1].type==="lineEndingBlank"&&(a+=2),a<s.length&&s[a][1].type==="content"))for(;++a<s.length&&s[a][1].type!=="content";)s[a][1].type==="chunkText"&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Jl(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=h.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return ve(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function Jl(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,s=[],c={};let h,u,p=-1,d=n,g=0,M=0;const x=[M];for(;d;){for(;e.get(++i)[1]!==d;);a.push(i),d._tokenizer||(h=r.sliceStream(d),d.next||h.push(null),u&&o.defineSkip(d.start),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(h),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(M=p+1,x.push(M),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(o.events=[],d?(d._tokenizer=void 0,d.previous=void 0):x.pop(),p=x.length;p--;){const b=l.slice(x[p],x[p+1]),A=a.pop();s.push([A,A+b.length-1]),e.splice(A,2,b)}for(s.reverse(),p=-1;++p<s.length;)c[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return c}const Xl={resolve:$l,tokenize:es},Kl={partial:!0,tokenize:ts};function $l(e){return Fi(e),e}function es(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):q(l)?e.check(Kl,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ts(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),te(e,a,"linePrefix")}function a(o){if(o===null||q(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Yi(e,t,n,r,i,a,o,l,s){const c=s||Number.POSITIVE_INFINITY;let h=0;return u;function u(b){return b===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(b),e.exit(a),p):b===null||b===32||b===41||Ut(b)?n(b):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),M(b))}function p(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(e.exit("chunkString"),e.exit(l),p(b)):b===null||b===60||q(b)?n(b):(e.consume(b),b===92?g:d)}function g(b){return b===60||b===62||b===92?(e.consume(b),d):d(b)}function M(b){return!h&&(b===null||b===41||oe(b))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(b)):h<c&&b===40?(e.consume(b),h++,M):b===41?(e.consume(b),h--,M):b===null||b===32||b===40||Ut(b)?n(b):(e.consume(b),b===92?x:M)}function x(b){return b===40||b===41||b===92?(e.consume(b),M):M(b)}}function Hi(e,t,n,r,i,a){const o=this;let l=0,s;return c;function c(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(a),h}function h(d){return l>999||d===null||d===91||d===93&&!s||d===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):d===93?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):q(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||q(d)||l++>999?(e.exit("chunkString"),h(d)):(e.consume(d),s||(s=!J(d)),d===92?p:u)}function p(d){return d===91||d===92||d===93?(e.consume(d),l++,u):u(d)}}function Gi(e,t,n,r,i,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,s):n(p)}function s(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),s(o)):p===null?n(p):q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),te(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||q(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?u:h)}function u(p){return p===o||p===92?(e.consume(p),h):h(p)}}function bt(e,t){let n;return r;function r(i){return q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?te(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ns={name:"definition",tokenize:is},rs={partial:!0,tokenize:as};function is(e,t,n){const r=this;let i;return a;function a(d){return e.enter("definition"),o(d)}function o(d){return Hi.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),s):n(d)}function s(d){return oe(d)?bt(e,c)(d):c(d)}function c(d){return Yi(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function h(d){return e.attempt(rs,u,u)(d)}function u(d){return J(d)?te(e,p,"whitespace")(d):p(d)}function p(d){return d===null||q(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function as(e,t,n){return r;function r(l){return oe(l)?bt(e,i)(l):n(l)}function i(l){return Gi(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return J(l)?te(e,o,"whitespace")(l):o(l)}function o(l){return l===null||q(l)?t(l):n(l)}}const os={name:"hardBreakEscape",tokenize:ls};function ls(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return q(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const ss={name:"headingAtx",resolve:cs,tokenize:us};function cs(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};ve(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])}return e}function us(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&r++<6?(e.consume(h),o):h===null||oe(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),s(h)):h===null||q(h)?(e.exit("atxHeading"),t(h)):J(h)?te(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function s(h){return h===35?(e.consume(h),s):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||oe(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const hs=["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"],Nr=["pre","script","style","textarea"],ds={concrete:!0,name:"htmlFlow",resolveTo:fs,tokenize:gs},ps={partial:!0,tokenize:ms};function fs(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function gs(e,t,n){const r=this;let i,a,o,l,s;return c;function c(f){return h(f)}function h(f){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(f),u}function u(f){return f===33?(e.consume(f),p):f===47?(e.consume(f),a=!0,M):f===63?(e.consume(f),i=3,r.interrupt?t:m):we(f)?(e.consume(f),o=String.fromCharCode(f),x):n(f)}function p(f){return f===45?(e.consume(f),i=2,d):f===91?(e.consume(f),i=5,l=0,g):we(f)?(e.consume(f),i=4,r.interrupt?t:m):n(f)}function d(f){return f===45?(e.consume(f),r.interrupt?t:m):n(f)}function g(f){const H="CDATA[";return f===H.charCodeAt(l++)?(e.consume(f),l===H.length?r.interrupt?t:U:g):n(f)}function M(f){return we(f)?(e.consume(f),o=String.fromCharCode(f),x):n(f)}function x(f){if(f===null||f===47||f===62||oe(f)){const H=f===47,G=o.toLowerCase();return!H&&!a&&Nr.includes(G)?(i=1,r.interrupt?t(f):U(f)):hs.includes(o.toLowerCase())?(i=6,H?(e.consume(f),b):r.interrupt?t(f):U(f)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(f):a?A(f):I(f))}return f===45||xe(f)?(e.consume(f),o+=String.fromCharCode(f),x):n(f)}function b(f){return f===62?(e.consume(f),r.interrupt?t:U):n(f)}function A(f){return J(f)?(e.consume(f),A):k(f)}function I(f){return f===47?(e.consume(f),k):f===58||f===95||we(f)?(e.consume(f),j):J(f)?(e.consume(f),I):k(f)}function j(f){return f===45||f===46||f===58||f===95||xe(f)?(e.consume(f),j):D(f)}function D(f){return f===61?(e.consume(f),N):J(f)?(e.consume(f),D):I(f)}function N(f){return f===null||f===60||f===61||f===62||f===96?n(f):f===34||f===39?(e.consume(f),s=f,B):J(f)?(e.consume(f),N):F(f)}function B(f){return f===s?(e.consume(f),s=null,W):f===null||q(f)?n(f):(e.consume(f),B)}function F(f){return f===null||f===34||f===39||f===47||f===60||f===61||f===62||f===96||oe(f)?D(f):(e.consume(f),F)}function W(f){return f===47||f===62||J(f)?I(f):n(f)}function k(f){return f===62?(e.consume(f),v):n(f)}function v(f){return f===null||q(f)?U(f):J(f)?(e.consume(f),v):n(f)}function U(f){return f===45&&i===2?(e.consume(f),X):f===60&&i===1?(e.consume(f),K):f===62&&i===4?(e.consume(f),E):f===63&&i===3?(e.consume(f),m):f===93&&i===5?(e.consume(f),ne):q(f)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ps,z,Y)(f)):f===null||q(f)?(e.exit("htmlFlowData"),Y(f)):(e.consume(f),U)}function Y(f){return e.check(Nn,S,z)(f)}function S(f){return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),V}function V(f){return f===null||q(f)?Y(f):(e.enter("htmlFlowData"),U(f))}function X(f){return f===45?(e.consume(f),m):U(f)}function K(f){return f===47?(e.consume(f),o="",re):U(f)}function re(f){if(f===62){const H=o.toLowerCase();return Nr.includes(H)?(e.consume(f),E):U(f)}return we(f)&&o.length<8?(e.consume(f),o+=String.fromCharCode(f),re):U(f)}function ne(f){return f===93?(e.consume(f),m):U(f)}function m(f){return f===62?(e.consume(f),E):f===45&&i===2?(e.consume(f),m):U(f)}function E(f){return f===null||q(f)?(e.exit("htmlFlowData"),z(f)):(e.consume(f),E)}function z(f){return e.exit("htmlFlow"),t(f)}}function ms(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(wt,t,n)}}const bs={name:"htmlText",tokenize:xs};function xs(e,t,n){const r=this;let i,a,o;return l;function l(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),s}function s(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),D):m===63?(e.consume(m),I):we(m)?(e.consume(m),F):n(m)}function c(m){return m===45?(e.consume(m),h):m===91?(e.consume(m),a=0,g):we(m)?(e.consume(m),A):n(m)}function h(m){return m===45?(e.consume(m),d):n(m)}function u(m){return m===null?n(m):m===45?(e.consume(m),p):q(m)?(o=u,K(m)):(e.consume(m),u)}function p(m){return m===45?(e.consume(m),d):u(m)}function d(m){return m===62?X(m):m===45?p(m):u(m)}function g(m){const E="CDATA[";return m===E.charCodeAt(a++)?(e.consume(m),a===E.length?M:g):n(m)}function M(m){return m===null?n(m):m===93?(e.consume(m),x):q(m)?(o=M,K(m)):(e.consume(m),M)}function x(m){return m===93?(e.consume(m),b):M(m)}function b(m){return m===62?X(m):m===93?(e.consume(m),b):M(m)}function A(m){return m===null||m===62?X(m):q(m)?(o=A,K(m)):(e.consume(m),A)}function I(m){return m===null?n(m):m===63?(e.consume(m),j):q(m)?(o=I,K(m)):(e.consume(m),I)}function j(m){return m===62?X(m):I(m)}function D(m){return we(m)?(e.consume(m),N):n(m)}function N(m){return m===45||xe(m)?(e.consume(m),N):B(m)}function B(m){return q(m)?(o=B,K(m)):J(m)?(e.consume(m),B):X(m)}function F(m){return m===45||xe(m)?(e.consume(m),F):m===47||m===62||oe(m)?W(m):n(m)}function W(m){return m===47?(e.consume(m),X):m===58||m===95||we(m)?(e.consume(m),k):q(m)?(o=W,K(m)):J(m)?(e.consume(m),W):X(m)}function k(m){return m===45||m===46||m===58||m===95||xe(m)?(e.consume(m),k):v(m)}function v(m){return m===61?(e.consume(m),U):q(m)?(o=v,K(m)):J(m)?(e.consume(m),v):W(m)}function U(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,Y):q(m)?(o=U,K(m)):J(m)?(e.consume(m),U):(e.consume(m),S)}function Y(m){return m===i?(e.consume(m),i=void 0,V):m===null?n(m):q(m)?(o=Y,K(m)):(e.consume(m),Y)}function S(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||oe(m)?W(m):(e.consume(m),S)}function V(m){return m===47||m===62||oe(m)?W(m):n(m)}function X(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function K(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),re}function re(m){return J(m)?te(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ne(m)}function ne(m){return e.enter("htmlTextData"),o(m)}}const Vn={name:"labelEnd",resolveAll:ws,resolveTo:Is,tokenize:Ns},ys={tokenize:As},Ms={tokenize:Ds},ks={tokenize:Es};function ws(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ve(e,0,e.length,n),e}function Is(e,t){let n=e.length,r=0,i,a,o;for(;n--;){const h=e[n][1];if(i){if(h.type==="link"||h.type==="labelLink"&&h._inactive)break;e[n][0]==="enter"&&h.type==="labelLink"&&(h._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(h.type==="labelImage"||h.type==="labelLink")&&!h._balanced&&(i=n,h.type!=="labelLink")){r=2;break}}else h.type==="labelEnd"&&(a=n)}const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",s,t]],o=je(o,e.slice(i+1,i+r+3)),o=je(o,[["enter",c,t]]),o=je(o,qt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=je(o,[["exit",c,t],e[a-2],e[a-1],["exit",s,t]]),o=je(o,e.slice(a+1)),o=je(o,[["exit",l,t]]),ve(e,i,e.length,o),e}function Ns(e,t,n){const r=this,i=r._labelStarts;let a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return l;function l(p){return a?a._inactive?u(p):(o=r.parser.defined.includes(Le(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(ys,h,o?h:u)(p):p===91?e.attempt(Ms,h,o?c:u)(p):o?h(p):u(p)}function c(p){return e.attempt(ks,h,u)(p)}function h(p){return i.pop(),t(p)}function u(p){return a._balanced=!0,n(p)}}function As(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return oe(u)?bt(e,a)(u):a(u)}function a(u){return u===41?h(u):Yi(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function o(u){return oe(u)?bt(e,s)(u):h(u)}function l(u){return n(u)}function s(u){return u===34||u===39||u===40?Gi(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):h(u)}function c(u){return oe(u)?bt(e,h)(u):h(u)}function h(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function Ds(e,t,n){const r=this;return i;function i(l){return Hi.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function Es(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Ss={name:"labelStartImage",resolveAll:Vn.resolveAll,tokenize:Ts};function Ts(e,t,n){const r=this;let i;return a;function a(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),i=e.exit("labelImage"),l):n(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(s))}}const js={name:"labelStartLink",resolveAll:Vn.resolveAll,tokenize:zs};function zs(e,t,n){const r=this;let i;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const en={name:"lineEnding",tokenize:vs};function vs(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),te(e,t,"linePrefix")}}const Ot={name:"thematicBreak",tokenize:Ls};function Ls(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),s(c)):r>=3&&(c===null||q(c))?(e.exit("thematicBreak"),t(c)):n(c)}function s(c){return c===i?(e.consume(c),r++,s):(e.exit("thematicBreakSequence"),J(c)?te(e,l,"whitespace")(c):l(c))}}const Ne={continuation:{tokenize:Ps},exit:Bs,name:"list",tokenize:Rs},Cs={partial:!0,tokenize:Qs},Os={partial:!0,tokenize:Us};function Rs(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(d){const g=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:wn(d)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ot,n,c)(d):c(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(d)}return n(d)}function s(d){return wn(d)&&++o<10?(e.consume(d),s):(!r.interrupt||o<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(wt,r.interrupt?n:h,e.attempt(Cs,p,u))}function h(d){return r.containerState.initialBlankLine=!0,a++,p(d)}function u(d){return J(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function Ps(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(wt,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,te(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!J(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Os,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,te(e,e.attempt(Ne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Us(e,t,n){const r=this;return te(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function Bs(e){e.exit(this.containerState.type)}function Qs(e,t,n){const r=this;return te(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(a){const o=r.events[r.events.length-1];return!J(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ar={name:"setextUnderline",resolveTo:Fs,tokenize:Ys};function Fs(e,t){const n=new Bt;let r=e.length,i,a,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!o&&e[r][1].type==="definition"&&(o=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(n.add(a,0,[["enter",l,t]]),n.add(o+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=l,n.add(e.length,0,[["exit",l,t]]),n.consume(e),e}function Ys(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,u;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){u=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),J(c)?te(e,s,"lineSuffix")(c):s(c))}function s(c){return c===null||q(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Hs={tokenize:Gs};function Gs(e){const t=this,n=e.attempt(wt,r,e.attempt(this.parser.constructs.flowInitial,i,te(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xl,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Vs={resolveAll:qi()},qs=Vi("string"),Zs=Vi("text");function Vi(e){return{resolveAll:qi(e==="text"?_s:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),s}function s(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),s)}function c(h){if(h===null)return!0;const u=i[h];let p=-1;if(u)for(;++p<u.length;){const d=u[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function qi(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function _s(e,t){const n=new Bt;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],a=t.sliceStream(i);let o=a.length,l=-1,s=0,c;for(;o--;){const h=a[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(h===-2)c=!0,s++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){const h={type:r===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:i.start._bufferIndex+l,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):n.add(r,0,[["enter",h,t],["exit",h,t]])}r++}return n.consume(e),e}const Ws={42:Ne,43:Ne,45:Ne,48:Ne,49:Ne,50:Ne,51:Ne,52:Ne,53:Ne,54:Ne,55:Ne,56:Ne,57:Ne,62:Ui},Js={91:ns},Xs={[-2]:$t,[-1]:$t,32:$t},Ks={35:ss,42:Ot,45:[Ar,Ot],60:ds,61:Ar,95:Ot,96:Ir,126:Ir},$s={38:Qi,92:Bi},ec={[-5]:en,[-4]:en,[-3]:en,33:Ss,38:Qi,42:In,60:[vl,bs],91:js,92:[os,Bi],93:Vn,95:In,96:Vl},tc={null:[In,Vs]},nc={null:[42,95]},rc={null:[]},ic=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nc,contentInitial:Js,disable:rc,document:Ws,flow:Ks,flowInitial:Xs,insideSpan:tc,string:$s,text:ec},Symbol.toStringTag,{value:"Module"}));function ac(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const s={attempt:B(D),check:B(N),consume:A,enter:I,exit:j,interrupt:B(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:M,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:u};let h=t.tokenize.call(c,s);return t.resolveAll&&a.push(t),c;function u(v){return o=je(o,v),x(),o[o.length-1]!==null?[]:(F(t,0),c.events=qt(a,c.events,c),c.events)}function p(v,U){return lc(d(v),U)}function d(v){return oc(o,v)}function g(){const{_bufferIndex:v,_index:U,line:Y,column:S,offset:V}=r;return{_bufferIndex:v,_index:U,line:Y,column:S,offset:V}}function M(v){i[v.line]=v.column,k()}function x(){for(;r._index<o.length;){const v=o[r._index];if(typeof v=="string"){const U=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<v.length;)b(v.charCodeAt(r._bufferIndex))}else b(v)}}function b(v){h=h(v)}function A(v){q(v)?(r.line++,r.column=1,r.offset+=v===-3?2:1,k()):v!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=v}function I(v,U){const Y=U||{};return Y.type=v,Y.start=g(),c.events.push(["enter",Y,c]),l.push(Y),Y}function j(v){const U=l.pop();return U.end=g(),c.events.push(["exit",U,c]),U}function D(v,U){F(v,U.from)}function N(v,U){U.restore()}function B(v,U){return Y;function Y(S,V,X){let K,re,ne,m;return Array.isArray(S)?z(S):"tokenize"in S?z([S]):E(S);function E(P){return ee;function ee($){const me=$!==null&&P[$],pe=$!==null&&P.null,Me=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return z(Me)($)}}function z(P){return K=P,re=0,P.length===0?X:f(P[re])}function f(P){return ee;function ee($){return m=W(),ne=P,P.partial||(c.currentConstruct=P),P.name&&c.parser.constructs.disable.null.includes(P.name)?G():P.tokenize.call(U?Object.assign(Object.create(c),U):c,s,H,G)($)}}function H(P){return v(ne,m),V}function G(P){return m.restore(),++re<K.length?f(K[re]):X}}}function F(v,U){v.resolveAll&&!a.includes(v)&&a.push(v),v.resolve&&ve(c.events,U,c.events.length-U,v.resolve(c.events.slice(U),c)),v.resolveTo&&(c.events=v.resolveTo(c.events,c))}function W(){const v=g(),U=c.previous,Y=c.currentConstruct,S=c.events.length,V=Array.from(l);return{from:S,restore:X};function X(){r=v,c.previous=U,c.currentConstruct=Y,c.events.length=S,l=V,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function oc(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function lc(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
6
6
|
`;break}case-3:{o=`\r
|
|
7
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function sc(e){const r={constructs:Oi([ic,...(e||{}).extensions||[]]),content:i(Al),defined:[],document:i(El),flow:i(Hs),lazy:{},string:i(qs),text:i(Zs)};return r;function i(a){return o;function o(l){return ac(r,a,l)}}}function cc(e){for(;!Fi(e););return e}const Dr=/[\0\t\n\r]/g;function uc(){let e=1,t="",n=!0,r;return i;function i(a,o,l){a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a));const s=[];let c=0;for(t="",n&&(a.charCodeAt(0)===65279&&c++,n=void 0);c<a.length;){Dr.lastIndex=c;const h=Dr.exec(a),u=h&&h.index!==void 0?h.index:a.length,p=a.charCodeAt(u);if(!h){t=a.slice(c);break}if(p===10&&c===u&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<u&&(s.push(a.slice(c,u)),e+=u-c),p){case 0:{s.push(65533),e++;break}case 9:{const d=Math.ceil(e/4)*4;for(s.push(-2);e++<d;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=u+1}return l&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const hc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dc(e){return e.replace(hc,pc)}function pc(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Ri(n.slice(a?2:1),a?16:10)}return Gn(n)||e}const Zi={}.hasOwnProperty;function fc(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),gc(n)(cc(sc(n).document().write(uc()(e,t,!0))))}function gc(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(he),blockQuote:o(Me),characterEscape:k,characterReference:k,codeFenced:o(fe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(fe,l),codeText:o(ge,l),codeTextData:k,data:k,codeFlowValue:k,definition:o(re),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(W),hardBreakEscape:o(De),hardBreakTrailing:o(De),htmlFlow:o(Ue,l),htmlFlowData:k,htmlText:o(Ue,l),htmlTextData:k,image:o(Nt),label:l,link:o(st),listItem:o(At),listItemValue:d,listOrdered:o(ct,p),listUnordered:o(ct),paragraph:o(Dt),reference:V,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(he),strong:o(Et),thematicBreak:o(Tt)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:pe,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:P,characterReferenceMarkerNumeric:P,characterReferenceValue:$,characterReference:te,codeFenced:c(x),codeFencedFence:M,codeFencedFenceInfo:g,codeFencedFenceMeta:b,codeFlowValue:L,codeIndented:c(N),codeText:c(K),codeTextData:L,data:L,definition:c(),definitionDestinationString:E,definitionLabelString:w,definitionTitleString:j,emphasis:c(),hardBreakEscape:c(q),hardBreakTrailing:c(q),htmlFlow:c(S),htmlFlowData:L,htmlText:c(F),htmlTextData:L,image:c(ne),label:m,labelText:ie,lineEnding:U,link:c(X),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Y,resourceDestinationString:D,resourceTitleString:z,resource:f,setextHeading:c(_),setextHeadingLineSequence:G,setextHeadingText:B,strong:c(),thematicBreak:c()}};_i(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(I){let v={type:"root",children:[],position:void 0};const C={stack:[v],tokenStack:[],config:t,enter:s,exit:h,buffer:l,resume:u,data:n},Q=[],ce=[];let le=-1;for(;++le<I.length;)if(ce.push(I[le]),I[le][1].type==="listOrdered"||I[le][1].type==="listUnordered")if(I[le][0]==="enter")Q.push(ce.length-1);else{const Ie=Q.pop();a(ce,Ie)}for(I=ce,le=-1;++le<I.length;){const Ie=t[I[le][0]];I[le][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...C,sliceSerialize:I[le][2].sliceSerialize},I[le][1]),Zi.call(Ie,I[le][1].type)&&Ie[I[le][1].type].call({...C,sliceSerialize:I[le][2].sliceSerialize},I[le][1]),I[le][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...C,sliceSerialize:I[le][2].sliceSerialize},I[le][1])}if(C.tokenStack.length>0){const Ie=C.tokenStack[C.tokenStack.length-1];(Ie[1]||Er).call(C,void 0,Ie[0])}for(v.position={start:He(I.length>0?I[0][1].start:{line:1,column:1,offset:0}),end:He(I.length>0?I[I.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le<t.transforms.length;)v=t.transforms[le](v)||v;return v}function i(I,v,C){let Q=-1;for(;++Q<I.length;)I[Q].call(v,C)}function a(I,v){const C=I.length-1;let Q=v-1,ce=-1,le=!1,Ie,Ce,ut,ht;const dt=[];for(;++Q<=C;){const Ee=I[Q];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?ce++:ce--,ht=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&(Ie&&!ht&&!ce&&!ut&&(ut=Q),ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ht=void 0}if(!ce&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||ce===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(Ie){let et=Q;for(Ce=void 0;et--;){const Be=I[et];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;Ce&&(I[Ce][1].type="lineEndingBlank",le=!0),Be[1].type="lineEnding",Ce=et}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}ut&&(!Ce||ut<Ce)&&(Ie._spread=!0),Ie.end=Object.assign({},Ce?I[Ce][1].start:Ee[1].end),dt.push({at:Ce||Q,event:["exit",Ie,Ee[2]]})}if(Ee[1].type==="listItemPrefix"){const et={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};Ie=et,dt.push({at:Q,event:["enter",et,Ee[2]]}),ut=void 0,ht=!0}}}const ir=I.splice(v);let Jt=0;for(Q=-1;++Q<ir.length;){for(;Jt<dt.length&&dt[Jt].at===v+Q;)I.push(dt[Jt++].event);I.push(ir[Q])}I[v][1]._spread=le}function o(I,v){return C;function C(Q){s.call(this,I(Q),Q),v&&v.call(this,Q)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(I,v,C){this.stack[this.stack.length-1].children.push(I),this.stack.push(I),this.tokenStack.push([v,C||void 0]),I.position={start:He(v.start),end:void 0}}function c(I){return v;function v(C){I&&I.call(this,C),h.call(this,C)}}function h(I,v){const C=this.stack.pop(),Q=this.tokenStack.pop();if(!Q)throw new Error("Cannot close `"+I.type+"` ("+mt({start:I.start,end:I.end})+"): it’s not open");Q[0].type!==I.type&&(v?v.call(this,I,Q[0]):(Q[1]||Er).call(this,I,Q[0])),C.position.end=He(I.end)}function u(){return Hn(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function d(I){if(this.data.expectingFirstListItemValue){const v=this.stack[this.stack.length-2];v.start=Number.parseInt(this.sliceSerialize(I),10),this.data.expectingFirstListItemValue=void 0}}function g(){const I=this.resume(),v=this.stack[this.stack.length-1];v.lang=I}function b(){const I=this.resume(),v=this.stack[this.stack.length-1];v.meta=I}function M(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const I=this.resume(),v=this.stack[this.stack.length-1];v.value=I.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const I=this.resume(),v=this.stack[this.stack.length-1];v.value=I.replace(/(\r?\n|\r)$/g,"")}function w(I){const v=this.resume(),C=this.stack[this.stack.length-1];C.label=v,C.identifier=Le(this.sliceSerialize(I)).toLowerCase()}function j(){const I=this.resume(),v=this.stack[this.stack.length-1];v.title=I}function E(){const I=this.resume(),v=this.stack[this.stack.length-1];v.url=I}function A(I){const v=this.stack[this.stack.length-1];if(!v.depth){const C=this.sliceSerialize(I).length;v.depth=C}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function G(I){const v=this.stack[this.stack.length-1];v.depth=this.sliceSerialize(I).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function k(I){const C=this.stack[this.stack.length-1].children;let Q=C[C.length-1];(!Q||Q.type!=="text")&&(Q=St(),Q.position={start:He(I.start),end:void 0},C.push(Q)),this.stack.push(Q)}function L(I){const v=this.stack.pop();v.value+=this.sliceSerialize(I),v.position.end=He(I.end)}function U(I){const v=this.stack[this.stack.length-1];if(this.data.atHardBreak){const C=v.children[v.children.length-1];C.position.end=He(I.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(v.type)&&(k.call(this,I),L.call(this,I))}function q(){this.data.atHardBreak=!0}function S(){const I=this.resume(),v=this.stack[this.stack.length-1];v.value=I}function F(){const I=this.resume(),v=this.stack[this.stack.length-1];v.value=I}function K(){const I=this.resume(),v=this.stack[this.stack.length-1];v.value=I}function X(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=v,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function ne(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=v,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function ie(I){const v=this.sliceSerialize(I),C=this.stack[this.stack.length-2];C.label=dc(v),C.identifier=Le(v).toLowerCase()}function m(){const I=this.stack[this.stack.length-1],v=this.resume(),C=this.stack[this.stack.length-1];if(this.data.inReference=!0,C.type==="link"){const Q=I.children;C.children=Q}else C.alt=v}function D(){const I=this.resume(),v=this.stack[this.stack.length-1];v.url=I}function z(){const I=this.resume(),v=this.stack[this.stack.length-1];v.title=I}function f(){this.data.inReference=void 0}function V(){this.data.referenceType="collapsed"}function Y(I){const v=this.resume(),C=this.stack[this.stack.length-1];C.label=v,C.identifier=Le(this.sliceSerialize(I)).toLowerCase(),this.data.referenceType="full"}function P(I){this.data.characterReferenceType=I.type}function $(I){const v=this.sliceSerialize(I),C=this.data.characterReferenceType;let Q;C?(Q=Ri(v,C==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Q=Gn(v);const ce=this.stack[this.stack.length-1];ce.value+=Q}function te(I){const v=this.stack.pop();v.position.end=He(I.end)}function me(I){L.call(this,I);const v=this.stack[this.stack.length-1];v.url=this.sliceSerialize(I)}function pe(I){L.call(this,I);const v=this.stack[this.stack.length-1];v.url="mailto:"+this.sliceSerialize(I)}function Me(){return{type:"blockquote",children:[],position:void 0}}function fe(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function ge(){return{type:"inlineCode",value:"",position:void 0}}function re(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function W(){return{type:"emphasis",children:[],position:void 0}}function he(){return{type:"heading",depth:0,children:[],position:void 0}}function De(){return{type:"break",position:void 0}}function Ue(){return{type:"html",value:"",position:void 0}}function Nt(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function st(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ct(I){return{type:"list",ordered:I.type==="listOrdered",start:null,spread:I._spread,children:[],position:void 0}}function At(I){return{type:"listItem",spread:I._spread,checked:null,children:[],position:void 0}}function Dt(){return{type:"paragraph",children:[],position:void 0}}function Et(){return{type:"strong",children:[],position:void 0}}function St(){return{type:"text",value:"",position:void 0}}function Tt(){return{type:"thematicBreak",position:void 0}}}function He(e){return{line:e.line,column:e.column,offset:e.offset}}function _i(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?_i(e,r):mc(e,r)}}function mc(e,t){let n;for(n in t)if(Zi.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Er(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+mt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+mt({start:t.start,end:t.end})+") is still open")}function bc(e){const t=this;t.parser=n;function n(r){return fc(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xc(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function yc(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
7
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function sc(e){const r={constructs:Oi([ic,...(e||{}).extensions||[]]),content:i(Al),defined:[],document:i(El),flow:i(Hs),lazy:{},string:i(qs),text:i(Zs)};return r;function i(a){return o;function o(l){return ac(r,a,l)}}}function cc(e){for(;!Fi(e););return e}const Dr=/[\0\t\n\r]/g;function uc(){let e=1,t="",n=!0,r;return i;function i(a,o,l){a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a));const s=[];let c=0;for(t="",n&&(a.charCodeAt(0)===65279&&c++,n=void 0);c<a.length;){Dr.lastIndex=c;const h=Dr.exec(a),u=h&&h.index!==void 0?h.index:a.length,p=a.charCodeAt(u);if(!h){t=a.slice(c);break}if(p===10&&c===u&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<u&&(s.push(a.slice(c,u)),e+=u-c),p){case 0:{s.push(65533),e++;break}case 9:{const d=Math.ceil(e/4)*4;for(s.push(-2);e++<d;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=u+1}return l&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const hc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dc(e){return e.replace(hc,pc)}function pc(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Ri(n.slice(a?2:1),a?16:10)}return Gn(n)||e}const Zi={}.hasOwnProperty;function fc(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),gc(n)(cc(sc(n).document().write(uc()(e,t,!0))))}function gc(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(he),blockQuote:o(Me),characterEscape:k,characterReference:k,codeFenced:o(fe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(fe,l),codeText:o(ge,l),codeTextData:k,data:k,codeFlowValue:k,definition:o(ie),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(_),hardBreakEscape:o(De),hardBreakTrailing:o(De),htmlFlow:o(Ue,l),htmlFlowData:k,htmlText:o(Ue,l),htmlTextData:k,image:o(Nt),label:l,link:o(st),listItem:o(At),listItemValue:d,listOrdered:o(ct,p),listUnordered:o(ct),paragraph:o(Dt),reference:H,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(he),strong:o(Et),thematicBreak:o(Tt)},exit:{atxHeading:c(),atxHeadingSequence:N,autolink:c(),autolinkEmail:pe,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:P,characterReferenceMarkerNumeric:P,characterReferenceValue:ee,characterReference:$,codeFenced:c(b),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:M,codeFlowValue:v,codeIndented:c(A),codeText:c(X),codeTextData:v,data:v,definition:c(),definitionDestinationString:D,definitionLabelString:I,definitionTitleString:j,emphasis:c(),hardBreakEscape:c(Y),hardBreakTrailing:c(Y),htmlFlow:c(S),htmlFlowData:v,htmlText:c(V),htmlTextData:v,image:c(re),label:m,labelText:ne,lineEnding:U,link:c(K),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:G,resourceDestinationString:E,resourceTitleString:z,resource:f,setextHeading:c(W),setextHeadingLineSequence:F,setextHeadingText:B,strong:c(),thematicBreak:c()}};_i(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let L={type:"root",children:[],position:void 0};const C={stack:[L],tokenStack:[],config:t,enter:s,exit:h,buffer:l,resume:u,data:n},Q=[],ce=[];let le=-1;for(;++le<w.length;)if(ce.push(w[le]),w[le][1].type==="listOrdered"||w[le][1].type==="listUnordered")if(w[le][0]==="enter")Q.push(ce.length-1);else{const Ie=Q.pop();a(ce,Ie)}for(w=ce,le=-1;++le<w.length;){const Ie=t[w[le][0]];w[le][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...C,sliceSerialize:w[le][2].sliceSerialize},w[le][1]),Zi.call(Ie,w[le][1].type)&&Ie[w[le][1].type].call({...C,sliceSerialize:w[le][2].sliceSerialize},w[le][1]),w[le][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...C,sliceSerialize:w[le][2].sliceSerialize},w[le][1])}if(C.tokenStack.length>0){const Ie=C.tokenStack[C.tokenStack.length-1];(Ie[1]||Er).call(C,void 0,Ie[0])}for(L.position={start:He(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:He(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le<t.transforms.length;)L=t.transforms[le](L)||L;return L}function i(w,L,C){let Q=-1;for(;++Q<w.length;)w[Q].call(L,C)}function a(w,L){const C=w.length-1;let Q=L-1,ce=-1,le=!1,Ie,Ce,ut,ht;const dt=[];for(;++Q<=C;){const Ee=w[Q];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?ce++:ce--,ht=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&(Ie&&!ht&&!ce&&!ut&&(ut=Q),ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ht=void 0}if(!ce&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||ce===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(Ie){let et=Q;for(Ce=void 0;et--;){const Be=w[et];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;Ce&&(w[Ce][1].type="lineEndingBlank",le=!0),Be[1].type="lineEnding",Ce=et}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}ut&&(!Ce||ut<Ce)&&(Ie._spread=!0),Ie.end=Object.assign({},Ce?w[Ce][1].start:Ee[1].end),dt.push({at:Ce||Q,event:["exit",Ie,Ee[2]]})}if(Ee[1].type==="listItemPrefix"){const et={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};Ie=et,dt.push({at:Q,event:["enter",et,Ee[2]]}),ut=void 0,ht=!0}}}const ir=w.splice(L);let Jt=0;for(Q=-1;++Q<ir.length;){for(;Jt<dt.length&&dt[Jt].at===L+Q;)w.push(dt[Jt++].event);w.push(ir[Q])}w[L][1]._spread=le}function o(w,L){return C;function C(Q){s.call(this,w(Q),Q),L&&L.call(this,Q)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(w,L,C){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([L,C||void 0]),w.position={start:He(L.start),end:void 0}}function c(w){return L;function L(C){w&&w.call(this,C),h.call(this,C)}}function h(w,L){const C=this.stack.pop(),Q=this.tokenStack.pop();if(!Q)throw new Error("Cannot close `"+w.type+"` ("+mt({start:w.start,end:w.end})+"): it’s not open");Q[0].type!==w.type&&(L?L.call(this,w,Q[0]):(Q[1]||Er).call(this,w,Q[0])),C.position.end=He(w.end)}function u(){return Hn(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function d(w){if(this.data.expectingFirstListItemValue){const L=this.stack[this.stack.length-2];L.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function g(){const w=this.resume(),L=this.stack[this.stack.length-1];L.lang=w}function M(){const w=this.resume(),L=this.stack[this.stack.length-1];L.meta=w}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const w=this.resume(),L=this.stack[this.stack.length-1];L.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const w=this.resume(),L=this.stack[this.stack.length-1];L.value=w.replace(/(\r?\n|\r)$/g,"")}function I(w){const L=this.resume(),C=this.stack[this.stack.length-1];C.label=L,C.identifier=Le(this.sliceSerialize(w)).toLowerCase()}function j(){const w=this.resume(),L=this.stack[this.stack.length-1];L.title=w}function D(){const w=this.resume(),L=this.stack[this.stack.length-1];L.url=w}function N(w){const L=this.stack[this.stack.length-1];if(!L.depth){const C=this.sliceSerialize(w).length;L.depth=C}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function F(w){const L=this.stack[this.stack.length-1];L.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function k(w){const C=this.stack[this.stack.length-1].children;let Q=C[C.length-1];(!Q||Q.type!=="text")&&(Q=St(),Q.position={start:He(w.start),end:void 0},C.push(Q)),this.stack.push(Q)}function v(w){const L=this.stack.pop();L.value+=this.sliceSerialize(w),L.position.end=He(w.end)}function U(w){const L=this.stack[this.stack.length-1];if(this.data.atHardBreak){const C=L.children[L.children.length-1];C.position.end=He(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(L.type)&&(k.call(this,w),v.call(this,w))}function Y(){this.data.atHardBreak=!0}function S(){const w=this.resume(),L=this.stack[this.stack.length-1];L.value=w}function V(){const w=this.resume(),L=this.stack[this.stack.length-1];L.value=w}function X(){const w=this.resume(),L=this.stack[this.stack.length-1];L.value=w}function K(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const L=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=L,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function re(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const L=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=L,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function ne(w){const L=this.sliceSerialize(w),C=this.stack[this.stack.length-2];C.label=dc(L),C.identifier=Le(L).toLowerCase()}function m(){const w=this.stack[this.stack.length-1],L=this.resume(),C=this.stack[this.stack.length-1];if(this.data.inReference=!0,C.type==="link"){const Q=w.children;C.children=Q}else C.alt=L}function E(){const w=this.resume(),L=this.stack[this.stack.length-1];L.url=w}function z(){const w=this.resume(),L=this.stack[this.stack.length-1];L.title=w}function f(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function G(w){const L=this.resume(),C=this.stack[this.stack.length-1];C.label=L,C.identifier=Le(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function P(w){this.data.characterReferenceType=w.type}function ee(w){const L=this.sliceSerialize(w),C=this.data.characterReferenceType;let Q;C?(Q=Ri(L,C==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Q=Gn(L);const ce=this.stack[this.stack.length-1];ce.value+=Q}function $(w){const L=this.stack.pop();L.position.end=He(w.end)}function me(w){v.call(this,w);const L=this.stack[this.stack.length-1];L.url=this.sliceSerialize(w)}function pe(w){v.call(this,w);const L=this.stack[this.stack.length-1];L.url="mailto:"+this.sliceSerialize(w)}function Me(){return{type:"blockquote",children:[],position:void 0}}function fe(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function ge(){return{type:"inlineCode",value:"",position:void 0}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function _(){return{type:"emphasis",children:[],position:void 0}}function he(){return{type:"heading",depth:0,children:[],position:void 0}}function De(){return{type:"break",position:void 0}}function Ue(){return{type:"html",value:"",position:void 0}}function Nt(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function st(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ct(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[],position:void 0}}function At(w){return{type:"listItem",spread:w._spread,checked:null,children:[],position:void 0}}function Dt(){return{type:"paragraph",children:[],position:void 0}}function Et(){return{type:"strong",children:[],position:void 0}}function St(){return{type:"text",value:"",position:void 0}}function Tt(){return{type:"thematicBreak",position:void 0}}}function He(e){return{line:e.line,column:e.column,offset:e.offset}}function _i(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?_i(e,r):mc(e,r)}}function mc(e,t){let n;for(n in t)if(Zi.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Er(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+mt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+mt({start:t.start,end:t.end})+") is still open")}function bc(e){const t=this;t.parser=n;function n(r){return fc(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xc(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function yc(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
8
8
|
`}]}function Mc(e,t){const n=t.value?t.value+`
|
|
9
9
|
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function kc(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wc(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ic(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=lt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)}function Nc(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ac(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Wi(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Dc(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Wi(e,t);const i={src:lt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ec(e,t){const n={src:lt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Sc(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Tc(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Wi(e,t);const i={href:lt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jc(e,t){const n={href:lt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zc(e,t,n){const r=e.all(t),i=n?vc(n):Ji(t),a={},o=[];if(typeof t.checked=="boolean"){const h=r[0];let u;h&&h.type==="element"&&h.tagName==="p"?u=h:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
|
|
10
10
|
`}),h.type==="element"&&h.tagName==="p"&&!i?o.push(...h.children):o.push(h)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
11
|
-
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function vc(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ji(n[r])}return t}function Ji(e){const t=e.spread;return t==null?e.children.length>1:t}function Lc(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Cc(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oc(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Rc(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pc(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Bn(t.children[1]),s=Si(t.children[t.children.length-1]);l&&s&&(o.position={start:l,end:s}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Uc(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let s=-1;const c=[];for(;++s<l;){const u=t.children[s],p={},d=o?o[s]:void 0;d&&(p.align=d);let g={type:"element",tagName:a,properties:p,children:[]};u&&(g.children=e.all(u),e.patch(u,g),g=e.applyData(u,g)),c.push(g)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function Bc(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Sr=9,Tr=32;function Qc(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(jr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(jr(t.slice(i),i>0,!1)),a.join("")}function jr(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Sr||a===Tr;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Sr||a===Tr;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Fc(e,t){const n={type:"text",value:Qc(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Yc(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Hc={blockquote:xc,break:yc,code:Mc,delete:kc,emphasis:wc,footnoteReference:Ic,heading:Nc,html:Ac,imageReference:Dc,image:Ec,inlineCode:Sc,linkReference:Tc,link:jc,listItem:zc,list:Lc,paragraph:Cc,root:Oc,strong:Rc,table:Pc,tableCell:Bc,tableRow:Uc,text:Fc,thematicBreak:Yc,toml:jt,yaml:jt,definition:jt,footnoteDefinition:jt};function jt(){}const Xi=-1,Zt=0,xt=1,Ft=2,qn=3,Zn=4,_n=5,Wn=6,Ki=7,$i=8,{defineProperty:Gc}=Object,ea=typeof self=="object"?self:globalThis,zr=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ea[e](t)},Vc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Zt:case Xi:return n(o,i);case xt:{const l=n([],i);for(const s of o)l.push(r(s));return l}case Ft:{const l=n({},i);for(const[s,c]of o){const h=r(s),u=r(c);h==="__proto__"?Gc(l,h,{value:u,configurable:!0,enumerable:!0,writable:!0}):l[h]=u}return l}case qn:return n(new Date(o),i);case Zn:{const{source:l,flags:s}=o;return n(new RegExp(l,s),i)}case _n:{const l=n(new Map,i);for(const[s,c]of o)l.set(r(s),r(c));return l}case Wn:{const l=n(new Set,i);for(const s of o)l.add(r(s));return l}case Ki:{const{name:l,message:s}=o;return n(typeof ea[l]=="function"?zr(l,s):new Error(s),i)}case $i:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}case"-0":return-0}return n(zr(a,o),i)};return r},vr=e=>Vc(new Map,e)(0),Ze="",{toString:qc}={},{keys:Zc,is:_c}=Object,ft=e=>{const t=typeof e;if(t!=="object"||!e)return[Zt,t];const n=qc.call(e).slice(8,-1);switch(n){case"Array":return[xt,Ze];case"Object":return[Ft,Ze];case"Date":return[qn,Ze];case"RegExp":return[Zn,Ze];case"Map":return[_n,Ze];case"Set":return[Wn,Ze];case"DataView":return[xt,n]}return n.includes("Array")?[xt,n]:e instanceof Error?[Ki,e.name||"Error"]:[Ft,n]},zt=([e,t])=>e===Zt&&(t==="function"||t==="symbol"),Wc=(e,t,n,r)=>{const i=(o,l)=>{const s=r.push(o)-1;return n.set(l,s),s},a=o=>{if(n.has(o))return n.get(o);let[l,s]=ft(o);switch(l){case Zt:{let h=o;switch(s){case"bigint":l=$i,h=o.toString();break;case"number":if(!o&&_c(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);h=null;break;case"undefined":return i([Xi],o)}return i([l,h],o)}case xt:{if(s){let p=o;return s==="DataView"?p=new Uint8Array(o.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(o)),i([s,[...p]],o)}const h=[],u=i([l,h],o);for(const p of o)h.push(a(p));return u}case Ft:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const h=[],u=i([l,h],o);for(const p of Zc(o))(e||!zt(ft(o[p])))&&h.push([a(p),a(o[p])]);return u}case qn:return i([l,isNaN(o.getTime())?Ze:o.toISOString()],o);case Zn:{const{source:h,flags:u}=o;return i([l,{source:h,flags:u}],o)}case _n:{const h=[],u=i([l,h],o);for(const[p,d]of o)(e||!(zt(ft(p))||zt(ft(d))))&&h.push([a(p),a(d)]);return u}case Wn:{const h=[],u=i([l,h],o);for(const p of o)(e||!zt(ft(p)))&&h.push(a(p));return u}}const{message:c}=o;return i([l,{name:s,message:c}],o)};return a},Lr=(e,{json:t,lossy:n}={})=>{const r=[];return Wc(!(t||n),!!t,new Map,r)(e),r},Yt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?vr(Lr(e,t)):structuredClone(e):(e,t)=>vr(Lr(e,t));function Jc(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Xc(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Kc(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Jc,r=e.options.footnoteBackLabel||Xc,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[s]);if(!c)continue;const h=e.all(c),u=String(c.identifier).toUpperCase(),p=lt(u.toLowerCase());let d=0;const g=[],
|
|
11
|
+
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function vc(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ji(n[r])}return t}function Ji(e){const t=e.spread;return t==null?e.children.length>1:t}function Lc(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Cc(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oc(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Rc(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pc(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Bn(t.children[1]),s=Si(t.children[t.children.length-1]);l&&s&&(o.position={start:l,end:s}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Uc(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let s=-1;const c=[];for(;++s<l;){const u=t.children[s],p={},d=o?o[s]:void 0;d&&(p.align=d);let g={type:"element",tagName:a,properties:p,children:[]};u&&(g.children=e.all(u),e.patch(u,g),g=e.applyData(u,g)),c.push(g)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function Bc(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Sr=9,Tr=32;function Qc(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(jr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(jr(t.slice(i),i>0,!1)),a.join("")}function jr(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Sr||a===Tr;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Sr||a===Tr;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Fc(e,t){const n={type:"text",value:Qc(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Yc(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Hc={blockquote:xc,break:yc,code:Mc,delete:kc,emphasis:wc,footnoteReference:Ic,heading:Nc,html:Ac,imageReference:Dc,image:Ec,inlineCode:Sc,linkReference:Tc,link:jc,listItem:zc,list:Lc,paragraph:Cc,root:Oc,strong:Rc,table:Pc,tableCell:Bc,tableRow:Uc,text:Fc,thematicBreak:Yc,toml:jt,yaml:jt,definition:jt,footnoteDefinition:jt};function jt(){}const Xi=-1,Zt=0,xt=1,Ft=2,qn=3,Zn=4,_n=5,Wn=6,Ki=7,$i=8,{defineProperty:Gc}=Object,ea=typeof self=="object"?self:globalThis,zr=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ea[e](t)},Vc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Zt:case Xi:return n(o,i);case xt:{const l=n([],i);for(const s of o)l.push(r(s));return l}case Ft:{const l=n({},i);for(const[s,c]of o){const h=r(s),u=r(c);h==="__proto__"?Gc(l,h,{value:u,configurable:!0,enumerable:!0,writable:!0}):l[h]=u}return l}case qn:return n(new Date(o),i);case Zn:{const{source:l,flags:s}=o;return n(new RegExp(l,s),i)}case _n:{const l=n(new Map,i);for(const[s,c]of o)l.set(r(s),r(c));return l}case Wn:{const l=n(new Set,i);for(const s of o)l.add(r(s));return l}case Ki:{const{name:l,message:s}=o;return n(typeof ea[l]=="function"?zr(l,s):new Error(s),i)}case $i:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}case"-0":return-0}return n(zr(a,o),i)};return r},vr=e=>Vc(new Map,e)(0),Ze="",{toString:qc}={},{keys:Zc,is:_c}=Object,ft=e=>{const t=typeof e;if(t!=="object"||!e)return[Zt,t];const n=qc.call(e).slice(8,-1);switch(n){case"Array":return[xt,Ze];case"Object":return[Ft,Ze];case"Date":return[qn,Ze];case"RegExp":return[Zn,Ze];case"Map":return[_n,Ze];case"Set":return[Wn,Ze];case"DataView":return[xt,n]}return n.includes("Array")?[xt,n]:e instanceof Error?[Ki,e.name||"Error"]:[Ft,n]},zt=([e,t])=>e===Zt&&(t==="function"||t==="symbol"),Wc=(e,t,n,r)=>{const i=(o,l)=>{const s=r.push(o)-1;return n.set(l,s),s},a=o=>{if(n.has(o))return n.get(o);let[l,s]=ft(o);switch(l){case Zt:{let h=o;switch(s){case"bigint":l=$i,h=o.toString();break;case"number":if(!o&&_c(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);h=null;break;case"undefined":return i([Xi],o)}return i([l,h],o)}case xt:{if(s){let p=o;return s==="DataView"?p=new Uint8Array(o.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(o)),i([s,[...p]],o)}const h=[],u=i([l,h],o);for(const p of o)h.push(a(p));return u}case Ft:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const h=[],u=i([l,h],o);for(const p of Zc(o))(e||!zt(ft(o[p])))&&h.push([a(p),a(o[p])]);return u}case qn:return i([l,isNaN(o.getTime())?Ze:o.toISOString()],o);case Zn:{const{source:h,flags:u}=o;return i([l,{source:h,flags:u}],o)}case _n:{const h=[],u=i([l,h],o);for(const[p,d]of o)(e||!(zt(ft(p))||zt(ft(d))))&&h.push([a(p),a(d)]);return u}case Wn:{const h=[],u=i([l,h],o);for(const p of o)(e||!zt(ft(p)))&&h.push(a(p));return u}}const{message:c}=o;return i([l,{name:s,message:c}],o)};return a},Lr=(e,{json:t,lossy:n}={})=>{const r=[];return Wc(!(t||n),!!t,new Map,r)(e),r},Yt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?vr(Lr(e,t)):structuredClone(e):(e,t)=>vr(Lr(e,t));function Jc(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Xc(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Kc(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Jc,r=e.options.footnoteBackLabel||Xc,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[s]);if(!c)continue;const h=e.all(c),u=String(c.identifier).toUpperCase(),p=lt(u.toLowerCase());let d=0;const g=[],M=e.footnoteCounts.get(u);for(;M!==void 0&&++d<=M;){g.length>0&&g.push({type:"text",value:" "});let A=typeof n=="string"?n:n(s,d);typeof A=="string"&&(A={type:"text",value:A}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,d),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const x=h[h.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const A=x.children[x.children.length-1];A&&A.type==="text"?A.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...g)}else h.push(...g);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,b),l.push(b)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Yt(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
12
12
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
13
|
-
`}]}}const _t=function(e){if(e==null)return nu;if(typeof e=="function")return Wt(e);if(typeof e=="object")return Array.isArray(e)?$c(e):eu(e);if(typeof e=="string")return tu(e);throw new Error("Expected function, string, or object as test")};function $c(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_t(e[n]);return Wt(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function eu(e){const t=e;return Wt(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function tu(e){return Wt(t);function t(n){return n&&n.type===e}}function Wt(e){return t;function t(n,r,i){return!!(ru(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nu(){return!0}function ru(e){return e!==null&&typeof e=="object"&&"type"in e}const ta=[],iu=!0,An=!1,au="skip";function na(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=_t(i),o=r?-1:1;l(e,void 0,[])();function l(s,c,h){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=ta,g,
|
|
13
|
+
`}]}}const _t=function(e){if(e==null)return nu;if(typeof e=="function")return Wt(e);if(typeof e=="object")return Array.isArray(e)?$c(e):eu(e);if(typeof e=="string")return tu(e);throw new Error("Expected function, string, or object as test")};function $c(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_t(e[n]);return Wt(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function eu(e){const t=e;return Wt(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function tu(e){return Wt(t);function t(n){return n&&n.type===e}}function Wt(e){return t;function t(n,r,i){return!!(ru(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nu(){return!0}function ru(e){return e!==null&&typeof e=="object"&&"type"in e}const ta=[],iu=!0,An=!1,au="skip";function na(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=_t(i),o=r?-1:1;l(e,void 0,[])();function l(s,c,h){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=ta,g,M,x;if((!t||a(s,c,h[h.length-1]||void 0))&&(d=ou(n(s,h)),d[0]===An))return d;if("children"in s&&s.children){const b=s;if(b.children&&d[0]!==au)for(M=(r?b.children.length:-1)+o,x=h.concat(b);M>-1&&M<b.children.length;){const A=b.children[M];if(g=l(A,M,x)(),g[0]===An)return g;M=typeof g[1]=="number"?g[1]:M+o}}return d}}}function ou(e){return Array.isArray(e)?e:typeof e=="number"?[iu,e]:e==null?ta:[e]}function Jn(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),na(e,a,l,i);function l(s,c){const h=c[c.length-1],u=h?h.children.indexOf(s):void 0;return o(s,u,h)}}const Dn={}.hasOwnProperty,lu={};function su(e,t){const n=t||lu,r=new Map,i=new Map,a=new Map,o={...Hc,...n.handlers},l={all:c,applyData:uu,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:s,options:n,patch:cu,wrap:du};return Jn(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const u=h.type==="definition"?r:i,p=String(h.identifier).toUpperCase();u.has(p)||u.set(p,h)}}),l;function s(h,u){const p=h.type,d=l.handlers[p];if(Dn.call(l.handlers,p)&&d)return d(l,h,u);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:M,...x}=h,b=Yt(x);return b.children=l.all(h),b}return Yt(h)}return(l.options.unknownHandler||hu)(l,h,u)}function c(h){const u=[];if("children"in h){const p=h.children;let d=-1;for(;++d<p.length;){const g=l.one(p[d],h);if(g){if(d&&p[d-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Cr(g.value)),!Array.isArray(g)&&g.type==="element")){const M=g.children[0];M&&M.type==="text"&&(M.value=Cr(M.value))}Array.isArray(g)?u.push(...g):u.push(g)}}}return u}}function cu(e,t){e.position&&(t.position=Jo(e))}function uu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Yt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function hu(e,t){const n=t.data||{},r="value"in t&&!(Dn.call(n,"hProperties")||Dn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function du(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
14
14
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
15
15
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
16
16
|
`}),n}function Cr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Or(e,t){const n=su(e,t),r=n.one(e,void 0),i=Kc(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
17
|
-
`},i),a}function pu(e,t){return e&&"run"in e?async function(n,r){const i=Or(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Or(n,{file:r,...e||t})}}function Rr(e){if(e)throw e}var Rt=Object.prototype.hasOwnProperty,ra=Object.prototype.toString,Pr=Object.defineProperty,Ur=Object.getOwnPropertyDescriptor,Br=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ra.call(t)==="[object Array]"},Qr=function(t){if(!t||ra.call(t)!=="[object Object]")return!1;var n=Rt.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Rt.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i=="undefined"||Rt.call(t,i)},Fr=function(t,n){Pr&&n.name==="__proto__"?Pr(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Yr=function(t,n){if(n==="__proto__")if(Rt.call(t,n)){if(Ur)return Ur(t,n).value}else return;return t[n]},fu=function e(){var t,n,r,i,a,o,l=arguments[0],s=1,c=arguments.length,h=!1;for(typeof l=="boolean"&&(h=l,l=arguments[1]||{},s=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});s<c;++s)if(t=arguments[s],t!=null)for(n in t)r=Yr(l,n),i=Yr(t,n),l!==i&&(h&&i&&(Qr(i)||(a=Br(i)))?(a?(a=!1,o=r&&Br(r)?r:[]):o=r&&Qr(r)?r:{},Fr(l,{name:n,newValue:e(h,o,i)})):typeof i!="undefined"&&Fr(l,{name:n,newValue:i}));return l};const tn=Ei(fu);function En(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function gu(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(s,...c){const h=e[++a];let u=-1;if(s){o(s);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,h?mu(h,l)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function mu(e,t){let n;return r;function r(...o){const l=e.length>o.length;let s;l&&o.push(i);try{s=e.apply(this,o)}catch(c){const h=c;if(l&&n)throw h;return i(h)}l||(s&&s.then&&typeof s.then=="function"?s.then(a,i):s instanceof Error?i(s):a(s))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const Re={basename:bu,dirname:xu,extname:yu,join:Mu,sep:"/"};function bu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');It(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function xu(e){if(It(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function yu(e){It(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Mu(...e){let t=-1,n;for(;++t<e.length;)It(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ku(n)}function ku(e){It(e);const t=e.codePointAt(0)===47;let n=wu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function wu(e,t){let n="",r=0,i=-1,a=0,o=-1,l,s;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function It(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Iu={cwd:Nu};function Nu(){return"/"}function Sn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Au(e){if(typeof e=="string")e=new URL(e);else if(!Sn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Du(e)}function Du(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const nn=["history","path","basename","stem","extname","dirname"];class ia{constructor(t){let n;t?Sn(t)?n={path:t}:typeof t=="string"||Eu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Iu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nn.length;){const a=nn[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)nn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Re.basename(this.path):void 0}set basename(t){an(t,"basename"),rn(t,"basename"),this.path=Re.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Re.dirname(this.path):void 0}set dirname(t){Hr(this.basename,"dirname"),this.path=Re.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Re.extname(this.path):void 0}set extname(t){if(rn(t,"extname"),Hr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Re.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Sn(t)&&(t=Au(t)),an(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Re.basename(this.path,this.extname):void 0}set stem(t){an(t,"stem"),rn(t,"stem"),this.path=Re.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ye(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function rn(e,t){if(e&&e.includes(Re.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Re.sep+"`")}function an(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Eu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Su=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},Tu={}.hasOwnProperty;class Xn extends Su{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=gu()}copy(){const t=new Xn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(tn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sn("data",this.frozen),this.namespace[t]=n,this):Tu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=vt(t),r=this.parser||this.Parser;return on("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),on("process",this.parser||this.Parser),ln("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=vt(t),s=r.parse(l);r.run(s,l,function(h,u,p){if(h||!u||!p)return c(h);const d=u,g=r.stringify(d,p);vu(g)?p.value=g:p.result=g,c(h,p)});function c(h,u){h||!u?o(h):a?a(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),on("processSync",this.parser||this.Parser),ln("processSync",this.compiler||this.Compiler),this.process(t,i),Vr("processSync","process",n),r;function i(a,o){n=!0,Rr(a),r=o}}run(t,n,r){Gr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const s=vt(n);i.run(t,s,c);function c(h,u,p){const d=u||t;h?l(h):o?o(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Vr("runSync","run",r),i;function a(o,l){Rr(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=vt(n),i=this.compiler||this.Compiler;return ln("stringify",i),Gr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(sn("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")s(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...u]=c;s(h,u)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=tn(!0,i.settings,c.settings))}function l(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const u=c[h];a(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function s(c,h){let u=-1,p=-1;for(;++u<r.length;)if(r[u][0]===c){p=u;break}if(p===-1)r.push([c,...h]);else if(h.length>0){let[d,...g]=h;const b=r[p][1];En(b)&&En(d)&&(d=tn(!0,b,d)),r[p]=[c,d,...g]}}}}const ju=new Xn().freeze();function on(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ln(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Gr(e){if(!En(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vt(e){return zu(e)?e:new ia(e)}function zu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vu(e){return typeof e=="string"||Lu(e)}function Lu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Cu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qr=[],Zr={allowDangerousHtml:!0},Ou=/^(https?|ircs?|mailto|xmpp)$/i,Ru=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Pu(e){const t=Uu(e),n=Bu(e);return Qu(t.runSync(t.parse(n),n),e)}function Uu(e){const t=e.rehypePlugins||qr,n=e.remarkPlugins||qr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Zr}:Zr;return ju().use(bc).use(n).use(pu,r).use(t)}function Bu(e){const t=e.children||"",n=new ia;return typeof t=="string"&&(n.value=t),n}function Qu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||Fu;for(const h of Ru)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Cu+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jn(e,c),tl(e,{Fragment:y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function c(h,u,p){if(h.type==="raw"&&p&&typeof u=="number")return o?p.children.splice(u,1):p.children[u]={type:"text",value:h.value},u;if(h.type==="element"){let d;for(d in Kt)if(Object.hasOwn(Kt,d)&&Object.hasOwn(h.properties,d)){const g=h.properties[d],b=Kt[d];(b===null||b.includes(h.tagName))&&(h.properties[d]=s(String(g||""),d,h))}}if(h.type==="element"){let d=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!d&&r&&typeof u=="number"&&(d=!r(h,u,p)),d&&p&&typeof u=="number")return l&&h.children?p.children.splice(u,1,...h.children):p.children.splice(u,1),u}}}function Fu(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ou.test(e.slice(0,t))?e:""}function _r(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Yu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hu(e,t,n){const i=_t((n||{}).ignore||[]),a=Gu(t);let o=-1;for(;++o<a.length;)na(e,"text",l);function l(c,h){let u=-1,p;for(;++u<h.length;){const d=h[u],g=p?p.children:void 0;if(i(d,g?g.indexOf(d):void 0,p))return;p=d}if(p)return s(c,h)}function s(c,h){const u=h[h.length-1],p=a[o][0],d=a[o][1];let g=0;const M=u.children.indexOf(c);let x=!1,N=[];p.lastIndex=0;let w=p.exec(c.value);for(;w;){const E=w.index,A={index:w.index,input:w.input,stack:[...h,c]};let B=d(...w,A);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1)p.lastIndex=E+1;else{if(g!==E&&j({type:"text",value:c.value.slice(g,E)}),Array.isArray(B))for(const G of B)j(G);else B&&j(B);g=E+w[0].length,x=!0}if(!p.global)break;w=p.exec(c.value)}return x?(g<c.value.length&&j({type:"text",value:c.value.slice(g)}),u.children.splice(M,1,...N)):N=[c],M+N.length;function j(E){const A=N[N.length-1];A&&A.type==="text"&&E.type==="text"?A.value+=E.value:N.push(E)}}}function Gu(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Vu(i[0]),qu(i[1])])}return t}function Vu(e){return typeof e=="string"?new RegExp(Yu(e),"g"):e}function qu(e){return typeof e=="function"?e:function(){return e}}const cn="phrasing",un=["autolink","link","image","label"];function Zu(){return{transforms:[eh],enter:{literalAutolink:Wu,literalAutolinkEmail:hn,literalAutolinkHttp:hn,literalAutolinkWww:hn},exit:{literalAutolink:$u,literalAutolinkEmail:Ku,literalAutolinkHttp:Ju,literalAutolinkWww:Xu}}}function _u(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cn,notInConstruct:un},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cn,notInConstruct:un},{character:":",before:"[ps]",after:"\\/",inConstruct:cn,notInConstruct:un}]}}function Wu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hn(e){this.config.enter.autolinkProtocol.call(this,e)}function Ju(e){this.config.exit.autolinkProtocol.call(this,e)}function Xu(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ku(e){this.config.exit.autolinkEmail.call(this,e)}function $u(e){this.exit(e)}function eh(e){Hu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,th],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nh]],{ignore:["link","linkReference"]})}function th(e,t,n,r,i){let a="";if(!aa(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!rh(n)))return!1;const o=ih(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function nh(e,t,n,r){return!aa(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rh(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ih(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=_r(e,"(");let a=_r(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function aa(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xe(n)||Vt(n))&&(!t||n!==47)}oa.peek=ph;function ah(){this.buffer()}function oh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lh(){this.buffer()}function sh(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ch(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Le(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uh(e){this.exit(e)}function hh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Le(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dh(e){this.exit(e)}function ph(){return"["}function oa(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function fh(){return{enter:{gfmFootnoteCallString:ah,gfmFootnoteCall:oh,gfmFootnoteDefinitionLabelString:lh,gfmFootnoteDefinition:sh},exit:{gfmFootnoteCallString:ch,gfmFootnoteCall:uh,gfmFootnoteDefinitionLabelString:hh,gfmFootnoteDefinition:dh}}}function gh(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:oa},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const l=a.createTracker(o);let s=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return s+=l.move(a.safe(a.associationId(r),{before:s,after:"]"})),h(),s+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),s+=l.move((t?`
|
|
18
|
-
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?la:mh))),c(),s}}function mh(e,t,n){return t===0?e:la(e,t,n)}function la(e,t,n){return(n?"":" ")+e}const bh=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kn.attention=wh;Kn.peek=Ih;function xh(){return{canContainEols:["delete"],enter:{strikethrough:Mh},exit:{strikethrough:kh}}}function yh(){return{handlers:{delete:Kn},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bh}]}}function Mh(e){this.enter({type:"delete",children:[],position:void 0},e)}function kh(e){this.exit(e)}function Kn(e,t,n,r){const i=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let l=i.move(a);return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move(a),o(),l}function wh(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Ih(){return"~"}function Nh(e){return e.length}function Ah(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Nh,a=[],o=[],l=[],s=[];let c=0,h=-1;for(;++h<e.length;){const
|
|
17
|
+
`},i),a}function pu(e,t){return e&&"run"in e?async function(n,r){const i=Or(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Or(n,{file:r,...e||t})}}function Rr(e){if(e)throw e}var Rt=Object.prototype.hasOwnProperty,ra=Object.prototype.toString,Pr=Object.defineProperty,Ur=Object.getOwnPropertyDescriptor,Br=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ra.call(t)==="[object Array]"},Qr=function(t){if(!t||ra.call(t)!=="[object Object]")return!1;var n=Rt.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Rt.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i=="undefined"||Rt.call(t,i)},Fr=function(t,n){Pr&&n.name==="__proto__"?Pr(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Yr=function(t,n){if(n==="__proto__")if(Rt.call(t,n)){if(Ur)return Ur(t,n).value}else return;return t[n]},fu=function e(){var t,n,r,i,a,o,l=arguments[0],s=1,c=arguments.length,h=!1;for(typeof l=="boolean"&&(h=l,l=arguments[1]||{},s=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});s<c;++s)if(t=arguments[s],t!=null)for(n in t)r=Yr(l,n),i=Yr(t,n),l!==i&&(h&&i&&(Qr(i)||(a=Br(i)))?(a?(a=!1,o=r&&Br(r)?r:[]):o=r&&Qr(r)?r:{},Fr(l,{name:n,newValue:e(h,o,i)})):typeof i!="undefined"&&Fr(l,{name:n,newValue:i}));return l};const tn=Ei(fu);function En(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function gu(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(s,...c){const h=e[++a];let u=-1;if(s){o(s);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,h?mu(h,l)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function mu(e,t){let n;return r;function r(...o){const l=e.length>o.length;let s;l&&o.push(i);try{s=e.apply(this,o)}catch(c){const h=c;if(l&&n)throw h;return i(h)}l||(s&&s.then&&typeof s.then=="function"?s.then(a,i):s instanceof Error?i(s):a(s))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const Re={basename:bu,dirname:xu,extname:yu,join:Mu,sep:"/"};function bu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');It(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function xu(e){if(It(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function yu(e){It(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Mu(...e){let t=-1,n;for(;++t<e.length;)It(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ku(n)}function ku(e){It(e);const t=e.codePointAt(0)===47;let n=wu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function wu(e,t){let n="",r=0,i=-1,a=0,o=-1,l,s;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function It(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Iu={cwd:Nu};function Nu(){return"/"}function Sn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Au(e){if(typeof e=="string")e=new URL(e);else if(!Sn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Du(e)}function Du(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const nn=["history","path","basename","stem","extname","dirname"];class ia{constructor(t){let n;t?Sn(t)?n={path:t}:typeof t=="string"||Eu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Iu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nn.length;){const a=nn[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)nn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Re.basename(this.path):void 0}set basename(t){an(t,"basename"),rn(t,"basename"),this.path=Re.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Re.dirname(this.path):void 0}set dirname(t){Hr(this.basename,"dirname"),this.path=Re.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Re.extname(this.path):void 0}set extname(t){if(rn(t,"extname"),Hr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Re.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Sn(t)&&(t=Au(t)),an(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Re.basename(this.path,this.extname):void 0}set stem(t){an(t,"stem"),rn(t,"stem"),this.path=Re.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ye(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function rn(e,t){if(e&&e.includes(Re.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Re.sep+"`")}function an(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Eu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Su=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},Tu={}.hasOwnProperty;class Xn extends Su{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=gu()}copy(){const t=new Xn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(tn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sn("data",this.frozen),this.namespace[t]=n,this):Tu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=vt(t),r=this.parser||this.Parser;return on("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),on("process",this.parser||this.Parser),ln("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=vt(t),s=r.parse(l);r.run(s,l,function(h,u,p){if(h||!u||!p)return c(h);const d=u,g=r.stringify(d,p);vu(g)?p.value=g:p.result=g,c(h,p)});function c(h,u){h||!u?o(h):a?a(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),on("processSync",this.parser||this.Parser),ln("processSync",this.compiler||this.Compiler),this.process(t,i),Vr("processSync","process",n),r;function i(a,o){n=!0,Rr(a),r=o}}run(t,n,r){Gr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const s=vt(n);i.run(t,s,c);function c(h,u,p){const d=u||t;h?l(h):o?o(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Vr("runSync","run",r),i;function a(o,l){Rr(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=vt(n),i=this.compiler||this.Compiler;return ln("stringify",i),Gr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(sn("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")s(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...u]=c;s(h,u)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=tn(!0,i.settings,c.settings))}function l(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const u=c[h];a(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function s(c,h){let u=-1,p=-1;for(;++u<r.length;)if(r[u][0]===c){p=u;break}if(p===-1)r.push([c,...h]);else if(h.length>0){let[d,...g]=h;const M=r[p][1];En(M)&&En(d)&&(d=tn(!0,M,d)),r[p]=[c,d,...g]}}}}const ju=new Xn().freeze();function on(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ln(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Gr(e){if(!En(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vt(e){return zu(e)?e:new ia(e)}function zu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vu(e){return typeof e=="string"||Lu(e)}function Lu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Cu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qr=[],Zr={allowDangerousHtml:!0},Ou=/^(https?|ircs?|mailto|xmpp)$/i,Ru=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Pu(e){const t=Uu(e),n=Bu(e);return Qu(t.runSync(t.parse(n),n),e)}function Uu(e){const t=e.rehypePlugins||qr,n=e.remarkPlugins||qr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Zr}:Zr;return ju().use(bc).use(n).use(pu,r).use(t)}function Bu(e){const t=e.children||"",n=new ia;return typeof t=="string"&&(n.value=t),n}function Qu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||Fu;for(const h of Ru)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Cu+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jn(e,c),tl(e,{Fragment:y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function c(h,u,p){if(h.type==="raw"&&p&&typeof u=="number")return o?p.children.splice(u,1):p.children[u]={type:"text",value:h.value},u;if(h.type==="element"){let d;for(d in Kt)if(Object.hasOwn(Kt,d)&&Object.hasOwn(h.properties,d)){const g=h.properties[d],M=Kt[d];(M===null||M.includes(h.tagName))&&(h.properties[d]=s(String(g||""),d,h))}}if(h.type==="element"){let d=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!d&&r&&typeof u=="number"&&(d=!r(h,u,p)),d&&p&&typeof u=="number")return l&&h.children?p.children.splice(u,1,...h.children):p.children.splice(u,1),u}}}function Fu(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ou.test(e.slice(0,t))?e:""}function _r(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Yu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hu(e,t,n){const i=_t((n||{}).ignore||[]),a=Gu(t);let o=-1;for(;++o<a.length;)na(e,"text",l);function l(c,h){let u=-1,p;for(;++u<h.length;){const d=h[u],g=p?p.children:void 0;if(i(d,g?g.indexOf(d):void 0,p))return;p=d}if(p)return s(c,h)}function s(c,h){const u=h[h.length-1],p=a[o][0],d=a[o][1];let g=0;const x=u.children.indexOf(c);let b=!1,A=[];p.lastIndex=0;let I=p.exec(c.value);for(;I;){const D=I.index,N={index:I.index,input:I.input,stack:[...h,c]};let B=d(...I,N);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1)p.lastIndex=D+1;else{if(g!==D&&j({type:"text",value:c.value.slice(g,D)}),Array.isArray(B))for(const F of B)j(F);else B&&j(B);g=D+I[0].length,b=!0}if(!p.global)break;I=p.exec(c.value)}return b?(g<c.value.length&&j({type:"text",value:c.value.slice(g)}),u.children.splice(x,1,...A)):A=[c],x+A.length;function j(D){const N=A[A.length-1];N&&N.type==="text"&&D.type==="text"?N.value+=D.value:A.push(D)}}}function Gu(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Vu(i[0]),qu(i[1])])}return t}function Vu(e){return typeof e=="string"?new RegExp(Yu(e),"g"):e}function qu(e){return typeof e=="function"?e:function(){return e}}const cn="phrasing",un=["autolink","link","image","label"];function Zu(){return{transforms:[eh],enter:{literalAutolink:Wu,literalAutolinkEmail:hn,literalAutolinkHttp:hn,literalAutolinkWww:hn},exit:{literalAutolink:$u,literalAutolinkEmail:Ku,literalAutolinkHttp:Ju,literalAutolinkWww:Xu}}}function _u(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cn,notInConstruct:un},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cn,notInConstruct:un},{character:":",before:"[ps]",after:"\\/",inConstruct:cn,notInConstruct:un}]}}function Wu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hn(e){this.config.enter.autolinkProtocol.call(this,e)}function Ju(e){this.config.exit.autolinkProtocol.call(this,e)}function Xu(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ku(e){this.config.exit.autolinkEmail.call(this,e)}function $u(e){this.exit(e)}function eh(e){Hu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,th],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nh]],{ignore:["link","linkReference"]})}function th(e,t,n,r,i){let a="";if(!aa(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!rh(n)))return!1;const o=ih(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function nh(e,t,n,r){return!aa(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rh(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ih(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=_r(e,"(");let a=_r(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function aa(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xe(n)||Vt(n))&&(!t||n!==47)}oa.peek=ph;function ah(){this.buffer()}function oh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lh(){this.buffer()}function sh(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ch(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Le(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uh(e){this.exit(e)}function hh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Le(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dh(e){this.exit(e)}function ph(){return"["}function oa(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function fh(){return{enter:{gfmFootnoteCallString:ah,gfmFootnoteCall:oh,gfmFootnoteDefinitionLabelString:lh,gfmFootnoteDefinition:sh},exit:{gfmFootnoteCallString:ch,gfmFootnoteCall:uh,gfmFootnoteDefinitionLabelString:hh,gfmFootnoteDefinition:dh}}}function gh(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:oa},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const l=a.createTracker(o);let s=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return s+=l.move(a.safe(a.associationId(r),{before:s,after:"]"})),h(),s+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),s+=l.move((t?`
|
|
18
|
+
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?la:mh))),c(),s}}function mh(e,t,n){return t===0?e:la(e,t,n)}function la(e,t,n){return(n?"":" ")+e}const bh=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kn.attention=wh;Kn.peek=Ih;function xh(){return{canContainEols:["delete"],enter:{strikethrough:Mh},exit:{strikethrough:kh}}}function yh(){return{handlers:{delete:Kn},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bh}]}}function Mh(e){this.enter({type:"delete",children:[],position:void 0},e)}function kh(e){this.exit(e)}function Kn(e,t,n,r){const i=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let l=i.move(a);return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move(a),o(),l}function wh(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Ih(){return"~"}function Nh(e){return e.length}function Ah(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Nh,a=[],o=[],l=[],s=[];let c=0,h=-1;for(;++h<e.length;){const M=[],x=[];let b=-1;for(e[h].length>c&&(c=e[h].length);++b<e[h].length;){const A=Dh(e[h][b]);if(n.alignDelimiters!==!1){const I=i(A);x[b]=I,(s[b]===void 0||I>s[b])&&(s[b]=I)}M.push(A)}o[h]=M,l[h]=x}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<c;)a[u]=Wr(r[u]);else{const M=Wr(r);for(;++u<c;)a[u]=M}u=-1;const p=[],d=[];for(;++u<c;){const M=a[u];let x="",b="";M===99?(x=":",b=":"):M===108?x=":":M===114&&(b=":");let A=n.alignDelimiters===!1?1:Math.max(1,s[u]-x.length-b.length);const I=x+"-".repeat(A)+b;n.alignDelimiters!==!1&&(A=x.length+A+b.length,A>s[u]&&(s[u]=A),d[u]=A),p[u]=I}o.splice(1,0,p),l.splice(1,0,d),h=-1;const g=[];for(;++h<o.length;){const M=o[h],x=l[h];u=-1;const b=[];for(;++u<c;){const A=M[u]||"";let I="",j="";if(n.alignDelimiters!==!1){const D=s[u]-(x[u]||0),N=a[u];N===114?I=" ".repeat(D):N===99?D%2?(I=" ".repeat(D/2+.5),j=" ".repeat(D/2-.5)):(I=" ".repeat(D/2),j=I):j=" ".repeat(D)}n.delimiterStart!==!1&&!u&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||u)&&b.push(" "),n.alignDelimiters!==!1&&b.push(I),b.push(A),n.alignDelimiters!==!1&&b.push(j),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||u!==c-1)&&b.push("|")}g.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return g.join(`
|
|
19
19
|
`)}function Dh(e){return e==null?"":String(e)}function Wr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Eh=_t(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sh(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),Th);return i(),o}function Th(e,t,n){return">"+(n?"":" ")+e}function jh(e,t){return Jr(e,t.inConstruct,!0)&&!Jr(e,t.notInConstruct,!1)}function Jr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Xr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const a=n.unsafe[i];if(a.character===`
|
|
20
20
|
`&&!a.before&&!a.after&&jh(n.stack,a))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
21
21
|
`}function zh(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function vh(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Lh(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Ch(e,t,n,r){const i=Lh(n),a=e.value||"";if(vh(e,n)){const u=n.enter("codeIndented"),p=n.indentLines(a,Oh);return u(),p}const o=n.createTracker(r),l=i.repeat(Math.max(zh(a,i)+1,3)),s=n.enter("codeFenced"),c=i==="`"?"GraveAccent":"Tilde";let h=o.move(l);if(e.lang){const u=n.enter(`codeFencedLang${c}`);h+=o.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),u()}if(e.lang&&e.meta){const u=n.enter(`codeFencedMeta${c}`);h+=o.move(" "),h+=o.move(n.safe(e.meta,{before:h,after:`
|
|
@@ -28,9 +28,9 @@ Feel free to ask me anything`,welcomeDescription:"Ask me about render tasks, ass
|
|
|
28
28
|
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
29
29
|
`))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),s=n.enter("phrasing");a.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
30
30
|
`,...a.current()});const h=c.charCodeAt(0);return(h===9||h===32)&&(c=Qh(h)+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),s(),l(),c}sa.peek=Hh;function sa(e){return e.value||""}function Hh(){return"<"}ca.peek=Gh;function ca(e,t,n,r){const i=$n(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");return c+=s.move(n.safe(e.alt,{before:c,after:"]",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),o(),c}function Gh(){return"!"}ua.peek=Vh;function ua(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let s=l.move("![");const c=n.safe(e.alt,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),o();const h=n.stack;n.stack=h.filter(function(p){return p!=="phrasing"}),o=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!c||c!==u?s+=l.move(u+"]"):i==="shortcut"?s=s.slice(0,-1):s+=l.move("]"),s}function Vh(){return"!"}ha.peek=qh;function ha(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);if(!o.atBreak)continue;let s;for(;s=l.exec(r);){let c=s.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(s.index+1)}}return i+r+i}function qh(){return"`"}function da(e,t){const n=Hn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}pa.peek=Zh;function pa(e,t,n,r){const i=$n(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);if(da(e,n)){const h=n.stack;n.stack=h.filter(function(d){return d!=="phrasing"});const u=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),u(),n.stack=h,p}const l=n.enter("link");let s=n.enter("label"),c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(s=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),s()),c+=o.move(")"),l(),c}function Zh(e,t,n){return da(e,n)?"<":"["}fa.peek=_h;function fa(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let s=l.move("[");const c=n.containerPhrasing(e,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),o();const h=n.stack;n.stack=h.filter(function(p){return p!=="phrasing"}),o=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!c||c!==u?s+=l.move(u+"]"):i==="shortcut"?s=s.slice(0,-1):s+=l.move("]"),s}function _h(){return"["}function tr(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Wh(e){const t=tr(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Jh(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ga(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Xh(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?Jh(n):tr(n);const l=e.ordered?o==="."?")":".":Wh(n);let s=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),ga(n)===o&&h){let u=-1;for(;++u<e.children.length;){const p=e.children[u];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(o=l),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c}function Kh(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function $h(e,t,n,r){const i=Kh(n);let a=n.bulletCurrent||tr(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),h);return s(),c;function h(u,p,d){return p?(d?"":" ".repeat(o))+u:(d?a:a+" ".repeat(o-a.length))+u}}function ed(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}function td(e,t,n,r){if(!e.children.some(function(l){return Eh(l)}))return n.containerFlow(e,r);const a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),o}function nd(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}nr.attention=rd;nr.peek=id;function nr(e,t,n,r){const i=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return i(),a}function rd(e,t){return{construct:"strong",markers:nd(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function id(e,t,n){return n.options.strong||"*"}function ad(e,t,n,r){const i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function od(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ld(e,t,n){const r=(ga(n)+(n.options.ruleSpaces?" ":"")).repeat(od(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ma={blockquote:Sh,break:Xr,code:Ch,definition:Rh,emphasis:er,hardBreak:Xr,heading:Yh,html:sa,image:ca,imageReference:ua,inlineCode:ha,link:pa,linkReference:fa,list:Xh,listItem:$h,paragraph:ed,root:td,strong:nr,text:ad,thematicBreak:ld};function sd(){return{enter:{table:cd,tableData:Kr,tableHeader:Kr,tableRow:hd},exit:{codeText:dd,table:ud,tableData:dn,tableHeader:dn,tableRow:dn}}}function cd(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ud(e){this.exit(e),this.data.inTable=void 0}function hd(e){this.enter({type:"tableRow",children:[]},e)}function dn(e){this.exit(e)}function Kr(e){this.enter({type:"tableCell",children:[]},e)}function dd(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pd));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pd(e,t){return t==="|"?t:e}function fd(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
31
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:s,tableRow:l}};function o(d,g,
|
|
32
|
-
`))}function s(d,g,b,M){const x=b.enter("tableCell"),N=b.enter("phrasing"),w=b.containerPhrasing(d,{...M,before:a,after:a});return N(),x(),w}function c(d,g){return Ah(d,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function h(d,g,b){const M=d.children;let x=-1;const N=[],w=g.enter("table");for(;++x<M.length;)N[x]=u(M[x],g,b);return w(),N}function u(d,g,b){const M=d.children;let x=-1;const N=[],w=g.enter("tableRow");for(;++x<M.length;)N[x]=s(M[x],d,g,b);return w(),N}function p(d,g,b){let M=ma.inlineCode(d,g,b);return b.stack.includes("tableCell")&&(M=M.replace(/\|/g,"\\$&")),M}}function gd(){return{exit:{taskListCheckValueChecked:$r,taskListCheckValueUnchecked:$r,paragraph:bd}}}function md(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xd}}}function $r(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bd(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function xd(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let s=ma.listItem(e,t,n,{...r,...l.current()});return a&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),s;function c(h){return h+o}}function yd(){return[Zu(),fh(),xh(),sd(),gd()]}function Md(e){return{extensions:[_u(),gh(e),yh(),fd(e),md()]}}const kd={tokenize:Ed,partial:!0},ba={tokenize:Sd,partial:!0},xa={tokenize:Td,partial:!0},ya={tokenize:jd,partial:!0},wd={tokenize:zd,partial:!0},Ma={name:"wwwAutolink",tokenize:Ad,previous:wa},ka={name:"protocolAutolink",tokenize:Dd,previous:Ia},Ye={name:"emailAutolink",tokenize:Nd,previous:Na},Pe={};function Id(){return{text:Pe}}let qe=48;for(;qe<123;)Pe[qe]=Ye,qe++,qe===58?qe=65:qe===91&&(qe=97);Pe[43]=Ye;Pe[45]=Ye;Pe[46]=Ye;Pe[95]=Ye;Pe[72]=[Ye,ka];Pe[104]=[Ye,ka];Pe[87]=[Ye,Ma];Pe[119]=[Ye,Ma];function Nd(e,t,n){const r=this;let i,a;return o;function o(u){return!Tn(u)||!Na.call(r,r.previous)||rr(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(u))}function l(u){return Tn(u)?(e.consume(u),l):u===64?(e.consume(u),s):n(u)}function s(u){return u===46?e.check(wd,h,c)(u):u===45||u===95||xe(u)?(a=!0,e.consume(u),s):h(u)}function c(u){return e.consume(u),i=!0,s}function h(u){return a&&i&&we(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function Ad(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!wa.call(r,r.previous)||rr(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(kd,e.attempt(ba,e.attempt(xa,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Dd(e,t,n){const r=this;let i="",a=!1;return o;function o(u){return(u===72||u===104)&&Ia.call(r,r.previous)&&!rr(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),l):n(u)}function l(u){if(we(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),l;if(u===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(u),s}return n(u)}function s(u){return u===47?(e.consume(u),a?c:(a=!0,s)):n(u)}function c(u){return u===null||Ut(u)||oe(u)||Xe(u)||Vt(u)?n(u):e.attempt(ba,e.attempt(xa,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function Ed(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function Sd(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(ya,s,l)(c):c===null||oe(c)||Xe(c)||c!==45&&Vt(c)?s(c):(a=!0,e.consume(c),o)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function s(c){return i||r||!a?n(c):t(c)}}function Td(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ya,t,a)(o):o===null||oe(o)||Xe(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function jd(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||oe(l)||Xe(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||oe(l)||Xe(l)?t(l):r(l)}function a(l){return we(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):we(l)?(e.consume(l),o):n(l)}}function zd(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return xe(a)?n(a):t(a)}}function wa(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function Ia(e){return!we(e)}function Na(e){return!(e===47||Tn(e))}function Tn(e){return e===43||e===45||e===46||e===95||xe(e)}function rr(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const vd={tokenize:Qd,partial:!0};function Ld(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pd,continuation:{tokenize:Ud},exit:Bd}},text:{91:{name:"gfmFootnoteCall",tokenize:Rd},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cd,resolveTo:Od}}}}function Cd(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){o=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return l;function l(s){if(!o||!o._balanced)return n(s);const c=Le(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Od(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Rd(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),s}function s(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(a>999||u===93&&!o||u===null||u===91||oe(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Le(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return oe(u)||(o=!0),a++,e.consume(u),u===92?h:c}function h(u){return u===91||u===92||u===93?(e.consume(u),a++,c):c(u)}}function Pd(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(o>999||g===93&&!l||g===null||g===91||oe(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=Le(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return oe(g)||(l=!0),o++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),ee(e,d,"gfmFootnoteDefinitionWhitespace")):n(g)}function d(g){return t(g)}}function Ud(e,t,n){return e.check(wt,t,e.attempt(vd,t,n))}function Bd(e){e.exit("gfmFootnoteDefinition")}function Qd(e,t,n){const r=this;return ee(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function Fd(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let s=-1;for(;++s<o.length;)if(o[s][0]==="enter"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._close){let c=s;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[s][1].end.offset-o[s][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[s][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[s][1].end)},u={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[s][1].start)},p=[["enter",h,l],["enter",o[c][1],l],["exit",o[c][1],l],["enter",u,l]],d=l.parser.constructs.insideSpan.null;d&&ve(p,p.length,0,qt(d,o.slice(c+1,s),l)),ve(p,p.length,0,[["exit",u,l],["enter",o[s][1],l],["exit",o[s][1],l],["exit",h,l]]),ve(o,c-1,s-c+3,p),s=c+p.length-2;break}}for(s=-1;++s<o.length;)o[s][1].type==="strikethroughSequenceTemporary"&&(o[s][1].type="data");return o}function a(o,l,s){const c=this.previous,h=this.events;let u=0;return p;function p(g){return c===126&&h[h.length-1][1].type!=="characterEscape"?s(g):(o.enter("strikethroughSequenceTemporary"),d(g))}function d(g){const b=Qt(c);if(g===126)return u>1?s(g):(o.consume(g),u++,d);if(u<2&&!n)return s(g);const M=o.exit("strikethroughSequenceTemporary"),x=Qt(g);return M._open=!x||x===2&&!!b,M._close=!b||b===2&&!!x,l(g)}}}class Yd{constructor(){this.map=[],this.index=new Map}add(t,n,r){Hd(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0,this.index.clear()}}function Hd(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Gd(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Vd(){return{flow:{null:{name:"table",tokenize:qd,resolveAll:Zd}}}}function qd(e,t,n){const r=this;let i=0,a=0,o;return l;function l(k){let L=r.events.length-1;for(;L>-1;){const{type:S}=r.events[L][1];if(S==="lineEnding"||S==="linePrefix")L--;else break}const U=L>-1?r.events[L][1].type:null,q=U==="tableHead"||U==="tableRow"?A:s;return q===A&&r.parser.lazy[r.now().line]?n(k):q(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(o=!0,a+=1),h(k)}function h(k){return k===null?n(k):H(k)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),d):n(k):J(k)?ee(e,h,"whitespace")(k):(a+=1,o&&(o=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),u(k)))}function u(k){return k===null||k===124||oe(k)?(e.exit("data"),h(k)):(e.consume(k),k===92?p:u)}function p(k){return k===92||k===124?(e.consume(k),u):u(k)}function d(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),o=!1,J(k)?ee(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):g(k))}function g(k){return k===45||k===58?M(k):k===124?(o=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),b):E(k)}function b(k){return J(k)?ee(e,M,"whitespace")(k):M(k)}function M(k){return k===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(a+=1,x(k)):k===null||H(k)?j(k):E(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),N(k)):E(k)}function N(k){return k===45?(e.consume(k),N):k===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(k))}function w(k){return J(k)?ee(e,j,"whitespace")(k):j(k)}function j(k){return k===124?g(k):k===null||H(k)?!o||i!==a?E(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):E(k)}function E(k){return n(k)}function A(k){return e.enter("tableRow"),B(k)}function B(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),B):k===null||H(k)?(e.exit("tableRow"),t(k)):J(k)?ee(e,B,"whitespace")(k):(e.enter("data"),G(k))}function G(k){return k===null||k===124||oe(k)?(e.exit("data"),B(k)):(e.consume(k),k===92?_:G)}function _(k){return k===92||k===124?(e.consume(k),G):G(k)}}function Zd(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,s=0,c,h,u;const p=new Yd;for(;++n<e.length;){const d=e[n],g=d[1];d[0]==="enter"?g.type==="tableHead"?(l=!1,s!==0&&(ei(p,t,s,c,h),h=void 0,s=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,u=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),i=g.type==="tableDelimiterRow"?2:h?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],u=Lt(p,t,a,i,void 0,u),a=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],u=Lt(p,t,a,i,void 0,u)),a=o,o=[a[1],n,0,0])):g.type==="tableHead"?(l=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,a[1]!==0?(o[0]=o[1],u=Lt(p,t,a,i,n,u)):o[1]!==0&&(u=Lt(p,t,o,i,n,u)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(s!==0&&ei(p,t,s,c,h),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Gd(t.events,n))}return e}function Lt(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},nt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=nt(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=nt(t.events,n[2]),h=nt(t.events,n[3]),u={type:l,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return i!==void 0&&(a.end=Object.assign({},nt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ei(e,t,n,r,i){const a=[],o=nt(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function nt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _d={name:"tasklistCheck",tokenize:Jd};function Wd(){return{text:{91:_d}}}function Jd(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),a)}function a(s){return oe(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),o):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),o):n(s)}function o(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(s)}function l(s){return H(s)?t(s):J(s)?e.check({tokenize:Xd},t,n)(s):n(s)}}function Xd(e,t,n){return ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Kd(e){return Oi([Id(),Ld(),Fd(e),Vd(),Wd()])}const $d={};function ep(e){const t=this,n=e||$d,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Kd(n)),a.push(yd()),o.push(Md(n))}function tp(e){return{a:({href:t,children:n})=>np(t)?y.jsx("a",{className:"rb-chat-markdown-link",href:t,target:"_blank",rel:"noopener noreferrer",children:n}):y.jsx("span",{children:n}),img:({src:t,alt:n})=>!t||!rp(t)?null:e?y.jsx("button",{type:"button",className:"rb-chat-markdown-image-button","aria-label":n!=null?n:"",onClick:r=>e(t,r),children:y.jsx("img",{src:t,alt:n!=null?n:"",style:{maxWidth:"100%"}})}):y.jsx("img",{src:t,alt:n!=null?n:"",style:{maxWidth:"100%"}}),code:({children:t,className:n})=>y.jsx("code",{className:n,children:t})}}function pn({children:e,className:t,onImageClick:n}){return y.jsx(Pu,{className:t,remarkPlugins:[ep],components:tp(n),children:e})}function np(e){if(!e)return!1;try{const t=new URL(e,window.location.href).protocol;return t==="http:"||t==="https:"||t==="mailto:"}catch(t){return!1}}function rp(e){if(!e)return!1;try{return new URL(e,window.location.href).protocol==="https:"}catch(t){return!1}}const ti="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0IiB2aWV3Qm94PSIwIDAgMTQgMTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9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4IDcuMzk4NTcgMS43NSA3LjE0NjM0IDEuNzUgNi44ODMzM1Y0LjJDMS43NSAzLjkzNjk5IDEuODU0NDggMy42ODQ3NiAyLjA0MDQ1IDMuNDk4NzlDMi4yMjY0MyAzLjMxMjgxIDIuNDc4NjYgMy4yMDgzMyAyLjc0MTY3IDMuMjA4MzNINC4yVjMuOTY2NjdNNC4yIDcuODc1TDUuOTUgMTEuNDMzM0M2LjAzNDU4IDExLjU5MTkgNi4xNjA2NyAxMS43MjQ1IDYuMzE0NzkgMTEuODE3QzYuNDY4OTEgMTEuOTA5NSA2LjY0NTI3IDExLjk1ODMgNi44MjUgMTEuOTU4M1Y5LjMzMzMzSDEwLjQ0MTdDMTAuNTk1NiA5LjMzNTQ5IDEwLjc0ODEgOS4zMDM3NyAxMC44ODg0IDkuMjQwNDJDMTEuMDI4NyA5LjE3NzA4IDExLjE1MzQgOS4wODM2NSAxMS4yNTM2IDguOTY2NzdDMTEuMzUzOCA4Ljg0OTg4IDExLjQyNyA4LjcxMjQgMTEuNDY4MiA4LjU2NDA1QzExLjUwOTMgOC40MTU3IDExLjUxNzMgOC4yNjAxMiAxMS40OTE3IDguMTA4MzNMMTEuMDgzMyA0LjlDMTEuMDU0NSA0LjY0MjIxIDEwLjkzMTMgNC40MDQyIDEwLjczNzQgNC4yMzE4N0MxMC41NDM1IDQuMDU5NTMgMTAuMjkyNyAzLjk2NTA2IDEwLjAzMzMgMy45NjY2N0g0LjIiIHN0cm9rZS13aWR0aD0iMC45MzMzMzMiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZT0iI0MwNEM0MSIvPgo8L2c+Cjwvc3ZnPgo=",up=314,hp=260,Ge=8;function dp({open:e,anchor:t,children:n,container:r,className:i="rb-chat-feedback-popover",onClose:a}){const{theme:o}=at(),[l,s]=O.useState(null),[c,h]=O.useState(!1),u=O.useRef(null),p=O.useCallback(M=>{u.current=M,h(M!==null)},[]),d=t==null?void 0:t.getRootNode(),g=r!=null?r:d instanceof DocumentFragment?d:void 0;if(O.useLayoutEffect(()=>{if(!e||!t){s(N=>N===null?N:null);return}const M=()=>{var k,L;const N=t.getBoundingClientRect(),w=((k=u.current)==null?void 0:k.offsetWidth)||up,j=((L=u.current)==null?void 0:L.offsetHeight)||hp,E=Math.min(Math.max(Ge,N.left),Math.max(Ge,window.innerWidth-w-Ge)),B=N.top-Ge>=j?N.top-j-8:N.bottom+8,G=Math.max(Ge,window.innerHeight-j-Ge),_=Math.min(Math.max(Ge,B),G);s(U=>(U==null?void 0:U.left)===E&&U.top===_?U:{left:E,top:_})};M(),window.addEventListener("resize",M),document.addEventListener("scroll",M,!0);const x=typeof ResizeObserver=="undefined"?null:new ResizeObserver(M);return u.current&&(x==null||x.observe(u.current)),()=>{window.removeEventListener("resize",M),document.removeEventListener("scroll",M,!0),x==null||x.disconnect()}},[t,e,c]),O.useEffect(()=>{if(!e||!a)return;const M=N=>{N.key==="Escape"&&(N.stopPropagation(),a())},x=N=>{const w=N.composedPath();t&&w.includes(t)||u.current&&w.includes(u.current)||a()};return document.addEventListener("keydown",M),document.addEventListener("mousedown",x),()=>{document.removeEventListener("keydown",M),document.removeEventListener("mousedown",x)}},[t,i,a,e]),!e||!t||!l)return null;const b={left:l.left,top:l.top,maxHeight:`calc(100vh - ${Ge*2}px)`};return y.jsx(Cn,{anchor:t,container:g,children:y.jsx("div",{ref:p,className:i,"data-theme":o,role:"dialog","aria-modal":"false",style:b,onMouseDown:M=>M.stopPropagation(),children:n})})}async function Aa(e){var n,r;try{if((n=navigator.clipboard)!=null&&n.writeText){await navigator.clipboard.writeText(e);return}}catch(i){}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{if(t.select(),!((r=document.execCommand)!=null&&r.call(document,"copy")))throw new Error("Clipboard is unavailable")}finally{t.remove()}}const ii="https://wpa1.qq.com/SV5t0IWb?_type=wpa&qidian=true",pp=O.memo(function({message:t,onCitationClick:n,onRetry:r,onFeedback:i}){var Nt,st,ct,At,Dt,Et,St,Tt,I,v;const{labels:a}=Fe(),{theme:o}=at(),l=O.useRef(null),s=O.useRef(null),[c,h]=O.useState(null),[u,p]=O.useState(!1),[d,g]=O.useState(null),[b,M]=O.useState(!1),[x,N]=O.useState(null),[w,j]=O.useState(!1),[E,A]=O.useState(!1),[B,G]=O.useState(!1),[_,k]=O.useState(""),[L,U]=O.useState(""),[q,S]=O.useState(!1),F=O.useRef(null),K=O.useRef(null),X=O.useRef(0),ne=O.useRef(0),ie=(st=(Nt=t.citations)==null?void 0:Nt.length)!=null?st:0,m=O.useRef(ie);O.useEffect(()=>{ie>1&&m.current<=1&&p(!1),m.current=ie},[ie]),O.useEffect(()=>()=>{X.current+=1,ne.current+=1,K.current&&clearTimeout(K.current)},[]);const D=async C=>{const Q=++X.current;h(C),N(null),M(!0);try{const ce=await(n==null?void 0:n(t.id,C.citation_id));Q===X.current&&ce&&h(ce)}catch(ce){Q===X.current&&N(ce instanceof Error?ce.message:a.requestFailed)}finally{Q===X.current&&M(!1)}},z=()=>{X.current+=1,h(null),N(null),M(!1)},f=(C,Q)=>{s.current=C.currentTarget,g(Q)},V=(C,Q)=>{f(Q,C)},Y=async()=>{const C=++ne.current;j(!1),A(!1),K.current&&clearTimeout(K.current);try{if(await Aa(t.text),C!==ne.current)return;j(!0),K.current=setTimeout(()=>j(!1),2e3)}catch(Q){C===ne.current&&A(!0)}},P=async(C,Q="")=>{if(!(!i||q)){S(!0);try{await i(t.id,C,Q),C==="dislike"&&G(!1)}finally{S(!1)}}},$=()=>{const C=_===a.feedbackOther?L.trim():_;C&&P("dislike",C)},te=_===a.feedbackOther,me=!!((ct=t.attachments)!=null&&ct.length),pe=t.status===se.COMPLETE||t.status===se.NO_EVIDENCE,Me=((At=t.error)==null?void 0:At.error_code)===it.KNOWLEDGE_BUSY,fe=Me||((Dt=t.retryCount)!=null?Dt:0)>0&&(t.status===se.AWAITING_RECOVERY||t.status===se.ERROR),ge=(St=(Et=t.feedback)==null?void 0:Et.rating)!=null?St:null,re=ge==="like"?ni:o==="dark"?lp:op,W=ge==="dislike"?ri:o==="dark"?cp:sp,he=[a.feedbackUnprofessional,a.feedbackUnresolved,a.feedbackMisunderstood,a.feedbackSlow,a.feedbackOther],De=()=>{if(ge==="dislike"){G(!1),k(""),U(""),P(null,"");return}G(!0)},Ue=(Tt=t.attachments)==null?void 0:Tt.map(C=>{var Q;return y.jsxs("div",{className:`rb-chat-message-attachment${C.kind==="image"?" is-image":""}`,children:[C.kind==="image"?y.jsx("button",{type:"button",className:"rb-chat-image-preview-button","aria-label":`${a.previewImage} ${C.filename}`,onClick:ce=>f(ce,C.content_url),children:y.jsx("img",{src:C.content_url,alt:C.filename})}):y.jsx("span",{className:"rb-chat-message-file-icon",children:((Q=C.filename.split(".").pop())==null?void 0:Q.toUpperCase())||"FILE"}),C.kind!=="image"?y.jsx("span",{className:"rb-chat-message-attachment-name",title:C.filename,children:C.filename}):null]},C.attachment_id)});return y.jsxs("div",{className:`rb-chat-message ${t.role}`,children:[t.role===Te.ASSISTANT?y.jsxs("div",{className:"rb-chat-identity",children:[y.jsx("img",{src:On,alt:""}),y.jsx("span",{children:a.assistantName})]}):null,y.jsxs("div",{className:"rb-chat-message-content",children:[t.role===Te.USER&&me?y.jsx("div",{className:"rb-chat-message-attachments",children:Ue}):null,t.role===Te.ASSISTANT||t.text?y.jsx("div",{className:`rb-chat-bubble${t.role===Te.ASSISTANT&&t.status===se.STREAMING&&!t.text.trim()?" is-loading":""}`,children:t.role===Te.ASSISTANT?t.text?y.jsx(pn,{children:t.text}):t.status===se.ERROR||t.status===se.AWAITING_RECOVERY?Me?a.knowledgeBusy:a.requestFailed:null:t.text}):null,t.role===Te.ASSISTANT&&ie?y.jsxs("div",{className:"rb-chat-citations",children:[ie>1?y.jsxs("button",{type:"button",className:"rb-chat-citations-toggle","aria-expanded":u,"aria-label":u?a.collapseCitations:a.expandCitations,onClick:()=>p(C=>!C),children:[y.jsx("span",{children:a.citations(ie)}),y.jsx("span",{className:`rb-chat-citations-toggle-icon${u?" is-expanded":""}`,"aria-hidden":"true"})]}):null,ie===1||u?y.jsx("div",{className:"rb-chat-citations-list",children:(I=t.citations)==null?void 0:I.map((C,Q)=>y.jsx("div",{className:"rb-chat-citation",children:y.jsxs("button",{ref:Q===0?l:void 0,type:"button",onClick:()=>void D(C),children:[y.jsx("span",{className:"rb-chat-citation-index",children:Q+1}),y.jsx("span",{className:"rb-chat-citation-copy",children:y.jsx("b",{children:C.title})})]})},C.citation_id))}):null]}):null,t.role===Te.ASSISTANT&&pe?y.jsxs("div",{ref:F,className:"rb-chat-message-tools",children:[y.jsxs("button",{type:"button",className:"rb-chat-tool-button rb-chat-copy-button",onClick:()=>void Y(),children:[y.jsx("img",{className:"rb-chat-copy-icon",src:ti,style:{"--rb-chat-copy-light":`url(${ti})`,"--rb-chat-copy-dark":`url(${ap})`,"--rb-chat-copy-hover":`url(${ip})`},alt:""}),w?a.copied:a.copy]}),E?y.jsx("span",{className:"rb-chat-error",role:"status",children:a.copyFailed}):null,i?y.jsxs("button",{type:"button",className:`rb-chat-tool-button rb-chat-feedback-button rb-chat-feedback-like${ge==="like"?" is-active-like":""}`,onClick:()=>void P(ge==="like"?null:"like"),disabled:q,children:[y.jsx("img",{src:re,style:{"--rb-chat-feedback-hover":`url(${ni})`},alt:""}),a.like]}):null,i?y.jsxs("div",{className:"rb-chat-dislike-wrap",children:[y.jsxs("button",{type:"button",className:`rb-chat-tool-button rb-chat-feedback-button rb-chat-feedback-dislike${ge==="dislike"?" is-active-dislike":""}`,onClick:De,disabled:q,children:[y.jsx("img",{src:W,style:{"--rb-chat-feedback-hover":`url(${ri})`},alt:""}),a.dislike]}),y.jsxs(dp,{open:B,anchor:F.current,onClose:()=>G(!1),children:[y.jsxs("div",{className:"rb-chat-feedback-head",children:[y.jsx("strong",{children:a.feedbackTitle}),y.jsx("button",{type:"button",className:"rb-chat-icon-button",onClick:()=>G(!1),"aria-label":a.closeFeedback,title:a.closeFeedback,children:y.jsx("img",{src:yi,alt:""})})]}),y.jsx("div",{className:"rb-chat-feedback-reasons",children:he.map(C=>y.jsx("button",{type:"button",className:_===C?"is-selected":"",onClick:()=>k(C),children:C},C))}),y.jsx("textarea",{className:te?void 0:"is-hidden","aria-hidden":!te,tabIndex:te?0:-1,disabled:!te||q,value:L,placeholder:a.feedbackOtherPlaceholder,onChange:C=>U(C.target.value),rows:3}),y.jsx("button",{type:"button",className:"rb-chat-feedback-submit",disabled:!_||_===a.feedbackOther&&!L.trim()||q,onClick:$,children:a.feedbackSubmit})]})]}):null,y.jsxs("a",{className:"rb-chat-tool-button rb-chat-human-button",href:ii,target:"_blank",rel:"noreferrer",children:["◎ ",a.humanSupport]})]}):null,t.role===Te.ASSISTANT&&!pe&&(fe||r&&(t.status===se.AWAITING_RECOVERY||t.status===se.ERROR))?y.jsx("div",{className:"rb-chat-message-tools",children:fe?y.jsxs("a",{className:"rb-chat-tool-button rb-chat-human-button",href:ii,target:"_blank",rel:"noreferrer",children:["◎ ",a.humanSupport]}):y.jsx("button",{type:"button",className:"rb-chat-tool-button",onClick:r,children:a.retry})}):null]}),y.jsx(bi,{open:c!==null,anchor:l.current,onClose:z,className:`rb-chat-citation-modal-backdrop${o==="dark"?" is-dark":""}`,children:y.jsxs("div",{className:"rb-chat-citation-modal",children:[y.jsxs("header",{className:"rb-chat-citation-modal-header",children:[y.jsx("h2",{children:(v=c==null?void 0:c.title)!=null?v:a.processing}),y.jsx("button",{type:"button",className:"rb-chat-citation-modal-close","aria-label":a.closeCitation,title:a.closeCitation,onClick:z,children:"×"})]}),y.jsxs("div",{className:"rb-chat-citation-modal-body",children:[b&&!(c!=null&&c.content)?y.jsx("div",{className:"rb-chat-citation-modal-loading",children:a.processing}):null,x?y.jsx("div",{className:"rb-chat-citation-modal-error",children:x}):null,c?y.jsxs(y.Fragment,{children:[y.jsxs("ul",{className:"rb-chat-citation-meta",children:[c.category_path?y.jsxs("li",{children:[a.citationCategoryPath,": ",c.category_path]}):null,c.slug?y.jsxs("li",{children:["slug:",c.slug]}):null,c.url?y.jsxs("li",{children:["URL:",c.url]}):null,c.published_at?y.jsxs("li",{children:[a.citationPublishedAt,": ",c.published_at]}):null,c.updated_at?y.jsxs("li",{children:[a.citationUpdatedAt,": ",c.updated_at]}):null]}),c.content?y.jsx(pn,{className:"rb-chat-citation-content",onImageClick:V,children:c.content}):c.snippet?y.jsx(pn,{className:"rb-chat-citation-content",onImageClick:V,children:c.snippet}):null,c.document_id?y.jsxs("small",{className:"rb-chat-citation-version",children:[c.document_id,c.content_version?` · ${a.citationContentVersion} ${c.content_version}`:""]}):null]}):null]})]})}),y.jsx(xi,{open:d!==null,imageUrl:d,anchor:s.current,onClose:()=>g(null)})]})}),fp="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJzcGFyayI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik04IDEuMkw5LjE1IDYuMDVMMTQgOEw5LjE1IDkuOTVMOCAxNC44TDYuODUgOS45NUwyIDhMNi44NSA2LjA1TDggMS4yWiIgZmlsbD0iIzEzQ0I3NSIvPgo8L2c+Cjwvc3ZnPgo=",gp="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJhcnJvdyI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik02IDMuNUwxMC41IDhMNiAxMi41IiBzdHJva2U9IiNDNUNDRDEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8L3N2Zz4K",mp=20;function bp({messages:e,phase:t,dragging:n,suggestedQuestions:r,onSuggestedQuestion:i,onCitationClick:a,onRetry:o,onFeedback:l}){const{labels:s}=Fe(),c=O.useRef(null),h=O.useRef(!0),u=O.useRef(e.length),p=d=>{const g=d.currentTarget;h.current=g.scrollHeight-g.scrollTop-g.clientHeight<=mp};return O.useLayoutEffect(()=>{const d=c.current;if(!d)return;const g=e.length>u.current;u.current=e.length,g&&(h.current=!0),h.current&&(d.scrollTop=d.scrollHeight)},[e]),O.useEffect(()=>{const d=c.current;if(!d)return;let g=null;const b=()=>{!h.current||g!==null||(g=requestAnimationFrame(()=>{g=null,h.current&&(d.scrollTop=d.scrollHeight)}))},M=d.querySelector(".rb-chat-messages");if(!M||typeof ResizeObserver=="undefined")return;const x=new ResizeObserver(b);return x.observe(M),()=>{x.disconnect(),g!==null&&cancelAnimationFrame(g)}},[e.length]),y.jsxs("main",{ref:c,onScroll:p,className:`rb-chat-main ${e.length===0?"is-empty":"has-messages"}`,children:[n?y.jsx("div",{className:"rb-chat-drop",children:s.dropFiles}):null,e.length===0?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"rb-chat-welcome",children:[y.jsx("div",{className:"rb-chat-avatar rb-chat-welcome-avatar",children:y.jsx("img",{src:On,alt:""})}),y.jsx("h1",{children:s.welcome.split(`
|
|
33
|
-
`).map((d,g)=>y.jsxs("span",{children:[g>0?y.jsx("br",{}):null,d]},d))}),y.jsx("p",{children:s.welcomeDescription})]}),r.length>0?y.jsx("div",{className:"rb-chat-suggestions",children:r.map(d=>y.jsxs("button",{type:"button",className:"rb-chat-suggestion",onClick:()=>i(d),children:[y.jsxs("span",{children:[y.jsx("img",{src:fp,alt:""}),d.display_text]}),y.jsx("img",{src:gp,alt:""})]},`${d.id}-${d.version}`))}):null]}):y.jsxs("div",{className:"rb-chat-messages",children:[e.map(d=>y.jsx(pp,{message:d,onCitationClick:a,onRetry:o,onFeedback:l},d.id)),t?y.jsx("div",{className:"rb-chat-status",role:"status","aria-label":t,children:y.jsxs("span",{className:"rb-chat-loading-dots","aria-hidden":"true",children:[y.jsx("span",{}),y.jsx("span",{}),y.jsx("span",{})]})}):null]})]})}const xp="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJGcmFtZSIgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzBfNCkiPgo8Y2lyY2xlIGlkPSJFbGxpcHNlIDE0IiBjeD0iOCIgY3k9IjgiIHI9IjciIGZpbGw9IndoaXRlIi8+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik04IDE2QzUuODc4MjcgMTYgMy44NDM0NCAxNS4xNTcxIDIuMzQzMTUgMTMuNjU2OUMwLjg0Mjg1NSAxMi4xNTY2IDAgMTAuMTIxNyAwIDhDMCA1Ljg3ODI3IDAuODQyODU1IDMuODQzNDQgMi4zNDMxNSAyLjM0MzE1QzMuODQzNDQgMC44NDI4NTUgNS44NzgyNyAwIDggMEMxMC4xMjE3IDAgMTIuMTU2NiAwLjg0Mjg1NSAxMy42NTY5IDIuMzQzMTVDMTUuMTU3MSAzLjg0MzQ0IDE2IDUuODc4MjcgMTYgOEMxNiAxMC4xMjE3IDE1LjE1NzEgMTIuMTU2NiAxMy42NTY5IDEzLjY1NjlDMTIuMTU2NiAxNS4xNTcxIDEwLjEyMTcgMTYgOCAxNlpNMTEuMjY1MyA0LjU3Mkw3LjAzNDY3IDguNzgxMzNMNC44MTA2NyA2LjU2OEwzLjQyNjY3IDcuOTU3MzNMNy4wMzMzMyAxMS41NDUzTDEyLjY0NjcgNS45NkwxMS4yNjQgNC41NzMzM0wxMS4yNjUzIDQuNTcyWiIgZmlsbD0iIzExQzg3MSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzBfNCI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K";function yp({toast:e,duration:t=2400,onClose:n}){return O.useEffect(()=>{if(!e||e.kind==="loading")return;const r=window.setTimeout(n,t);return()=>window.clearTimeout(r)},[t,n,e]),e?y.jsxs("div",{className:`rb-chat-toast is-${e.kind}`,role:"status",children:[e.kind==="success"?y.jsx("img",{src:xp,alt:""}):e.kind==="loading"?y.jsx("span",{className:"rb-chat-toast-loading-icon","aria-hidden":"true"}):y.jsx("span",{className:"rb-chat-toast-error-icon","aria-hidden":"true",children:"!"}),y.jsx("span",{children:e.message})]}):null}function Mp({controller:e,adapter:t,language:n="zh",panelStyle:r,onResizeStart:i}){const a=e.store(S=>S.open),o=e.store(S=>S.restoring),l=e.store(S=>S.messages),s=e.store(S=>S.busy),c=e.store(S=>S.phase),h=e.store(S=>S.draft),u=e.store(S=>S.attachments),p=e.store(S=>S.toast),d=e.store(S=>S.conversationId),g=e.store(S=>S.attachmentPolicy),
|
|
31
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:s,tableRow:l}};function o(d,g,M,x){return c(h(d,M,x),d.align)}function l(d,g,M,x){const b=u(d,M,x),A=c([b]);return A.slice(0,A.indexOf(`
|
|
32
|
+
`))}function s(d,g,M,x){const b=M.enter("tableCell"),A=M.enter("phrasing"),I=M.containerPhrasing(d,{...x,before:a,after:a});return A(),b(),I}function c(d,g){return Ah(d,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function h(d,g,M){const x=d.children;let b=-1;const A=[],I=g.enter("table");for(;++b<x.length;)A[b]=u(x[b],g,M);return I(),A}function u(d,g,M){const x=d.children;let b=-1;const A=[],I=g.enter("tableRow");for(;++b<x.length;)A[b]=s(x[b],d,g,M);return I(),A}function p(d,g,M){let x=ma.inlineCode(d,g,M);return M.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function gd(){return{exit:{taskListCheckValueChecked:$r,taskListCheckValueUnchecked:$r,paragraph:bd}}}function md(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xd}}}function $r(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bd(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function xd(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let s=ma.listItem(e,t,n,{...r,...l.current()});return a&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),s;function c(h){return h+o}}function yd(){return[Zu(),fh(),xh(),sd(),gd()]}function Md(e){return{extensions:[_u(),gh(e),yh(),fd(e),md()]}}const kd={tokenize:Ed,partial:!0},ba={tokenize:Sd,partial:!0},xa={tokenize:Td,partial:!0},ya={tokenize:jd,partial:!0},wd={tokenize:zd,partial:!0},Ma={name:"wwwAutolink",tokenize:Ad,previous:wa},ka={name:"protocolAutolink",tokenize:Dd,previous:Ia},Ye={name:"emailAutolink",tokenize:Nd,previous:Na},Pe={};function Id(){return{text:Pe}}let qe=48;for(;qe<123;)Pe[qe]=Ye,qe++,qe===58?qe=65:qe===91&&(qe=97);Pe[43]=Ye;Pe[45]=Ye;Pe[46]=Ye;Pe[95]=Ye;Pe[72]=[Ye,ka];Pe[104]=[Ye,ka];Pe[87]=[Ye,Ma];Pe[119]=[Ye,Ma];function Nd(e,t,n){const r=this;let i,a;return o;function o(u){return!Tn(u)||!Na.call(r,r.previous)||rr(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(u))}function l(u){return Tn(u)?(e.consume(u),l):u===64?(e.consume(u),s):n(u)}function s(u){return u===46?e.check(wd,h,c)(u):u===45||u===95||xe(u)?(a=!0,e.consume(u),s):h(u)}function c(u){return e.consume(u),i=!0,s}function h(u){return a&&i&&we(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function Ad(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!wa.call(r,r.previous)||rr(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(kd,e.attempt(ba,e.attempt(xa,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Dd(e,t,n){const r=this;let i="",a=!1;return o;function o(u){return(u===72||u===104)&&Ia.call(r,r.previous)&&!rr(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),l):n(u)}function l(u){if(we(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),l;if(u===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(u),s}return n(u)}function s(u){return u===47?(e.consume(u),a?c:(a=!0,s)):n(u)}function c(u){return u===null||Ut(u)||oe(u)||Xe(u)||Vt(u)?n(u):e.attempt(ba,e.attempt(xa,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function Ed(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function Sd(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(ya,s,l)(c):c===null||oe(c)||Xe(c)||c!==45&&Vt(c)?s(c):(a=!0,e.consume(c),o)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function s(c){return i||r||!a?n(c):t(c)}}function Td(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ya,t,a)(o):o===null||oe(o)||Xe(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function jd(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||oe(l)||Xe(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||oe(l)||Xe(l)?t(l):r(l)}function a(l){return we(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):we(l)?(e.consume(l),o):n(l)}}function zd(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return xe(a)?n(a):t(a)}}function wa(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function Ia(e){return!we(e)}function Na(e){return!(e===47||Tn(e))}function Tn(e){return e===43||e===45||e===46||e===95||xe(e)}function rr(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const vd={tokenize:Qd,partial:!0};function Ld(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pd,continuation:{tokenize:Ud},exit:Bd}},text:{91:{name:"gfmFootnoteCall",tokenize:Rd},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cd,resolveTo:Od}}}}function Cd(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){o=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return l;function l(s){if(!o||!o._balanced)return n(s);const c=Le(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Od(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Rd(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),s}function s(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(a>999||u===93&&!o||u===null||u===91||oe(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Le(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return oe(u)||(o=!0),a++,e.consume(u),u===92?h:c}function h(u){return u===91||u===92||u===93?(e.consume(u),a++,c):c(u)}}function Pd(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(o>999||g===93&&!l||g===null||g===91||oe(g))return n(g);if(g===93){e.exit("chunkString");const M=e.exit("gfmFootnoteDefinitionLabelString");return a=Le(r.sliceSerialize(M)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return oe(g)||(l=!0),o++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),te(e,d,"gfmFootnoteDefinitionWhitespace")):n(g)}function d(g){return t(g)}}function Ud(e,t,n){return e.check(wt,t,e.attempt(vd,t,n))}function Bd(e){e.exit("gfmFootnoteDefinition")}function Qd(e,t,n){const r=this;return te(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function Fd(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let s=-1;for(;++s<o.length;)if(o[s][0]==="enter"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._close){let c=s;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[s][1].end.offset-o[s][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[s][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[s][1].end)},u={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[s][1].start)},p=[["enter",h,l],["enter",o[c][1],l],["exit",o[c][1],l],["enter",u,l]],d=l.parser.constructs.insideSpan.null;d&&ve(p,p.length,0,qt(d,o.slice(c+1,s),l)),ve(p,p.length,0,[["exit",u,l],["enter",o[s][1],l],["exit",o[s][1],l],["exit",h,l]]),ve(o,c-1,s-c+3,p),s=c+p.length-2;break}}for(s=-1;++s<o.length;)o[s][1].type==="strikethroughSequenceTemporary"&&(o[s][1].type="data");return o}function a(o,l,s){const c=this.previous,h=this.events;let u=0;return p;function p(g){return c===126&&h[h.length-1][1].type!=="characterEscape"?s(g):(o.enter("strikethroughSequenceTemporary"),d(g))}function d(g){const M=Qt(c);if(g===126)return u>1?s(g):(o.consume(g),u++,d);if(u<2&&!n)return s(g);const x=o.exit("strikethroughSequenceTemporary"),b=Qt(g);return x._open=!b||b===2&&!!M,x._close=!M||M===2&&!!b,l(g)}}}class Yd{constructor(){this.map=[],this.index=new Map}add(t,n,r){Hd(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0,this.index.clear()}}function Hd(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Gd(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Vd(){return{flow:{null:{name:"table",tokenize:qd,resolveAll:Zd}}}}function qd(e,t,n){const r=this;let i=0,a=0,o;return l;function l(k){let v=r.events.length-1;for(;v>-1;){const{type:S}=r.events[v][1];if(S==="lineEnding"||S==="linePrefix")v--;else break}const U=v>-1?r.events[v][1].type:null,Y=U==="tableHead"||U==="tableRow"?N:s;return Y===N&&r.parser.lazy[r.now().line]?n(k):Y(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(o=!0,a+=1),h(k)}function h(k){return k===null?n(k):q(k)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),d):n(k):J(k)?te(e,h,"whitespace")(k):(a+=1,o&&(o=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),u(k)))}function u(k){return k===null||k===124||oe(k)?(e.exit("data"),h(k)):(e.consume(k),k===92?p:u)}function p(k){return k===92||k===124?(e.consume(k),u):u(k)}function d(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),o=!1,J(k)?te(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):g(k))}function g(k){return k===45||k===58?x(k):k===124?(o=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),M):D(k)}function M(k){return J(k)?te(e,x,"whitespace")(k):x(k)}function x(k){return k===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),b):k===45?(a+=1,b(k)):k===null||q(k)?j(k):D(k)}function b(k){return k===45?(e.enter("tableDelimiterFiller"),A(k)):D(k)}function A(k){return k===45?(e.consume(k),A):k===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(k))}function I(k){return J(k)?te(e,j,"whitespace")(k):j(k)}function j(k){return k===124?g(k):k===null||q(k)?!o||i!==a?D(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):D(k)}function D(k){return n(k)}function N(k){return e.enter("tableRow"),B(k)}function B(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),B):k===null||q(k)?(e.exit("tableRow"),t(k)):J(k)?te(e,B,"whitespace")(k):(e.enter("data"),F(k))}function F(k){return k===null||k===124||oe(k)?(e.exit("data"),B(k)):(e.consume(k),k===92?W:F)}function W(k){return k===92||k===124?(e.consume(k),F):F(k)}}function Zd(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,s=0,c,h,u;const p=new Yd;for(;++n<e.length;){const d=e[n],g=d[1];d[0]==="enter"?g.type==="tableHead"?(l=!1,s!==0&&(ei(p,t,s,c,h),h=void 0,s=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,u=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),i=g.type==="tableDelimiterRow"?2:h?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],u=Lt(p,t,a,i,void 0,u),a=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],u=Lt(p,t,a,i,void 0,u)),a=o,o=[a[1],n,0,0])):g.type==="tableHead"?(l=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,a[1]!==0?(o[0]=o[1],u=Lt(p,t,a,i,n,u)):o[1]!==0&&(u=Lt(p,t,o,i,n,u)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(s!==0&&ei(p,t,s,c,h),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Gd(t.events,n))}return e}function Lt(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},nt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=nt(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=nt(t.events,n[2]),h=nt(t.events,n[3]),u={type:l,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,M=n[3]-n[2]-1;e.add(g,M,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return i!==void 0&&(a.end=Object.assign({},nt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ei(e,t,n,r,i){const a=[],o=nt(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function nt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _d={name:"tasklistCheck",tokenize:Jd};function Wd(){return{text:{91:_d}}}function Jd(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),a)}function a(s){return oe(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),o):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),o):n(s)}function o(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(s)}function l(s){return q(s)?t(s):J(s)?e.check({tokenize:Xd},t,n)(s):n(s)}}function Xd(e,t,n){return te(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Kd(e){return Oi([Id(),Ld(),Fd(e),Vd(),Wd()])}const $d={};function ep(e){const t=this,n=e||$d,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Kd(n)),a.push(yd()),o.push(Md(n))}function tp(e){return{a:({href:t,children:n})=>np(t)?y.jsx("a",{className:"rb-chat-markdown-link",href:t,target:"_blank",rel:"noopener noreferrer",children:n}):y.jsx("span",{children:n}),img:({src:t,alt:n})=>!t||!rp(t)?null:e?y.jsx("button",{type:"button",className:"rb-chat-markdown-image-button","aria-label":n!=null?n:"",onClick:r=>e(t,r),children:y.jsx("img",{src:t,alt:n!=null?n:"",style:{maxWidth:"100%"}})}):y.jsx("img",{src:t,alt:n!=null?n:"",style:{maxWidth:"100%"}}),code:({children:t,className:n})=>y.jsx("code",{className:n,children:t})}}function pn({children:e,className:t,onImageClick:n}){return y.jsx(Pu,{className:t,remarkPlugins:[ep],components:tp(n),children:e})}function np(e){if(!e)return!1;try{const t=new URL(e,window.location.href).protocol;return t==="http:"||t==="https:"||t==="mailto:"}catch(t){return!1}}function rp(e){if(!e)return!1;try{return new URL(e,window.location.href).protocol==="https:"}catch(t){return!1}}const ti="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0IiB2aWV3Qm94PSIwIDAgMTQgMTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJjb3B5Ij4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEwLjE1IDUuMjVINi4xODMzM0M1LjY2Nzg3IDUuMjUgNS4yNSA1LjY2Nzg3IDUuMjUgNi4xODMzM1YxMC4xNUM1LjI1IDEwLjY2NTUgNS42Njc4NyAxMS4wODMzIDYuMTgzMzMgMTEuMDgzM0gxMC4xNUMxMC42NjU1IDExLjA4MzMgMTEuMDgzMyAxMC42NjU1IDExLjA4MzMgMTAuMTVWNi4xODMzM0MxMS4wODMzI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uOTA5NSA2LjY0NTI3IDExLjk1ODMgNi44MjUgMTEuOTU4M1Y5LjMzMzMzSDEwLjQ0MTdDMTAuNTk1NiA5LjMzNTQ5IDEwLjc0ODEgOS4zMDM3NyAxMC44ODg0IDkuMjQwNDJDMTEuMDI4NyA5LjE3NzA4IDExLjE1MzQgOS4wODM2NSAxMS4yNTM2IDguOTY2NzdDMTEuMzUzOCA4Ljg0OTg4IDExLjQyNyA4LjcxMjQgMTEuNDY4MiA4LjU2NDA1QzExLjUwOTMgOC40MTU3IDExLjUxNzMgOC4yNjAxMiAxMS40OTE3IDguMTA4MzNMMTEuMDgzMyA0LjlDMTEuMDU0NSA0LjY0MjIxIDEwLjkzMTMgNC40MDQyIDEwLjczNzQgNC4yMzE4N0MxMC41NDM1IDQuMDU5NTMgMTAuMjkyNyAzLjk2NTA2IDEwLjAzMzMgMy45NjY2N0g0LjIiIHN0cm9rZS13aWR0aD0iMC45MzMzMzMiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZT0iI0MwNEM0MSIvPgo8L2c+Cjwvc3ZnPgo=",up=314,hp=260,Ge=8;function dp({open:e,anchor:t,children:n,container:r,className:i="rb-chat-feedback-popover",onClose:a}){const{theme:o}=at(),[l,s]=O.useState(null),[c,h]=O.useState(!1),u=O.useRef(null),p=O.useCallback(x=>{u.current=x,h(x!==null)},[]),d=t==null?void 0:t.getRootNode(),g=r!=null?r:d instanceof DocumentFragment?d:void 0;if(O.useLayoutEffect(()=>{if(!e||!t){s(A=>A===null?A:null);return}const x=()=>{var k,v;const A=t.getBoundingClientRect(),I=((k=u.current)==null?void 0:k.offsetWidth)||up,j=((v=u.current)==null?void 0:v.offsetHeight)||hp,D=Math.min(Math.max(Ge,A.left),Math.max(Ge,window.innerWidth-I-Ge)),B=A.top-Ge>=j?A.top-j-8:A.bottom+8,F=Math.max(Ge,window.innerHeight-j-Ge),W=Math.min(Math.max(Ge,B),F);s(U=>(U==null?void 0:U.left)===D&&U.top===W?U:{left:D,top:W})};x(),window.addEventListener("resize",x),document.addEventListener("scroll",x,!0);const b=typeof ResizeObserver=="undefined"?null:new ResizeObserver(x);return u.current&&(b==null||b.observe(u.current)),()=>{window.removeEventListener("resize",x),document.removeEventListener("scroll",x,!0),b==null||b.disconnect()}},[t,e,c]),O.useEffect(()=>{if(!e||!a)return;const x=A=>{A.key==="Escape"&&(A.stopPropagation(),a())},b=A=>{const I=A.composedPath();t&&I.includes(t)||u.current&&I.includes(u.current)||a()};return document.addEventListener("keydown",x),document.addEventListener("mousedown",b),()=>{document.removeEventListener("keydown",x),document.removeEventListener("mousedown",b)}},[t,i,a,e]),!e||!t||!l)return null;const M={left:l.left,top:l.top,maxHeight:`calc(100vh - ${Ge*2}px)`};return y.jsx(Cn,{anchor:t,container:g,children:y.jsx("div",{ref:p,className:i,"data-theme":o,role:"dialog","aria-modal":"false",style:M,onMouseDown:x=>x.stopPropagation(),children:n})})}async function Aa(e){var n,r;try{if((n=navigator.clipboard)!=null&&n.writeText){await navigator.clipboard.writeText(e);return}}catch(i){}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{if(t.select(),!((r=document.execCommand)!=null&&r.call(document,"copy")))throw new Error("Clipboard is unavailable")}finally{t.remove()}}const ii="https://wpa1.qq.com/SV5t0IWb?_type=wpa&qidian=true",pp=O.memo(function({message:t,onCitationClick:n,onRetry:r,onFeedback:i}){var Nt,st,ct,At,Dt,Et,St,Tt,w,L;const{labels:a}=Fe(),{theme:o}=at(),l=O.useRef(null),s=O.useRef(null),[c,h]=O.useState(null),[u,p]=O.useState(!1),[d,g]=O.useState(null),[M,x]=O.useState(!1),[b,A]=O.useState(null),[I,j]=O.useState(!1),[D,N]=O.useState(!1),[B,F]=O.useState(!1),[W,k]=O.useState(""),[v,U]=O.useState(""),[Y,S]=O.useState(!1),V=O.useRef(null),X=O.useRef(null),K=O.useRef(0),re=O.useRef(0),ne=(st=(Nt=t.citations)==null?void 0:Nt.length)!=null?st:0,m=O.useRef(ne);O.useEffect(()=>{ne>1&&m.current<=1&&p(!1),m.current=ne},[ne]),O.useEffect(()=>()=>{K.current+=1,re.current+=1,X.current&&clearTimeout(X.current)},[]);const E=async C=>{const Q=++K.current;h(C),A(null),x(!0);try{const ce=await(n==null?void 0:n(t.id,C.citation_id));Q===K.current&&ce&&h(ce)}catch(ce){Q===K.current&&A(ce instanceof Error?ce.message:a.requestFailed)}finally{Q===K.current&&x(!1)}},z=()=>{K.current+=1,h(null),A(null),x(!1)},f=(C,Q)=>{s.current=C.currentTarget,g(Q)},H=(C,Q)=>{f(Q,C)},G=async()=>{const C=++re.current;j(!1),N(!1),X.current&&clearTimeout(X.current);try{if(await Aa(t.text),C!==re.current)return;j(!0),X.current=setTimeout(()=>j(!1),2e3)}catch(Q){C===re.current&&N(!0)}},P=async(C,Q="")=>{if(!(!i||Y)){S(!0);try{await i(t.id,C,Q),C==="dislike"&&F(!1)}finally{S(!1)}}},ee=()=>{const C=W===a.feedbackOther?v.trim():W;C&&P("dislike",C)},$=W===a.feedbackOther,me=!!((ct=t.attachments)!=null&&ct.length),pe=t.status===se.COMPLETE||t.status===se.NO_EVIDENCE,Me=((At=t.error)==null?void 0:At.error_code)===it.KNOWLEDGE_BUSY,fe=Me||((Dt=t.retryCount)!=null?Dt:0)>0&&(t.status===se.AWAITING_RECOVERY||t.status===se.ERROR),ge=(St=(Et=t.feedback)==null?void 0:Et.rating)!=null?St:null,ie=ge==="like"?ni:o==="dark"?lp:op,_=ge==="dislike"?ri:o==="dark"?cp:sp,he=[a.feedbackUnprofessional,a.feedbackUnresolved,a.feedbackMisunderstood,a.feedbackSlow,a.feedbackOther],De=()=>{if(ge==="dislike"){F(!1),k(""),U(""),P(null,"");return}F(!0)},Ue=(Tt=t.attachments)==null?void 0:Tt.map(C=>{var Q;return y.jsxs("div",{className:`rb-chat-message-attachment${C.kind==="image"?" is-image":""}`,children:[C.kind==="image"?y.jsx("button",{type:"button",className:"rb-chat-image-preview-button","aria-label":`${a.previewImage} ${C.filename}`,onClick:ce=>f(ce,C.content_url),children:y.jsx("img",{src:C.content_url,alt:C.filename})}):y.jsx("span",{className:"rb-chat-message-file-icon",children:((Q=C.filename.split(".").pop())==null?void 0:Q.toUpperCase())||"FILE"}),C.kind!=="image"?y.jsx("span",{className:"rb-chat-message-attachment-name",title:C.filename,children:C.filename}):null]},C.attachment_id)});return y.jsxs("div",{className:`rb-chat-message ${t.role}`,children:[t.role===Te.ASSISTANT?y.jsxs("div",{className:"rb-chat-identity",children:[y.jsx("img",{src:On,alt:""}),y.jsx("span",{children:a.assistantName})]}):null,y.jsxs("div",{className:"rb-chat-message-content",children:[t.role===Te.USER&&me?y.jsx("div",{className:"rb-chat-message-attachments",children:Ue}):null,t.role===Te.ASSISTANT||t.text?y.jsx("div",{className:`rb-chat-bubble${t.role===Te.ASSISTANT&&t.status===se.STREAMING&&!t.text.trim()?" is-loading":""}`,children:t.role===Te.ASSISTANT?t.text?y.jsx(pn,{children:t.text}):t.status===se.ERROR||t.status===se.AWAITING_RECOVERY?Me?a.knowledgeBusy:a.requestFailed:null:t.text}):null,t.role===Te.ASSISTANT&&ne?y.jsxs("div",{className:"rb-chat-citations",children:[ne>1?y.jsxs("button",{type:"button",className:"rb-chat-citations-toggle","aria-expanded":u,"aria-label":u?a.collapseCitations:a.expandCitations,onClick:()=>p(C=>!C),children:[y.jsx("span",{children:a.citations(ne)}),y.jsx("span",{className:`rb-chat-citations-toggle-icon${u?" is-expanded":""}`,"aria-hidden":"true"})]}):null,ne===1||u?y.jsx("div",{className:"rb-chat-citations-list",children:(w=t.citations)==null?void 0:w.map((C,Q)=>y.jsx("div",{className:"rb-chat-citation",children:y.jsxs("button",{ref:Q===0?l:void 0,type:"button",onClick:()=>void E(C),children:[y.jsx("span",{className:"rb-chat-citation-index",children:Q+1}),y.jsx("span",{className:"rb-chat-citation-copy",children:y.jsx("b",{children:C.title})})]})},C.citation_id))}):null]}):null,t.role===Te.ASSISTANT&&pe?y.jsxs("div",{ref:V,className:"rb-chat-message-tools",children:[y.jsxs("button",{type:"button",className:"rb-chat-tool-button rb-chat-copy-button",onClick:()=>void G(),children:[y.jsx("img",{className:"rb-chat-copy-icon",src:ti,style:{"--rb-chat-copy-light":`url(${ti})`,"--rb-chat-copy-dark":`url(${ap})`,"--rb-chat-copy-hover":`url(${ip})`},alt:""}),I?a.copied:a.copy]}),D?y.jsx("span",{className:"rb-chat-error",role:"status",children:a.copyFailed}):null,i?y.jsxs("button",{type:"button",className:`rb-chat-tool-button rb-chat-feedback-button rb-chat-feedback-like${ge==="like"?" is-active-like":""}`,onClick:()=>void P(ge==="like"?null:"like"),disabled:Y,children:[y.jsx("img",{src:ie,style:{"--rb-chat-feedback-hover":`url(${ni})`},alt:""}),a.like]}):null,i?y.jsxs("div",{className:"rb-chat-dislike-wrap",children:[y.jsxs("button",{type:"button",className:`rb-chat-tool-button rb-chat-feedback-button rb-chat-feedback-dislike${ge==="dislike"?" is-active-dislike":""}`,onClick:De,disabled:Y,children:[y.jsx("img",{src:_,style:{"--rb-chat-feedback-hover":`url(${ri})`},alt:""}),a.dislike]}),y.jsxs(dp,{open:B,anchor:V.current,onClose:()=>F(!1),children:[y.jsxs("div",{className:"rb-chat-feedback-head",children:[y.jsx("strong",{children:a.feedbackTitle}),y.jsx("button",{type:"button",className:"rb-chat-icon-button",onClick:()=>F(!1),"aria-label":a.closeFeedback,title:a.closeFeedback,children:y.jsx("img",{src:yi,alt:""})})]}),y.jsx("div",{className:"rb-chat-feedback-reasons",children:he.map(C=>y.jsx("button",{type:"button",className:W===C?"is-selected":"",onClick:()=>k(C),children:C},C))}),y.jsx("textarea",{className:$?void 0:"is-hidden","aria-hidden":!$,tabIndex:$?0:-1,disabled:!$||Y,value:v,placeholder:a.feedbackOtherPlaceholder,onChange:C=>U(C.target.value),rows:3}),y.jsx("button",{type:"button",className:"rb-chat-feedback-submit",disabled:!W||W===a.feedbackOther&&!v.trim()||Y,onClick:ee,children:a.feedbackSubmit})]})]}):null,y.jsxs("a",{className:"rb-chat-tool-button rb-chat-human-button",href:ii,target:"_blank",rel:"noreferrer",children:["◎ ",a.humanSupport]})]}):null,t.role===Te.ASSISTANT&&!pe&&(fe||r&&(t.status===se.AWAITING_RECOVERY||t.status===se.ERROR))?y.jsx("div",{className:"rb-chat-message-tools",children:fe?y.jsxs("a",{className:"rb-chat-tool-button rb-chat-human-button",href:ii,target:"_blank",rel:"noreferrer",children:["◎ ",a.humanSupport]}):y.jsx("button",{type:"button",className:"rb-chat-tool-button",onClick:r,children:a.retry})}):null]}),y.jsx(bi,{open:c!==null,anchor:l.current,onClose:z,className:`rb-chat-citation-modal-backdrop${o==="dark"?" is-dark":""}`,children:y.jsxs("div",{className:"rb-chat-citation-modal",children:[y.jsxs("header",{className:"rb-chat-citation-modal-header",children:[y.jsx("h2",{children:(L=c==null?void 0:c.title)!=null?L:a.processing}),y.jsx("button",{type:"button",className:"rb-chat-citation-modal-close","aria-label":a.closeCitation,title:a.closeCitation,onClick:z,children:"×"})]}),y.jsxs("div",{className:"rb-chat-citation-modal-body",children:[M&&!(c!=null&&c.content)?y.jsx("div",{className:"rb-chat-citation-modal-loading",children:a.processing}):null,b?y.jsx("div",{className:"rb-chat-citation-modal-error",children:b}):null,c?y.jsxs(y.Fragment,{children:[y.jsxs("ul",{className:"rb-chat-citation-meta",children:[c.category_path?y.jsxs("li",{children:[a.citationCategoryPath,": ",c.category_path]}):null,c.slug?y.jsxs("li",{children:["slug:",c.slug]}):null,c.url?y.jsxs("li",{children:["URL:",c.url]}):null,c.published_at?y.jsxs("li",{children:[a.citationPublishedAt,": ",c.published_at]}):null,c.updated_at?y.jsxs("li",{children:[a.citationUpdatedAt,": ",c.updated_at]}):null]}),c.content?y.jsx(pn,{className:"rb-chat-citation-content",onImageClick:H,children:c.content}):c.snippet?y.jsx(pn,{className:"rb-chat-citation-content",onImageClick:H,children:c.snippet}):null,c.document_id?y.jsxs("small",{className:"rb-chat-citation-version",children:[c.document_id,c.content_version?` · ${a.citationContentVersion} ${c.content_version}`:""]}):null]}):null]})]})}),y.jsx(xi,{open:d!==null,imageUrl:d,anchor:s.current,onClose:()=>g(null)})]})}),fp="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJzcGFyayI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik04IDEuMkw5LjE1IDYuMDVMMTQgOEw5LjE1IDkuOTVMOCAxNC44TDYuODUgOS45NUwyIDhMNi44NSA2LjA1TDggMS4yWiIgZmlsbD0iIzEzQ0I3NSIvPgo8L2c+Cjwvc3ZnPgo=",gp="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJhcnJvdyI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik02IDMuNUwxMC41IDhMNiAxMi41IiBzdHJva2U9IiNDNUNDRDEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8L3N2Zz4K",mp=20;function bp({messages:e,phase:t,dragging:n,suggestedQuestions:r,onSuggestedQuestion:i,onCitationClick:a,onRetry:o,onFeedback:l}){const{labels:s}=Fe(),c=O.useRef(null),h=O.useRef(!0),u=O.useRef(e.length),p=d=>{const g=d.currentTarget;h.current=g.scrollHeight-g.scrollTop-g.clientHeight<=mp};return O.useLayoutEffect(()=>{const d=c.current;if(!d)return;const g=e.length>u.current;u.current=e.length,g&&(h.current=!0),h.current&&(d.scrollTop=d.scrollHeight)},[e]),O.useEffect(()=>{const d=c.current;if(!d)return;let g=null;const M=()=>{!h.current||g!==null||(g=requestAnimationFrame(()=>{g=null,h.current&&(d.scrollTop=d.scrollHeight)}))},x=d.querySelector(".rb-chat-messages");if(!x||typeof ResizeObserver=="undefined")return;const b=new ResizeObserver(M);return b.observe(x),()=>{b.disconnect(),g!==null&&cancelAnimationFrame(g)}},[e.length]),y.jsxs("main",{ref:c,onScroll:p,className:`rb-chat-main ${e.length===0?"is-empty":"has-messages"}`,children:[n?y.jsx("div",{className:"rb-chat-drop",children:s.dropFiles}):null,e.length===0?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"rb-chat-welcome",children:[y.jsx("div",{className:"rb-chat-avatar rb-chat-welcome-avatar",children:y.jsx("img",{src:On,alt:""})}),y.jsx("h1",{children:s.welcome.split(`
|
|
33
|
+
`).map((d,g)=>y.jsxs("span",{children:[g>0?y.jsx("br",{}):null,d]},d))}),y.jsx("p",{children:s.welcomeDescription})]}),r.length>0?y.jsx("div",{className:"rb-chat-suggestions",children:r.map(d=>y.jsxs("button",{type:"button",className:"rb-chat-suggestion",onClick:()=>i(d),children:[y.jsxs("span",{children:[y.jsx("img",{src:fp,alt:""}),d.display_text]}),y.jsx("img",{src:gp,alt:""})]},`${d.id}-${d.version}`))}):null]}):y.jsxs("div",{className:"rb-chat-messages",children:[e.map(d=>y.jsx(pp,{message:d,onCitationClick:a,onRetry:o,onFeedback:l},d.id)),t?y.jsx("div",{className:"rb-chat-status",role:"status","aria-label":t,children:y.jsxs("span",{className:"rb-chat-loading-dots","aria-hidden":"true",children:[y.jsx("span",{}),y.jsx("span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xpcFBhdGggaWQ9ImNsaXAwXzBfNCI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K";function yp({toast:e,duration:t=2400,onClose:n}){return O.useEffect(()=>{if(!e||e.kind==="loading")return;const r=window.setTimeout(n,t);return()=>window.clearTimeout(r)},[t,n,e]),e?y.jsxs("div",{className:`rb-chat-toast is-${e.kind}`,role:"status",children:[e.kind==="success"?y.jsx("img",{src:xp,alt:""}):e.kind==="loading"?y.jsx("span",{className:"rb-chat-toast-loading-icon","aria-hidden":"true"}):y.jsx("span",{className:"rb-chat-toast-error-icon","aria-hidden":"true",children:"!"}),y.jsx("span",{children:e.message})]}):null}function Mp({controller:e,adapter:t,language:n="zh",panelStyle:r,onResizeStart:i}){const a=e.store(S=>S.open),o=e.store(S=>S.restoring),l=e.store(S=>S.messages),s=e.store(S=>S.busy),c=e.store(S=>S.phase),h=e.store(S=>S.draft),u=e.store(S=>S.attachments),p=e.store(S=>S.toast),d=e.store(S=>S.conversationId),g=e.store(S=>S.attachmentPolicy),M=e.store(S=>S.suggestedQuestions),[x,b]=O.useState(!1),{labels:A,language:I}=Fe(),{theme:j}=at(),D=c?Ya(I,c):null,N=o?{kind:"loading",message:A.loading}:p!=null&&p.errorCode?{...p,message:A.attachmentError(p.errorCode)}:p,B=O.useCallback(()=>e.store.getState().clearToast(),[e]),F=O.useCallback((S,V)=>e.loadCitation(S,V),[e]),W=O.useCallback(()=>e.recover(),[e]),k=O.useCallback(async(S,V,X)=>{try{await e.submitFeedback(S,V,X),V!==null&&e.store.getState().showToast({kind:"success",message:A.feedbackThanks})}catch(K){e.store.getState().showToast({kind:"error",message:A.feedbackFailed})}},[e,A]),v=O.useCallback(async()=>{if(d){e.store.getState().showToast({kind:"loading",message:A.sharing});try{const S=await e.share();if(!S)throw new Error("Conversation is not available for sharing");await Aa(S),e.store.getState().conversationId===d&&e.clear(),e.store.getState().showToast({kind:"success",message:A.shareCopied})}catch(S){e.store.getState().showToast({kind:"error",message:S instanceof Error?S.message:A.shareFailed})}}},[d,e,A]);O.useEffect(()=>{t&&e.setAdapter(t)},[t,e]),O.useEffect(()=>{e.setLanguage(n)},[e,n]),O.useEffect(()=>{a&&e.initialize()},[e,a]),O.useEffect(()=>{const S=V=>{V.key==="Escape"&&e.store.getState().open&&e.toggle(!1)};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[e]);const U=S=>{const V=Array.from(S.clipboardData.files).filter(X=>X.type.startsWith("image/"));V.length>0&&e.addFiles(V)},Y=S=>{S.preventDefault(),b(!1),e.addFiles(Array.from(S.dataTransfer.files))};return a?y.jsxs("section",{className:"rb-chat-panel","data-theme":j,style:r,onDragOver:S=>{S.preventDefault(),b(!0)},onDrop:Y,children:[y.jsx("div",{className:"rb-chat-resize-handle rb-chat-resize-handle-left","aria-hidden":"true",onPointerDown:S=>{S.stopPropagation(),i==null||i("left",S)}}),y.jsx("div",{className:"rb-chat-resize-handle rb-chat-resize-handle-top","aria-hidden":"true",onPointerDown:S=>{S.stopPropagation(),i==null||i("top",S)}}),y.jsx("div",{className:"rb-chat-resize-handle rb-chat-resize-handle-right","aria-hidden":"true",onPointerDown:S=>{S.stopPropagation(),i==null||i("right",S)}}),y.jsx("div",{className:"rb-chat-resize-handle rb-chat-resize-handle-bottom","aria-hidden":"true",onPointerDown:S=>{S.stopPropagation(),i==null||i("bottom",S)}}),y.jsxs(y.Fragment,{children:[y.jsx(ro,{isWelcome:l.length===0,onNewChat:()=>e.clear(),onShare:()=>void v(),shareDisabled:!d||s,onCollapse:()=>e.toggle(!1)}),y.jsx(yp,{toast:N,onClose:B}),y.jsx(bp,{messages:l,phase:D,dragging:x,suggestedQuestions:M,onSuggestedQuestion:S=>e.submitSuggested(S),onCitationClick:F,onRetry:W,onFeedback:k}),y.jsx($a,{attachments:u,draft:h,busy:s,accept:g.accept.join(","),attachmentsAvailable:g.available!==!1,onDraftChange:S=>e.setDraft(S),onPaste:U,onFiles:S=>void e.addFiles(S),onRemoveAttachment:S=>e.removeAttachment(S),onSubmit:()=>e.send(),onCancel:()=>e.cancel()}),y.jsx("div",{className:"rb-chat-disclaimer",children:A.disclaimer})]})]}):null}const kp="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjI2IiBoZWlnaHQ9IjI2IiB2aWV3Qm94PSIwIDAgMjYgMjYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJjaGF0Ij4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTUgOS43MzMzM0M1IDguNzQzMTkgNS40MjE0MyA3Ljc5MzYgNi4xNzE1NyA3LjA5MzQ3QzYuOTIxNzIgNi4zOTMzMyA3LjkzOTEzIDYgOSA2SDE3QzE4LjA2MDkgNiAxOS4wNzgzIDYuMzkzMzMgMTkuODI4NCA3LjA5MzQ3QzIwLjU3ODYgNy43OTM2IDIxIDguNzQzMTkgMjEgOS43MzMzM1YxNS4wNjY3QzIxIDE2LjA1NjggMjAuNTc4NiAxNy4wMDY0IDE5LjgyODQgMTcuNzA2NUMxOS4wNzgzIDE4LjQwNjcgMTguMDYwOSAxOC44IDE3IDE4LjhIMTNMOC40Mjg1NyAyMlYxOC41ODY3QzcuNTA3NyAxOC40NjM2IDYuNjYxNTggMTguMDQ0OCA2LjAzNTgxIDE3LjQwMjNDNS40MTAwNCAxNi43NTk5IDUuMDQzNzYgMTUuOTM0IDUgMTUuMDY2N1Y5LjczMzMzWiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggaWQ9IlZlY3Rvcl8yIiBkPSJNOS43NSAxMS4zNzVIMTYuMjVNOS43NSAxNC4wODMzSDE0LjA4MzMiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9nPgo8L3N2Zz4K";function wp({controller:e,disabled:t,className:n="",onPositionChange:r,style:i}){const{labels:a}=Fe(),o=O.useRef(!1),l=O.useRef(!1),[s,c]=O.useState(!1),h=p=>{if(t)return;const d=p.currentTarget,g=d.getBoundingClientRect(),M=p.clientX-g.left,x=p.clientY-g.top;o.current=!0,l.current=!1,c(!0),d.setPointerCapture(p.pointerId);const b=I=>{if(!o.current)return;const j=Math.min(Math.max(I.clientX-M,8),window.innerWidth-g.width-8),D=Math.min(Math.max(I.clientY-x,8),window.innerHeight-g.height-8);(Math.abs(I.clientX-p.clientX)>3||Math.abs(I.clientY-p.clientY)>3)&&(l.current=!0),r==null||r(j,D)},A=()=>{o.current=!1,c(!1),window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",A)};window.addEventListener("pointermove",b),window.addEventListener("pointerup",A)},u=p=>{if(l.current){p.preventDefault(),l.current=!1;return}e.toggle()};return y.jsx("button",{type:"button",className:`rb-chat-launcher ${n}`,style:i,"data-dragging":s?"true":void 0,disabled:t,"aria-label":a.openAssistant,onPointerDown:h,onClick:u,children:y.jsx("img",{src:kp,alt:"","aria-hidden":"true"})})}const ai={"--rb-chat-ink":"#182027","--rb-chat-muted":"#71808a","--rb-chat-line":"#e8edf0","--rb-chat-surface":"#ffffff","--rb-chat-soft":"#f6f8f9","--rb-chat-accent":"#19c47a","--rb-chat-accent-strong":"#0ca866","--rb-chat-accent-pale":"#e8faf2","--rb-chat-shadow":"0 24px 70px rgba(23,44,54,.2), 0 4px 14px rgba(23,44,54,.08)"};function Ip(){const e=Object.entries(ai).map(([t,n])=>`${t}:${n}`).join(";");return`
|
|
34
34
|
:host { color: ${ai["--rb-chat-ink"]}; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
|
|
35
35
|
.rb-ai-chat-root { ${e}; position: fixed; inset: 0; z-index: 2147482998; pointer-events: none; color: var(--rb-chat-ink); font-size: 14px; line-height: 1.5; }
|
|
36
36
|
.rb-ai-chat-root .rb-chat-launcher,
|
|
@@ -49,6 +49,6 @@ Feel free to ask me anything`,welcomeDescription:"Ask me about render tasks, ass
|
|
|
49
49
|
`;function jn(e){if(typeof e=="string")return e;if(!e)return"";if(Array.isArray(e)){const t=e.toString();return t.includes("[object Object]")?e.map(jn).join(""):t}if(typeof e=="object"&&"default"in e)return jn(e.default);if(typeof e.toString=="function"){const t=String(e);if(t!=="[object Object]")return t}return""}function Ea(e){return Array.from(e).map(t=>{if("cssRules"in t&&t.cssRules){const n=Ea(t.cssRules);return n?`${t.cssText.split("{")[0]}{${n}}`:""}return t.cssText.includes(".rb-chat-")||t.cssText.includes(".rb-ai-chat-root")?t.cssText:""}).filter(Boolean).join(`
|
|
50
50
|
`)}const fn=[Np,Dp,Ap,Ep].map(jn).join(`
|
|
51
51
|
`);function Sp(){if(fn.includes(".rb-chat-panel")||typeof document=="undefined")return fn;const e=Array.from(document.querySelectorAll("style")).map(n=>{var r;return(r=n.textContent)!=null?r:""}).filter(n=>n.includes(".rb-chat-panel")),t=Array.from(document.styleSheets).flatMap(n=>{try{return n.cssRules?[Ea(n.cssRules)]:[]}catch(r){return[]}});return[...e,...t].filter(Boolean).join(`
|
|
52
|
-
`)}const Sa="renderbus-ai-chat-layout",be=55,R=8,ke=10,_e=300,ue=360,Ht=24,Ta=400,ja=660;function Tp(){return typeof window=="undefined"?{left:0,top:0}:{left:Math.max(window.innerWidth-be-Ht,R),top:Math.max(window.innerHeight-be-Ht,R)}}function jp(){return typeof window=="undefined"?{left:0,top:0}:{left:Math.max(window.innerWidth-Ta-Ht,R),top:Math.max(window.innerHeight-ja-Ht,R)}}function zp(){var e;if(typeof window=="undefined")return null;try{const t=JSON.parse((e=window.localStorage.getItem(Sa))!=null?e:"null"),n=t==null?void 0:t.launcherPosition,r=t==null?void 0:t.panelSize;return!n||!r||!Number.isFinite(n.left)||!Number.isFinite(n.top)||!Number.isFinite(r.width)||!Number.isFinite(r.height)||r.width<_e||r.height<ue?null:{launcherPosition:{left:Math.min(Math.max(n.left,R),Math.max(R,window.innerWidth-be-R)),top:Math.min(Math.max(n.top,R),Math.max(R,window.innerHeight-be-R))},panelSize:{width:r.width,height:r.height}}}catch(t){return null}}function vp(e){const t=O.useMemo(()=>zp(),[]),[n,r]=O.useState(()=>{var
|
|
53
|
-
`);let a=i;try{a=JSON.parse(i)}catch(o){}return{id:t,event:n,data:a}}const Oe={RUN_STARTED:"run.started",RUN_PROGRESS:"run.progress",ANSWER_DELTA:"answer.delta",ANSWER_SNAPSHOT:"answer.snapshot",CITATION_ADDED:"citation.added",RUN_COMPLETED:"run.completed",RUN_NO_EVIDENCE:"run.no_evidence",RUN_FAILED:"run.failed",TERMINAL:"terminal"},Ke={QUEUED:"queued",RUNNING:"running",COMPLETED:"completed",NO_EVIDENCE:"no_evidence"},Bp="/api/ai-assistant/v1",Qp="https://agent-gateway.renderbus.com:39080";function za(e={}){var r;const t=((r=e.baseUrl)!=null?r:Bp).replace(/\/$/,""),n=Rp(t);return{send(i,a){const o=new AbortController;let l=!1;const s={...a,onComplete:(...c)=>{l||(l=!0,a.onComplete(...c))},onError:(...c)=>{l||(l=!0,a.onError(...c))}};return Fp(t,e,i,s,o.signal).catch(c=>{var h;o.signal.aborted||s.onError((h=i.clientMessageId)!=null?h:"",Gp(c))}),{cancel:()=>o.abort()}},async getSuggestedQuestions(i,a=4){var c;const o=new URLSearchParams({limit:String(a)}),l=i!=null?i:e.module;l&&o.set("module",l);const s=await rt(t,`/suggested-questions?${o.toString()}`);if(!s.ok)throw await ze(s);return(c=(await s.json()).items)!=null?c:[]},getAttachmentOptions:()=>n.getOptions(),uploadAttachment:(i,a)=>n.upload(i,a),getAttachmentContent:(i,a)=>n.getContent(i,a),deleteAttachment:i=>n.delete(i),async getConversation(i,a=50){var l,s;const o=await rt(t,`/conversations/${encodeURIComponent(i)}?limit=${a}`);if(!o.ok)throw await ze(o);return(s=(l=(await o.json()).items)==null?void 0:l.map(Yp))!=null?s:[]},async shareConversation(i){var s;const a=await rt(t,`/conversations/${encodeURIComponent(i)}/share`,{method:"POST",headers:{Accept:"application/json"}});if(!a.ok)throw await ze(a);const o=await a.json(),l=new URL("/console/customer-assistant",(s=e.shareOrigin)!=null?s:Qp);return l.searchParams.set("conversation_id",o.conversation_id),l.toString()},async getCitation(i,a){const o=await rt(t,`/runs/${encodeURIComponent(i)}/citations/${encodeURIComponent(a)}`);if(!o.ok)throw await ze(o);const l=await o.json();return yt(l.citations[0])},async submitFeedback(i,a){const o=await rt(t,`/runs/${encodeURIComponent(i)}/feedback`,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok)throw await ze(o);return(await o.json()).feedback}}}async function Fp(e,t,n,r,i){var c,h,u,p,d,g,
|
|
54
|
-
`).replace(/(\*\*[^*\n]+?\*\*)(?=[\u3400-\u9fff])/g,"$1 ")}function Hp(e,t){var r,i,a,o,l;if(e.runId)return{run_id:e.runId};const n={attachment_ids:e.attachmentIds,client_message_id:(r=e.clientMessageId)!=null?r:va(),conversation_id:e.conversationId,module:(a=(i=e.module)!=null?i:t.module)!=null?a:"",knowledge_scope:t.knowledgeScope};return e.suggestedQuestionId?{...n,suggested_question_id:e.suggestedQuestionId,suggested_question_version:(o=e.suggestedQuestionVersion)!=null?o:1}:{...n,...(l=e.query)!=null&&l.trim()?{query:e.query.trim()}:{}}}async function rt(e,t,n={}){return fetch(`${e}${t}`,{...n,credentials:"include"})}function va(){return typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random()}`}function Gp(e){return e&&typeof e=="object"&&"error_code"in e?e:{status:"network_error",error_code:"NETWORK_ERROR",message:String(e)}}const si="renderbus-ai-chat-state",Vp="task-eva-ai-chat-state";function La(e={}){var K,X,ne,ie,m;const t=typeof e.persistSession=="object"&&(K=e.persistSession.storageKey)!=null?K:si,n=!!e.persistSession,r=n?Wp(t):null,i=Cp((ne=(X=e.defaultOpen)!=null?X:r==null?void 0:r.open)!=null?ne:!1);r!=null&&r.conversationId&&(i.getState().setConversation(r.conversationId),i.getState().setRestoring(!0));let a=(ie=e.adapter)!=null?ie:za({baseUrl:e.baseUrl,shareOrigin:e.shareOrigin}),o=null,l=null,s=0,c=0,h=null,u=null,p=null,d=null,g=(m=r==null?void 0:r.conversationId)!=null?m:null,b="zh";n&&i.subscribe(D=>{Jp(t,{open:D.open,conversationId:D.conversationId})});const M=D=>{b=D},x=async()=>{a!=null&&a.initializeConversation&&(u!=null||(u=a.initializeConversation().catch(()=>{})),await u)},N=async(D,z=50)=>{if(!(a!=null&&a.getConversation)||!D)return;const f=s,V=await a.getConversation(D,z);if(f!==s)return;const Y=V.flatMap(P=>{var me,pe,Me,fe,ge;const $={id:`user-${P.message_id}`,role:Te.USER,text:(me=P.question)!=null?me:"",status:se.COMPLETE,attachments:P.attachments},te={id:`assistant-${P.run_id}`,role:Te.ASSISTANT,text:(pe=P.answer)!=null?pe:"",status:P.status===Ke.NO_EVIDENCE?se.NO_EVIDENCE:hi(P.status)?se.COMPLETE:gn(P.status)?se.AWAITING_RECOVERY:se.ERROR,retryable:gn(P.status),citations:P.citations,feedback:P.feedback,runId:P.run_id,conversationId:P.conversation_id,confirmed:hi(P.status),requestInput:{runId:gn(P.status)?P.run_id:void 0,content:[{type:"text",text:(Me=P.question)!=null?Me:""}],query:P.question,attachmentIds:(ge=(fe=P.attachments)==null?void 0:fe.map(re=>re.attachment_id))!=null?ge:[],conversationId:P.conversation_id}};return[$,te]});i.getState().setMessages(Y),i.getState().setConversation(D,null)},w=async()=>{const D=i.getState().conversationId;if(!(!(a!=null&&a.shareConversation)||!D))return a.shareConversation(D)},j=async()=>{const D=g;if(!n||!D){i.getState().setRestoring(!1);return}return d||(i.getState().setRestoring(!0),d=(async()=>{const z=s;try{if(await N(D),z!==s)return;g=null}catch(f){if(z!==s)return;if(Ct(f).error_code==="CONVERSATION_NOT_FOUND"){g=null,i.getState().setConversation(null,null);return}throw f}finally{i.getState().setRestoring(!1),d=null}})(),d)},E=()=>{if(!a||h===a)return p!=null?p:Promise.resolve();const D=a;return h=D,p=(async()=>{var f,V;let z=!1;try{await x(),await j()}catch(Y){z=!0}try{const Y=await((f=D.getSuggestedQuestions)==null?void 0:f.call(D));Y&&a===D&&i.getState().setSuggestedQuestions(Y)}catch(Y){z=!0}try{const Y=await((V=D.getAttachmentOptions)==null?void 0:V.call(D));Y&&a===D&&i.getState().setAttachmentOptions(Y)}catch(Y){z=!0}z&&h===D&&(h=null)})(),p},A=D=>{var P;const z=i.getState();if(!a||z.busy)return;const f=ci(z.attachments),V=f.map($=>$.attachment_id),Y=(P=D.find($=>$.type==="text"))==null?void 0:P.text;G({content:D,query:Y,attachmentIds:V,attachments:f})},B=D=>{const z=i.getState();if(z.busy)return;const f=ci(z.attachments),V=f.map(Y=>Y.attachment_id);G({content:[{type:"text",text:D.display_text}],suggestedQuestionId:D.id,suggestedQuestionVersion:D.version,attachmentIds:V,attachments:f}),f.length>0&&i.getState().clearAttachments()},G=async D=>{var pe,Me,fe,ge;if(!a||i.getState().busy)return;let z=i.getState();const f=++s;if(g=null,i.getState().setBusy(!0),i.getState().setPhase(z.conversationId?"syncing":"processing"),await x(),f!==s)return;if(z=i.getState(),!D.runId&&z.conversationId&&a.getConversation){try{await a.getConversation(z.conversationId)}catch(re){Ct(re).error_code==="CONVERSATION_NOT_FOUND"&&i.getState().setConversation(null,null)}z=i.getState()}if(f!==s)return;const V=(pe=D.clientMessageId)!=null?pe:gt(),Y=`assistant-${gt()}`;l=Y;const P=qp(D.content,D.attachments,gt()),$={id:Y,role:Te.ASSISTANT,text:"",status:se.STREAMING,confirmed:!1,retryCount:D.retryCount,runId:D.runId,conversationId:(Me=z.conversationId)!=null?Me:void 0,requestInput:{runId:D.runId,content:D.content,query:D.query,attachmentIds:D.attachmentIds,clientMessageId:V,conversationId:(fe=z.conversationId)!=null?fe:void 0,suggestedQuestionId:D.suggestedQuestionId,suggestedQuestionVersion:D.suggestedQuestionVersion}};z.updateMessages(re=>D.addUserMessage===!1?[...re,$]:[...re,P,$]),z.setBusy(!0),z.setPhase("processing");let te=!1;const me={onMessageStart:(re,W)=>{f===s&&(l=Y,i.getState().setConversation(W!=null?W:i.getState().conversationId,re),q({runId:re,conversationId:W,status:se.STREAMING,confirmed:!1}))},onProgress:(re,W)=>{f===s&&(i.getState().setPhase(W),q({progress:W}))},onDelta:(re,W,he)=>{f===s&&q(De=>({text:`${De.text}${W}`,sequence:he,status:se.STREAMING}))},onSnapshot:(re,W,he,De)=>{f===s&&q(Ue=>({text:W,citations:ui(Ue.citations,he),sequence:De}))},onCitation:(re,W,he)=>{f===s&&q(De=>({citations:zn(De.citations,W),sequence:he}))},onComplete:(re,W)=>{if(f!==s)return;te=!0;const he={status:(W==null?void 0:W.status)===Ke.NO_EVIDENCE?se.NO_EVIDENCE:se.COMPLETE,confirmed:!0};(W==null?void 0:W.answer)!==void 0&&(he.text=W.answer),q(De=>{var Ue;return{...he,citations:(Ue=W==null?void 0:W.citations)!=null&&Ue.length?ui(De.citations,W.citations):De.citations}}),S()},onError:(re,W)=>{f===s&&(te=!0,q({status:di(W)?se.AWAITING_RECOVERY:se.ERROR,error:W,retryable:di(W),confirmed:!1}),i.getState().setPhase(null),i.getState().setBusy(!1),o=null)}};try{const re=a.send((ge=$.requestInput)!=null?ge:{content:D.content},me);!te&&f===s&&(o=re)}catch(re){te||me.onError(Y,Ct(re,{status:"request_error",error_code:"REQUEST_START_FAILED"}))}},_=()=>{const{draft:D,attachments:z}=i.getState();if(z.some(Y=>Y.status===Qe.UPLOADING||Y.status===Qe.PENDING))return;const f=Op({draft:D}),V=z.some(Y=>Y.status===Qe.UPLOADED);f.length===0&&!V||(A(f),i.getState().resetComposer())},k=async D=>{var pe,Me;const z=a;if(!(z!=null&&z.uploadAttachment))return;const f=c,V=()=>f===c&&z===a;if(await E(),!V())return;const Y=i.getState().attachmentOptions;if(!Y||!Y.available)return;const P=i.getState();i.getState().setAttachmentError(null),i.getState().clearToast();const $=Y.limits.max_attachments-P.attachments.length;if(D.length>$){const fe={type:"fileLimitExceeded",value:Y.limits.max_attachments};i.getState().setAttachmentError(fe),i.getState().showToast({kind:"error",message:mn(fe,b)})}let te=D.length>$,me=0;for(const fe of D.slice(0,Math.max($,0))){if(!V())return;const ge=Zp(fe,Y);if(ge){i.getState().setAttachmentError(ge),i.getState().showToast({kind:"error",message:mn(ge,b)}),te=!0;continue}if(i.getState().attachments.length>=Y.limits.max_attachments){const W={type:"fileLimitExceeded",value:Y.limits.max_attachments};i.getState().setAttachmentError(W),i.getState().showToast({kind:"error",message:mn(W,b)}),te=!0;break}const re={id:gt(),file:fe,clientUploadId:gt(),status:Qe.UPLOADING};i.getState().addAttachment(re);try{const W=await z.uploadAttachment(fe,re.clientUploadId);if(!V()||!i.getState().attachments.some(he=>he.id===re.id)){if(await((pe=z.deleteAttachment)==null?void 0:pe.call(z,W.attachment_id).catch(()=>{})),!V())return;continue}i.getState().setAttachmentState(re.id,{status:Qe.UPLOADED,attachment:W})}catch(W){if(!V())return;te=!0;const he=Ct(W);i.getState().setAttachmentState(re.id,{status:Qe.ERROR,error:he}),i.getState().showToast({kind:"error",message:(Me=he.message)!=null?Me:he.error_code,errorCode:he.error_code})}me+=1}me>0&&!te&&i.getState().showToast({kind:"success",message:Ln(b).attachmentUploaded})},L=()=>{o==null||o.cancel(),o=null,s+=1;const D=l;D&&i.getState().updateMessages(z=>z.map(f=>f.id===D?{...f,status:se.CANCELLED,confirmed:!1}:f)),l=null,i.getState().setBusy(!1),i.getState().setPhase(null)};return{setLanguage:M,store:i,initialize:E,setAdapter:D=>{a=D,u=null,E()},toggle:D=>{const z=i.getState(),f=D!=null?D:!z.open;z.toggle(D),f&&E()},submitSuggested:B,setDraft:D=>i.getState().setDraft(D),send:_,addFiles:k,removeAttachment:D=>{const z=i.getState().attachments.find(f=>f.id===D);z!=null&&z.attachment&&(a!=null&&a.deleteAttachment)&&a.deleteAttachment(z.attachment.attachment_id),i.getState().removeAttachmentLocal(D)},clearAttachments:()=>{c+=1,F(),i.getState().clearAttachments()},cancel:L,recover:()=>{var V,Y;if(i.getState().busy)return;const D=i.getState().messages,z=l?D.find(P=>P.id===l):[...D].reverse().find(P=>P.role===Te.ASSISTANT&&(P.status===se.AWAITING_RECOVERY||P.status===se.ERROR)&&P.requestInput),f=z==null?void 0:z.requestInput;f&&(i.getState().updateMessages(P=>P.filter($=>$.id!==(z==null?void 0:z.id))),G({runId:z.status===se.AWAITING_RECOVERY?z.runId:f.runId,content:f.content,query:f.query,suggestedQuestionId:f.suggestedQuestionId,suggestedQuestionVersion:f.suggestedQuestionVersion,attachmentIds:(V=f.attachmentIds)!=null?V:[],attachments:(()=>{var $;const P=D.findIndex(te=>te.id===z.id);return P>0?($=D[P-1].attachments)!=null?$:[]:[]})(),clientMessageId:f.clientMessageId,addUserMessage:!1,retryCount:((Y=z.retryCount)!=null?Y:0)+1}))},restoreConversation:N,share:w,loadCitation:async(D,z)=>{if(!(a!=null&&a.getCitation))return;const f=i.getState().messages.find(Y=>Y.id===D);if(!(f!=null&&f.runId))return;const V=await a.getCitation(f.runId,z);return i.getState().updateMessages(Y=>Y.map(P=>P.id!==D?P:{...P,citations:zn(P.citations,V)})),V},submitFeedback:async(D,z,f="")=>{const V=i.getState().messages.find($=>$.id===D);if(!(V!=null&&V.runId)||!(a!=null&&a.submitFeedback))return null;const Y=z==="dislike"?f:"",P=await a.submitFeedback(V.runId,{rating:z,comment:Y});return i.getState().updateMessages($=>$.map(te=>te.id===D?{...te,feedback:P}:te)),P},clear:()=>{g=null,c+=1,L(),F(),u=null,i.getState().clearMessages(),i.getState().setConversation(null,null),i.getState().resetComposer(),x().then(()=>{var D;return(D=a==null?void 0:a.getSuggestedQuestions)==null?void 0:D.call(a)}).then(D=>{D&&i.getState().setSuggestedQuestions(D)}).catch(()=>{})},destroy:()=>{c+=1,L(),i.destroy()}};function q(D){l&&i.getState().updateMessages(z=>z.map(f=>{if(f.id!==l)return f;const V=typeof D=="function"?D(f):D;return{...f,...V}}))}function S(){o=null,l=null,i.getState().setBusy(!1),i.getState().setPhase(null)}function F(){const D=i.getState().attachments;if(a!=null&&a.deleteAttachment)for(const z of D)z.attachment&&a.deleteAttachment(z.attachment.attachment_id).catch(()=>{})}}function qp(e,t,n){var i,a;const r=(a=(i=e.find(o=>o.type==="text"))==null?void 0:i.text)!=null?a:"";return{id:`user-${n}`,role:Te.USER,text:r,status:"complete",attachments:t,requestInput:{content:e,attachmentIds:t.map(o=>o.attachment_id)}}}function ci(e){return e.filter(t=>t.status===Qe.UPLOADED&&t.attachment).map(t=>t.attachment)}function zn(e,t){const n=e!=null?e:[],r=n.findIndex(a=>a.citation_id===t.citation_id);if(r===-1)return[...n,t];const i=[...n];return i[r]=t,i}function ui(e,t){return t.reduce(zn,e!=null?e:[])}function hi(e){return e===Ke.COMPLETED||e===Ke.NO_EVIDENCE}function gn(e){return e===Ke.RUNNING||e===Ke.QUEUED}function di(e){return e.error_code===it.STREAM_ENDED_BEFORE_TERMINAL||e.error_code===it.KNOWLEDGE_RUN_IN_PROGRESS}function Ct(e,t={status:"upload_error",error_code:it.ATTACHMENT_UPLOAD_FAILED}){return e&&typeof e=="object"&&"error_code"in e?e:{...t,message:String(e)}}function gt(){return typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random()}`}function Zp(e,t){const n=_p(e.name),r=new Set(t.image_extensions.map(vn)),i=new Set(t.text_extensions.map(vn)),a=e.type.startsWith("image/")||r.has(n),o=i.has(n)||e.type==="text/plain";if(!a&&!o||a&&!t.image_supported)return{type:"unsupportedFile",value:e.name};const l=a?t.limits.image_max_bytes:t.limits.text_max_bytes;return e.size>l?{type:"fileTooLarge",value:e.name}:null}function mn(e,t){return Ln(t)[e.type](e.value)}function _p(e){const t=e.lastIndexOf(".");return t>=0?vn(e.slice(t)):""}function vn(e){return e.startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`}function Wp(e){var t;try{const n=(t=window.sessionStorage.getItem(e))!=null?t:window.sessionStorage.getItem(Vp);if(!n)return null;const r=JSON.parse(n);return{open:!!r.open,conversationId:typeof r.conversationId=="string"?r.conversationId:null}}catch(n){return null}}function Jp(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){}}const Ca="renderbus-ai-chat-theme";function Xp(e){if(typeof window=="undefined")return e;try{const t=window.localStorage.getItem(Ca);return t==="light"||t==="dark"?t:e}catch(t){return e}}function Oa(e){var r;const t=(r=e.shadowRoot)!=null?r:e.attachShadow({mode:"open"}),n=document.createElement("div");return n.className="rb-ai-chat-root",t.appendChild(n),{host:e,root:t,container:n,destroy:()=>n.remove()}}function Kp(e,t={}){var s;const n=Oa(e);Da(n.root);const r=(s=t.controller)!=null?s:La({adapter:t.adapter,baseUrl:t.baseUrl,defaultOpen:t.defaultOpen,persistSession:t.persistSession}),i=!t.controller,a=typeof t.launcher=="object"?{...t.launcher,controller:r}:t.launcher,o={adapter:t.adapter,controller:r,language:t.language,theme:t.theme,launcher:a},l=Pa.createRoot(n.container);return l.render(y.jsx(Ra,{props:o,mount:n,renderInPortal:!1})),{...n,controller:r,destroy:()=>{l.unmount(),i&&r.destroy(),n.destroy()}}}function Ra({props:e,mount:t,renderInPortal:n=!0}){var g;const[r,i]=O.useState(()=>{var b;return Xp((b=e.theme)!=null?b:"light")}),a=(g=e.language)!=null?g:"zh",o=O.useMemo(()=>Ln(a),[a]),l=e.launcher!==!1,{launcherStyle:s,onPositionChange:c,panelStyle:h,onResizeStart:u}=vp(l);O.useEffect(()=>{try{window.localStorage.setItem(Ca,r)}catch(b){}},[r]),O.useEffect(()=>{e.controller.initialize()},[e.controller]);const p=typeof e.launcher=="object"?e.launcher:void 0,d=y.jsxs(Ga,{labels:o,language:a,theme:r,toggleTheme:()=>i(b=>b==="light"?"dark":"light"),children:[y.jsx("style",{children:Sp()}),y.jsx(Mp,{...e,panelStyle:h,onResizeStart:u}),l?y.jsx(wp,{controller:e.controller,disabled:p==null?void 0:p.disabled,className:p==null?void 0:p.className,onPositionChange:c,style:s}):null]});return n?pi.createPortal(d,t.container):d}function $p(e){const[t,n]=O.useState(null);return O.useEffect(()=>{if(!e.container)return;const r=Oa(e.container);return Da(r.root),n(r),()=>{r.destroy(),n(null)}},[e.container]),t?y.jsx(Ra,{props:e,mount:t}):null}exports.AIChat=$p;exports.createAIChatController=La;exports.createCustomerV1ChatAdapter=za;exports.mountAIChat=Kp;
|
|
52
|
+
`)}const Sa="renderbus-ai-chat-layout",be=55,R=8,ke=10,_e=300,ue=360,Ht=24,Ta=400,ja=660;function Tp(){return typeof window=="undefined"?{left:0,top:0}:{left:Math.max(window.innerWidth-be-Ht,R),top:Math.max(window.innerHeight-be-Ht,R)}}function jp(){return typeof window=="undefined"?{left:0,top:0}:{left:Math.max(window.innerWidth-Ta-Ht,R),top:Math.max(window.innerHeight-ja-Ht,R)}}function zp(){var e;if(typeof window=="undefined")return null;try{const t=JSON.parse((e=window.localStorage.getItem(Sa))!=null?e:"null"),n=t==null?void 0:t.launcherPosition,r=t==null?void 0:t.panelSize;return!n||!r||!Number.isFinite(n.left)||!Number.isFinite(n.top)||!Number.isFinite(r.width)||!Number.isFinite(r.height)||r.width<_e||r.height<ue?null:{launcherPosition:{left:Math.min(Math.max(n.left,R),Math.max(R,window.innerWidth-be-R)),top:Math.min(Math.max(n.top,R),Math.max(R,window.innerHeight-be-R))},panelSize:{width:r.width,height:r.height}}}catch(t){return null}}function vp(e){const t=O.useMemo(()=>zp(),[]),[n,r]=O.useState(()=>{var x;return(x=t==null?void 0:t.launcherPosition)!=null?x:Tp()}),[i,a]=O.useState(()=>{var x;return(x=t==null?void 0:t.panelSize)!=null?x:{width:Ta,height:ja}}),[o,l]=O.useState(jp),[s,c]=O.useState(()=>typeof window=="undefined"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}),h=O.useRef(null);O.useEffect(()=>{const x=()=>{c(A=>{const I={width:window.innerWidth,height:window.innerHeight};return A.width===I.width&&A.height===I.height?A:I})},b=window.visualViewport;return window.addEventListener("resize",x),b==null||b.addEventListener("resize",x),x(),()=>{window.removeEventListener("resize",x),b==null||b.removeEventListener("resize",x)}},[]);const u=O.useMemo(()=>({left:Math.min(Math.max(n.left,R),Math.max(R,s.width-be-R)),top:Math.min(Math.max(n.top,R),Math.max(R,s.height-be-R))}),[n,s]),p=O.useMemo(()=>({left:Math.min(Math.max(o.left,R),Math.max(R,s.width-i.width-R)),top:Math.min(Math.max(o.top,R),Math.max(R,s.height-i.height-R))}),[i,o,s]);O.useEffect(()=>{const x=u.top-ke-R,b=s.height-u.top-be-2*ke-R;x>=ue||b<ue?h.current="above":h.current="below"},[u.top,i.height,s]);const d=O.useCallback((x,b)=>{var D;const A=(D=h.current)!=null?D:"above",I=b-ke-R,j=window.innerHeight-b-be-2*ke-R;A==="above"&&I<ue?h.current="below":A==="below"&&j<ue&&(h.current="above"),r({left:x,top:b})},[]),g=O.useCallback((x,b)=>{b.preventDefault();const A=b.clientX,I=b.clientY,j=i,D=u;if(!e){const X=window.innerWidth,K=window.innerHeight,re=Math.min(j.width,X-2*R),ne=Math.min(j.height,K-2*R),m=Math.min(Math.max(p.left,R),X-re-R),E=Math.min(Math.max(p.top,R),K-ne-R),z=H=>{const G=H.clientX-A,P=H.clientY-I,ee=x==="left"?Math.min(Math.max(re-G,_e),re+m-R):x==="right"?Math.min(Math.max(re+G,_e),X-R-m):re,$=x==="top"?Math.min(Math.max(ne-P,ue),ne+E-R):x==="bottom"?Math.min(Math.max(ne+P,ue),K-R-E):ne;a({width:ee,height:$}),l({left:x==="left"?m+re-ee:m,top:x==="top"?E+ne-$:E})},f=()=>{window.removeEventListener("pointermove",z),window.removeEventListener("pointerup",f)};window.addEventListener("pointermove",z),window.addEventListener("pointerup",f);return}const N=D.top-j.height-ke,B=D.top-ke-R,F=h.current==="below"||h.current!=="above"&&N<R&&B<ue,W=window.innerHeight-D.top-be-2*ke-R,k=Math.min(j.height,window.innerHeight-2*R,F?Math.max(ue,W):N<R?Math.max(ue,B):window.innerHeight-2*R),v=Math.max(D.left+be-j.width,R),U=F?D.top+be+ke:Math.max(R,D.top-k-ke);let Y=null;const S=X=>{const K=X.clientX-A,re=X.clientY-I,ne=window.innerWidth-be-R,m=window.innerHeight-be-R,E=ue+ke+R,z=x==="left"?Math.min(Math.max(j.width-K,_e),Math.max(_e,j.width+v-R)):x==="right"?Math.min(Math.max(j.width+K,_e,j.width+R-D.left),Math.min(Math.max(_e,window.innerWidth-2*R),window.innerWidth-R-v,j.width+ne-D.left)):j.width,f=x==="top"?Math.min(Math.max(k-re,ue),Math.min(window.innerHeight-2*R,k+U-R)):x==="bottom"?Math.min(Math.max(k+re,ue,k+R-D.top),Math.min(Math.max(ue,window.innerHeight-2*R),window.innerHeight-R-U)):j.height,H=x==="top"&&F?D.top+k-f:x==="bottom"&&!F?Math.max(D.top+f-k,E):D.top;f===ue&&(Y!=null||(Y=H)),a({width:z,height:f}),(x==="right"||x==="top"&&F||x==="bottom"&&!F)&&r({left:Math.min(Math.max(x==="right"?D.left+(z-j.width):D.left,R),ne),top:Math.min(Math.max(x==="top"&&F||x==="bottom"&&!F?Y!=null?Y:H:D.top,R),m)})},V=()=>{window.removeEventListener("pointermove",S),window.removeEventListener("pointerup",V)};window.addEventListener("pointermove",S),window.addEventListener("pointerup",V)},[e,u,p,i,o]),M=O.useMemo(()=>{if(typeof window=="undefined")return;const x=Math.min(i.width,window.innerWidth-2*R);if(!e){const W=Math.min(i.height,window.innerHeight-2*R),k=Math.min(Math.max(p.left,R),window.innerWidth-x-R),v=Math.min(Math.max(p.top,R),window.innerHeight-W-R);return{left:k,top:v,width:x,height:W,right:"auto",bottom:"auto"}}const b=u.top-i.height-ke,A=u.top-ke-R,I=window.innerHeight-u.top-be-2*ke-R,j=h.current==="below"&&A<ue&&I>=ue||h.current!=="above"&&b<R&&A<ue&&I>=ue;h.current=j?"below":"above";const D=I,N=Math.min(i.height,window.innerHeight-2*R,j?Math.max(ue,D):b<R?Math.max(R,A):window.innerHeight-2*R),B=Math.min(Math.max(u.left+be-x,R),Math.max(R,window.innerWidth-x-R)),F=j?u.top+be+ke:Math.max(R,u.top-N-ke);return{left:B,top:F,width:x,height:N,minHeight:N<ue?0:void 0,right:"auto",bottom:"auto"}},[e,u,i,o,s]);return O.useEffect(()=>{try{window.localStorage.setItem(Sa,JSON.stringify({launcherPosition:n,panelSize:i}))}catch(x){}},[n,i]),{launcherStyle:{left:u.left,top:u.top,right:"auto",bottom:"auto"},panelStyle:M,onPositionChange:d,onResizeStart:g}}const Lp={accept:[],maxCount:0,maxFileBytes:0,available:!1};function Cp(e=!1){return Ua.create(t=>({open:e,restoring:!1,messages:[],busy:!1,draft:"",attachments:[],attachmentError:null,toast:null,attachmentPolicy:Lp,attachmentOptions:null,suggestedQuestions:[],conversationId:null,activeRunId:null,phase:null,toggle:n=>t(r=>({open:n!=null?n:!r.open})),setMessages:n=>t({messages:n}),updateMessages:n=>t(r=>({messages:n(r.messages)})),setBusy:n=>t({busy:n}),setRestoring:n=>t({restoring:n}),setDraft:n=>t({draft:n}),clearMessages:()=>t({messages:[]}),clearDraft:()=>t({draft:""}),resetComposer:()=>t({draft:"",attachments:[],attachmentError:null,toast:null}),setAttachmentOptions:n=>t({attachmentOptions:n,attachmentPolicy:{accept:[...n.image_extensions,...n.text_extensions],maxCount:n.limits.max_attachments,maxFileBytes:Math.max(n.limits.image_max_bytes,n.limits.text_max_bytes),available:n.available,imageSupported:n.image_supported,options:n}}),setSuggestedQuestions:n=>t({suggestedQuestions:n}),setConversation:(n,r=null)=>t({conversationId:n,activeRunId:r}),setPhase:n=>t({phase:n}),setAttachmentState:(n,r)=>t(i=>({attachments:i.attachments.map(a=>a.id===n?{...a,...r}:a)})),setAttachmentError:n=>t({attachmentError:n}),showToast:n=>t({toast:n}),clearToast:()=>t({toast:null}),addAttachment:n=>t(r=>({attachments:[...r.attachments,n]})),removeAttachmentLocal:n=>t(r=>({attachments:r.attachments.filter(i=>i.id!==n)})),clearAttachments:()=>t({attachments:[],attachmentError:null,toast:null})}))}function Op({draft:e}){const t=e.trim();return t?[{type:"text",text:t}]:[]}async function ze(e){var a,o,l,s,c,h;const t=(a=e.headers.get("X-Request-ID"))!=null?a:void 0,n=Number(e.headers.get("Retry-After"))||void 0,r=(o=e.headers.get("Content-Type"))!=null?o:"";let i={};if(r.includes("application/json"))try{i=await e.json()}catch(u){i={}}return{request_id:(l=i.request_id)!=null?l:t,status:(s=i.status)!=null?s:e.statusText,error_code:(c=i.error_code)!=null?c:`HTTP_${e.status}`,message:i.message,retry_after:(h=i.retry_after)!=null?h:n,httpStatus:e.status}}function Rp(e){const t=(n,r={})=>fetch(`${e}${n}`,{...r,credentials:"include"});return{async getOptions(){const n=await t("/attachments/options",{headers:{Accept:"application/json"}});if(!n.ok)throw await ze(n);return await n.json()},async upload(n,r){const i=new FormData;i.append("client_upload_id",r),i.append("file",n);const a=await t("/attachments",{method:"POST",headers:{Accept:"application/json"},body:i});if(!a.ok)throw await ze(a);return(await a.json()).attachment},async getContent(n,r=!1){const i=r?"?download=1":"",a=await t(`/attachments/${encodeURIComponent(n)}/content${i}`,{headers:{Accept:"*/*"}});if(!a.ok)throw await ze(a);return a.blob()},async delete(n){const r=await t(`/attachments/${encodeURIComponent(n)}`,{method:"DELETE",headers:{Accept:"application/json"}});if(!(r.status===204||r.status===404&&await Pp(r))&&!r.ok)throw await ze(r)}}}async function Pp(e){return(await ze(e)).error_code==="ATTACHMENT_NOT_FOUND"}async function*Up(e){var i,a;if(!e.body)throw new Error("SSE response body is missing");const t=e.body.getReader(),n=new TextDecoder;let r="";try{for(;;){const l=await t.read();r+=n.decode((i=l.value)!=null?i:new Uint8Array,{stream:!l.done});const s=r.split(/\r?\n\r?\n/);r=(a=s.pop())!=null?a:"";for(const c of s){const h=oi(c);h&&(yield h)}if(l.done)break}const o=oi(r);o&&(yield o)}finally{await t.cancel().catch(()=>{}),t.releaseLock()}}function oi(e){let t,n="message";const r=[];for(const o of e.split(/\r?\n/)){if(!o||o.startsWith(":"))continue;const l=o.indexOf(":"),s=l<0?o:o.slice(0,l),c=l<0?"":o.slice(l+1).replace(/^ /,"");s==="id"&&(t=c),s==="event"&&(n=c),s==="data"&&r.push(c)}if(r.length===0)return null;const i=r.join(`
|
|
53
|
+
`);let a=i;try{a=JSON.parse(i)}catch(o){}return{id:t,event:n,data:a}}const Oe={RUN_STARTED:"run.started",RUN_PROGRESS:"run.progress",ANSWER_DELTA:"answer.delta",ANSWER_SNAPSHOT:"answer.snapshot",CITATION_ADDED:"citation.added",RUN_COMPLETED:"run.completed",RUN_NO_EVIDENCE:"run.no_evidence",RUN_FAILED:"run.failed",TERMINAL:"terminal"},Ke={QUEUED:"queued",RUNNING:"running",COMPLETED:"completed",NO_EVIDENCE:"no_evidence"},Bp="/api/ai-assistant/v1",Qp="https://agent-gateway.renderbus.com:39080";function za(e={}){var r;const t=((r=e.baseUrl)!=null?r:Bp).replace(/\/$/,""),n=Rp(t);return{send(i,a){const o=new AbortController;let l=!1;const s={...a,onComplete:(...c)=>{l||(l=!0,a.onComplete(...c))},onError:(...c)=>{l||(l=!0,a.onError(...c))}};return Fp(t,e,i,s,o.signal).catch(c=>{var h;o.signal.aborted||s.onError((h=i.clientMessageId)!=null?h:"",Gp(c))}),{cancel:()=>o.abort()}},async getSuggestedQuestions(i,a=4){var c;const o=new URLSearchParams({limit:String(a)}),l=i!=null?i:e.module;l&&o.set("module",l);const s=await rt(t,`/suggested-questions?${o.toString()}`);if(!s.ok)throw await ze(s);return(c=(await s.json()).items)!=null?c:[]},getAttachmentOptions:()=>n.getOptions(),uploadAttachment:(i,a)=>n.upload(i,a),getAttachmentContent:(i,a)=>n.getContent(i,a),deleteAttachment:i=>n.delete(i),async getConversation(i,a=50){var l,s;const o=await rt(t,`/conversations/${encodeURIComponent(i)}?limit=${a}`);if(!o.ok)throw await ze(o);return(s=(l=(await o.json()).items)==null?void 0:l.map(Yp))!=null?s:[]},async shareConversation(i){var s;const a=await rt(t,`/conversations/${encodeURIComponent(i)}/share`,{method:"POST",headers:{Accept:"application/json"}});if(!a.ok)throw await ze(a);const o=await a.json(),l=new URL("/console/customer-assistant",(s=e.shareOrigin)!=null?s:Qp);return l.searchParams.set("conversation_id",o.conversation_id),l.toString()},async getCitation(i,a){const o=await rt(t,`/runs/${encodeURIComponent(i)}/citations/${encodeURIComponent(a)}`);if(!o.ok)throw await ze(o);const l=await o.json();return yt(l.citations[0])},async submitFeedback(i,a){const o=await rt(t,`/runs/${encodeURIComponent(i)}/feedback`,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok)throw await ze(o);return(await o.json()).feedback}}}async function Fp(e,t,n,r,i){var c,h,u,p,d,g,M,x,b,A;const a=Hp(n,t),o=await rt(e,"/chat/stream",{method:"POST",headers:{Accept:"text/event-stream","Content-Type":"application/json","Cache-Control":"no-cache",Pragma:"no-cache","X-Request-ID":va()},body:JSON.stringify(a),signal:i});if(!o.ok)throw await ze(o);const l=(c=o.headers.get("Content-Type"))!=null?c:"";if(!l.toLowerCase().includes("text/event-stream"))throw{status:"invalid_response",error_code:it.INVALID_STREAM_CONTENT_TYPE,message:`Expected text/event-stream, received ${l||"unknown"}`,httpStatus:o.status};let s=(h=n.clientMessageId)!=null?h:"";for await(const I of Up(o)){const j=I.data;if(I.event===Oe.RUN_STARTED){const D=j;s=D.run_id,(u=r.onMessageStart)==null||u.call(r,s,D.conversation_id);continue}if(I.event===Oe.RUN_PROGRESS){const D=j;(p=r.onProgress)==null||p.call(r,s,D.phase,D.progress_sequence);continue}if(I.event===Oe.ANSWER_DELTA){const D=j;r.onDelta(s,D.text,D.sequence);continue}if(I.event===Oe.ANSWER_SNAPSHOT){const D=j;(M=r.onSnapshot)==null||M.call(r,s,D.answer,(g=(d=D.citations)==null?void 0:d.map(yt))!=null?g:[],D.sequence);continue}if(I.event===Oe.CITATION_ADDED){const D=yt(j.citation);(b=r.onCitation)==null||b.call(r,s,D,Number((x=j.sequence)!=null?x:0));continue}if(I.event===Oe.RUN_COMPLETED||I.event===Oe.RUN_NO_EVIDENCE){const D=j;r.onComplete(s,{status:I.event===Oe.RUN_NO_EVIDENCE?Ke.NO_EVIDENCE:D.status,answer:D.answer,citations:(A=D.citations)==null?void 0:A.map(yt),error_code:D.error_code,confirmed:!0});return}if(I.event===Oe.RUN_FAILED||I.event===Oe.TERMINAL){const D=j;r.onError(s,{status:D.status,error_code:D.error_code,message:D.message,retry_after:D.retry_after,httpStatus:o.status});return}}throw{status:"unknown",error_code:it.STREAM_ENDED_BEFORE_TERMINAL,message:"The answer stream ended before a terminal event"}}function Yp(e){var t;return{...e,citations:(t=e.citations)==null?void 0:t.map(yt)}}function yt(e){return{...e,snippet:li(e.snippet),content:e.content?li(e.content):e.content}}function li(e){var r;const t=e.split(/\r?\n/);let n=!1;for(let i=0;i<t.length;i+=1){const a=t[i];if(/^\s*[-*+]\s+/.test(a)){n=!0;continue}if(n&&a.trim()&&((r=t[i-1])!=null&&r.trim())){t.splice(i,0,"");break}if(n&&!a.trim())break}return t.join(`
|
|
54
|
+
`).replace(/(\*\*[^*\n]+?\*\*)(?=[\u3400-\u9fff])/g,"$1 ")}function Hp(e,t){var r,i,a,o,l;if(e.runId)return{run_id:e.runId};const n={attachment_ids:e.attachmentIds,client_message_id:(r=e.clientMessageId)!=null?r:va(),conversation_id:e.conversationId,module:(a=(i=e.module)!=null?i:t.module)!=null?a:"",knowledge_scope:t.knowledgeScope};return e.suggestedQuestionId?{...n,suggested_question_id:e.suggestedQuestionId,suggested_question_version:(o=e.suggestedQuestionVersion)!=null?o:1}:{...n,...(l=e.query)!=null&&l.trim()?{query:e.query.trim()}:{}}}async function rt(e,t,n={}){return fetch(`${e}${t}`,{...n,credentials:"include"})}function va(){return typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random()}`}function Gp(e){return e&&typeof e=="object"&&"error_code"in e?e:{status:"network_error",error_code:"NETWORK_ERROR",message:String(e)}}const si="renderbus-ai-chat-state",Vp="task-eva-ai-chat-state";function La(e={}){var X,K,re,ne,m;const t=typeof e.persistSession=="object"&&(X=e.persistSession.storageKey)!=null?X:si,n=!!e.persistSession,r=n?Wp(t):null,i=Cp((re=(K=e.defaultOpen)!=null?K:r==null?void 0:r.open)!=null?re:!1);r!=null&&r.conversationId&&(i.getState().setConversation(r.conversationId),i.getState().setRestoring(!0));let a=(ne=e.adapter)!=null?ne:za({baseUrl:e.baseUrl,shareOrigin:e.shareOrigin}),o=null,l=null,s=0,c=0,h=null,u=null,p=null,d=null,g=(m=r==null?void 0:r.conversationId)!=null?m:null,M="zh";n&&i.subscribe(E=>{Jp(t,{open:E.open,conversationId:E.conversationId})});const x=E=>{M=E},b=async()=>{a!=null&&a.initializeConversation&&(u!=null||(u=a.initializeConversation().catch(()=>{})),await u)},A=async(E,z=50)=>{if(!(a!=null&&a.getConversation)||!E)return;const f=s,H=await a.getConversation(E,z);if(f!==s)return;const G=H.flatMap(P=>{var me,pe,Me,fe,ge;const ee={id:`user-${P.message_id}`,role:Te.USER,text:(me=P.question)!=null?me:"",status:se.COMPLETE,attachments:P.attachments},$={id:`assistant-${P.run_id}`,role:Te.ASSISTANT,text:(pe=P.answer)!=null?pe:"",status:P.status===Ke.NO_EVIDENCE?se.NO_EVIDENCE:hi(P.status)?se.COMPLETE:gn(P.status)?se.AWAITING_RECOVERY:se.ERROR,retryable:gn(P.status),citations:P.citations,feedback:P.feedback,runId:P.run_id,conversationId:P.conversation_id,confirmed:hi(P.status),requestInput:{runId:gn(P.status)?P.run_id:void 0,content:[{type:"text",text:(Me=P.question)!=null?Me:""}],query:P.question,attachmentIds:(ge=(fe=P.attachments)==null?void 0:fe.map(ie=>ie.attachment_id))!=null?ge:[],conversationId:P.conversation_id}};return[ee,$]});i.getState().setMessages(G),i.getState().setConversation(E,null)},I=async()=>{const E=i.getState().conversationId;if(!(!(a!=null&&a.shareConversation)||!E))return a.shareConversation(E)},j=async()=>{const E=g;if(!n||!E){i.getState().setRestoring(!1);return}return d||(i.getState().setRestoring(!0),d=(async()=>{const z=s;try{if(await A(E),z!==s)return;g=null}catch(f){if(z!==s)return;if(Ct(f).error_code==="CONVERSATION_NOT_FOUND"){g=null,i.getState().setConversation(null,null);return}throw f}finally{i.getState().setRestoring(!1),d=null}})(),d)},D=()=>{if(!a||h===a)return p!=null?p:Promise.resolve();const E=a;return h=E,p=(async()=>{var f,H;let z=!1;try{await b(),await j()}catch(G){z=!0}try{const G=await((f=E.getSuggestedQuestions)==null?void 0:f.call(E));G&&a===E&&i.getState().setSuggestedQuestions(G)}catch(G){z=!0}try{const G=await((H=E.getAttachmentOptions)==null?void 0:H.call(E));G&&a===E&&i.getState().setAttachmentOptions(G)}catch(G){z=!0}z&&h===E&&(h=null)})(),p},N=E=>{var P;const z=i.getState();if(!a||z.busy)return;const f=ci(z.attachments),H=f.map(ee=>ee.attachment_id),G=(P=E.find(ee=>ee.type==="text"))==null?void 0:P.text;F({content:E,query:G,attachmentIds:H,attachments:f})},B=E=>{const z=i.getState();if(z.busy)return;const f=ci(z.attachments),H=f.map(G=>G.attachment_id);F({content:[{type:"text",text:E.display_text}],suggestedQuestionId:E.id,suggestedQuestionVersion:E.version,attachmentIds:H,attachments:f}),f.length>0&&i.getState().clearAttachments()},F=async E=>{var pe,Me,fe,ge;if(!a||i.getState().busy)return;let z=i.getState();const f=++s;if(g=null,i.getState().setBusy(!0),i.getState().setPhase(z.conversationId?"syncing":"processing"),await b(),f!==s)return;if(z=i.getState(),!E.runId&&z.conversationId&&a.getConversation){try{await a.getConversation(z.conversationId)}catch(ie){Ct(ie).error_code==="CONVERSATION_NOT_FOUND"&&i.getState().setConversation(null,null)}z=i.getState()}if(f!==s)return;const H=(pe=E.clientMessageId)!=null?pe:gt(),G=`assistant-${gt()}`;l=G;const P=qp(E.content,E.attachments,gt()),ee={id:G,role:Te.ASSISTANT,text:"",status:se.STREAMING,confirmed:!1,retryCount:E.retryCount,runId:E.runId,conversationId:(Me=z.conversationId)!=null?Me:void 0,requestInput:{runId:E.runId,content:E.content,query:E.query,attachmentIds:E.attachmentIds,clientMessageId:H,conversationId:(fe=z.conversationId)!=null?fe:void 0,suggestedQuestionId:E.suggestedQuestionId,suggestedQuestionVersion:E.suggestedQuestionVersion}};z.updateMessages(ie=>E.addUserMessage===!1?[...ie,ee]:[...ie,P,ee]),z.setBusy(!0),z.setPhase("processing");let $=!1;const me={onMessageStart:(ie,_)=>{f===s&&(l=G,i.getState().setConversation(_!=null?_:i.getState().conversationId,ie),Y({runId:ie,conversationId:_,status:se.STREAMING,confirmed:!1}))},onProgress:(ie,_)=>{f===s&&(i.getState().setPhase(_),Y({progress:_}))},onDelta:(ie,_,he)=>{f===s&&Y(De=>({text:`${De.text}${_}`,sequence:he,status:se.STREAMING}))},onSnapshot:(ie,_,he,De)=>{f===s&&Y(Ue=>({text:_,citations:ui(Ue.citations,he),sequence:De}))},onCitation:(ie,_,he)=>{f===s&&Y(De=>({citations:zn(De.citations,_),sequence:he}))},onComplete:(ie,_)=>{if(f!==s)return;$=!0;const he={status:(_==null?void 0:_.status)===Ke.NO_EVIDENCE?se.NO_EVIDENCE:se.COMPLETE,confirmed:!0};(_==null?void 0:_.answer)!==void 0&&(he.text=_.answer),Y(De=>{var Ue;return{...he,citations:(Ue=_==null?void 0:_.citations)!=null&&Ue.length?ui(De.citations,_.citations):De.citations}}),S()},onError:(ie,_)=>{f===s&&($=!0,Y({status:di(_)?se.AWAITING_RECOVERY:se.ERROR,error:_,retryable:di(_),confirmed:!1}),i.getState().setPhase(null),i.getState().setBusy(!1),o=null)}};try{const ie=a.send((ge=ee.requestInput)!=null?ge:{content:E.content},me);!$&&f===s&&(o=ie)}catch(ie){$||me.onError(G,Ct(ie,{status:"request_error",error_code:"REQUEST_START_FAILED"}))}},W=()=>{const{draft:E,attachments:z}=i.getState();if(z.some(G=>G.status===Qe.UPLOADING||G.status===Qe.PENDING))return;const f=Op({draft:E}),H=z.some(G=>G.status===Qe.UPLOADED);f.length===0&&!H||(N(f),i.getState().resetComposer())},k=async E=>{var pe,Me;const z=a;if(!(z!=null&&z.uploadAttachment))return;const f=c,H=()=>f===c&&z===a;if(await D(),!H())return;const G=i.getState().attachmentOptions;if(!G||!G.available)return;const P=i.getState();i.getState().setAttachmentError(null),i.getState().clearToast();const ee=G.limits.max_attachments-P.attachments.length;if(E.length>ee){const fe={type:"fileLimitExceeded",value:G.limits.max_attachments};i.getState().setAttachmentError(fe),i.getState().showToast({kind:"error",message:mn(fe,M)})}let $=E.length>ee,me=0;for(const fe of E.slice(0,Math.max(ee,0))){if(!H())return;const ge=Zp(fe,G);if(ge){i.getState().setAttachmentError(ge),i.getState().showToast({kind:"error",message:mn(ge,M)}),$=!0;continue}if(i.getState().attachments.length>=G.limits.max_attachments){const _={type:"fileLimitExceeded",value:G.limits.max_attachments};i.getState().setAttachmentError(_),i.getState().showToast({kind:"error",message:mn(_,M)}),$=!0;break}const ie={id:gt(),file:fe,clientUploadId:gt(),status:Qe.UPLOADING};i.getState().addAttachment(ie);try{const _=await z.uploadAttachment(fe,ie.clientUploadId);if(!H()||!i.getState().attachments.some(he=>he.id===ie.id)){if(await((pe=z.deleteAttachment)==null?void 0:pe.call(z,_.attachment_id).catch(()=>{})),!H())return;continue}i.getState().setAttachmentState(ie.id,{status:Qe.UPLOADED,attachment:_})}catch(_){if(!H())return;$=!0;const he=Ct(_);i.getState().setAttachmentState(ie.id,{status:Qe.ERROR,error:he}),i.getState().showToast({kind:"error",message:(Me=he.message)!=null?Me:he.error_code,errorCode:he.error_code})}me+=1}me>0&&!$&&i.getState().showToast({kind:"success",message:Ln(M).attachmentUploaded})},v=()=>{o==null||o.cancel(),o=null,s+=1;const E=l;E&&i.getState().updateMessages(z=>z.map(f=>f.id===E?{...f,status:se.CANCELLED,confirmed:!1}:f)),l=null,i.getState().setBusy(!1),i.getState().setPhase(null)};return{setLanguage:x,store:i,initialize:D,setAdapter:E=>{a=E,u=null,D()},toggle:E=>{const z=i.getState(),f=E!=null?E:!z.open;z.toggle(E),f&&D()},submitSuggested:B,setDraft:E=>i.getState().setDraft(E),send:W,addFiles:k,removeAttachment:E=>{const z=i.getState().attachments.find(f=>f.id===E);z!=null&&z.attachment&&(a!=null&&a.deleteAttachment)&&a.deleteAttachment(z.attachment.attachment_id),i.getState().removeAttachmentLocal(E)},clearAttachments:()=>{c+=1,V(),i.getState().clearAttachments()},cancel:v,recover:()=>{var H,G;if(i.getState().busy)return;const E=i.getState().messages,z=l?E.find(P=>P.id===l):[...E].reverse().find(P=>P.role===Te.ASSISTANT&&(P.status===se.AWAITING_RECOVERY||P.status===se.ERROR)&&P.requestInput),f=z==null?void 0:z.requestInput;f&&(i.getState().updateMessages(P=>P.filter(ee=>ee.id!==(z==null?void 0:z.id))),F({runId:z.status===se.AWAITING_RECOVERY?z.runId:f.runId,content:f.content,query:f.query,suggestedQuestionId:f.suggestedQuestionId,suggestedQuestionVersion:f.suggestedQuestionVersion,attachmentIds:(H=f.attachmentIds)!=null?H:[],attachments:(()=>{var ee;const P=E.findIndex($=>$.id===z.id);return P>0?(ee=E[P-1].attachments)!=null?ee:[]:[]})(),clientMessageId:f.clientMessageId,addUserMessage:!1,retryCount:((G=z.retryCount)!=null?G:0)+1}))},restoreConversation:A,share:I,loadCitation:async(E,z)=>{if(!(a!=null&&a.getCitation))return;const f=i.getState().messages.find(G=>G.id===E);if(!(f!=null&&f.runId))return;const H=await a.getCitation(f.runId,z);return i.getState().updateMessages(G=>G.map(P=>P.id!==E?P:{...P,citations:zn(P.citations,H)})),H},submitFeedback:async(E,z,f="")=>{const H=i.getState().messages.find(ee=>ee.id===E);if(!(H!=null&&H.runId)||!(a!=null&&a.submitFeedback))return null;const G=z==="dislike"?f:"",P=await a.submitFeedback(H.runId,{rating:z,comment:G});return i.getState().updateMessages(ee=>ee.map($=>$.id===E?{...$,feedback:P}:$)),P},clear:()=>{g=null,c+=1,v(),V(),u=null,i.getState().clearMessages(),i.getState().setConversation(null,null),i.getState().resetComposer(),b().then(()=>{var E;return(E=a==null?void 0:a.getSuggestedQuestions)==null?void 0:E.call(a)}).then(E=>{E&&i.getState().setSuggestedQuestions(E)}).catch(()=>{})},destroy:()=>{c+=1,v(),i.destroy()}};function Y(E){l&&i.getState().updateMessages(z=>z.map(f=>{if(f.id!==l)return f;const H=typeof E=="function"?E(f):E;return{...f,...H}}))}function S(){o=null,l=null,i.getState().setBusy(!1),i.getState().setPhase(null)}function V(){const E=i.getState().attachments;if(a!=null&&a.deleteAttachment)for(const z of E)z.attachment&&a.deleteAttachment(z.attachment.attachment_id).catch(()=>{})}}function qp(e,t,n){var i,a;const r=(a=(i=e.find(o=>o.type==="text"))==null?void 0:i.text)!=null?a:"";return{id:`user-${n}`,role:Te.USER,text:r,status:"complete",attachments:t,requestInput:{content:e,attachmentIds:t.map(o=>o.attachment_id)}}}function ci(e){return e.filter(t=>t.status===Qe.UPLOADED&&t.attachment).map(t=>t.attachment)}function zn(e,t){const n=e!=null?e:[],r=n.findIndex(a=>a.citation_id===t.citation_id);if(r===-1)return[...n,t];const i=[...n];return i[r]=t,i}function ui(e,t){return t.reduce(zn,e!=null?e:[])}function hi(e){return e===Ke.COMPLETED||e===Ke.NO_EVIDENCE}function gn(e){return e===Ke.RUNNING||e===Ke.QUEUED}function di(e){return e.error_code===it.STREAM_ENDED_BEFORE_TERMINAL||e.error_code===it.KNOWLEDGE_RUN_IN_PROGRESS}function Ct(e,t={status:"upload_error",error_code:it.ATTACHMENT_UPLOAD_FAILED}){return e&&typeof e=="object"&&"error_code"in e?e:{...t,message:String(e)}}function gt(){return typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random()}`}function Zp(e,t){const n=_p(e.name),r=new Set(t.image_extensions.map(vn)),i=new Set(t.text_extensions.map(vn)),a=e.type.startsWith("image/")||r.has(n),o=i.has(n)||e.type==="text/plain";if(!a&&!o||a&&!t.image_supported)return{type:"unsupportedFile",value:e.name};const l=a?t.limits.image_max_bytes:t.limits.text_max_bytes;return e.size>l?{type:"fileTooLarge",value:e.name}:null}function mn(e,t){return Ln(t)[e.type](e.value)}function _p(e){const t=e.lastIndexOf(".");return t>=0?vn(e.slice(t)):""}function vn(e){return e.startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`}function Wp(e){var t;try{const n=(t=window.sessionStorage.getItem(e))!=null?t:window.sessionStorage.getItem(Vp);if(!n)return null;const r=JSON.parse(n);return{open:!!r.open,conversationId:typeof r.conversationId=="string"?r.conversationId:null}}catch(n){return null}}function Jp(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){}}const Ca="renderbus-ai-chat-theme";function Xp(e){if(typeof window=="undefined")return e;try{const t=window.localStorage.getItem(Ca);return t==="light"||t==="dark"?t:e}catch(t){return e}}function Oa(e){var r;const t=(r=e.shadowRoot)!=null?r:e.attachShadow({mode:"open"}),n=document.createElement("div");return n.className="rb-ai-chat-root",t.appendChild(n),{host:e,root:t,container:n,destroy:()=>n.remove()}}function Kp(e,t={}){var s;const n=Oa(e);Da(n.root);const r=(s=t.controller)!=null?s:La({adapter:t.adapter,baseUrl:t.baseUrl,defaultOpen:t.defaultOpen,persistSession:t.persistSession}),i=!t.controller,a=typeof t.launcher=="object"?{...t.launcher,controller:r}:t.launcher,o={adapter:t.adapter,controller:r,language:t.language,theme:t.theme,launcher:a},l=Pa.createRoot(n.container);return l.render(y.jsx(Ra,{props:o,mount:n,renderInPortal:!1})),{...n,controller:r,destroy:()=>{l.unmount(),i&&r.destroy(),n.destroy()}}}function Ra({props:e,mount:t,renderInPortal:n=!0}){var g;const[r,i]=O.useState(()=>{var M;return Xp((M=e.theme)!=null?M:"light")}),a=(g=e.language)!=null?g:"zh",o=O.useMemo(()=>Ln(a),[a]),l=e.launcher!==!1,{launcherStyle:s,onPositionChange:c,panelStyle:h,onResizeStart:u}=vp(l);O.useEffect(()=>{try{window.localStorage.setItem(Ca,r)}catch(M){}},[r]),O.useEffect(()=>{e.controller.initialize()},[e.controller]);const p=typeof e.launcher=="object"?e.launcher:void 0,d=y.jsxs(Ga,{labels:o,language:a,theme:r,toggleTheme:()=>i(M=>M==="light"?"dark":"light"),children:[y.jsx("style",{children:Sp()}),y.jsx(Mp,{...e,panelStyle:h,onResizeStart:u}),l?y.jsx(wp,{controller:e.controller,disabled:p==null?void 0:p.disabled,className:p==null?void 0:p.className,onPositionChange:c,style:s}):null]});return n?pi.createPortal(d,t.container):d}function $p(e){const[t,n]=O.useState(null);return O.useEffect(()=>{if(!e.container)return;const r=Oa(e.container);return Da(r.root),n(r),()=>{r.destroy(),n(null)}},[e.container]),t?y.jsx(Ra,{props:e,mount:t}):null}exports.AIChat=$p;exports.createAIChatController=La;exports.createCustomerV1ChatAdapter=za;exports.mountAIChat=Kp;
|