@schmitech/chatbot-widget 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +266 -0
- package/dist/chatbot-widget.bundle.js +123 -0
- package/dist/chatbot-widget.css +1 -0
- package/dist/chatbot-widget.umd.js +113 -0
- package/dist/chatbot-widget.umd.js.map +1 -0
- package/dist/index.d.ts +91 -0
- package/package.json +59 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
(function(ee,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],Y):(ee=typeof globalThis<"u"?globalThis:ee||self,Y(ee.ChatbotWidget={},ee.React))})(this,function(ee,Y){"use strict";var $e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},Re={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var it;function ei(){if(it)return Re;it=1;var e=Y,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function o(a,s,c){var u,p={},h=null,f=null;c!==void 0&&(h=""+c),s.key!==void 0&&(h=""+s.key),s.ref!==void 0&&(f=s.ref);for(u in s)r.call(s,u)&&!l.hasOwnProperty(u)&&(p[u]=s[u]);if(a&&a.defaultProps)for(u in s=a.defaultProps,s)p[u]===void 0&&(p[u]=s[u]);return{$$typeof:n,type:a,key:h,ref:f,props:p,_owner:i.current}}return Re.Fragment=t,Re.jsx=o,Re.jsxs=o,Re}rt.exports=ei();var I=rt.exports;/**
|
|
10
|
+
* @license lucide-react v0.344.0 - ISC
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the ISC license.
|
|
13
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/var ni={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
15
|
+
* @license lucide-react v0.344.0 - ISC
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the ISC license.
|
|
18
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/const ti=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ue=(e,n)=>{const t=Y.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:a="",children:s,...c},u)=>Y.createElement("svg",{ref:u,...ni,width:i,height:i,stroke:r,strokeWidth:o?Number(l)*24/Number(i):l,className:["lucide",`lucide-${ti(e)}`,a].join(" "),...c},[...n.map(([p,h])=>Y.createElement(p,h)),...Array.isArray(s)?s:[s]]));return t.displayName=`${e}`,t};/**
|
|
20
|
+
* @license lucide-react v0.344.0 - ISC
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the ISC license.
|
|
23
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/const ri=ue("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
25
|
+
* @license lucide-react v0.344.0 - ISC
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the ISC license.
|
|
28
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/const ii=ue("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
30
|
+
* @license lucide-react v0.344.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/const li=ue("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
35
|
+
* @license lucide-react v0.344.0 - ISC
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the ISC license.
|
|
38
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/const oi=ue("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
|
|
40
|
+
* @license lucide-react v0.344.0 - ISC
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the ISC license.
|
|
43
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/const ai=ue("HelpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
45
|
+
* @license lucide-react v0.344.0 - ISC
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the ISC license.
|
|
48
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/const si=ue("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
50
|
+
* @license lucide-react v0.344.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const ui=ue("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
|
55
|
+
* @license lucide-react v0.344.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/const ci=ue("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
60
|
+
* @license lucide-react v0.344.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const lt=ue("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
65
|
+
* @license lucide-react v0.344.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const fi=ue("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
70
|
+
* @license lucide-react v0.344.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const pi=ue("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
|
|
75
|
+
* @license lucide-react v0.344.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const hi=ue("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),di={},ot=e=>{let n;const t=new Set,r=(u,p)=>{const h=typeof u=="function"?u(n):u;if(!Object.is(h,n)){const f=n;n=p??(typeof h!="object"||h===null)?h:Object.assign({},n,h),t.forEach(y=>y(n,f))}},i=()=>n,s={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(t.add(u),()=>t.delete(u)),destroy:()=>{(di?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},c=n=e(r,i,s);return s},mi=e=>e?ot(e):ot;var at={exports:{}},pn={},hn={exports:{}},dn={};/**
|
|
80
|
+
* @license React
|
|
81
|
+
* use-sync-external-store-shim.production.js
|
|
82
|
+
*
|
|
83
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the MIT license found in the
|
|
86
|
+
* LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/var st;function gi(){if(st)return dn;st=1;var e=Y;function n(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,i=e.useEffect,l=e.useLayoutEffect,o=e.useDebugValue;function a(p,h){var f=h(),y=r({inst:{value:f,getSnapshot:h}}),k=y[0].inst,v=y[1];return l(function(){k.value=f,k.getSnapshot=h,s(k)&&v({inst:k})},[p,f,h]),i(function(){return s(k)&&v({inst:k}),p(function(){s(k)&&v({inst:k})})},[p]),o(f),f}function s(p){var h=p.getSnapshot;p=p.value;try{var f=h();return!t(p,f)}catch{return!0}}function c(p,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return dn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,dn}var ut;function yi(){return ut||(ut=1,hn.exports=gi()),hn.exports}/**
|
|
88
|
+
* @license React
|
|
89
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
90
|
+
*
|
|
91
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the MIT license found in the
|
|
94
|
+
* LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/var ct;function xi(){if(ct)return pn;ct=1;var e=Y,n=yi();function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:t,i=n.useSyncExternalStore,l=e.useRef,o=e.useEffect,a=e.useMemo,s=e.useDebugValue;return pn.useSyncExternalStoreWithSelector=function(c,u,p,h,f){var y=l(null);if(y.current===null){var k={hasValue:!1,value:null};y.current=k}else k=y.current;y=a(function(){function w(x){if(!C){if(C=!0,E=x,x=h(x),f!==void 0&&k.hasValue){var N=k.value;if(f(N,x))return M=N}return M=x}if(N=M,r(E,x))return N;var W=h(x);return f!==void 0&&f(N,W)?(E=x,N):(E=x,M=W)}var C=!1,E,M,j=p===void 0?null:p;return[function(){return w(u())},j===null?void 0:function(){return w(j())}]},[u,p,h,f]);var v=i(c,y[0],y[1]);return o(function(){k.hasValue=!0,k.value=v},[v]),s(v),v},pn}at.exports=xi();var ki=at.exports;const bi=fn(ki),ft={},{useDebugValue:wi}=Y,{useSyncExternalStoreWithSelector:Si}=bi;let pt=!1;const Ci=e=>e;function Ei(e,n=Ci,t){(ft?"production":void 0)!=="production"&&t&&!pt&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),pt=!0);const r=Si(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return wi(r),r}const ht=e=>{(ft?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?mi(e):e,t=(r,i)=>Ei(n,r,i);return Object.assign(t,n),t},vi=e=>e?ht(e):ht;let Oe=null,mn=null,Ii=0,Ti=0;const Ai=async()=>{if(typeof window>"u")try{let e,n;try{e=await Promise.resolve().then(()=>Xr),n=await Promise.resolve().then(()=>Xr)}catch(r){console.warn("[Connection Pool] Failed to import Node.js modules:",r);return}Oe=new e.Agent({keepAlive:!0,keepAliveMsecs:3e4,maxSockets:5});const t=Oe.createConnection;Oe.createConnection=function(r,i){Ii++;const l=t.call(this,r,i);return l.on("reuse",()=>{Ti++}),l},mn=new n.Agent({keepAlive:!0,keepAliveMsecs:3e4,maxSockets:5})}catch(e){console.warn("[Connection Pool] Failed to initialize HTTP agents:",e)}};(async()=>{try{await Ai()}catch(e){console.warn("Failed to initialize connection pool:",e)}})();let gn=null;const dt=e=>{if(!e||typeof e!="string")throw new Error("API URL must be a valid string");gn=e},Pi=()=>{if(!gn)throw new Error("API URL not configured. Please call configureApi() with your server URL before using any API functions.");return gn},Li=(e,n={})=>{const t=e.startsWith("https:");if(typeof window>"u"){if(t&&mn)return{...n,agent:mn};if(Oe)return{...n,agent:Oe}}const r=Date.now().toString(36)+Math.random().toString(36).substring(2);return{...n,headers:{...n.headers,Connection:"keep-alive","X-Request-ID":r}}};async function*_i(e,n){var t;try{const r=Pi(),i=await fetch(`${r}/chat`,Li(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,voiceEnabled:n})}));if(!i.ok){const s=await i.text();throw console.error(`API request failed: ${i.status} ${s}`),new Error(`Network response was not ok: ${i.status} ${s}`)}const l=(t=i.body)==null?void 0:t.getReader();if(!l)throw new Error("No reader available");const o=new TextDecoder;let a="";for(;;){const{done:s,value:c}=await l.read();if(s)break;const u=o.decode(c,{stream:!0});a+=u;const p=a.split(`
|
|
96
|
+
`);a=p.pop()||"";for(const h of p)if(h.trim())try{const f=JSON.parse(h);f.content&&!f.text&&(f.text=f.content),yield f}catch{console.warn("Error parsing JSON chunk:",h)}}if(a)try{const s=JSON.parse(a);s.content&&!s.text&&(s.text=s.content),yield s}catch{console.warn("Error parsing final JSON buffer:",a)}}catch(r){console.error("Chat API error:",r.message),yield{text:`Error connecting to chat server: ${r.message}`,done:!0}}}function mt(){try{if(typeof window<"u"&&window.CHATBOT_API_URL)return dt(window.CHATBOT_API_URL),!0}catch(e){console.error("Failed to configure API:",e)}return!1}mt();const yn=vi((e,n)=>({messages:[],isLoading:!1,error:null,voiceEnabled:!1,toggleVoice:()=>e(t=>({voiceEnabled:!t.voiceEnabled})),sendMessage:async t=>{try{if(!mt())throw new Error("API URL not configured");e(i=>({messages:[...i.messages,{role:"user",content:t}],isLoading:!0,error:null})),e(i=>({messages:[...i.messages,{role:"assistant",content:""}]}));let r=!1;try{for await(const i of _i(t,n().voiceEnabled))i.text&&(n().appendToLastMessage(i.text),r=!0);r||n().appendToLastMessage("No response received from the server. Please try again later.")}catch(i){console.error("Chat API error:",i),n().appendToLastMessage("Sorry, there was an error processing your request.")}e({isLoading:!1})}catch(r){console.error("Chat store error:",r),e(i=>({isLoading:!1,error:`Failed to send message: ${r instanceof Error?r.message:"Unknown error"}`}))}},appendToLastMessage:t=>{e(r=>{const i=[...r.messages],l=i[i.length-1];return l&&l.role==="assistant"&&(i[i.length-1]={...l,content:l.content+t}),{messages:i}})},clearMessages:()=>{e({messages:[]})}}));function bu(){}function wu(){}function zi(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Ni=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ri={};function gt(e,n){return(Ri.jsx?Mi:Ni).test(e)}const Oi=/[ \t\n\f\r]/g;function Di(e){return typeof e=="object"?e.type==="text"?yt(e.value):!1:yt(e)}function yt(e){return e.replace(Oi,"")===""}class De{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}De.prototype.normal={},De.prototype.property={},De.prototype.space=void 0;function xt(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new De(t,r,n)}function xn(e){return e.toLowerCase()}class ne{constructor(n,t){this.attribute=t,this.property=n}}ne.prototype.attribute="",ne.prototype.booleanish=!1,ne.prototype.boolean=!1,ne.prototype.commaOrSpaceSeparated=!1,ne.prototype.commaSeparated=!1,ne.prototype.defined=!1,ne.prototype.mustUseProperty=!1,ne.prototype.number=!1,ne.prototype.overloadedBoolean=!1,ne.prototype.property="",ne.prototype.spaceSeparated=!1,ne.prototype.space=void 0;let ji=0;const z=Se(),$=Se(),kt=Se(),b=Se(),V=Se(),Te=Se(),le=Se();function Se(){return 2**++ji}const kn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:le,commaSeparated:Te,number:b,overloadedBoolean:kt,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),bn=Object.keys(kn);class wn extends ne{constructor(n,t,r,i){let l=-1;if(super(n,t),bt(this,"space",i),typeof r=="number")for(;++l<bn.length;){const o=bn[l];bt(this,bn[l],(r&kn[o])===kn[o])}}}wn.prototype.defined=!0;function bt(e,n,t){t&&(e[n]=t)}function Ae(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new wn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[xn(r)]=r,t[xn(l.attribute)]=r}return new De(n,t,e.space)}const wt=Ae({properties:{ariaActiveDescendant:null,ariaAtomic:$,ariaAutoComplete:null,ariaBusy:$,ariaChecked:$,ariaColCount:b,ariaColIndex:b,ariaColSpan:b,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:$,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:$,ariaFlowTo:V,ariaGrabbed:$,ariaHasPopup:null,ariaHidden:$,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:b,ariaLive:null,ariaModal:$,ariaMultiLine:$,ariaMultiSelectable:$,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:b,ariaPressed:$,ariaReadOnly:$,ariaRelevant:null,ariaRequired:$,ariaRoleDescription:V,ariaRowCount:b,ariaRowIndex:b,ariaRowSpan:b,ariaSelected:$,ariaSetSize:b,ariaSort:null,ariaValueMax:b,ariaValueMin:b,ariaValueNow:b,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function St(e,n){return n in e?e[n]:n}function Ct(e,n){return St(e,n.toLowerCase())}const Fi=Ae({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Te,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:V,autoFocus:z,autoPlay:z,blocking:V,capture:null,charSet:null,checked:z,cite:null,className:V,cols:b,colSpan:null,content:null,contentEditable:$,controls:z,controlsList:V,coords:b|Te,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:kt,draggable:$,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:V,height:b,hidden:z,high:b,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:V,itemRef:V,itemScope:z,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:b,manifest:null,max:null,maxLength:b,media:null,method:null,min:null,minLength:b,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:b,pattern:null,ping:V,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:V,required:z,reversed:z,rows:b,rowSpan:b,sandbox:V,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shape:null,size:b,sizes:null,slot:null,span:b,spellCheck:$,src:null,srcDoc:null,srcLang:null,srcSet:null,start:b,step:null,style:null,tabIndex:b,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:$,width:b,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:b,borderColor:null,bottomMargin:b,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:b,leftMargin:b,link:null,longDesc:null,lowSrc:null,marginHeight:b,marginWidth:b,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:b,rules:null,scheme:null,scrolling:$,standby:null,summary:null,text:null,topMargin:b,valueType:null,version:null,vAlign:null,vLink:null,vSpace:b,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:z,disableRemotePlayback:z,prefix:null,property:null,results:b,security:null,unselectable:null},space:"html",transform:Ct}),Bi=Ae({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:le,accentHeight:b,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:b,amplitude:b,arabicForm:null,ascent:b,attributeName:null,attributeType:null,azimuth:b,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:b,by:null,calcMode:null,capHeight:b,className:V,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:b,diffuseConstant:b,direction:null,display:null,dur:null,divisor:b,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:b,enableBackground:null,end:null,event:null,exponent:b,externalResourcesRequired:null,fill:null,fillOpacity:b,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:Te,g2:Te,glyphName:Te,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:b,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:b,horizOriginX:b,horizOriginY:b,id:null,ideographic:b,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:b,k:b,k1:b,k2:b,k3:b,k4:b,kernelMatrix:le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:b,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:b,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:b,overlineThickness:b,paintOrder:null,panose1:null,path:null,pathLength:b,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:b,pointsAtY:b,pointsAtZ:b,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:le,rev:le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:le,requiredFeatures:le,requiredFonts:le,requiredFormats:le,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:b,specularExponent:b,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:b,strikethroughThickness:b,string:null,stroke:null,strokeDashArray:le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:b,strokeOpacity:b,strokeWidth:null,style:null,surfaceScale:b,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:le,tabIndex:b,tableValues:null,target:null,targetX:b,targetY:b,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:b,underlineThickness:b,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:b,values:null,vAlphabetic:b,vMathematical:b,vectorEffect:null,vHanging:b,vIdeographic:b,version:null,vertAdvY:b,vertOriginX:b,vertOriginY:b,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:b,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:St}),Et=Ae({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),vt=Ae({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ct}),It=Ae({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Ui={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"},Hi=/[A-Z]/g,Tt=/-[a-z]/g,Vi=/^data[-\w.:]+$/i;function qi(e,n){const t=xn(n);let r=n,i=ne;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Vi.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Tt,Qi);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Tt.test(l)){let o=l.replace(Hi,Wi);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=wn}return new i(r,n)}function Wi(e){return"-"+e.toLowerCase()}function Qi(e){return e.charAt(1).toUpperCase()}const Yi=xt([wt,Fi,Et,vt,It],"html"),Sn=xt([wt,Bi,Et,vt,It],"svg");function Xi(e){return e.join(" ").trim()}var Cn={},At=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$i=/\n/g,Ji=/^\s*/,Gi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ki=/^:\s*/,Zi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,el=/^[;\s]*/,nl=/^\s+|\s+$/g,tl=`
|
|
97
|
+
`,Pt="/",Lt="*",Ce="",rl="comment",il="declaration",ll=function(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(y){var k=y.match($i);k&&(t+=k.length);var v=y.lastIndexOf(tl);r=~v?y.length-v:r+y.length}function l(){var y={line:t,column:r};return function(k){return k.position=new o(y),c(),k}}function o(y){this.start=y,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function a(y){var k=new Error(n.source+":"+t+":"+r+": "+y);if(k.reason=y,k.filename=n.source,k.line=t,k.column=r,k.source=e,!n.silent)throw k}function s(y){var k=y.exec(e);if(k){var v=k[0];return i(v),e=e.slice(v.length),k}}function c(){s(Ji)}function u(y){var k;for(y=y||[];k=p();)k!==!1&&y.push(k);return y}function p(){var y=l();if(!(Pt!=e.charAt(0)||Lt!=e.charAt(1))){for(var k=2;Ce!=e.charAt(k)&&(Lt!=e.charAt(k)||Pt!=e.charAt(k+1));)++k;if(k+=2,Ce===e.charAt(k-1))return a("End of comment missing");var v=e.slice(2,k-2);return r+=2,i(v),e=e.slice(k),r+=2,y({type:rl,comment:v})}}function h(){var y=l(),k=s(Gi);if(k){if(p(),!s(Ki))return a("property missing ':'");var v=s(Zi),w=y({type:il,property:_t(k[0].replace(At,Ce)),value:v?_t(v[0].replace(At,Ce)):Ce});return s(el),w}}function f(){var y=[];u(y);for(var k;k=h();)k!==!1&&(y.push(k),u(y));return y}return c(),f()};function _t(e){return e?e.replace(nl,Ce):Ce}var ol=$e&&$e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=sl;var al=ol(ll);function sl(e,n){var t=null;if(!e||typeof e!="string")return t;var r=(0,al.default)(e),i=typeof n=="function";return r.forEach(function(l){if(l.type==="declaration"){var o=l.property,a=l.value;i?n(o,a,l):a&&(t=t||{},t[o]=a)}}),t}var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.camelCase=void 0;var ul=/^--[a-zA-Z0-9_-]+$/,cl=/-([a-z])/g,fl=/^[^-]+$/,pl=/^-(webkit|moz|ms|o|khtml)-/,hl=/^-(ms)-/,dl=function(e){return!e||fl.test(e)||ul.test(e)},ml=function(e,n){return n.toUpperCase()},zt=function(e,n){return"".concat(n,"-")},gl=function(e,n){return n===void 0&&(n={}),dl(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(hl,zt):e=e.replace(pl,zt),e.replace(cl,ml))};Je.camelCase=gl;var yl=$e&&$e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xl=yl(Cn),kl=Je;function En(e,n){var t={};return!e||typeof e!="string"||(0,xl.default)(e,function(r,i){r&&i&&(t[(0,kl.camelCase)(r,n)]=i)}),t}En.default=En;var bl=En;const wl=fn(bl),Nt=Mt("end"),vn=Mt("start");function Mt(e){return n;function n(t){const r=t&&t.position&&t.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 Sl(e){const n=vn(e),t=Nt(e);if(n&&t)return{start:n,end:t}}function je(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rt(e.position):"start"in e||"end"in e?Rt(e):"line"in e||"column"in e?In(e):""}function In(e){return Ot(e&&e.line)+":"+Ot(e&&e.column)}function Rt(e){return In(e&&e.start)+"-"+In(e&&e.end)}function Ot(e){return e&&typeof e=="number"?e:1}class Z extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?l.ruleId=r:(l.source=r.slice(0,s),l.ruleId=r.slice(s+1))}if(!l.place&&l.ancestors&&l.ancestors){const s=l.ancestors[l.ancestors.length-1];s&&(l.place=s.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=je(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual,this.expected,this.note,this.url}}Z.prototype.file="",Z.prototype.name="",Z.prototype.reason="",Z.prototype.message="",Z.prototype.stack="",Z.prototype.column=void 0,Z.prototype.line=void 0,Z.prototype.ancestors=void 0,Z.prototype.cause=void 0,Z.prototype.fatal=void 0,Z.prototype.place=void 0,Z.prototype.ruleId=void 0,Z.prototype.source=void 0;const Tn={}.hasOwnProperty,Cl=new Map,El=/[A-Z]/g,vl=new Set(["table","tbody","thead","tfoot","tr"]),Il=new Set(["td","th"]),Dt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tl(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Rl(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ml(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Sn:Yi,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=jt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function jt(e,n,t){if(n.type==="element")return Al(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Pl(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return _l(e,n,t);if(n.type==="mdxjsEsm")return Ll(e,n);if(n.type==="root")return zl(e,n,t);if(n.type==="text")return Nl(e,n)}function Al(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Sn,e.schema=i),e.ancestors.push(n);const l=Bt(e,n.tagName,!1),o=Ol(e,n);let a=Pn(e,n);return vl.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Di(s):!0})),Ft(e,o,l,n),An(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Pl(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Fe(e,n.position)}function Ll(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Fe(e,n.position)}function _l(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Sn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Bt(e,n.name,!0),o=Dl(e,n),a=Pn(e,n);return Ft(e,o,l,n),An(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function zl(e,n,t){const r={};return An(r,Pn(e,n)),e.create(n,e.Fragment,r,t)}function Nl(e,n){return n.value}function Ft(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function An(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Ml(e,n,t){return r;function r(i,l,o,a){const c=Array.isArray(o.children)?t:n;return a?c(l,o,a):c(l,o)}}function Rl(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),s=vn(r);return n(i,l,o,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ol(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Tn.call(n.properties,i)){const l=jl(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Il.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Dl(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Fe(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Fe(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Pn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Cl;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const s=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(s){const c=i.get(s)||0;o=s+"-"+c,i.set(s,c+1)}}const a=jt(e,l,o);a!==void 0&&t.push(a)}return t}function jl(e,n,t){const r=qi(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?zi(t):Xi(t)),r.property==="style"){let i=typeof t=="object"?t:Fl(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Bl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ui[r.property]||r.property:r.attribute,t]}}function Fl(e,n){try{return wl(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new Z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Dt+"#cannot-parse-style-attribute",i}}function Bt(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=gt(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=gt(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Tn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fe(e)}function Fe(e,n){const t=new Z("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Dt+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Bl(e){const n={};let t;for(t in e)Tn.call(e,t)&&(n[Ul(t)]=e[t]);return n}function Ul(e){let n=e.replace(El,Hl);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Hl(e){return"-"+e.toLowerCase()}const Ln={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"]},Vl={};function ql(e,n){const t=Vl,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ut(e,r,i)}function Ut(e,n,t){if(Wl(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ht(e.children,n,t)}return Array.isArray(e)?Ht(e,n,t):""}function Ht(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ut(e[i],n,t);return r.join("")}function Wl(e){return!!(e&&typeof e=="object")}const Vt=document.createElement("i");function _n(e){const n="&"+e+";";Vt.innerHTML=n;const t=Vt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function de(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function ce(e,n){return e.length>0?(de(e,e.length,0,n),e):n}const qt={}.hasOwnProperty;function Ql(e){const n={};let t=-1;for(;++t<e.length;)Yl(n,e[t]);return n}function Yl(e,n){let t;for(t in n){const i=(qt.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){qt.call(i,o)||(i[o]=[]);const a=l[o];Xl(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Xl(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);de(e,0,0,r)}function Wt(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Pe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const me=ke(/[A-Za-z]/),oe=ke(/[\dA-Za-z]/),$l=ke(/[#-'*+\--9=?A-Z^-~]/);function zn(e){return e!==null&&(e<32||e===127)}const Nn=ke(/\d/),Jl=ke(/[\dA-Fa-f]/),Gl=ke(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function te(e){return e!==null&&(e<0||e===32)}function D(e){return e===-2||e===-1||e===32}const Kl=ke(new RegExp("\\p{P}|\\p{S}","u")),Zl=ke(/\s/);function ke(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Le(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&oe(e.charCodeAt(t+1))&&oe(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function q(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(s){return D(s)?(e.enter(t),a(s)):n(s)}function a(s){return D(s)&&l++<i?(e.consume(s),a):(e.exit(t),n(s))}}const eo={tokenize:no};function no(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const s=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return L(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}const to={tokenize:ro},Qt={tokenize:io};function ro(e){const n=this,t=[];let r=0,i,l,o;return a;function a(E){if(r<t.length){const M=t[r];return n.containerState=M[1],e.attempt(M[0].continuation,s,c)(E)}return c(E)}function s(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&C();const M=n.events.length;let j=M,x;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){x=n.events[j][1].end;break}w(r);let N=M;for(;N<n.events.length;)n.events[N][1].end={...x},N++;return de(n.events,j+1,0,n.events.slice(M)),n.events.length=N,c(E)}return a(E)}function c(E){if(r===t.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return y(E);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Qt,u,p)(E)}function u(E){return i&&C(),w(r),h(E)}function p(E){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,y(E)}function h(E){return n.containerState={},e.attempt(Qt,f,y)(E)}function f(E){return r++,t.push([n.currentConstruct,n.containerState]),h(E)}function y(E){if(E===null){i&&C(),w(0),e.consume(E);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(E)}function k(E){if(E===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(E);return}return L(E)?(e.consume(E),v(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(E),k)}function v(E,M){const j=n.sliceStream(E);if(M&&j.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(j),n.parser.lazy[E.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<o&&(!i.events[x][1].end||i.events[x][1].end.offset>o))return;const N=n.events.length;let W=N,F,U;for(;W--;)if(n.events[W][0]==="exit"&&n.events[W][1].type==="chunkFlow"){if(F){U=n.events[W][1].end;break}F=!0}for(w(r),x=N;x<n.events.length;)n.events[x][1].end={...U},x++;de(n.events,W+1,0,n.events.slice(N)),n.events.length=x}}function w(E){let M=t.length;for(;M-- >E;){const j=t[M];n.containerState=j[1],j[0].exit.call(n,e)}t.length=E}function C(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function io(e,n,t){return q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yt(e){if(e===null||te(e)||Zl(e))return 1;if(Kl(e))return 2}function Mn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const Rn={name:"attention",resolveAll:lo,tokenize:oo};function lo(e,n){let t=-1,r,i,l,o,a,s,c,u;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const p={...e[r][1].end},h={...e[t][1].start};Xt(p,-s),Xt(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},l={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:s>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ce(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=ce(c,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),c=ce(c,Mn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=ce(c,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(u=2,c=ce(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):u=0,de(e,r-1,t-r+3,c),t=r+c.length-u-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function oo(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Yt(r);let l;return o;function o(s){return l=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===l)return e.consume(s),a;const c=e.exit("attentionSequence"),u=Yt(s),p=!u||u===2&&i||t.includes(s),h=!i||i===2&&u||t.includes(r);return c._open=!!(l===42?p:p&&(i||!h)),c._close=!!(l===42?h:h&&(u||!p)),n(s)}}function Xt(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const ao={name:"autolink",tokenize:so};function so(e,n,t){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(f){return me(f)?(e.consume(f),o):f===64?t(f):c(f)}function o(f){return f===43||f===45||f===46||oe(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(e.consume(f),r=0,s):(f===43||f===45||f===46||oe(f))&&r++<32?(e.consume(f),a):(r=0,c(f))}function s(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):f===null||f===32||f===60||zn(f)?t(f):(e.consume(f),s)}function c(f){return f===64?(e.consume(f),u):$l(f)?(e.consume(f),c):t(f)}function u(f){return oe(f)?p(f):t(f)}function p(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):h(f)}function h(f){if((f===45||oe(f))&&r++<63){const y=f===45?h:p;return e.consume(f),y}return t(f)}}const Ge={partial:!0,tokenize:uo};function uo(e,n,t){return r;function r(l){return D(l)?q(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||L(l)?n(l):t(l)}}const $t={continuation:{tokenize:fo},exit:po,name:"blockQuote",tokenize:co};function co(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return D(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function fo(e,n,t){const r=this;return i;function i(o){return D(o)?q(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt($t,n,t)(o)}}function po(e){e.exit("blockQuote")}const Jt={name:"characterEscape",tokenize:ho};function ho(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Gl(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Gt={name:"characterReference",tokenize:mo};function mo(e,n,t){const r=this;let i=0,l,o;return a;function a(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),s}function s(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),l=31,o=oe,u(p))}function c(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Jl,u):(e.enter("characterReferenceValue"),l=7,o=Nn,u(p))}function u(p){if(p===59&&i){const h=e.exit("characterReferenceValue");return o===oe&&!_n(r.sliceSerialize(h))?t(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(p)&&i++<l?(e.consume(p),u):t(p)}}const Kt={partial:!0,tokenize:yo},Zt={concrete:!0,name:"codeFenced",tokenize:go};function go(e,n,t){const r=this,i={partial:!0,tokenize:j};let l=0,o=0,a;return s;function s(x){return c(x)}function c(x){const N=r.events[r.events.length-1];return l=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(x)}function u(x){return x===a?(o++,e.consume(x),u):o<3?t(x):(e.exit("codeFencedFenceSequence"),D(x)?q(e,p,"whitespace")(x):p(x))}function p(x){return x===null||L(x)?(e.exit("codeFencedFence"),r.interrupt?n(x):e.check(Kt,k,M)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===null||L(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(x)):D(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,f,"whitespace")(x)):x===96&&x===a?t(x):(e.consume(x),h)}function f(x){return x===null||L(x)?p(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||L(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(x)):x===96&&x===a?t(x):(e.consume(x),y)}function k(x){return e.attempt(i,M,v)(x)}function v(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),w}function w(x){return l>0&&D(x)?q(e,C,"linePrefix",l+1)(x):C(x)}function C(x){return x===null||L(x)?e.check(Kt,k,M)(x):(e.enter("codeFlowValue"),E(x))}function E(x){return x===null||L(x)?(e.exit("codeFlowValue"),C(x)):(e.consume(x),E)}function M(x){return e.exit("codeFenced"),n(x)}function j(x,N,W){let F=0;return U;function U(R){return x.enter("lineEnding"),x.consume(R),x.exit("lineEnding"),A}function A(R){return x.enter("codeFencedFence"),D(R)?q(x,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):T(R)}function T(R){return R===a?(x.enter("codeFencedFenceSequence"),Q(R)):W(R)}function Q(R){return R===a?(F++,x.consume(R),Q):F>=o?(x.exit("codeFencedFenceSequence"),D(R)?q(x,X,"whitespace")(R):X(R)):W(R)}function X(R){return R===null||L(R)?(x.exit("codeFencedFence"),N(R)):W(R)}}}function yo(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const On={name:"codeIndented",tokenize:ko},xo={partial:!0,tokenize:bo};function ko(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),q(e,l,"linePrefix",5)(c)}function l(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?s(c):L(c)?e.attempt(xo,o,s)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||L(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function s(c){return e.exit("codeIndented"),n(c)}}function bo(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):L(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):q(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):L(o)?i(o):t(o)}}const wo={name:"codeText",previous:Co,resolve:So,tokenize:Eo};function So(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function Co(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Eo(e,n,t){let r=0,i,l;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),a(p)}function a(p){return p===96?(e.consume(p),r++,a):(e.exit("codeTextSequence"),s(p))}function s(p){return p===null?t(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),s):p===96?(l=e.enter("codeTextSequence"),i=0,u(p)):L(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||L(p)?(e.exit("codeTextData"),s(p)):(e.consume(p),c)}function u(p){return p===96?(e.consume(p),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(p)):(l.type="codeTextData",c(p))}}class vo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Be(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Be(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Be(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Be(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Be(this.left,t.reverse())}}}function Be(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function er(e){const n={};let t=-1,r,i,l,o,a,s,c;const u=new vo(e);for(;++t<u.length;){for(;t in n;)t=n[t];if(r=u.get(t),t&&r[1].type==="chunkFlow"&&u.get(t-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,l=0,l<s.length&&s[l][1].type==="lineEndingBlank"&&(l+=2),l<s.length&&s[l][1].type==="content"))for(;++l<s.length&&s[l][1].type!=="content";)s[l][1].type==="chunkText"&&(s[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Io(u,t)),t=n[t],c=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=u.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,t),a.unshift(r),u.splice(i,t-i+1,a))}}return de(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Io(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,s=[],c={};let u,p,h=-1,f=t,y=0,k=0;const v=[k];for(;f;){for(;e.get(++i)[1]!==f;);l.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),p&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(k=h+1,v.push(k),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):v.pop(),h=v.length;h--;){const w=a.slice(v[h],v[h+1]),C=l.pop();s.push([C,C+w.length-1]),e.splice(C,2,w)}for(s.reverse(),h=-1;++h<s.length;)c[y+s[h][0]]=y+s[h][1],y+=s[h][1]-s[h][0]-1;return c}const To={resolve:Po,tokenize:Lo},Ao={partial:!0,tokenize:_o};function Po(e){return er(e),e}function Lo(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):L(a)?e.check(Ao,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function _o(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),q(e,l,"linePrefix")}function l(o){if(o===null||L(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function nr(e,n,t,r,i,l,o,a,s){const c=s||Number.POSITIVE_INFINITY;let u=0;return p;function p(w){return w===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(w),e.exit(l),h):w===null||w===32||w===41||zn(w)?t(w):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),k(w))}function h(w){return w===62?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===62?(e.exit("chunkString"),e.exit(a),h(w)):w===null||w===60||L(w)?t(w):(e.consume(w),w===92?y:f)}function y(w){return w===60||w===62||w===92?(e.consume(w),f):f(w)}function k(w){return!u&&(w===null||w===41||te(w))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(w)):u<c&&w===40?(e.consume(w),u++,k):w===41?(e.consume(w),u--,k):w===null||w===32||w===40||zn(w)?t(w):(e.consume(w),w===92?v:k)}function v(w){return w===40||w===41||w===92?(e.consume(w),k):k(w)}}function tr(e,n,t,r,i,l){const o=this;let a=0,s;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(l),u}function u(f){return a>999||f===null||f===91||f===93&&!s||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):f===93?(e.exit(l),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):L(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||L(f)||a++>999?(e.exit("chunkString"),u(f)):(e.consume(f),s||(s=!D(f)),f===92?h:p)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,p):p(f)}}function rr(e,n,t,r,i,l){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,s):t(h)}function s(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(l),c(h))}function c(h){return h===o?(e.exit(l),s(o)):h===null?t(h):L(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),q(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||L(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?p:u)}function p(h){return h===o||h===92?(e.consume(h),u):u(h)}}function Ue(e,n){let t;return r;function r(i){return L(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):D(i)?q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const zo={name:"definition",tokenize:Mo},No={partial:!0,tokenize:Ro};function Mo(e,n,t){const r=this;let i;return l;function l(f){return e.enter("definition"),o(f)}function o(f){return tr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s):t(f)}function s(f){return te(f)?Ue(e,c)(f):c(f)}function c(f){return nr(e,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(No,p,p)(f)}function p(f){return D(f)?q(e,h,"whitespace")(f):h(f)}function h(f){return f===null||L(f)?(e.exit("definition"),r.parser.defined.push(i),n(f)):t(f)}}function Ro(e,n,t){return r;function r(a){return te(a)?Ue(e,i)(a):t(a)}function i(a){return rr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return D(a)?q(e,o,"whitespace")(a):o(a)}function o(a){return a===null||L(a)?n(a):t(a)}}const Oo={name:"hardBreakEscape",tokenize:Do};function Do(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return L(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const jo={name:"headingAtx",resolve:Fo,tokenize:Bo};function Fo(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},de(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Bo(e,n,t){let r=0;return i;function i(u){return e.enter("atxHeading"),l(u)}function l(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||te(u)?(e.exit("atxHeadingSequence"),a(u)):t(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),s(u)):u===null||L(u)?(e.exit("atxHeading"),n(u)):D(u)?q(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function s(u){return u===35?(e.consume(u),s):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||te(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const Uo=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ir=["pre","script","style","textarea"],Ho={concrete:!0,name:"htmlFlow",resolveTo:Wo,tokenize:Qo},Vo={partial:!0,tokenize:Xo},qo={partial:!0,tokenize:Yo};function Wo(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Qo(e,n,t){const r=this;let i,l,o,a,s;return c;function c(m){return u(m)}function u(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),p}function p(m){return m===33?(e.consume(m),h):m===47?(e.consume(m),l=!0,k):m===63?(e.consume(m),i=3,r.interrupt?n:d):me(m)?(e.consume(m),o=String.fromCharCode(m),v):t(m)}function h(m){return m===45?(e.consume(m),i=2,f):m===91?(e.consume(m),i=5,a=0,y):me(m)?(e.consume(m),i=4,r.interrupt?n:d):t(m)}function f(m){return m===45?(e.consume(m),r.interrupt?n:d):t(m)}function y(m){const pe="CDATA[";return m===pe.charCodeAt(a++)?(e.consume(m),a===pe.length?r.interrupt?n:T:y):t(m)}function k(m){return me(m)?(e.consume(m),o=String.fromCharCode(m),v):t(m)}function v(m){if(m===null||m===47||m===62||te(m)){const pe=m===47,ve=o.toLowerCase();return!pe&&!l&&ir.includes(ve)?(i=1,r.interrupt?n(m):T(m)):Uo.includes(o.toLowerCase())?(i=6,pe?(e.consume(m),w):r.interrupt?n(m):T(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?C(m):E(m))}return m===45||oe(m)?(e.consume(m),o+=String.fromCharCode(m),v):t(m)}function w(m){return m===62?(e.consume(m),r.interrupt?n:T):t(m)}function C(m){return D(m)?(e.consume(m),C):U(m)}function E(m){return m===47?(e.consume(m),U):m===58||m===95||me(m)?(e.consume(m),M):D(m)?(e.consume(m),E):U(m)}function M(m){return m===45||m===46||m===58||m===95||oe(m)?(e.consume(m),M):j(m)}function j(m){return m===61?(e.consume(m),x):D(m)?(e.consume(m),j):E(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),s=m,N):D(m)?(e.consume(m),x):W(m)}function N(m){return m===s?(e.consume(m),s=null,F):m===null||L(m)?t(m):(e.consume(m),N)}function W(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||te(m)?j(m):(e.consume(m),W)}function F(m){return m===47||m===62||D(m)?E(m):t(m)}function U(m){return m===62?(e.consume(m),A):t(m)}function A(m){return m===null||L(m)?T(m):D(m)?(e.consume(m),A):t(m)}function T(m){return m===45&&i===2?(e.consume(m),P):m===60&&i===1?(e.consume(m),B):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),ae):L(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Vo,fe,Q)(m)):m===null||L(m)?(e.exit("htmlFlowData"),Q(m)):(e.consume(m),T)}function Q(m){return e.check(qo,X,fe)(m)}function X(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),R}function R(m){return m===null||L(m)?Q(m):(e.enter("htmlFlowData"),T(m))}function P(m){return m===45?(e.consume(m),d):T(m)}function B(m){return m===47?(e.consume(m),o="",J):T(m)}function J(m){if(m===62){const pe=o.toLowerCase();return ir.includes(pe)?(e.consume(m),ie):T(m)}return me(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),J):T(m)}function ae(m){return m===93?(e.consume(m),d):T(m)}function d(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),d):T(m)}function ie(m){return m===null||L(m)?(e.exit("htmlFlowData"),fe(m)):(e.consume(m),ie)}function fe(m){return e.exit("htmlFlow"),n(m)}}function Yo(e,n,t){const r=this;return i;function i(o){return L(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Xo(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ge,n,t)}}const $o={name:"htmlText",tokenize:Jo};function Jo(e,n,t){const r=this;let i,l,o;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),c):d===47?(e.consume(d),j):d===63?(e.consume(d),E):me(d)?(e.consume(d),W):t(d)}function c(d){return d===45?(e.consume(d),u):d===91?(e.consume(d),l=0,y):me(d)?(e.consume(d),C):t(d)}function u(d){return d===45?(e.consume(d),f):t(d)}function p(d){return d===null?t(d):d===45?(e.consume(d),h):L(d)?(o=p,B(d)):(e.consume(d),p)}function h(d){return d===45?(e.consume(d),f):p(d)}function f(d){return d===62?P(d):d===45?h(d):p(d)}function y(d){const ie="CDATA[";return d===ie.charCodeAt(l++)?(e.consume(d),l===ie.length?k:y):t(d)}function k(d){return d===null?t(d):d===93?(e.consume(d),v):L(d)?(o=k,B(d)):(e.consume(d),k)}function v(d){return d===93?(e.consume(d),w):k(d)}function w(d){return d===62?P(d):d===93?(e.consume(d),w):k(d)}function C(d){return d===null||d===62?P(d):L(d)?(o=C,B(d)):(e.consume(d),C)}function E(d){return d===null?t(d):d===63?(e.consume(d),M):L(d)?(o=E,B(d)):(e.consume(d),E)}function M(d){return d===62?P(d):E(d)}function j(d){return me(d)?(e.consume(d),x):t(d)}function x(d){return d===45||oe(d)?(e.consume(d),x):N(d)}function N(d){return L(d)?(o=N,B(d)):D(d)?(e.consume(d),N):P(d)}function W(d){return d===45||oe(d)?(e.consume(d),W):d===47||d===62||te(d)?F(d):t(d)}function F(d){return d===47?(e.consume(d),P):d===58||d===95||me(d)?(e.consume(d),U):L(d)?(o=F,B(d)):D(d)?(e.consume(d),F):P(d)}function U(d){return d===45||d===46||d===58||d===95||oe(d)?(e.consume(d),U):A(d)}function A(d){return d===61?(e.consume(d),T):L(d)?(o=A,B(d)):D(d)?(e.consume(d),A):F(d)}function T(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),i=d,Q):L(d)?(o=T,B(d)):D(d)?(e.consume(d),T):(e.consume(d),X)}function Q(d){return d===i?(e.consume(d),i=void 0,R):d===null?t(d):L(d)?(o=Q,B(d)):(e.consume(d),Q)}function X(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||te(d)?F(d):(e.consume(d),X)}function R(d){return d===47||d===62||te(d)?F(d):t(d)}function P(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function B(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),J}function J(d){return D(d)?q(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):ae(d)}function ae(d){return e.enter("htmlTextData"),o(d)}}const Dn={name:"labelEnd",resolveAll:ea,resolveTo:na,tokenize:ta},Go={tokenize:ra},Ko={tokenize:ia},Zo={tokenize:la};function ea(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&de(e,0,e.length,t),e}function na(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const s={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",s,n],["enter",c,n]],a=ce(a,e.slice(l+1,l+r+3)),a=ce(a,[["enter",u,n]]),a=ce(a,Mn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=ce(a,[["exit",u,n],e[o-2],e[o-1],["exit",c,n]]),a=ce(a,e.slice(o+1)),a=ce(a,[["exit",s,n]]),de(e,l,e.length,a),e}function ta(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(h){return l?l._inactive?p(h):(o=r.parser.defined.includes(Pe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):t(h)}function s(h){return h===40?e.attempt(Go,u,o?u:p)(h):h===91?e.attempt(Ko,u,o?c:p)(h):o?u(h):p(h)}function c(h){return e.attempt(Zo,u,p)(h)}function u(h){return n(h)}function p(h){return l._balanced=!0,t(h)}}function ra(e,n,t){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return te(p)?Ue(e,l)(p):l(p)}function l(p){return p===41?u(p):nr(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return te(p)?Ue(e,s)(p):u(p)}function a(p){return t(p)}function s(p){return p===34||p===39||p===40?rr(e,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function c(p){return te(p)?Ue(e,u)(p):u(p)}function u(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),n):t(p)}}function ia(e,n,t){const r=this;return i;function i(a){return tr.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function la(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const oa={name:"labelStartImage",resolveAll:Dn.resolveAll,tokenize:aa};function aa(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const sa={name:"labelStartLink",resolveAll:Dn.resolveAll,tokenize:ua};function ua(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const jn={name:"lineEnding",tokenize:ca};function ca(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,n,"linePrefix")}}const Ke={name:"thematicBreak",tokenize:fa};function fa(e,n,t){let r=0,i;return l;function l(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),s(c)):r>=3&&(c===null||L(c))?(e.exit("thematicBreak"),n(c)):t(c)}function s(c){return c===i?(e.consume(c),r++,s):(e.exit("thematicBreakSequence"),D(c)?q(e,a,"whitespace")(c):a(c))}}const re={continuation:{tokenize:ma},exit:ya,name:"list",tokenize:da},pa={partial:!0,tokenize:xa},ha={partial:!0,tokenize:ga};function da(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const y=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Nn(f)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ke,t,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(f)}return t(f)}function s(f){return Nn(f)&&++o<10?(e.consume(f),s):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):t(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ge,r.interrupt?t:u,e.attempt(pa,h,p))}function u(f){return r.containerState.initialBlankLine=!0,l++,h(f)}function p(f){return D(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):t(f)}function h(f){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(f)}}function ma(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ge,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!D(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ha,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(re,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ga(e,n,t){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function ya(e){e.exit(this.containerState.type)}function xa(e,n,t){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!D(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const lr={name:"setextUnderline",resolveTo:ka,tokenize:ba};function ka(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function ba(e,n,t){const r=this;let i;return l;function l(c){let u=r.events.length,p;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){p=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),D(c)?q(e,s,"lineSuffix")(c):s(c))}function s(c){return c===null||L(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const wa={tokenize:Sa};function Sa(e){const n=this,t=e.attempt(Ge,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(To,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Ca={resolveAll:ar()},Ea=or("string"),va=or("text");function or(e){return{resolveAll:ar(e==="text"?Ia:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(u){return c(u)?l(u):a(u)}function a(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),s}function s(u){return c(u)?(t.exit("data"),l(u)):(t.consume(u),s)}function c(u){if(u===null)return!0;const p=i[u];let h=-1;if(p)for(;++h<p.length;){const f=p[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function ar(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function Ia(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,s;for(;l--;){const c=i[l];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)s=!0,a++;else if(c!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const c={type:t===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(t,0,["enter",c,n],["exit",c,n]),t+=2)}t++}return e}const Ta=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:zo},disable:{null:[]},document:{42:re,43:re,45:re,48:re,49:re,50:re,51:re,52:re,53:re,54:re,55:re,56:re,57:re,62:$t},flow:{35:jo,42:Ke,45:[lr,Ke],60:Ho,61:lr,95:Ke,96:Zt,126:Zt},flowInitial:{[-2]:On,[-1]:On,32:On},insideSpan:{null:[Rn,Ca]},string:{38:Gt,92:Jt},text:{[-5]:jn,[-4]:jn,[-3]:jn,33:oa,38:Gt,42:Rn,60:[ao,$o],91:sa,92:[Oo,Jt],93:Dn,95:Rn,96:wo}},Symbol.toStringTag,{value:"Module"}));function Aa(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const s={attempt:N(j),check:N(x),consume:C,enter:E,exit:M,interrupt:N(x,{interrupt:!0})},c={code:null,containerState:{},defineSkip:k,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:p};let u=n.tokenize.call(c,s);return n.resolveAll&&l.push(n),c;function p(A){return o=ce(o,A),v(),o[o.length-1]!==null?[]:(W(n,0),c.events=Mn(l,c.events,c),c.events)}function h(A,T){return La(f(A),T)}function f(A){return Pa(o,A)}function y(){const{_bufferIndex:A,_index:T,line:Q,column:X,offset:R}=r;return{_bufferIndex:A,_index:T,line:Q,column:X,offset:R}}function k(A){i[A.line]=A.column,U()}function v(){let A;for(;r._index<o.length;){const T=o[r._index];if(typeof T=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<T.length;)w(T.charCodeAt(r._bufferIndex));else w(T)}}function w(A){u=u(A)}function C(A){L(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,U()):A!==-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=A}function E(A,T){const Q=T||{};return Q.type=A,Q.start=y(),c.events.push(["enter",Q,c]),a.push(Q),Q}function M(A){const T=a.pop();return T.end=y(),c.events.push(["exit",T,c]),T}function j(A,T){W(A,T.from)}function x(A,T){T.restore()}function N(A,T){return Q;function Q(X,R,P){let B,J,ae,d;return Array.isArray(X)?fe(X):"tokenize"in X?fe([X]):ie(X);function ie(K){return Qe;function Qe(we){const ze=we!==null&&K[we],Ne=we!==null&&K.null,cn=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return fe(cn)(we)}}function fe(K){return B=K,J=0,K.length===0?P:m(K[J])}function m(K){return Qe;function Qe(we){return d=F(),ae=K,K.partial||(c.currentConstruct=K),K.name&&c.parser.constructs.disable.null.includes(K.name)?ve():K.tokenize.call(T?Object.assign(Object.create(c),T):c,s,pe,ve)(we)}}function pe(K){return A(ae,d),R}function ve(K){return d.restore(),++J<B.length?m(B[J]):P}}}function W(A,T){A.resolveAll&&!l.includes(A)&&l.push(A),A.resolve&&de(c.events,T,c.events.length-T,A.resolve(c.events.slice(T),c)),A.resolveTo&&(c.events=A.resolveTo(c.events,c))}function F(){const A=y(),T=c.previous,Q=c.currentConstruct,X=c.events.length,R=Array.from(a);return{from:X,restore:P};function P(){r=A,c.previous=T,c.currentConstruct=Q,c.events.length=X,a=R,U()}}function U(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pa(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function La(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
98
|
+
`;break}case-3:{o=`\r
|
|
99
|
+
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function _a(e){const r={constructs:Ql([Ta,...(e||{}).extensions||[]]),content:i(eo),defined:[],document:i(to),flow:i(wa),lazy:{},string:i(Ea),text:i(va)};return r;function i(l){return o;function o(a){return Aa(r,l,a)}}}function za(e){for(;!er(e););return e}const sr=/[\0\t\n\r]/g;function Na(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const s=[];let c,u,p,h,f;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),p=0,n="",t&&(l.charCodeAt(0)===65279&&p++,t=void 0);p<l.length;){if(sr.lastIndex=p,c=sr.exec(l),h=c&&c.index!==void 0?c.index:l.length,f=l.charCodeAt(h),!c){n=l.slice(p);break}if(f===10&&p===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),p<h&&(s.push(l.slice(p,h)),e+=h-p),f){case 0:{s.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,s.push(-2);e++<u;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}p=h+1}return a&&(r&&s.push(-5),n&&s.push(n),s.push(null)),s}}const Ma=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ra(e){return e.replace(Ma,Oa)}function Oa(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Wt(t.slice(l?2:1),l?16:10)}return _n(t)||e}const ur={}.hasOwnProperty;function Da(e,n,t){return typeof n!="string"&&(t=n,n=void 0),ja(t)(za(_a(t).document().write(Na()(e,n,!0))))}function ja(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Kr),autolinkProtocol:F,autolinkEmail:F,atxHeading:l($r),blockQuote:l(Ne),characterEscape:F,characterReference:F,codeFenced:l(cn),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(cn,o),codeText:l(fu,o),codeTextData:F,data:F,codeFlowValue:F,definition:l(pu),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(hu),hardBreakEscape:l(Jr),hardBreakTrailing:l(Jr),htmlFlow:l(Gr,o),htmlFlowData:F,htmlText:l(Gr,o),htmlTextData:F,image:l(du),label:o,link:l(Kr),listItem:l(mu),listItemValue:h,listOrdered:l(Zr,p),listUnordered:l(Zr),paragraph:l(gu),reference:m,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l($r),strong:l(yu),thematicBreak:l(ku)},exit:{atxHeading:s(),atxHeadingSequence:j,autolink:s(),autolinkEmail:ze,autolinkProtocol:we,blockQuote:s(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:K,characterReference:Qe,codeFenced:s(v),codeFencedFence:k,codeFencedFenceInfo:f,codeFencedFenceMeta:y,codeFlowValue:U,codeIndented:s(w),codeText:s(R),codeTextData:U,data:U,definition:s(),definitionDestinationString:M,definitionLabelString:C,definitionTitleString:E,emphasis:s(),hardBreakEscape:s(T),hardBreakTrailing:s(T),htmlFlow:s(Q),htmlFlowData:U,htmlText:s(X),htmlTextData:U,image:s(B),label:ae,labelText:J,lineEnding:A,link:s(P),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:pe,resourceDestinationString:d,resourceTitleString:ie,resource:fe,setextHeading:s(W),setextHeadingLineSequence:N,setextHeadingText:x,strong:s(),thematicBreak:s()}};cr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(g){let S={type:"root",children:[]};const _={stack:[S],tokenStack:[],config:n,enter:a,exit:c,buffer:o,resume:u,data:t},O=[];let H=-1;for(;++H<g.length;)if(g[H][1].type==="listOrdered"||g[H][1].type==="listUnordered")if(g[H][0]==="enter")O.push(H);else{const he=O.pop();H=i(g,he,H)}for(H=-1;++H<g.length;){const he=n[g[H][0]];ur.call(he,g[H][1].type)&&he[g[H][1].type].call(Object.assign({sliceSerialize:g[H][2].sliceSerialize},_),g[H][1])}if(_.tokenStack.length>0){const he=_.tokenStack[_.tokenStack.length-1];(he[1]||fr).call(_,void 0,he[0])}for(S.position={start:be(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:be(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H<n.transforms.length;)S=n.transforms[H](S)||S;return S}function i(g,S,_){let O=S-1,H=-1,he=!1,Ie,ye,Ye,Xe;for(;++O<=_;){const se=g[O];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?H++:H--,Xe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(Ie&&!Xe&&!H&&!Ye&&(Ye=O),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=void 0}if(!H&&se[0]==="enter"&&se[1].type==="listItemPrefix"||H===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(Ie){let Me=O;for(ye=void 0;Me--;){const xe=g[Me];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;ye&&(g[ye][1].type="lineEndingBlank",he=!0),xe[1].type="lineEnding",ye=Me}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}Ye&&(!ye||Ye<ye)&&(Ie._spread=!0),Ie.end=Object.assign({},ye?g[ye][1].start:se[1].end),g.splice(ye||O,0,["exit",Ie,se[2]]),O++,_++}if(se[1].type==="listItemPrefix"){const Me={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};Ie=Me,g.splice(O,0,["enter",Me,se[2]]),O++,_++,Ye=void 0,Xe=!0}}}return g[S][1]._spread=he,_}function l(g,S){return _;function _(O){a.call(this,g(O),O),S&&S.call(this,O)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(g,S,_){this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([S,_||void 0]),g.position={start:be(S.start),end:void 0}}function s(g){return S;function S(_){g&&g.call(this,_),c.call(this,_)}}function c(g,S){const _=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==g.type&&(S?S.call(this,g,O[0]):(O[1]||fr).call(this,g,O[0]));else throw new Error("Cannot close `"+g.type+"` ("+je({start:g.start,end:g.end})+"): it’s not open");_.position.end=be(g.end)}function u(){return ql(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(g){if(this.data.expectingFirstListItemValue){const S=this.stack[this.stack.length-2];S.start=Number.parseInt(this.sliceSerialize(g),10),this.data.expectingFirstListItemValue=void 0}}function f(){const g=this.resume(),S=this.stack[this.stack.length-1];S.lang=g}function y(){const g=this.resume(),S=this.stack[this.stack.length-1];S.meta=g}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const g=this.resume(),S=this.stack[this.stack.length-1];S.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const g=this.resume(),S=this.stack[this.stack.length-1];S.value=g.replace(/(\r?\n|\r)$/g,"")}function C(g){const S=this.resume(),_=this.stack[this.stack.length-1];_.label=S,_.identifier=Pe(this.sliceSerialize(g)).toLowerCase()}function E(){const g=this.resume(),S=this.stack[this.stack.length-1];S.title=g}function M(){const g=this.resume(),S=this.stack[this.stack.length-1];S.url=g}function j(g){const S=this.stack[this.stack.length-1];if(!S.depth){const _=this.sliceSerialize(g).length;S.depth=_}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function N(g){const S=this.stack[this.stack.length-1];S.depth=this.sliceSerialize(g).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function F(g){const _=this.stack[this.stack.length-1].children;let O=_[_.length-1];(!O||O.type!=="text")&&(O=xu(),O.position={start:be(g.start),end:void 0},_.push(O)),this.stack.push(O)}function U(g){const S=this.stack.pop();S.value+=this.sliceSerialize(g),S.position.end=be(g.end)}function A(g){const S=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _=S.children[S.children.length-1];_.position.end=be(g.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(S.type)&&(F.call(this,g),U.call(this,g))}function T(){this.data.atHardBreak=!0}function Q(){const g=this.resume(),S=this.stack[this.stack.length-1];S.value=g}function X(){const g=this.resume(),S=this.stack[this.stack.length-1];S.value=g}function R(){const g=this.resume(),S=this.stack[this.stack.length-1];S.value=g}function P(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=S,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function B(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const S=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=S,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function J(g){const S=this.sliceSerialize(g),_=this.stack[this.stack.length-2];_.label=Ra(S),_.identifier=Pe(S).toLowerCase()}function ae(){const g=this.stack[this.stack.length-1],S=this.resume(),_=this.stack[this.stack.length-1];if(this.data.inReference=!0,_.type==="link"){const O=g.children;_.children=O}else _.alt=S}function d(){const g=this.resume(),S=this.stack[this.stack.length-1];S.url=g}function ie(){const g=this.resume(),S=this.stack[this.stack.length-1];S.title=g}function fe(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function pe(g){const S=this.resume(),_=this.stack[this.stack.length-1];_.label=S,_.identifier=Pe(this.sliceSerialize(g)).toLowerCase(),this.data.referenceType="full"}function ve(g){this.data.characterReferenceType=g.type}function K(g){const S=this.sliceSerialize(g),_=this.data.characterReferenceType;let O;_?(O=Wt(S,_==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=_n(S);const H=this.stack[this.stack.length-1];H.value+=O}function Qe(g){const S=this.stack.pop();S.position.end=be(g.end)}function we(g){U.call(this,g);const S=this.stack[this.stack.length-1];S.url=this.sliceSerialize(g)}function ze(g){U.call(this,g);const S=this.stack[this.stack.length-1];S.url="mailto:"+this.sliceSerialize(g)}function Ne(){return{type:"blockquote",children:[]}}function cn(){return{type:"code",lang:null,meta:null,value:""}}function fu(){return{type:"inlineCode",value:""}}function pu(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function hu(){return{type:"emphasis",children:[]}}function $r(){return{type:"heading",depth:0,children:[]}}function Jr(){return{type:"break"}}function Gr(){return{type:"html",value:""}}function du(){return{type:"image",title:null,url:"",alt:null}}function Kr(){return{type:"link",title:null,url:"",children:[]}}function Zr(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function mu(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function gu(){return{type:"paragraph",children:[]}}function yu(){return{type:"strong",children:[]}}function xu(){return{type:"text",value:""}}function ku(){return{type:"thematicBreak"}}}function be(e){return{line:e.line,column:e.column,offset:e.offset}}function cr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?cr(e,r):Fa(e,r)}}function Fa(e,n){let t;for(t in n)if(ur.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function fr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+je({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+je({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+je({start:n.start,end:n.end})+") is still open")}function Ba(e){const n=this;n.parser=t;function t(r){return Da(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ua(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Ha(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
100
|
+
`}]}function Va(e,n){const t=n.value?n.value+`
|
|
101
|
+
`:"",r={};n.lang&&(r.className=["language-"+n.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function qa(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Wa(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Qa(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Le(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,c),e.applyData(n,c)}function Ya(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Xa(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function pr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function $a(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return pr(e,n);const i={src:Le(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function Ja(e,n){const t={src:Le(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Ga(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Ka(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return pr(e,n);const i={href:Le(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Za(e,n){const t={href:Le(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function es(e,n,t){const r=e.all(n),i=t?ns(t):hr(n),l={},o=[];if(typeof n.checked=="boolean"){const u=r[0];let p;u&&u.type==="element"&&u.tagName==="p"?p=u:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
102
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
103
|
+
`});const c={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,c),e.applyData(n,c)}function ns(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=hr(t[r])}return n}function hr(e){const n=e.spread;return n??e.children.length>1}function ts(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.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")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function rs(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function is(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ls(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function os(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=vn(n.children[1]),s=Nt(n.children[n.children.length-1]);a&&s&&(o.position={start:a,end:s}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function as(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let s=-1;const c=[];for(;++s<a;){const p=n.children[s],h={},f=o?o[s]:void 0;f&&(h.align=f);let y={type:"element",tagName:l,properties:h,children:[]};p&&(y.children=e.all(p),e.patch(p,y),y=e.applyData(p,y)),c.push(y)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(n,u),e.applyData(n,u)}function ss(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const dr=9,mr=32;function us(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(gr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(gr(n.slice(i),i>0,!1)),l.join("")}function gr(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===dr||l===mr;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===dr||l===mr;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function cs(e,n){const t={type:"text",value:us(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function fs(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const ps={blockquote:Ua,break:Ha,code:Va,delete:qa,emphasis:Wa,footnoteReference:Qa,heading:Ya,html:Xa,imageReference:$a,image:Ja,inlineCode:Ga,linkReference:Ka,link:Za,listItem:es,list:ts,paragraph:rs,root:is,strong:ls,table:os,tableCell:ss,tableRow:as,text:cs,thematicBreak:fs,toml:Ze,yaml:Ze,definition:Ze,footnoteDefinition:Ze};function Ze(){}const yr=-1,en=0,He=1,nn=2,Fn=3,Bn=4,Un=5,Hn=6,xr=7,kr=8,br=typeof self=="object"?self:globalThis,hs=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case en:case yr:return t(o,i);case He:{const a=t([],i);for(const s of o)a.push(r(s));return a}case nn:{const a=t({},i);for(const[s,c]of o)a[r(s)]=r(c);return a}case Fn:return t(new Date(o),i);case Bn:{const{source:a,flags:s}=o;return t(new RegExp(a,s),i)}case Un:{const a=t(new Map,i);for(const[s,c]of o)a.set(r(s),r(c));return a}case Hn:{const a=t(new Set,i);for(const s of o)a.add(r(s));return a}case xr:{const{name:a,message:s}=o;return t(new br[a](s),i)}case kr:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new br[l](o),i)};return r},wr=e=>hs(new Map,e)(0),_e="",{toString:ds}={},{keys:ms}=Object,Ve=e=>{const n=typeof e;if(n!=="object"||!e)return[en,n];const t=ds.call(e).slice(8,-1);switch(t){case"Array":return[He,_e];case"Object":return[nn,_e];case"Date":return[Fn,_e];case"RegExp":return[Bn,_e];case"Map":return[Un,_e];case"Set":return[Hn,_e];case"DataView":return[He,t]}return t.includes("Array")?[He,t]:t.includes("Error")?[xr,t]:[nn,t]},tn=([e,n])=>e===en&&(n==="function"||n==="symbol"),gs=(e,n,t,r)=>{const i=(o,a)=>{const s=r.push(o)-1;return t.set(a,s),s},l=o=>{if(t.has(o))return t.get(o);let[a,s]=Ve(o);switch(a){case en:{let u=o;switch(s){case"bigint":a=kr,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);u=null;break;case"undefined":return i([yr],o)}return i([a,u],o)}case He:{if(s){let h=o;return s==="DataView"?h=new Uint8Array(o.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(o)),i([s,[...h]],o)}const u=[],p=i([a,u],o);for(const h of o)u.push(l(h));return p}case nn:{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(n&&"toJSON"in o)return l(o.toJSON());const u=[],p=i([a,u],o);for(const h of ms(o))(e||!tn(Ve(o[h])))&&u.push([l(h),l(o[h])]);return p}case Fn:return i([a,o.toISOString()],o);case Bn:{const{source:u,flags:p}=o;return i([a,{source:u,flags:p}],o)}case Un:{const u=[],p=i([a,u],o);for(const[h,f]of o)(e||!(tn(Ve(h))||tn(Ve(f))))&&u.push([l(h),l(f)]);return p}case Hn:{const u=[],p=i([a,u],o);for(const h of o)(e||!tn(Ve(h)))&&u.push(l(h));return p}}const{message:c}=o;return i([a,{name:s,message:c}],o)};return l},Sr=(e,{json:n,lossy:t}={})=>{const r=[];return gs(!(n||t),!!n,new Map,r)(e),r},rn=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?wr(Sr(e,n)):structuredClone(e):(e,n)=>wr(Sr(e,n));function ys(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function xs(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function ks(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||ys,r=e.options.footnoteBackLabel||xs,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[s]);if(!c)continue;const u=e.all(c),p=String(c.identifier).toUpperCase(),h=Le(p.toLowerCase());let f=0;const y=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++f<=k;){y.length>0&&y.push({type:"text",value:" "});let C=typeof t=="string"?t:t(s,f);typeof C=="string"&&(C={type:"text",value:C}),y.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,f),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const C=v.children[v.children.length-1];C&&C.type==="text"?C.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...y)}else u.push(...y);const w={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,w),a.push(w)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...rn(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
104
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
105
|
+
`}]}}const Cr=function(e){if(e==null)return Cs;if(typeof e=="function")return ln(e);if(typeof e=="object")return Array.isArray(e)?bs(e):ws(e);if(typeof e=="string")return Ss(e);throw new Error("Expected function, string, or object as test")};function bs(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Cr(e[t]);return ln(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function ws(e){const n=e;return ln(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function Ss(e){return ln(n);function n(t){return t&&t.type===e}}function ln(e){return n;function n(t,r,i){return!!(Es(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Cs(){return!0}function Es(e){return e!==null&&typeof e=="object"&&"type"in e}function _u(e){return e}const Er=[],vs=!0,vr=!1,Is="skip";function Ts(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=Cr(i),o=r?-1:1;a(e,void 0,[])();function a(s,c,u){const p=s&&typeof s=="object"?s:{};if(typeof p.type=="string"){const f=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=Er,y,k,v;if((!n||l(s,c,u[u.length-1]||void 0))&&(f=As(t(s,u)),f[0]===vr))return f;if("children"in s&&s.children){const w=s;if(w.children&&f[0]!==Is)for(k=(r?w.children.length:-1)+o,v=u.concat(w);k>-1&&k<w.children.length;){const C=w.children[k];if(y=a(C,k,v)(),y[0]===vr)return y;k=typeof y[1]=="number"?y[1]:k+o}}return f}}}function As(e){return Array.isArray(e)?e:typeof e=="number"?[vs,e]:e==null?Er:[e]}function Ir(e,n,t,r){let i,l,o;typeof n=="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),Ts(e,l,a,i);function a(s,c){const u=c[c.length-1],p=u?u.children.indexOf(s):void 0;return o(s,p,u)}}const Vn={}.hasOwnProperty,Ps={};function Ls(e,n){const t=n||Ps,r=new Map,i=new Map,l=new Map,o={...ps,...t.handlers},a={all:c,applyData:zs,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:s,options:t,patch:_s,wrap:Ms};return Ir(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const p=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();p.has(h)||p.set(h,u)}}),a;function s(u,p){const h=u.type,f=a.handlers[h];if(Vn.call(a.handlers,h)&&f)return f(a,u,p);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:k,...v}=u,w=rn(v);return w.children=a.all(u),w}return rn(u)}return(a.options.unknownHandler||Ns)(a,u,p)}function c(u){const p=[];if("children"in u){const h=u.children;let f=-1;for(;++f<h.length;){const y=a.one(h[f],u);if(y){if(f&&h[f-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Tr(y.value)),!Array.isArray(y)&&y.type==="element")){const k=y.children[0];k&&k.type==="text"&&(k.value=Tr(k.value))}Array.isArray(y)?p.push(...y):p.push(y)}}}return p}}function _s(e,n){e.position&&(n.position=Sl(e))}function zs(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&l&&Object.assign(t.properties,rn(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Ns(e,n){const t=n.data||{},r="value"in n&&!(Vn.call(t,"hProperties")||Vn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Ms(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
106
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
107
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
108
|
+
`}),t}function Tr(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Ar(e,n){const t=Ls(e,n),r=t.one(e,void 0),i=ks(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
109
|
+
`},i),l}function Rs(e,n){return e&&"run"in e?async function(t,r){const i=Ar(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Ar(t,{file:r,...e||n})}}function Pr(e){if(e)throw e}var on=Object.prototype.hasOwnProperty,Lr=Object.prototype.toString,_r=Object.defineProperty,zr=Object.getOwnPropertyDescriptor,Nr=function(n){return typeof Array.isArray=="function"?Array.isArray(n):Lr.call(n)==="[object Array]"},Mr=function(n){if(!n||Lr.call(n)!=="[object Object]")return!1;var t=on.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&on.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||on.call(n,i)},Rr=function(n,t){_r&&t.name==="__proto__"?_r(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},Or=function(n,t){if(t==="__proto__")if(on.call(n,t)){if(zr)return zr(n,t).value}else return;return n[t]},Os=function e(){var n,t,r,i,l,o,a=arguments[0],s=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},s=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});s<c;++s)if(n=arguments[s],n!=null)for(t in n)r=Or(a,t),i=Or(n,t),a!==i&&(u&&i&&(Mr(i)||(l=Nr(i)))?(l?(l=!1,o=r&&Nr(r)?r:[]):o=r&&Mr(r)?r:{},Rr(a,{name:t,newValue:e(u,o,i)})):typeof i<"u"&&Rr(a,{name:t,newValue:i}));return a};const qn=fn(Os);function Wn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ds(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(s,...c){const u=e[++l];let p=-1;if(s){o(s);return}for(;++p<i.length;)(c[p]===null||c[p]===void 0)&&(c[p]=i[p]);i=c,u?js(u,a)(...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),n}}function js(e,n){let t;return r;function r(...o){const a=e.length>o.length;let s;a&&o.push(i);try{s=e.apply(this,o)}catch(c){const u=c;if(a&&t)throw u;return i(u)}a||(s&&s.then&&typeof s.then=="function"?s.then(l,i):s instanceof Error?i(s):l(s))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}const ge={basename:Fs,dirname:Bs,extname:Us,join:Hs,sep:"/"};function Fs(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');qe(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Bs(e){if(qe(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Us(e){qe(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Hs(...e){let n=-1,t;for(;++n<e.length;)qe(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Vs(t)}function Vs(e){qe(e);const n=e.codePointAt(0)===47;let t=qs(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function qs(e,n){let t="",r=0,i=-1,l=0,o=-1,a,s;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function qe(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ws={cwd:Qs};function Qs(){return"/"}function Qn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ys(e){if(typeof e=="string")e=new URL(e);else if(!Qn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Xs(e)}function Xs(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const Yn=["history","path","basename","stem","extname","dirname"];class Dr{constructor(n){let t;n?Qn(n)?t={path:n}:typeof n=="string"||$s(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Ws.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Yn.length;){const l=Yn[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)Yn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ge.basename(this.path):void 0}set basename(n){$n(n,"basename"),Xn(n,"basename"),this.path=ge.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ge.dirname(this.path):void 0}set dirname(n){jr(this.basename,"dirname"),this.path=ge.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ge.extname(this.path):void 0}set extname(n){if(Xn(n,"extname"),jr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ge.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Qn(n)&&(n=Ys(n)),$n(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ge.basename(this.path,this.extname):void 0}set stem(n){$n(n,"stem"),Xn(n,"stem"),this.path=ge.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new Z(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Xn(e,n){if(e&&e.includes(ge.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ge.sep+"`")}function $n(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function jr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function $s(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Js=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},Gs={}.hasOwnProperty;class Jn extends Js{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=Ds()}copy(){const n=new Jn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(qn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Zn("data",this.frozen),this.namespace[n]=t,this):Gs.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Zn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=an(n),r=this.parser||this.Parser;return Gn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Gn("process",this.parser||this.Parser),Kn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=an(n),s=r.parse(a);r.run(s,a,function(u,p,h){if(u||!p||!h)return c(u);const f=p,y=r.stringify(f,h);eu(y)?h.value=y:h.result=y,c(u,h)});function c(u,p){u||!p?o(u):l?l(p):t(void 0,p)}}}processSync(n){let t=!1,r;return this.freeze(),Gn("processSync",this.parser||this.Parser),Kn("processSync",this.compiler||this.Compiler),this.process(n,i),Br("processSync","process",t),r;function i(l,o){t=!0,Pr(l),r=o}}run(n,t,r){Fr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const s=an(t);i.run(n,s,c);function c(u,p,h){const f=p||n;u?a(u):o?o(f):r(void 0,f,h)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Br("runSync","run",r),i;function l(o,a){Pr(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=an(t),i=this.compiler||this.Compiler;return Kn("stringify",i),Fr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Zn("use",this.frozen),n!=null)if(typeof n=="function")s(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(c){if(typeof c=="function")s(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...p]=c;s(u,p)}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");a(c.plugins),c.settings&&(i.settings=qn(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const p=c[u];l(p)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function s(c,u){let p=-1,h=-1;for(;++p<r.length;)if(r[p][0]===c){h=p;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...y]=u;const k=r[h][1];Wn(k)&&Wn(f)&&(f=qn(!0,k,f)),r[h]=[c,f,...y]}}}}const Ks=new Jn().freeze();function Gn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Kn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Fr(e){if(!Wn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Br(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function an(e){return Zs(e)?e:new Dr(e)}function Zs(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eu(e){return typeof e=="string"||nu(e)}function nu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ur=[],Hr={allowDangerousHtml:!0},ru=/^(https?|ircs?|mailto|xmpp)$/i,iu=[{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 lu(e){const n=ou(e),t=au(e);return su(n.runSync(n.parse(t),t),e)}function ou(e){const n=e.rehypePlugins||Ur,t=e.remarkPlugins||Ur,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Hr}:Hr;return Ks().use(Ba).use(t).use(Rs,r).use(n)}function au(e){const n=e.children||"",t=new Dr;return typeof n=="string"&&(t.value=n),t}function su(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,s=n.urlTransform||uu;for(const u of iu)Object.hasOwn(n,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+tu+u.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),Ir(e,c),Tl(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function c(u,p,h){if(u.type==="raw"&&h&&typeof p=="number")return o?h.children.splice(p,1):h.children[p]={type:"text",value:u.value},p;if(u.type==="element"){let f;for(f in Ln)if(Object.hasOwn(Ln,f)&&Object.hasOwn(u.properties,f)){const y=u.properties[f],k=Ln[f];(k===null||k.includes(u.tagName))&&(u.properties[f]=s(String(y||""),f,u))}}if(u.type==="element"){let f=t?!t.includes(u.tagName):l?l.includes(u.tagName):!1;if(!f&&r&&typeof p=="number"&&(f=!r(u,p,h)),f&&h&&typeof p=="number")return a&&u.children?h.children.splice(p,1,...u.children):h.children.splice(p,1),p}}}function uu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||ru.test(e.slice(0,n))?e:""}function Vr(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(t=Vr(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function We(){for(var e,n,t=0,r="",i=arguments.length;t<i;t++)(e=arguments[t])&&(n=Vr(e))&&(r&&(r+=" "),r+=n);return r}const qr={primary:"#2C3E50",secondary:"#f97316",background:"#ffffff",text:{primary:"#1a1a1a",secondary:"#666666",inverse:"#ffffff"},input:{background:"#f9fafb",border:"#e5e7eb"},message:{user:"#2C3E50",assistant:"#ffffff",userText:"#ffffff"},suggestedQuestions:{background:"#fff7ed",hoverBackground:"#ffedd5",text:"#2C3E50"},iconColor:"#f97316"},Ee={welcome:{title:"Welcome to Our Help Center!",description:"I'm here to help you with any questions you might have."},suggestedQuestions:[{text:"How can I help you today?",query:"What services do you offer?"},{text:"Contact information",query:"What are your contact details?"}],header:{title:"Help Center"},theme:qr,icon:"message-square"},Wr=()=>{var e;return typeof window<"u"&&((e=window.ChatbotWidget)!=null&&e._latestConfig)?window.ChatbotWidget._latestConfig:Ee},cu=e=>I.jsx("a",{...e,target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-700 underline",children:e.children}),et=({iconName:e,size:n,className:t,style:r})=>{switch(e){case"heart":return I.jsx(oi,{size:n,className:t,style:r});case"message-circle":return I.jsx(ui,{size:n,className:t,style:r});case"help-circle":return I.jsx(ai,{size:n,className:t,style:r});case"info":return I.jsx(si,{size:n,className:t,style:r});case"bot":return I.jsx(ri,{size:n,className:t,style:r});case"sparkles":return I.jsx(pi,{size:n,className:t,style:r});case"message-square":default:return I.jsx(ci,{size:n,className:t,style:r})}},sn=e=>{const[n,t]=Y.useState(!1),[r,i]=Y.useState(""),[l,o]=Y.useState(!1),[a,s]=Y.useState(!1),c=Y.useRef(null),u=Y.useRef(null),p=500,h=Y.useRef(null),[f,y]=Y.useState(!1),k=Wr(),[v,w]=Y.useState({...k,...e}),C=v.theme||qr;Y.useEffect(()=>{const P=B=>{w(B.detail)};return window.addEventListener("chatbot-config-update",P),()=>{window.removeEventListener("chatbot-config-update",P)}},[]),Y.useEffect(()=>{e&&w(P=>({...P,...e}))},[e]);const{messages:E,isLoading:M,sendMessage:j,clearMessages:x}=yn(),N=()=>{t(!n),n||o(!1)},W=()=>{r.trim()&&!M&&(j(r),i(""))},F=P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),W())},U=P=>{navigator.clipboard.writeText(P)},A=P=>{const B=/(https?:\/\/[^\s]+?)([.,;:!?)]*)(?=\s|$)/g;return P.replace(B,(d,ie,fe)=>`[${ie}](${ie})${fe}`).replace(/\n{2,}/g,`
|
|
110
|
+
|
|
111
|
+
`).replace(/\n/g,`
|
|
112
|
+
`)},T=P=>P.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),Q=()=>{if(h.current){const{scrollTop:P}=h.current;y(P>200)}},X=()=>{h.current&&h.current.scrollTo({top:0,behavior:"smooth"})};Y.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth"}),!n&&E.length>0&&E[E.length-1].role==="assistant"&&o(!0)},[E,n]),Y.useEffect(()=>{n&&u.current&&u.current.focus()},[n]);const R=P=>{const B=P.target.value;B.length<=p&&i(B)};return I.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col items-end",children:[n&&I.jsxs("div",{className:"mb-4 w-96 sm:w-[500px] md:w-[600px] rounded-xl shadow-xl flex flex-col overflow-hidden border border-gray-200 transition-all duration-300 ease-in-out h-[500px]",style:{background:C.background,maxHeight:"var(--chat-container-height, 500px)"},children:[I.jsxs("div",{className:"p-3 flex justify-between items-center shrink-0",style:{background:C.primary,color:C.text.inverse},children:[I.jsxs("div",{className:"flex items-center",children:[I.jsx(et,{iconName:v.icon,size:28,className:"mr-2",style:{color:C.secondary}}),I.jsx("h3",{className:"font-medium",children:v.header.title})]}),I.jsxs("div",{className:"flex items-center space-x-2",children:[I.jsx("button",{onClick:()=>x(),className:"transition-colors p-1 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:C.text.inverse},"aria-label":"Clear conversation",title:"Clear conversation",children:I.jsx(hi,{size:18})}),I.jsx("button",{onClick:N,className:"transition-colors p-1 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:C.text.inverse},"aria-label":"Minimize chat",children:I.jsx(lt,{size:18})})]})]}),I.jsxs("div",{ref:h,className:"flex-1 p-3 overflow-y-auto h-full scroll-smooth",style:{background:C.input.background,overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${C.secondary} transparent`},onScroll:Q,children:[f&&I.jsx("button",{onClick:X,className:"sticky top-2 left-[calc(100%-40px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:C.primary,color:C.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:I.jsx(ii,{size:18})}),E.length===0?I.jsxs("div",{className:"text-center py-8",children:[I.jsx(et,{iconName:v.icon,size:40,className:"mx-auto mb-3",style:{color:C.iconColor}}),I.jsx("h4",{className:"font-medium text-[#2C3E50] mb-1",children:v.welcome.title}),I.jsx("p",{className:"text-sm text-gray-600 mb-4",children:v.welcome.description}),I.jsx("div",{className:"space-y-2",children:v.suggestedQuestions.map((P,B)=>I.jsx("button",{onClick:()=>j(P.query),className:"w-full text-left text-sm p-2 rounded-lg transition-colors",style:{backgroundColor:C.suggestedQuestions.background,color:C.suggestedQuestions.text},onMouseEnter:J=>{J.currentTarget.style.backgroundColor=C.suggestedQuestions.hoverBackground},onMouseLeave:J=>{J.currentTarget.style.backgroundColor=C.suggestedQuestions.background},children:P.text},B))})]}):I.jsxs("div",{className:"space-y-4",children:[E.map((P,B)=>{const J=new Date;return J.setMinutes(J.getMinutes()-(E.length-B)),I.jsx("div",{className:We("flex",P.role==="user"?"justify-end":"justify-start"),children:I.jsxs("div",{className:We("max-w-[85%] rounded-xl p-3 shadow-sm",P.role==="user"?"rounded-tr-none":"rounded-tl-none"),style:{background:P.role==="user"?C.message.user:C.message.assistant,color:P.role==="user"?C.message.userText:C.text.primary,border:P.role==="assistant"?`1px solid ${C.input.border}`:"none"},children:[P.role==="assistant"&&I.jsx("div",{className:"prose prose-sm max-w-none whitespace-pre-line",children:I.jsx(lu,{components:{a:ae=>I.jsx(cu,{...ae}),p:({node:ae,...d})=>I.jsx("p",{className:"mb-4",...d})},children:A(P.content)})}),P.role==="user"&&I.jsx("p",{children:P.content}),I.jsxs("div",{className:We("flex text-xs mt-1",P.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[I.jsx("span",{children:T(J)}),P.role==="assistant"&&I.jsx("button",{onClick:()=>U(P.content),className:"text-gray-400 hover:text-gray-600 transition-colors ml-2","aria-label":"Copy to clipboard",children:I.jsx(li,{size:14})})]})]})},B)}),M&&I.jsx("div",{className:"flex justify-start",children:I.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-3 shadow-sm",children:I.jsxs("div",{className:"flex space-x-2",children:[I.jsx("div",{className:"h-2 w-2 bg-orange-500 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),I.jsx("div",{className:"h-2 w-2 bg-orange-500 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),I.jsx("div",{className:"h-2 w-2 bg-orange-500 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),I.jsx("div",{ref:c})]})]}),I.jsx("div",{className:"p-3 border-t bg-white shrink-0",style:{borderColor:C.input.border,background:C.background},children:I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsxs("div",{className:"flex-1 relative",children:[I.jsx("textarea",{ref:u,value:r,onChange:R,onKeyDown:F,placeholder:"Type your message...",maxLength:p,className:"w-full resize-none border rounded-lg focus:outline-none focus:ring-2",style:{background:C.input.background,borderColor:C.input.border,color:C.text.primary,"--tw-ring-color":C.secondary,lineHeight:"20px",padding:"8px 12px",height:"40px",minHeight:"40px",boxSizing:"border-box"}}),r.length>0&&I.jsxs("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:r.length>=p*.9?"#ef4444":"#6b7280",fontSize:"0.7rem"},children:[r.length,"/",p]})]}),I.jsx("button",{onClick:W,disabled:!r.trim()||M,className:We("rounded-lg transition-all duration-200 flex items-center justify-center shrink-0",r.trim()&&!M?"text-white hover:shadow-md transform hover:-translate-y-0.5":"bg-gray-200 text-gray-400 cursor-not-allowed"),style:{backgroundColor:r.trim()&&!M?C.secondary:void 0,height:"40px",width:"44px",display:"flex",alignItems:"center",justifyContent:"center"},"aria-label":"Send message",children:I.jsx(fi,{size:24})})]})})]}),I.jsxs("div",{className:"relative",children:[l&&!n&&I.jsx("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-orange-500 rounded-full animate-pulse z-10"}),I.jsx("button",{onClick:N,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),className:We("rounded-full p-3 shadow-lg flex items-center justify-center transition-all duration-300",a&&!n&&"animate-pulse"),style:{backgroundColor:C.primary,color:C.text.inverse},"aria-label":n?"Minimize chat":"Open chat",children:n?I.jsx(lt,{size:32,className:"text-white",style:{opacity:.9}}):I.jsx(et,{iconName:"message-square",size:32,className:"text-white"})})]})]})};let un=null,G=null;function Qr(){if(!un)if(typeof window<"u"&&window.CHATBOT_API_URL)un=window.CHATBOT_API_URL;else throw new Error("API URL not set. Call setApiUrl or use injectChatWidget to configure the API URL.");return un}function nt(e){un=e,typeof window<"u"&&(window.CHATBOT_API_URL=e,dt(e))}function Yr(e){typeof window>"u"||(G={...Ee,...G,...e,header:{...Ee.header,...G==null?void 0:G.header,...e.header},welcome:{...Ee.welcome,...G==null?void 0:G.welcome,...e.welcome},suggestedQuestions:e.suggestedQuestions||(G==null?void 0:G.suggestedQuestions)||Ee.suggestedQuestions,theme:{...Ee.theme,...G==null?void 0:G.theme,...e.theme}},window.dispatchEvent(new CustomEvent("chatbot-config-update",{detail:G})))}function tt(e){if(typeof window>"u")return;nt(e.apiUrl),e.widgetConfig&&(G={...Ee,...e.widgetConfig});function n(){try{if(!React||!ReactDOM){console.log("React or ReactDOM not available yet, retrying in 100ms..."),setTimeout(n,100);return}const t=e.containerSelector?document.querySelector(e.containerSelector):document.createElement("div");if(!t){console.error(`Container with selector "${e.containerSelector}" not found`);return}e.containerSelector||(t.id="chatbot-widget-container",document.body.appendChild(t)),ReactDOM.createRoot(t).render(React.createElement(sn,G)),console.log("Chatbot widget initialized successfully!")}catch(t){console.error("Error initializing chatbot widget:",t)}}setTimeout(n,100)}typeof window<"u"&&(window.initChatbotWidget=tt,window.ChatbotWidget={ChatWidget:sn,useChatStore:yn,injectChatWidget:tt,setApiUrl:nt,getApiUrl:Qr,updateWidgetConfig:Yr},console.log("Chatbot widget loaded."));const Xr=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));ee.ChatWidget=sn,ee.default=sn,ee.getApiUrl=Qr,ee.getChatConfig=Wr,ee.injectChatWidget=tt,ee.setApiUrl=nt,ee.updateWidgetConfig=Yr,ee.useChatStore=yn,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
113
|
+
//# sourceMappingURL=chatbot-widget.umd.js.map
|